2
* Fast User Switch Applet: fusa-manager.h
4
* Copyright (C) 2005 James M. Cape <jcape@ignore-your.tv>.
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 of the License, or
9
* (at your option) any later version.
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 02111-1307 USA
22
* Singleton object to manage FusaDisplay and FusaUser objects, and handle GDM
23
* interaction/configs.
26
#ifndef __FUSA_MANAGER_H__
27
#define __FUSA_MANAGER_H__ 1
29
#include <gdk/gdkscreen.h>
31
#include "fusa-display.h"
32
#include "fusa-user.h"
36
#define FUSA_TYPE_MANAGER \
37
(fusa_manager_get_type ())
38
#define FUSA_MANAGER(object) \
39
(G_TYPE_CHECK_INSTANCE_CAST ((object), FUSA_TYPE_MANAGER, FusaManager))
40
#define FUSA_IS_MANAGER(object) \
41
(G_TYPE_CHECK_INSTANCE_TYPE ((object), FUSA_TYPE_MANAGER))
43
#define FUSA_MANAGER_DM_ERROR \
44
(fusa_manager_dm_error_get_quark ())
46
#define FUSA_MANAGER_SIGNAL_USER_ADDED \
48
#define FUSA_MANAGER_SIGNAL_USER_REMOVED \
50
#define FUSA_MANAGER_SIGNAL_DISPLAY_ADDED \
52
#define FUSA_MANAGER_SIGNAL_DISPLAY_REMOVED \
58
FUSA_MANAGER_DM_ERROR_UNKNOWN = -1,
59
FUSA_MANAGER_DM_ERROR_NOT_RUNNING = 0,
60
FUSA_MANAGER_DM_ERROR_FLEXI_LIMIT_REACHED = 1,
61
FUSA_MANAGER_DM_ERROR_X_ERROR = 2,
62
FUSA_MANAGER_DM_ERROR_X_FAILED = 3,
63
FUSA_MANAGER_DM_ERROR_X_LIMIT_REACHED = 4,
64
FUSA_MANAGER_DM_ERROR_XNEST_AUTH_ERROR = 5,
65
FUSA_MANAGER_DM_ERROR_X_NOT_FOUND = 6,
66
FUSA_MANAGER_DM_ERROR_LOGOUT_ACTION = 7,
67
FUSA_MANAGER_DM_ERROR_CONSOLES_UNSUPPORTED = 8,
68
FUSA_MANAGER_DM_ERROR_INVALID_CONSOLE = 9,
69
FUSA_MANAGER_DM_ERROR_UNKNOWN_CONFIG = 50,
70
FUSA_MANAGER_DM_ERROR_PERMISSIONS = 100,
71
FUSA_MANAGER_DM_ERROR_TOO_MANY_MESSAGES = 200,
72
FUSA_MANAGER_DM_ERROR_OTHER = -2
76
typedef struct _FusaManager FusaManager;
78
typedef void (*FusaManagerDisplayCallback) (FusaManager *manager,
83
GType fusa_manager_get_type (void) G_GNUC_CONST;
85
FusaManager *fusa_manager_ref_default (void);
88
GSList *fusa_manager_list_users (FusaManager *manager);
89
FusaUser *fusa_manager_get_user (FusaManager *manager,
91
FusaUser *fusa_manager_get_user_by_uid (FusaManager *manager,
95
GSList *fusa_manager_list_displays (FusaManager *manager);
96
FusaDisplay *fusa_manager_get_display (FusaManager *manager,
98
FusaDisplay *fusa_manager_get_display_by_screen (FusaManager *manager,
102
void fusa_manager_activate_display (FusaManager *manager,
103
FusaDisplay *display,
105
FusaManagerDisplayCallback func,
107
GDestroyNotify notify);
108
void fusa_manager_new_console (FusaManager *manager,
110
FusaManagerDisplayCallback func,
112
GDestroyNotify notify);
113
void fusa_manager_new_xnest (FusaManager *manager,
115
FusaManagerDisplayCallback func,
117
GDestroyNotify notify);
120
GQuark fusa_manager_dm_error_get_quark (void) G_GNUC_CONST;
124
#endif /* !__FUSA_MANAGER_H__ */