1
/* $Id: xfsm-splash-engine.h 4711 2004-11-01 16:10:55Z benny $ */
3
* Copyright (c) 2003-2004 Benedikt Meurer <benny@xfce.org>
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2, or (at your option)
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22
#ifndef __XFSM_SPLASH_ENGINE_H__
23
#define __XFSM_SPLASH_ENGINE_H__
29
#include <libxfsm/xfsm-splash-rc.h>
32
#define XFSM_CHOOSE_LOGOUT 0
33
#define XFSM_CHOOSE_LOAD 1
34
#define XFSM_CHOOSE_NEW 2
37
typedef struct _XfsmSplashEngine XfsmSplashEngine;
38
typedef struct _XfsmSplashConfig XfsmSplashConfig;
39
typedef struct _XfsmSessionInfo XfsmSessionInfo;
42
struct _XfsmSplashEngine
44
/* provided by the session manager */
46
GdkScreen *primary_screen;
50
/* to be filled in by the engine */
53
/* load config from rc and display the splash window */
54
void (*setup) (XfsmSplashEngine *engine,
57
/* tells the engine that the session will start now, where
58
steps is the approx. number of apps started in the session,
59
name is the name of the session and the preview at 52x42
61
void (*start) (XfsmSplashEngine *engine,
66
/* place, run, hide the dialog and return the result of the run.
67
override on demand (OPTIONAL) */
68
int (*run) (XfsmSplashEngine *engine,
71
/* display the text (OPTIONAL) */
72
void (*next) (XfsmSplashEngine *engine,
75
/* choose a session (OPTIONAL), should return XFSM_CHOOSE_* */
76
int (*choose) (XfsmSplashEngine *engine,
78
const gchar *default_session,
81
void (*destroy) (XfsmSplashEngine *engine);
83
gpointer _reserved[8];
87
struct _XfsmSplashConfig
89
/* provided by the session manager */
93
/* to be filled in by the config (freed by the session manager) */
100
/* config internals (config is responsible for freeing during destroy) */
103
/* generate preview for engine, should be 320x240! (OPTIONAL) */
104
GdkPixbuf *(*preview) (XfsmSplashConfig *config);
106
/* display a configuration dialog (OPTIONAL) */
107
void (*configure) (XfsmSplashConfig *config,
110
void (*destroy) (XfsmSplashConfig *config);
112
gpointer _reserved[8];
116
struct _XfsmSessionInfo
118
gchar *name; /* name of the session */
119
time_t atime; /* last access time */
120
GdkPixbuf *preview; /* preview icon (52x42) */
124
#endif /* !__XFSM_SPLASH_ENGINE_H__ */