File: x-server.h

package info (click to toggle)
lightdm 1.32.0-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,016 kB
  • sloc: ansic: 24,716; sh: 5,008; makefile: 1,159; cpp: 1,143; python: 267; xml: 39
file content (62 lines) | stat: -rw-r--r-- 1,393 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef X_SERVER_H_
#define X_SERVER_H_

#include <glib-object.h>
#include <gio/gio.h>

G_BEGIN_DECLS

#define X_SERVER_TYPE (x_server_get_type())
#define X_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), X_SERVER_TYPE, XServer))

#define X_CLIENT_SIGNAL_DISCONNECTED "disconnected"

#define X_SERVER_SIGNAL_CLIENT_CONNECTED    "client-connected"
#define X_SERVER_SIGNAL_CLIENT_DISCONNECTED "client-disconnected"
#define X_SERVER_SIGNAL_RESET               "reset"

typedef struct
{
   GObject parent_instance;
} XClient;

typedef struct
{
   GObjectClass parent_class;
   void (*disconnected)(XClient *client);
} XClientClass;

typedef struct
{
   GObject parent_instance;
} XServer;

typedef struct
{
   GObjectClass parent_class;
   void (*client_connected)(XServer *server, XClient *client);
   void (*client_disconnected)(XServer *server, XClient *client);
   void (*reset)(XServer *server);
} XServerClass;

GType x_server_get_type (void);

XServer *x_server_new (gint display_number);

gboolean x_server_start (XServer *server);

gsize x_server_get_n_clients (XServer *server);

GType x_client_get_type (void);

void x_client_send_failed (XClient *client, const gchar *reason);

void x_client_send_success (XClient *client);

void x_client_send_error (XClient *client, int type, int major, int minor);

void x_client_disconnect (XClient *client);

G_END_DECLS

#endif /* X_SERVER_H_ */