]> rtime.felk.cvut.cz Git - sojka/lightdm.git/blob - src/seat.h
move where we insert our own utility PATH
[sojka/lightdm.git] / src / seat.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 _SEAT_H_
13 #define _SEAT_H_
14
15 #include <glib-object.h>
16 #include "display.h"
17
18 G_BEGIN_DECLS
19
20 #define SEAT_TYPE           (seat_get_type())
21 #define SEAT(obj)           (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAT_TYPE, Seat))
22 #define SEAT_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), SEAT_TYPE, SeatClass))
23 #define SEAT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAT_TYPE, SeatClass))
24
25 typedef struct SeatPrivate SeatPrivate;
26
27 typedef struct
28 {
29     GObject         parent_instance;
30     SeatPrivate *priv;
31 } Seat;
32
33 typedef struct
34 {
35     GObjectClass parent_class;
36
37     void (*setup)(Seat *seat);    
38     gboolean (*start)(Seat *seat);
39     Display *(*add_display)(Seat *seat);
40     void (*set_active_display)(Seat *seat, Display *display);
41     void (*stop)(Seat *seat);
42
43     void (*started)(Seat *seat);
44     void (*display_added)(Seat *seat, Display *display);
45     void (*display_removed)(Seat *seat, Display *display);
46     void (*stopped)(Seat *seat);
47 } SeatClass;
48
49 GType seat_get_type (void);
50
51 void seat_register_module (const gchar *name, GType type);
52
53 Seat *seat_new (const gchar *module, const gchar *config_section);
54
55 const gchar *seat_get_config_section (Seat *seat);
56
57 void seat_set_can_switch (Seat *seat, gboolean can_switch);
58
59 gboolean seat_start (Seat *seat);
60
61 GList *seat_get_displays (Seat *seat);
62
63 void seat_set_active_display (Seat *seat, Display *display);
64
65 Display *seat_get_active_display (Seat *seat);
66
67 gboolean seat_get_can_switch (Seat *seat);
68
69 gboolean seat_get_allow_guest (Seat *seat);
70
71 gboolean seat_switch_to_greeter (Seat *seat);
72
73 gboolean seat_switch_to_user (Seat *seat, const gchar *username, const gchar *session_name);
74
75 gboolean seat_switch_to_guest (Seat *seat, const gchar *session_name);
76
77 void seat_stop (Seat *seat);
78
79 G_END_DECLS
80
81 #endif /* _SEAT_H_ */