2 * Copyright (C) 2010-2011 Robert Ancell.
3 * Author: Robert Ancell <robert.ancell@canonical.com>
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
15 #include <glib-object.h>
21 #define SEAT_TYPE (seat_get_type())
22 #define SEAT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAT_TYPE, Seat))
23 #define SEAT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SEAT_TYPE, SeatClass))
24 #define SEAT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAT_TYPE, SeatClass))
26 typedef struct SeatPrivate SeatPrivate;
30 GObject parent_instance;
36 GObjectClass parent_class;
38 void (*setup)(Seat *seat);
39 gboolean (*start)(Seat *seat);
40 DisplayServer *(*create_display_server) (Seat *seat);
41 Session *(*create_session) (Seat *seat, Display *display);
42 void (*set_active_display)(Seat *seat, Display *display);
43 Display *(*get_active_display)(Seat *seat);
44 void (*run_script)(Seat *seat, Display *display, Process *script);
45 void (*stop)(Seat *seat);
47 void (*display_added)(Seat *seat, Display *display);
48 void (*display_removed)(Seat *seat, Display *display);
49 void (*stopped)(Seat *seat);
52 GType seat_get_type (void);
54 void seat_register_module (const gchar *name, GType type);
56 Seat *seat_new (const gchar *module_name);
58 void seat_set_property (Seat *seat, const gchar *name, const gchar *value);
60 gboolean seat_has_property (Seat *seat, const gchar *name);
62 const gchar *seat_get_string_property (Seat *seat, const gchar *name);
64 gboolean seat_get_boolean_property (Seat *seat, const gchar *name);
66 gint seat_get_integer_property (Seat *seat, const gchar *name);
68 void seat_set_can_switch (Seat *seat, gboolean can_switch);
70 void seat_set_share_display_server (Seat *seat, gboolean share_display_server);
72 gboolean seat_start (Seat *seat);
74 GList *seat_get_displays (Seat *seat);
76 void seat_set_active_display (Seat *seat, Display *display);
78 Display *seat_get_active_display (Seat *seat);
80 gboolean seat_get_can_switch (Seat *seat);
82 gboolean seat_get_allow_guest (Seat *seat);
84 gboolean seat_get_greeter_allow_guest (Seat *seat);
86 gboolean seat_switch_to_greeter (Seat *seat);
88 gboolean seat_switch_to_user (Seat *seat, const gchar *username, const gchar *session_name);
90 gboolean seat_switch_to_guest (Seat *seat, const gchar *session_name);
92 gboolean seat_lock (Seat *seat, const gchar *username);
94 void seat_stop (Seat *seat);
96 gboolean seat_get_is_stopping (Seat *seat);