Back to index

lightdm  1.3.2
display.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 _DISPLAY_H_
00013 #define _DISPLAY_H_
00014 
00015 #include <glib-object.h>
00016 
00017 #include "display-server.h"
00018 #include "session.h"
00019 #include "accounts.h"
00020 
00021 G_BEGIN_DECLS
00022 
00023 #define DISPLAY_TYPE           (display_get_type())
00024 #define DISPLAY(obj)           (G_TYPE_CHECK_INSTANCE_CAST ((obj), DISPLAY_TYPE, Display))
00025 #define DISPLAY_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), DISPLAY_TYPE, DisplayClass))
00026 #define DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DISPLAY_TYPE, DisplayClass))
00027 
00028 typedef struct DisplayPrivate DisplayPrivate;
00029 
00030 typedef struct
00031 {
00032     GObject         parent_instance;
00033     DisplayPrivate *priv;
00034 } Display;
00035 
00036 typedef struct
00037 {
00038     GObjectClass parent_class;
00039 
00040     gboolean (*display_server_ready)(Display *display);
00041     gboolean (*start_greeter)(Display *display);
00042     gboolean (*start_session)(Display *display);
00043     Session *(*create_session) (Display *display);
00044     void (*ready)(Display *display);
00045     gboolean (*switch_to_user)(Display *display, User *user);
00046     gboolean (*switch_to_guest)(Display *display);
00047     gchar *(*get_guest_username)(Display *display);
00048     void (*stopped)(Display *display);
00049 } DisplayClass;
00050 
00051 GType display_get_type (void);
00052 
00053 Display *display_new (DisplayServer *display_server);
00054 
00055 DisplayServer *display_get_display_server (Display *display);
00056 
00057 const gchar *display_get_username (Display *display);
00058 
00059 Session *display_get_session (Display *display);
00060 
00061 void display_set_greeter_session (Display *display, const gchar *greeter_session);
00062 
00063 void display_set_session_wrapper (Display *display, const gchar *session_wrapper);
00064 
00065 void display_set_allow_guest (Display *display, gboolean allow_guest);
00066 
00067 void display_set_greeter_allow_guest (Display *display, gboolean greeter_allow_guest);
00068 
00069 void display_set_autologin_user (Display *display, const gchar *username, gboolean is_guest, gint timeout);
00070 
00071 void display_set_select_user_hint (Display *display, const gchar *username, gboolean is_guest);
00072 
00073 void display_set_hide_users_hint (Display *display, gboolean hide_users);
00074 
00075 void display_set_show_manual_login_hint (Display *display, gboolean show_manual);
00076 
00077 void display_set_lock_hint (Display *display, gboolean is_lock);
00078 
00079 void display_set_user_session (Display *display, const gchar *session_name);
00080 
00081 gboolean display_start (Display *display);
00082 
00083 gboolean display_get_is_ready (Display *display);
00084 
00085 void display_lock (Display *display);
00086 
00087 void display_unlock (Display *display);
00088 
00089 void display_stop (Display *display);
00090 
00091 G_END_DECLS
00092 
00093 #endif /* _DISPLAY_H_ */