Back to index

lightdm  1.3.2
x-server.h
Go to the documentation of this file.
00001 #ifndef _X_SERVER_H_
00002 #define _X_SERVER_H_
00003 
00004 #include <glib-object.h>
00005 #include <gio/gio.h>
00006 
00007 G_BEGIN_DECLS
00008 
00009 #define X_PROTOCOL_MAJOR_VERSION 11
00010 #define X_PROTOCOL_MINOR_VERSION 0
00011 
00012 #define X_RELEASE_NUMBER 0
00013 
00014 typedef struct
00015 {
00016     guint8 byte_order;
00017     guint16 protocol_major_version, protocol_minor_version;
00018     gchar *authorization_protocol_name;
00019     guint8 *authorization_protocol_data;
00020     guint16 authorization_protocol_data_length;
00021 } XConnect;
00022 
00023 typedef struct XClientPrivate XClientPrivate;
00024 
00025 typedef struct
00026 {
00027    GObject         parent_instance;
00028    XClientPrivate *priv;
00029 } XClient;
00030 
00031 typedef struct
00032 {
00033    GObjectClass parent_class;
00034    void (*connect)(XClient *client, XConnect *message);
00035    void (*disconnected)(XClient *client);
00036 } XClientClass;
00037 
00038 typedef struct XScreenPrivate XScreenPrivate;
00039 
00040 typedef struct
00041 {
00042    GObject         parent_instance;
00043    XScreenPrivate *priv;
00044 } XScreen;
00045 
00046 typedef struct
00047 {
00048    GObjectClass parent_class;
00049 } XScreenClass;
00050 
00051 typedef struct XVisualPrivate XVisualPrivate;
00052 
00053 typedef struct
00054 {
00055    GObject         parent_instance;
00056    XVisualPrivate *priv;
00057 } XVisual;
00058 
00059 typedef struct
00060 {
00061    GObjectClass parent_class;
00062 } XVisualClass;
00063 
00064 typedef struct XServerPrivate XServerPrivate;
00065 
00066 typedef struct
00067 {
00068    GObject         parent_instance;
00069    XServerPrivate *priv;
00070 } XServer;
00071 
00072 typedef struct
00073 {
00074    GObjectClass parent_class;
00075    void (*client_connected)(XServer *server, XClient *client);
00076    void (*client_disconnected)(XServer *server, XClient *client);
00077 } XServerClass;
00078 
00079 GType x_server_get_type (void);
00080 
00081 XServer *x_server_new (gint display_number);
00082 
00083 XScreen *x_server_add_screen (XServer *server, guint32 white_pixel, guint32 black_pixel, guint32 current_input_masks, guint16 width_in_pixels, guint16 height_in_pixels, guint16 width_in_millimeters, guint16 height_in_millimeters);
00084 
00085 void x_server_add_pixmap_format (XServer *server, guint8 depth, guint8 bits_per_pixel, guint8 scanline_pad);
00086 
00087 void x_server_set_listen_unix (XServer *server, gboolean listen_unix);
00088 
00089 void x_server_set_listen_tcp (XServer *server, gboolean listen_tcp);
00090 
00091 gboolean x_server_start (XServer *server);
00092 
00093 gsize x_server_get_n_clients (XServer *server);
00094 
00095 GType x_screen_get_type (void);
00096 
00097 XVisual *x_screen_add_visual (XScreen *screen, guint8 depth, guint8 class, guint8 bits_per_rgb_value, guint16 colormap_entries, guint32 red_mask, guint32 green_mask, guint32 blue_mask);
00098 
00099 GType x_visual_get_type (void);
00100 
00101 GType x_client_get_type (void);
00102 
00103 GInetAddress *x_client_get_address (XClient *client);
00104 
00105 void x_client_send_failed (XClient *client, const gchar *reason);
00106 
00107 void x_client_send_success (XClient *client);
00108 
00109 void x_client_send_error (XClient *client, int type, int major, int minor);
00110 
00111 void x_client_disconnect (XClient *client);
00112 
00113 G_END_DECLS
00114 
00115 #endif /* _X_SERVER_H_ */