]> rtime.felk.cvut.cz Git - sojka/lightdm.git/blob - src/display-manager.h
Releasing 1.20.0
[sojka/lightdm.git] / src / display-manager.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_MANAGER_H_
13 #define DISPLAY_MANAGER_H_
14
15 #include <glib-object.h>
16
17 #include "seat.h"
18
19 G_BEGIN_DECLS
20
21 #define DISPLAY_MANAGER_TYPE (display_manager_get_type())
22 #define DISPLAY_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DISPLAY_MANAGER_TYPE, DisplayManager));
23
24 #define DISPLAY_MANAGER_SIGNAL_SEAT_ADDED   "seat-added"
25 #define DISPLAY_MANAGER_SIGNAL_SEAT_REMOVED "seat-removed"
26 #define DISPLAY_MANAGER_SIGNAL_STOPPED      "stopped"
27
28 typedef struct DisplayManagerPrivate DisplayManagerPrivate;
29
30 typedef struct
31 {
32     GObject         parent_instance;
33     DisplayManagerPrivate *priv;
34 } DisplayManager;
35
36 typedef struct
37 {
38     GObjectClass parent_class;
39
40     void (*seat_added)(DisplayManager *manager, Seat *seat);
41     void (*seat_removed)(DisplayManager *manager, Seat *seat);
42     void (*stopped)(DisplayManager *manager);
43 } DisplayManagerClass;
44
45 GType display_manager_get_type (void);
46
47 DisplayManager *display_manager_new (void);
48
49 gboolean display_manager_add_seat (DisplayManager *manager, Seat *seat);
50
51 GList *display_manager_get_seats (DisplayManager *manager);
52
53 Seat *display_manager_get_seat (DisplayManager *manager, const gchar *name);
54
55 void display_manager_start (DisplayManager *manager);
56
57 void display_manager_stop (DisplayManager *manager);
58
59 G_END_DECLS
60
61 #endif /* DISPLAY_MANAGER_H_ */