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>
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))
25 typedef struct SeatPrivate SeatPrivate;
29 GObject parent_instance;
35 GObjectClass parent_class;
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);
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);
49 GType seat_get_type (void);
51 void seat_register_module (const gchar *name, GType type);
53 Seat *seat_new (const gchar *module, const gchar *config_section);
55 const gchar *seat_get_config_section (Seat *seat);
57 void seat_set_can_switch (Seat *seat, gboolean can_switch);
59 gboolean seat_start (Seat *seat);
61 GList *seat_get_displays (Seat *seat);
63 void seat_set_active_display (Seat *seat, Display *display);
65 Display *seat_get_active_display (Seat *seat);
67 gboolean seat_get_can_switch (Seat *seat);
69 gboolean seat_get_allow_guest (Seat *seat);
71 gboolean seat_switch_to_greeter (Seat *seat);
73 gboolean seat_switch_to_user (Seat *seat, const gchar *username);
75 gboolean seat_switch_to_guest (Seat *seat);
77 void seat_stop (Seat *seat);