/+junk/libgego

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/libgego
5 by Gustav Hartvigsson
* Annotate everything!
1
#include <glib.h>
7 by Gustav Hartvigsson
* Fixed build... sort of
2
#include <glib-object.h>
1 by Gustav Hartvigsson
* Initial code.
3
4
#ifndef GEGO_GLOBAL_NOTIFY_HEADER
5
#define GEGO_GLOBAL_NOTIFY_HEADER
6
7
G_BEGIN_DECLS
8
9
#define GEGO_TYPE_GLOBEL_NOTIFY (gego_global_notify_get_type ())
4 by Gustav Hartvigsson
* Changed err to the correct type
10
G_DECLARE_FINAL_TYPE (GegoGlobalNotify, gego_global_notify, GEGO, GLOBAL_NOTIFY, GObject)
11
7 by Gustav Hartvigsson
* Fixed build... sort of
12
4 by Gustav Hartvigsson
* Changed err to the correct type
13
typedef struct _GegoGlobalNotifyPrivate GegoGlobalNotifyPrivate;
14
21 by Gustav Hartvigsson
* Woops
15
typedef struct _GegoCallbackItem GegoCallbackItem;
1 by Gustav Hartvigsson
* Initial code.
16
17
struct
4 by Gustav Hartvigsson
* Changed err to the correct type
18
_GegoGlobalNotify {
1 by Gustav Hartvigsson
* Initial code.
19
  GObject parent_instance;
20
};
21
18 by Gustav Hartvigsson
* No.
22
GType
23
gego_global_notify_get_type (void);
1 by Gustav Hartvigsson
* Initial code.
24
25
gboolean
4 by Gustav Hartvigsson
* Changed err to the correct type
26
gego_global_notify_initalize (GError ** err);
1 by Gustav Hartvigsson
* Initial code.
27
28
29
gboolean
4 by Gustav Hartvigsson
* Changed err to the correct type
30
gego_global_notify_uninitalize (GError ** err);
1 by Gustav Hartvigsson
* Initial code.
31
32
gint
4 by Gustav Hartvigsson
* Changed err to the correct type
33
gego_global_notify_add_notification (gchar * name, GError ** err);
1 by Gustav Hartvigsson
* Initial code.
34
35
36
void
37
gego_global_notify_remove_notification (gchar * name,
38
                                        gint notification_id,
4 by Gustav Hartvigsson
* Changed err to the correct type
39
                                        GError ** err);
1 by Gustav Hartvigsson
* Initial code.
40
41
gint
42
gego_global_notify_subscribe (gchar * name, GCallback callback,
43
                              gpointer subscriber_data,
4 by Gustav Hartvigsson
* Changed err to the correct type
44
                              GError ** err);
1 by Gustav Hartvigsson
* Initial code.
45
46
void
47
gego_global_notify_unsubscribe (gchar * name,
48
                                gint subscription_id,
4 by Gustav Hartvigsson
* Changed err to the correct type
49
                                GError ** err);
1 by Gustav Hartvigsson
* Initial code.
50
51
gint
52
gego_global_notify_call (gchar * name,
53
                         gpointer caller_data,
4 by Gustav Hartvigsson
* Changed err to the correct type
54
                         GError ** err);
1 by Gustav Hartvigsson
* Initial code.
55
56
gboolean
7 by Gustav Hartvigsson
* Fixed build... sort of
57
gego_global_notify_is_initialized (void);
1 by Gustav Hartvigsson
* Initial code.
58
22 by Gustav Hartvigsson
* Moved remaining Docs into the C file
59
1 by Gustav Hartvigsson
* Initial code.
60
#define gego_global_notify_return_not_initialized(err)\
61
  if (!gego_global_notify_is_initialized ()) {\
4 by Gustav Hartvigsson
* Changed err to the correct type
62
    g_set_error (err, GEGO_GLOBAL_NOTIFY_ERROR,\
1 by Gustav Hartvigsson
* Initial code.
63
                       GEGO_GLOBAL_NOTIFY_ERROR_NOT_INITIALZED,\
64
                       "Global Notify is not initialized.");\
4 by Gustav Hartvigsson
* Changed err to the correct type
65
    g_return_if_reached();\
1 by Gustav Hartvigsson
* Initial code.
66
  }
67
68
69
GQuark
7 by Gustav Hartvigsson
* Fixed build... sort of
70
gego_global_notify_error_quark (void);
1 by Gustav Hartvigsson
* Initial code.
71
22 by Gustav Hartvigsson
* Moved remaining Docs into the C file
72
1 by Gustav Hartvigsson
* Initial code.
73
#define GEGO_GLOBAL_NOTIFY_ERROR gego_global_notify_error_quark ()
74
75
typedef enum {
76
  GEGO_GLOBAL_NOTIFY_ERROR_NONE,
77
  GEGO_GLOBAL_NOTIFY_ERROR_ALREADY_INITALIZED,
78
  GEGO_GLOBAL_NOTIFY_ERROR_NOT_INITIALZED,
79
  GEGO_GLOBAL_NOTIFY_ERROR_SIGNAL_ALREADY_EXISTS,
80
  GEGO_GLOBAL_NOTIFY_ERROR_SIGNAL_DOES_NOT_EXIST,
81
  GEGO_GLOBAL_NOTIFY_ERROR_INVALID_SUBSCRIPTION_ID,
82
  GEGO_GLOBAL_NOTIFY_ERROR_LAST
83
} GegoGlobalNotifyError;
84
22 by Gustav Hartvigsson
* Moved remaining Docs into the C file
85
1 by Gustav Hartvigsson
* Initial code.
86
gchar *
87
GegoGlobalNotifyErrorName[] __attribute__((unused)) = {
88
  "NONE",
89
  "Already initialized",
90
  "Not initialized",
91
  "Signal already exists",
92
  "Signal does not exist",
93
  "Invalid subscription id",
94
  0x0
95
};
96
4 by Gustav Hartvigsson
* Changed err to the correct type
97
98
gchar *
99
gego_global_notify_error_get_name(GegoGlobalNotifyError k);
1 by Gustav Hartvigsson
* Initial code.
100
101
G_END_DECLS
102
103
#endif /* GEGO_GLOBAL_NOTIFY_HEADER */