]> rtime.felk.cvut.cz Git - sojka/lightdm.git/blob - src/display-server.h
Merge in X module renaming changes
[sojka/lightdm.git] / src / display-server.h
1 /*
2  * Copyright (C) 2010-2011 Robert Ancell.
3  * Author: Robert Ancell <robert.ancell@canonical.com>
4  * 
5  * This program is free software: you can redistribute it and/or modify it under
6  * the terms of the GNU General Public License as published by the Free Software
7  * Foundation, either version 3 of the License, or (at your option) any later
8  * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
9  * license.
10  */
11
12 #ifndef DISPLAY_SERVER_H_
13 #define DISPLAY_SERVER_H_
14
15 #include <glib-object.h>
16
17 typedef struct DisplayServer DisplayServer;
18
19 #include "session.h"
20
21 G_BEGIN_DECLS
22
23 #define DISPLAY_SERVER_TYPE (display_server_get_type())
24 #define DISPLAY_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DISPLAY_SERVER_TYPE, DisplayServer))
25 #define DISPLAY_SERVER_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), DISPLAY_SERVER_TYPE, DisplayServerClass))
26 #define DISPLAY_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DISPLAY_SERVER_TYPE, DisplayServerClass))
27
28 typedef struct DisplayServerPrivate DisplayServerPrivate;
29
30 struct DisplayServer
31 {
32     GObject               parent_instance;
33     DisplayServerPrivate *priv;
34 };
35
36 typedef struct
37 {
38     GObjectClass parent_class;
39
40     void (*ready)(DisplayServer *server);
41     void (*stopped)(DisplayServer *server);
42
43     gint (*get_vt)(DisplayServer *server);
44     gboolean (*start)(DisplayServer *server);
45     void (*setup_session)(DisplayServer *server, Session *session);
46     void (*stop)(DisplayServer *server);
47 } DisplayServerClass;
48
49 GType display_server_get_type (void);
50
51 void display_server_set_name (DisplayServer *server, const gchar *name);
52
53 const gchar *display_server_get_name (DisplayServer *server);
54
55 gint display_server_get_vt (DisplayServer *server);
56
57 gboolean display_server_start (DisplayServer *server);
58
59 void display_server_setup_session (DisplayServer *server, Session *session);
60
61 void display_server_stop (DisplayServer *server);
62
63 gboolean display_server_get_is_stopping (DisplayServer *server);
64
65 G_END_DECLS
66
67 #endif /* DISPLAY_SERVER_H_ */