Back to index

lightdm  1.3.2
seat.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2010-2011 Robert Ancell.
00003  * Author: Robert Ancell <robert.ancell@canonical.com>
00004  * 
00005  * This program is free software: you can redistribute it and/or modify it under
00006  * the terms of the GNU General Public License as published by the Free Software
00007  * Foundation, either version 3 of the License, or (at your option) any later
00008  * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
00009  * license.
00010  */
00011 
00012 #ifndef _SEAT_H_
00013 #define _SEAT_H_
00014 
00015 #include <glib-object.h>
00016 #include "display.h"
00017 #include "process.h"
00018 
00019 G_BEGIN_DECLS
00020 
00021 #define SEAT_TYPE           (seat_get_type())
00022 #define SEAT(obj)           (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAT_TYPE, Seat))
00023 #define SEAT_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), SEAT_TYPE, SeatClass))
00024 #define SEAT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAT_TYPE, SeatClass))
00025 
00026 typedef struct SeatPrivate SeatPrivate;
00027 
00028 typedef struct
00029 {
00030     GObject         parent_instance;
00031     SeatPrivate *priv;
00032 } Seat;
00033 
00034 typedef struct
00035 {
00036     GObjectClass parent_class;
00037 
00038     void (*setup)(Seat *seat);    
00039     gboolean (*start)(Seat *seat);
00040     DisplayServer *(*create_display_server) (Seat *seat);
00041     Session *(*create_session) (Seat *seat, Display *display);
00042     void (*set_active_display)(Seat *seat, Display *display);
00043     void (*run_script)(Seat *seat, Display *display, Process *script);
00044     void (*stop)(Seat *seat);
00045 
00046     void (*display_added)(Seat *seat, Display *display);
00047     void (*display_removed)(Seat *seat, Display *display);
00048     void (*stopped)(Seat *seat);
00049 } SeatClass;
00050 
00051 GType seat_get_type (void);
00052 
00053 void seat_register_module (const gchar *name, GType type);
00054 
00055 Seat *seat_new (const gchar *module_name);
00056 
00057 void seat_set_property (Seat *seat, const gchar *name, const gchar *value);
00058 
00059 gboolean seat_has_property (Seat *seat, const gchar *name);
00060 
00061 const gchar *seat_get_string_property (Seat *seat, const gchar *name);
00062 
00063 gboolean seat_get_boolean_property (Seat *seat, const gchar *name);
00064 
00065 gint seat_get_integer_property (Seat *seat, const gchar *name);
00066 
00067 void seat_set_can_switch (Seat *seat, gboolean can_switch);
00068 
00069 gboolean seat_start (Seat *seat);
00070 
00071 GList *seat_get_displays (Seat *seat);
00072 
00073 void seat_set_active_display (Seat *seat, Display *display);
00074 
00075 Display *seat_get_active_display (Seat *seat);
00076 
00077 gboolean seat_get_can_switch (Seat *seat);
00078 
00079 gboolean seat_get_allow_guest (Seat *seat);
00080 
00081 gboolean seat_get_greeter_allow_guest (Seat *seat);
00082 
00083 gboolean seat_switch_to_greeter (Seat *seat);
00084 
00085 gboolean seat_switch_to_user (Seat *seat, const gchar *username, const gchar *session_name);
00086 
00087 gboolean seat_switch_to_guest (Seat *seat, const gchar *session_name);
00088 
00089 gboolean seat_lock (Seat *seat, const gchar *username);
00090 
00091 void seat_stop (Seat *seat);
00092 
00093 gboolean seat_get_is_stopping (Seat *seat);
00094 
00095 G_END_DECLS
00096 
00097 #endif /* _SEAT_H_ */