~cjgomes-it/+junk/pantheon-notify

« back to all changes in this revision

Viewing changes to build/src/pantheon-notify.c

  • Committer: Carlos Gomes
  • Date: 2014-01-05 00:16:55 UTC
  • Revision ID: cjgomes.it@gmail.com-20140105001655-jxnlrqrw79l6sbrs
first release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* pantheon-notify.c generated by valac 0.22.0, the Vala compiler
 
2
 * generated from pantheon-notify.vala, do not modify */
 
3
 
 
4
/* FIXME: Width and Height should automatically take shadow into account*/
 
5
 
 
6
#include <glib.h>
 
7
#include <glib-object.h>
 
8
#include <gio/gio.h>
 
9
#include <gtk/gtk.h>
 
10
#include <clutter/clutter.h>
 
11
#include <clutter-gtk/clutter-gtk.h>
 
12
#include <gdk/gdk.h>
 
13
#include <float.h>
 
14
#include <math.h>
 
15
#include <cairo.h>
 
16
#include <stdlib.h>
 
17
#include <string.h>
 
18
#include <libwnck/libwnck.h>
 
19
#include <granite.h>
 
20
 
 
21
 
 
22
#define TYPE_NOTIFY_SERVER (notify_server_get_type ())
 
23
#define NOTIFY_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NOTIFY_SERVER, NotifyServer))
 
24
#define NOTIFY_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NOTIFY_SERVER, NotifyServerClass))
 
25
#define IS_NOTIFY_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NOTIFY_SERVER))
 
26
#define IS_NOTIFY_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NOTIFY_SERVER))
 
27
#define NOTIFY_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NOTIFY_SERVER, NotifyServerClass))
 
28
 
 
29
typedef struct _NotifyServer NotifyServer;
 
30
typedef struct _NotifyServerClass NotifyServerClass;
 
31
typedef struct _NotifyServerPrivate NotifyServerPrivate;
 
32
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
 
33
#define _cairo_region_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_region_destroy (var), NULL)))
 
34
#define _g_free0(var) (var = (g_free (var), NULL))
 
35
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
 
36
 
 
37
#define TYPE_NOTIFICATION (notification_get_type ())
 
38
#define NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NOTIFICATION, Notification))
 
39
#define NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NOTIFICATION, NotificationClass))
 
40
#define IS_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NOTIFICATION))
 
41
#define IS_NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NOTIFICATION))
 
42
#define NOTIFICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NOTIFICATION, NotificationClass))
 
43
 
 
44
typedef struct _Notification Notification;
 
45
typedef struct _NotificationClass NotificationClass;
 
46
typedef struct _NotificationPrivate NotificationPrivate;
 
47
 
 
48
#define NOTIFICATION_TYPE_URGENCY (notification_urgency_get_type ())
 
49
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
 
50
typedef struct _Block1Data Block1Data;
 
51
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
 
52
 
 
53
struct _NotifyServer {
 
54
        GObject parent_instance;
 
55
        NotifyServerPrivate * priv;
 
56
        gint id_counter;
 
57
        GtkWindow* main_window;
 
58
        ClutterBox* box;
 
59
};
 
60
 
 
61
struct _NotifyServerClass {
 
62
        GObjectClass parent_class;
 
63
};
 
64
 
 
65
typedef enum  {
 
66
        NOTIFICATION_URGENCY_LOW = 0,
 
67
        NOTIFICATION_URGENCY_NORMAL = 1,
 
68
        NOTIFICATION_URGENCY_CRITICAL = 2
 
69
} NotificationUrgency;
 
70
 
 
71
struct _Notification {
 
72
        ClutterGroup parent_instance;
 
73
        NotificationPrivate * priv;
 
74
        NotificationUrgency urgency;
 
75
        guint32 id;
 
76
        WnckWindow* app_window;
 
77
};
 
78
 
 
79
struct _NotificationClass {
 
80
        ClutterGroupClass parent_class;
 
81
};
 
82
 
 
83
struct _Block1Data {
 
84
        int _ref_count_;
 
85
        NotifyServer* n;
 
86
};
 
87
 
 
88
 
 
89
static gpointer notify_server_parent_class = NULL;
 
90
 
 
91
#define WIDTH 320
 
92
#define HEIGHT 76
 
93
#define SHADOW 10
 
94
#define EXPIRE 7000
 
95
GType notify_server_get_type (void) G_GNUC_CONST;
 
96
guint notify_server_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
 
97
enum  {
 
98
        NOTIFY_SERVER_DUMMY_PROPERTY
 
99
};
 
100
NotifyServer* notify_server_new (void);
 
101
NotifyServer* notify_server_construct (GType object_type);
 
102
void notify_server_update_input_shape (NotifyServer* self);
 
103
void notify_server_reposition (NotifyServer* self);
 
104
static void __lambda2_ (NotifyServer* self);
 
105
static void ___lambda2__gdk_screen_monitors_changed (GdkScreen* _sender, gpointer self);
 
106
void notify_server_close_notification (NotifyServer* self, guint32 id);
 
107
gchar** notify_server_get_capabilities (NotifyServer* self, int* result_length1);
 
108
void notify_server_get_server_information (NotifyServer* self, gchar** name, gchar** vendor, gchar** version, gchar** spec_version);
 
109
guint32 notify_server_notify (NotifyServer* self, const gchar* app_name, guint32 replaces_id, const gchar* app_icon, const gchar* summary, const gchar* body, gchar** actions, int actions_length1, GHashTable* hints, gint32 expire_timeout, const char* name);
 
110
GType notification_get_type (void) G_GNUC_CONST;
 
111
GType notification_urgency_get_type (void) G_GNUC_CONST;
 
112
void notification_set_text (Notification* self, const gchar* name, const gchar* body);
 
113
void notification_set_pix (Notification* self, GHashTable* hints, const gchar* app, const gchar* icon);
 
114
void notification_updated (Notification* self);
 
115
Notification* notification_new (const gchar* name, const gchar* body, const gchar* icon, guint32 _timeout, const gchar* app, NotifyServer* _server, GHashTable* hints, guint32 _id, gchar** actions, int actions_length1);
 
116
Notification* notification_construct (GType object_type, const gchar* name, const gchar* body, const gchar* icon, guint32 _timeout, const gchar* app, NotifyServer* _server, GHashTable* hints, guint32 _id, gchar** actions, int actions_length1);
 
117
static void notify_server_finalize (GObject* obj);
 
118
static void _dbus_notify_server_reposition (NotifyServer* self, GVariant* parameters, GDBusMethodInvocation* invocation);
 
119
static void _dbus_notify_server_update_input_shape (NotifyServer* self, GVariant* parameters, GDBusMethodInvocation* invocation);
 
120
static void _dbus_notify_server_close_notification (NotifyServer* self, GVariant* parameters, GDBusMethodInvocation* invocation);
 
121
static void _dbus_notify_server_get_capabilities (NotifyServer* self, GVariant* parameters, GDBusMethodInvocation* invocation);
 
122
static void _dbus_notify_server_get_server_information (NotifyServer* self, GVariant* parameters, GDBusMethodInvocation* invocation);
 
123
static void _dbus_notify_server_notify (NotifyServer* self, GVariant* parameters, GDBusMethodInvocation* invocation);
 
124
static void notify_server_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data);
 
125
static GVariant* notify_server_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data);
 
126
static gboolean notify_server_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data);
 
127
static void _notify_server_unregister_object (gpointer user_data);
 
128
void _vala_main (gchar** args, int args_length1);
 
129
static Block1Data* block1_data_ref (Block1Data* _data1_);
 
130
static void block1_data_unref (void * _userdata_);
 
131
static void __lambda7_ (Block1Data* _data1_, GDBusConnection* con);
 
132
static void ___lambda7__gbus_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self);
 
133
static void __lambda8_ (void);
 
134
static void ___lambda8__gbus_name_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self);
 
135
static void __lambda9_ (GDBusConnection* con, const gchar* name);
 
136
static void ___lambda9__gbus_name_lost_callback (GDBusConnection* connection, const gchar* name, gpointer self);
 
137
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
 
138
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
 
139
 
 
140
static const GDBusArgInfo * const _notify_server_dbus_arg_info_reposition_in[] = {NULL};
 
141
static const GDBusArgInfo * const _notify_server_dbus_arg_info_reposition_out[] = {NULL};
 
142
static const GDBusMethodInfo _notify_server_dbus_method_info_reposition = {-1, "Reposition", (GDBusArgInfo **) (&_notify_server_dbus_arg_info_reposition_in), (GDBusArgInfo **) (&_notify_server_dbus_arg_info_reposition_out)};
 
143
static const GDBusArgInfo * const _notify_server_dbus_arg_info_update_input_shape_in[] = {NULL};
 
144
static const GDBusArgInfo * const _notify_server_dbus_arg_info_update_input_shape_out[] = {NULL};
 
145
static const GDBusMethodInfo _notify_server_dbus_method_info_update_input_shape = {-1, "UpdateInputShape", (GDBusArgInfo **) (&_notify_server_dbus_arg_info_update_input_shape_in), (GDBusArgInfo **) (&_notify_server_dbus_arg_info_update_input_shape_out)};
 
146
static const GDBusArgInfo _notify_server_dbus_arg_info_close_notification_id = {-1, "id", "u"};
 
147
static const GDBusArgInfo * const _notify_server_dbus_arg_info_close_notification_in[] = {&_notify_server_dbus_arg_info_close_notification_id, NULL};
 
148
static const GDBusArgInfo * const _notify_server_dbus_arg_info_close_notification_out[] = {NULL};
 
149
static const GDBusMethodInfo _notify_server_dbus_method_info_close_notification = {-1, "CloseNotification", (GDBusArgInfo **) (&_notify_server_dbus_arg_info_close_notification_in), (GDBusArgInfo **) (&_notify_server_dbus_arg_info_close_notification_out)};
 
150
static const GDBusArgInfo _notify_server_dbus_arg_info_get_capabilities_result = {-1, "result", "as"};
 
151
static const GDBusArgInfo * const _notify_server_dbus_arg_info_get_capabilities_in[] = {NULL};
 
152
static const GDBusArgInfo * const _notify_server_dbus_arg_info_get_capabilities_out[] = {&_notify_server_dbus_arg_info_get_capabilities_result, NULL};
 
153
static const GDBusMethodInfo _notify_server_dbus_method_info_get_capabilities = {-1, "GetCapabilities", (GDBusArgInfo **) (&_notify_server_dbus_arg_info_get_capabilities_in), (GDBusArgInfo **) (&_notify_server_dbus_arg_info_get_capabilities_out)};
 
154
static const GDBusArgInfo _notify_server_dbus_arg_info_get_server_information_name = {-1, "name", "s"};
 
155
static const GDBusArgInfo _notify_server_dbus_arg_info_get_server_information_vendor = {-1, "vendor", "s"};
 
156
static const GDBusArgInfo _notify_server_dbus_arg_info_get_server_information_version = {-1, "version", "s"};
 
157
static const GDBusArgInfo _notify_server_dbus_arg_info_get_server_information_spec_version = {-1, "spec_version", "s"};
 
158
static const GDBusArgInfo * const _notify_server_dbus_arg_info_get_server_information_in[] = {NULL};
 
159
static const GDBusArgInfo * const _notify_server_dbus_arg_info_get_server_information_out[] = {&_notify_server_dbus_arg_info_get_server_information_name, &_notify_server_dbus_arg_info_get_server_information_vendor, &_notify_server_dbus_arg_info_get_server_information_version, &_notify_server_dbus_arg_info_get_server_information_spec_version, NULL};
 
160
static const GDBusMethodInfo _notify_server_dbus_method_info_get_server_information = {-1, "GetServerInformation", (GDBusArgInfo **) (&_notify_server_dbus_arg_info_get_server_information_in), (GDBusArgInfo **) (&_notify_server_dbus_arg_info_get_server_information_out)};
 
161
static const GDBusArgInfo _notify_server_dbus_arg_info_notify_app_name = {-1, "app_name", "s"};
 
162
static const GDBusArgInfo _notify_server_dbus_arg_info_notify_replaces_id = {-1, "replaces_id", "u"};
 
163
static const GDBusArgInfo _notify_server_dbus_arg_info_notify_app_icon = {-1, "app_icon", "s"};
 
164
static const GDBusArgInfo _notify_server_dbus_arg_info_notify_summary = {-1, "summary", "s"};
 
165
static const GDBusArgInfo _notify_server_dbus_arg_info_notify_body = {-1, "body", "s"};
 
166
static const GDBusArgInfo _notify_server_dbus_arg_info_notify_actions = {-1, "actions", "as"};
 
167
static const GDBusArgInfo _notify_server_dbus_arg_info_notify_hints = {-1, "hints", "a{sv}"};
 
168
static const GDBusArgInfo _notify_server_dbus_arg_info_notify_expire_timeout = {-1, "expire_timeout", "i"};
 
169
static const GDBusArgInfo _notify_server_dbus_arg_info_notify_result = {-1, "result", "u"};
 
170
static const GDBusArgInfo * const _notify_server_dbus_arg_info_notify_in[] = {&_notify_server_dbus_arg_info_notify_app_name, &_notify_server_dbus_arg_info_notify_replaces_id, &_notify_server_dbus_arg_info_notify_app_icon, &_notify_server_dbus_arg_info_notify_summary, &_notify_server_dbus_arg_info_notify_body, &_notify_server_dbus_arg_info_notify_actions, &_notify_server_dbus_arg_info_notify_hints, &_notify_server_dbus_arg_info_notify_expire_timeout, NULL};
 
171
static const GDBusArgInfo * const _notify_server_dbus_arg_info_notify_out[] = {&_notify_server_dbus_arg_info_notify_result, NULL};
 
172
static const GDBusMethodInfo _notify_server_dbus_method_info_notify = {-1, "Notify", (GDBusArgInfo **) (&_notify_server_dbus_arg_info_notify_in), (GDBusArgInfo **) (&_notify_server_dbus_arg_info_notify_out)};
 
173
static const GDBusMethodInfo * const _notify_server_dbus_method_info[] = {&_notify_server_dbus_method_info_reposition, &_notify_server_dbus_method_info_update_input_shape, &_notify_server_dbus_method_info_close_notification, &_notify_server_dbus_method_info_get_capabilities, &_notify_server_dbus_method_info_get_server_information, &_notify_server_dbus_method_info_notify, NULL};
 
174
static const GDBusSignalInfo * const _notify_server_dbus_signal_info[] = {NULL};
 
175
static const GDBusPropertyInfo * const _notify_server_dbus_property_info[] = {NULL};
 
176
static const GDBusInterfaceInfo _notify_server_dbus_interface_info = {-1, "org.freedesktop.Notifications", (GDBusMethodInfo **) (&_notify_server_dbus_method_info), (GDBusSignalInfo **) (&_notify_server_dbus_signal_info), (GDBusPropertyInfo **) (&_notify_server_dbus_property_info)};
 
177
static const GDBusInterfaceVTable _notify_server_dbus_interface_vtable = {notify_server_dbus_interface_method_call, notify_server_dbus_interface_get_property, notify_server_dbus_interface_set_property};
 
178
 
 
179
static void __lambda2_ (NotifyServer* self) {
 
180
#line 49 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
181
        notify_server_reposition (self);
 
182
#line 183 "pantheon-notify.c"
 
183
}
 
184
 
 
185
 
 
186
static void ___lambda2__gdk_screen_monitors_changed (GdkScreen* _sender, gpointer self) {
 
187
#line 48 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
188
        __lambda2_ (self);
 
189
#line 190 "pantheon-notify.c"
 
190
}
 
191
 
 
192
 
 
193
NotifyServer* notify_server_construct (GType object_type) {
 
194
        NotifyServer * self = NULL;
 
195
        GtkClutterEmbed* clutter = NULL;
 
196
        GtkClutterEmbed* _tmp0_ = NULL;
 
197
        GtkWindow* _tmp1_ = NULL;
 
198
        GtkWindow* _tmp2_ = NULL;
 
199
        GdkScreen* _tmp3_ = NULL;
 
200
        GdkVisual* _tmp4_ = NULL;
 
201
        GtkWindow* _tmp5_ = NULL;
 
202
        GtkWindow* _tmp6_ = NULL;
 
203
        GtkWindow* _tmp7_ = NULL;
 
204
        GtkWindow* _tmp8_ = NULL;
 
205
        GtkWindow* _tmp9_ = NULL;
 
206
        GtkWindow* _tmp10_ = NULL;
 
207
        GtkWindow* _tmp11_ = NULL;
 
208
        GtkWindow* _tmp12_ = NULL;
 
209
        ClutterBoxLayout* _tmp13_ = NULL;
 
210
        ClutterBoxLayout* _tmp14_ = NULL;
 
211
        ClutterBox* _tmp15_ = NULL;
 
212
        ClutterBox* _tmp16_ = NULL;
 
213
        ClutterLayoutManager* _tmp17_ = NULL;
 
214
        ClutterLayoutManager* _tmp18_ = NULL;
 
215
        ClutterBox* _tmp19_ = NULL;
 
216
        ClutterActor* _tmp20_ = NULL;
 
217
        ClutterBindConstraint* _tmp21_ = NULL;
 
218
        ClutterBindConstraint* _tmp22_ = NULL;
 
219
        ClutterBox* _tmp23_ = NULL;
 
220
        ClutterActor* _tmp24_ = NULL;
 
221
        ClutterBindConstraint* _tmp25_ = NULL;
 
222
        ClutterBindConstraint* _tmp26_ = NULL;
 
223
        ClutterActor* _tmp27_ = NULL;
 
224
        ClutterColor _tmp28_ = {0};
 
225
        ClutterActor* _tmp29_ = NULL;
 
226
        ClutterActor* _tmp30_ = NULL;
 
227
        ClutterBox* _tmp31_ = NULL;
 
228
        GtkWindow* _tmp32_ = NULL;
 
229
        GtkWindow* _tmp33_ = NULL;
 
230
        GdkScreen* _tmp34_ = NULL;
 
231
        gint _tmp35_ = 0;
 
232
        GtkWindow* _tmp36_ = NULL;
 
233
        GdkScreen* _tmp37_ = NULL;
 
234
#line 17 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
235
        self = (NotifyServer*) g_object_new (object_type, NULL);
 
236
#line 18 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
237
        _tmp0_ = (GtkClutterEmbed*) gtk_clutter_embed_new ();
 
238
#line 18 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
239
        g_object_ref_sink (_tmp0_);
 
240
#line 18 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
241
        clutter = _tmp0_;
 
242
#line 20 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
243
        _tmp1_ = (GtkWindow*) gtk_window_new (GTK_WINDOW_POPUP);
 
244
#line 20 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
245
        g_object_ref_sink (_tmp1_);
 
246
#line 20 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
247
        _g_object_unref0 (self->main_window);
 
248
#line 20 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
249
        self->main_window = _tmp1_;
 
250
#line 21 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
251
        _tmp2_ = self->main_window;
 
252
#line 21 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
253
        _tmp3_ = gdk_screen_get_default ();
 
254
#line 21 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
255
        _tmp4_ = gdk_screen_get_rgba_visual (_tmp3_);
 
256
#line 21 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
257
        gtk_widget_set_visual ((GtkWidget*) _tmp2_, _tmp4_);
 
258
#line 22 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
259
        _tmp5_ = self->main_window;
 
260
#line 22 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
261
        gtk_window_set_type_hint (_tmp5_, GDK_WINDOW_TYPE_HINT_NOTIFICATION);
 
262
#line 23 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
263
        _tmp6_ = self->main_window;
 
264
#line 23 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
265
        gtk_window_stick (_tmp6_);
 
266
#line 24 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
267
        _tmp7_ = self->main_window;
 
268
#line 24 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
269
        gtk_window_set_keep_above (_tmp7_, TRUE);
 
270
#line 25 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
271
        _tmp8_ = self->main_window;
 
272
#line 25 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
273
        gtk_window_set_focus_on_map (_tmp8_, FALSE);
 
274
#line 26 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
275
        _tmp9_ = self->main_window;
 
276
#line 26 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
277
        gtk_window_set_accept_focus (_tmp9_, FALSE);
 
278
#line 27 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
279
        _tmp10_ = self->main_window;
 
280
#line 27 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
281
        gtk_window_set_skip_pager_hint (_tmp10_, TRUE);
 
282
#line 28 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
283
        _tmp11_ = self->main_window;
 
284
#line 28 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
285
        gtk_window_set_skip_taskbar_hint (_tmp11_, TRUE);
 
286
#line 29 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
287
        _tmp12_ = self->main_window;
 
288
#line 29 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
289
        gtk_window_set_focus_visible (_tmp12_, FALSE);
 
290
#line 30 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
291
        _tmp13_ = (ClutterBoxLayout*) clutter_box_layout_new ();
 
292
#line 30 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
293
        g_object_ref_sink (_tmp13_);
 
294
#line 30 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
295
        _tmp14_ = _tmp13_;
 
296
#line 30 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
297
        _tmp15_ = (ClutterBox*) clutter_box_new ((ClutterLayoutManager*) _tmp14_);
 
298
#line 30 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
299
        g_object_ref_sink (_tmp15_);
 
300
#line 30 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
301
        _g_object_unref0 (self->box);
 
302
#line 30 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
303
        self->box = _tmp15_;
 
304
#line 30 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
305
        _g_object_unref0 (_tmp14_);
 
306
#line 32 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
307
        _tmp16_ = self->box;
 
308
#line 32 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
309
        _tmp17_ = clutter_box_get_layout_manager (_tmp16_);
 
310
#line 32 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
311
        _tmp18_ = _tmp17_;
 
312
#line 32 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
313
        clutter_box_layout_set_vertical (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, clutter_box_layout_get_type (), ClutterBoxLayout), TRUE);
 
314
#line 33 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
315
        _tmp19_ = self->box;
 
316
#line 33 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
317
        _tmp20_ = gtk_clutter_embed_get_stage (clutter);
 
318
#line 33 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
319
        _tmp21_ = (ClutterBindConstraint*) clutter_bind_constraint_new (_tmp20_, CLUTTER_BIND_WIDTH, (gfloat) 0);
 
320
#line 33 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
321
        g_object_ref_sink (_tmp21_);
 
322
#line 33 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
323
        _tmp22_ = _tmp21_;
 
324
#line 33 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
325
        clutter_actor_add_constraint ((ClutterActor*) _tmp19_, (ClutterConstraint*) _tmp22_);
 
326
#line 33 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
327
        _g_object_unref0 (_tmp22_);
 
328
#line 34 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
329
        _tmp23_ = self->box;
 
330
#line 34 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
331
        _tmp24_ = gtk_clutter_embed_get_stage (clutter);
 
332
#line 34 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
333
        _tmp25_ = (ClutterBindConstraint*) clutter_bind_constraint_new (_tmp24_, CLUTTER_BIND_HEIGHT, (gfloat) 0);
 
334
#line 34 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
335
        g_object_ref_sink (_tmp25_);
 
336
#line 34 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
337
        _tmp26_ = _tmp25_;
 
338
#line 34 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
339
        clutter_actor_add_constraint ((ClutterActor*) _tmp23_, (ClutterConstraint*) _tmp26_);
 
340
#line 34 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
341
        _g_object_unref0 (_tmp26_);
 
342
#line 36 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
343
        _tmp27_ = gtk_clutter_embed_get_stage (clutter);
 
344
#line 36 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
345
        _tmp28_.red = (guint8) 0;
 
346
#line 36 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
347
        _tmp28_.green = (guint8) 0;
 
348
#line 36 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
349
        _tmp28_.blue = (guint8) 0;
 
350
#line 36 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
351
        _tmp28_.alpha = (guint8) 0;
 
352
#line 36 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
353
        clutter_stage_set_color (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, clutter_stage_get_type (), ClutterStage), &_tmp28_);
 
354
#line 37 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
355
        _tmp29_ = gtk_clutter_embed_get_stage (clutter);
 
356
#line 37 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
357
        clutter_stage_set_use_alpha (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, clutter_stage_get_type (), ClutterStage), TRUE);
 
358
#line 38 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
359
        _tmp30_ = gtk_clutter_embed_get_stage (clutter);
 
360
#line 38 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
361
        _tmp31_ = self->box;
 
362
#line 38 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
363
        clutter_actor_add_child (_tmp30_, (ClutterActor*) _tmp31_);
 
364
#line 40 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
365
        _tmp32_ = self->main_window;
 
366
#line 40 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
367
        gtk_container_add ((GtkContainer*) _tmp32_, (GtkWidget*) clutter);
 
368
#line 41 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
369
        _tmp33_ = self->main_window;
 
370
#line 41 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
371
        _tmp34_ = gdk_screen_get_default ();
 
372
#line 41 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
373
        _tmp35_ = gdk_screen_height ();
 
374
#line 41 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
375
        gtk_widget_set_size_request ((GtkWidget*) _tmp33_, WIDTH, _tmp35_);
 
376
#line 42 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
377
        _tmp36_ = self->main_window;
 
378
#line 42 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
379
        gtk_widget_show_all ((GtkWidget*) _tmp36_);
 
380
#line 44 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
381
        notify_server_update_input_shape (self);
 
382
#line 46 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
383
        notify_server_reposition (self);
 
384
#line 48 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
385
        _tmp37_ = gdk_screen_get_default ();
 
386
#line 48 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
387
        g_signal_connect_object (_tmp37_, "monitors-changed", (GCallback) ___lambda2__gdk_screen_monitors_changed, self, 0);
 
388
#line 17 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
389
        _g_object_unref0 (clutter);
 
390
#line 17 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
391
        return self;
 
392
#line 393 "pantheon-notify.c"
 
393
}
 
394
 
 
395
 
 
396
NotifyServer* notify_server_new (void) {
 
397
#line 17 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
398
        return notify_server_construct (TYPE_NOTIFY_SERVER);
 
399
#line 400 "pantheon-notify.c"
 
400
}
 
401
 
 
402
 
 
403
void notify_server_reposition (NotifyServer* self) {
 
404
        GdkRectangle rect = {0};
 
405
        GdkScreen* _tmp0_ = NULL;
 
406
        GdkScreen* _tmp1_ = NULL;
 
407
        gint _tmp2_ = 0;
 
408
        GdkRectangle _tmp3_ = {0};
 
409
        GtkWindow* _tmp4_ = NULL;
 
410
        GdkRectangle _tmp5_ = {0};
 
411
        gint _tmp6_ = 0;
 
412
        GdkRectangle _tmp7_ = {0};
 
413
        gint _tmp8_ = 0;
 
414
        GdkRectangle _tmp9_ = {0};
 
415
        gint _tmp10_ = 0;
 
416
#line 53 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
417
        g_return_if_fail (self != NULL);
 
418
#line 55 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
419
        _tmp0_ = gdk_screen_get_default ();
 
420
#line 55 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
421
        _tmp1_ = gdk_screen_get_default ();
 
422
#line 55 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
423
        _tmp2_ = gdk_screen_get_primary_monitor (_tmp1_);
 
424
#line 55 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
425
        gdk_screen_get_monitor_geometry (_tmp0_, _tmp2_, &_tmp3_);
 
426
#line 55 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
427
        rect = _tmp3_;
 
428
#line 56 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
429
        _tmp4_ = self->main_window;
 
430
#line 56 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
431
        _tmp5_ = rect;
 
432
#line 56 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
433
        _tmp6_ = _tmp5_.x;
 
434
#line 56 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
435
        _tmp7_ = rect;
 
436
#line 56 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
437
        _tmp8_ = _tmp7_.width;
 
438
#line 56 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
439
        _tmp9_ = rect;
 
440
#line 56 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
441
        _tmp10_ = _tmp9_.y;
 
442
#line 56 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
443
        gtk_window_move (_tmp4_, (_tmp6_ + _tmp8_) - WIDTH, _tmp10_ + 30);
 
444
#line 445 "pantheon-notify.c"
 
445
}
 
446
 
 
447
 
 
448
void notify_server_update_input_shape (NotifyServer* self) {
 
449
        GtkWindow* _tmp0_ = NULL;
 
450
        GdkWindow* _tmp1_ = NULL;
 
451
        ClutterBox* _tmp2_ = NULL;
 
452
        gint _tmp3_ = 0;
 
453
        cairo_rectangle_int_t _tmp4_ = {0};
 
454
        cairo_region_t* _tmp5_ = NULL;
 
455
        cairo_region_t* _tmp6_ = NULL;
 
456
#line 60 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
457
        g_return_if_fail (self != NULL);
 
458
#line 61 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
459
        _tmp0_ = self->main_window;
 
460
#line 61 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
461
        _tmp1_ = gtk_widget_get_window ((GtkWidget*) _tmp0_);
 
462
#line 61 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
463
        _tmp2_ = self->box;
 
464
#line 61 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
465
        _tmp3_ = clutter_actor_get_n_children ((ClutterActor*) _tmp2_);
 
466
#line 61 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
467
        _tmp4_.x = 0;
 
468
#line 61 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
469
        _tmp4_.y = 0;
 
470
#line 61 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
471
        _tmp4_.width = WIDTH;
 
472
#line 61 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
473
        _tmp4_.height = _tmp3_ * HEIGHT;
 
474
#line 61 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
475
        _tmp5_ = cairo_region_create_rectangle (&_tmp4_);
 
476
#line 61 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
477
        _tmp6_ = _tmp5_;
 
478
#line 61 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
479
        gdk_window_input_shape_combine_region (_tmp1_, _tmp6_, 0, 0);
 
480
#line 61 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
481
        _cairo_region_destroy0 (_tmp6_);
 
482
#line 483 "pantheon-notify.c"
 
483
}
 
484
 
 
485
 
 
486
void notify_server_close_notification (NotifyServer* self, guint32 id) {
 
487
#line 65 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
488
        g_return_if_fail (self != NULL);
 
489
#line 490 "pantheon-notify.c"
 
490
}
 
491
 
 
492
 
 
493
gchar** notify_server_get_capabilities (NotifyServer* self, int* result_length1) {
 
494
        gchar** result = NULL;
 
495
        gchar* _tmp0_ = NULL;
 
496
        gchar* _tmp1_ = NULL;
 
497
        gchar** _tmp2_ = NULL;
 
498
        gchar** _tmp3_ = NULL;
 
499
        gint _tmp3__length1 = 0;
 
500
#line 68 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
501
        g_return_val_if_fail (self != NULL, NULL);
 
502
#line 69 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
503
        _tmp0_ = g_strdup ("body");
 
504
#line 69 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
505
        _tmp1_ = g_strdup ("body-markup");
 
506
#line 69 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
507
        _tmp2_ = g_new0 (gchar*, 2 + 1);
 
508
#line 69 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
509
        _tmp2_[0] = _tmp0_;
 
510
#line 69 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
511
        _tmp2_[1] = _tmp1_;
 
512
#line 69 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
513
        _tmp3_ = _tmp2_;
 
514
#line 69 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
515
        _tmp3__length1 = 2;
 
516
#line 69 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
517
        if (result_length1) {
 
518
#line 69 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
519
                *result_length1 = _tmp3__length1;
 
520
#line 521 "pantheon-notify.c"
 
521
        }
 
522
#line 69 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
523
        result = _tmp3_;
 
524
#line 69 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
525
        return result;
 
526
#line 527 "pantheon-notify.c"
 
527
}
 
528
 
 
529
 
 
530
void notify_server_get_server_information (NotifyServer* self, gchar** name, gchar** vendor, gchar** version, gchar** spec_version) {
 
531
        gchar* _vala_name = NULL;
 
532
        gchar* _vala_vendor = NULL;
 
533
        gchar* _vala_version = NULL;
 
534
        gchar* _vala_spec_version = NULL;
 
535
        gchar* _tmp0_ = NULL;
 
536
        gchar* _tmp1_ = NULL;
 
537
        gchar* _tmp2_ = NULL;
 
538
        gchar* _tmp3_ = NULL;
 
539
#line 71 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
540
        g_return_if_fail (self != NULL);
 
541
#line 72 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
542
        _tmp0_ = g_strdup ("pantheon-notify");
 
543
#line 72 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
544
        _g_free0 (_vala_name);
 
545
#line 72 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
546
        _vala_name = _tmp0_;
 
547
#line 73 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
548
        _tmp1_ = g_strdup ("ElementaryOS");
 
549
#line 73 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
550
        _g_free0 (_vala_vendor);
 
551
#line 73 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
552
        _vala_vendor = _tmp1_;
 
553
#line 74 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
554
        _tmp2_ = g_strdup ("0.1");
 
555
#line 74 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
556
        _g_free0 (_vala_version);
 
557
#line 74 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
558
        _vala_version = _tmp2_;
 
559
#line 75 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
560
        _tmp3_ = g_strdup ("1.1");
 
561
#line 75 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
562
        _g_free0 (_vala_spec_version);
 
563
#line 75 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
564
        _vala_spec_version = _tmp3_;
 
565
#line 71 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
566
        if (name) {
 
567
#line 71 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
568
                *name = _vala_name;
 
569
#line 570 "pantheon-notify.c"
 
570
        } else {
 
571
#line 71 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
572
                _g_free0 (_vala_name);
 
573
#line 574 "pantheon-notify.c"
 
574
        }
 
575
#line 71 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
576
        if (vendor) {
 
577
#line 71 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
578
                *vendor = _vala_vendor;
 
579
#line 580 "pantheon-notify.c"
 
580
        } else {
 
581
#line 71 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
582
                _g_free0 (_vala_vendor);
 
583
#line 584 "pantheon-notify.c"
 
584
        }
 
585
#line 71 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
586
        if (version) {
 
587
#line 71 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
588
                *version = _vala_version;
 
589
#line 590 "pantheon-notify.c"
 
590
        } else {
 
591
#line 71 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
592
                _g_free0 (_vala_version);
 
593
#line 594 "pantheon-notify.c"
 
594
        }
 
595
#line 71 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
596
        if (spec_version) {
 
597
#line 71 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
598
                *spec_version = _vala_spec_version;
 
599
#line 600 "pantheon-notify.c"
 
600
        } else {
 
601
#line 71 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
602
                _g_free0 (_vala_spec_version);
 
603
#line 604 "pantheon-notify.c"
 
604
        }
 
605
}
 
606
 
 
607
 
 
608
guint32 notify_server_notify (NotifyServer* self, const gchar* app_name, guint32 replaces_id, const gchar* app_icon, const gchar* summary, const gchar* body, gchar** actions, int actions_length1, GHashTable* hints, gint32 expire_timeout, const char* name) {
 
609
        guint32 result = 0U;
 
610
        const char* _tmp0_ = NULL;
 
611
        gint urgency = 0;
 
612
        GHashTable* _tmp1_ = NULL;
 
613
        gboolean _tmp2_ = FALSE;
 
614
        gint _tmp6_ = 0;
 
615
        const gchar* _tmp7_ = NULL;
 
616
        const gchar* _tmp8_ = NULL;
 
617
        gint _tmp9_ = 0;
 
618
        guint32 _tmp10_ = 0U;
 
619
#line 77 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
620
        g_return_val_if_fail (self != NULL, 0U);
 
621
#line 77 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
622
        g_return_val_if_fail (app_name != NULL, 0U);
 
623
#line 77 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
624
        g_return_val_if_fail (app_icon != NULL, 0U);
 
625
#line 77 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
626
        g_return_val_if_fail (summary != NULL, 0U);
 
627
#line 77 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
628
        g_return_val_if_fail (body != NULL, 0U);
 
629
#line 77 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
630
        g_return_val_if_fail (hints != NULL, 0U);
 
631
#line 77 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
632
        g_return_val_if_fail (name != NULL, 0U);
 
633
#line 80 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
634
        _tmp0_ = name;
 
635
#line 80 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
636
        g_debug ("pantheon-notify.vala:80: Bus Name: %s", (const gchar*) _tmp0_);
 
637
#line 82 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
638
        urgency = 1;
 
639
#line 83 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
640
        _tmp1_ = hints;
 
641
#line 83 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
642
        _tmp2_ = g_hash_table_contains (_tmp1_, "urgency");
 
643
#line 83 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
644
        if (_tmp2_) {
 
645
#line 646 "pantheon-notify.c"
 
646
                GHashTable* _tmp3_ = NULL;
 
647
                gconstpointer _tmp4_ = NULL;
 
648
                guint8 _tmp5_ = 0U;
 
649
#line 84 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
650
                _tmp3_ = hints;
 
651
#line 84 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
652
                _tmp4_ = g_hash_table_lookup (_tmp3_, "urgency");
 
653
#line 84 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
654
                _tmp5_ = g_variant_get_byte ((GVariant*) _tmp4_);
 
655
#line 84 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
656
                urgency = (gint) _tmp5_;
 
657
#line 658 "pantheon-notify.c"
 
658
        }
 
659
#line 85 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
660
        _tmp6_ = self->id_counter;
 
661
#line 85 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
662
        _tmp7_ = app_name;
 
663
#line 85 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
664
        _tmp8_ = app_icon;
 
665
#line 85 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
666
        _tmp9_ = urgency;
 
667
#line 85 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
668
        g_message ("pantheon-notify.vala:85: New notification, ID: %i, app: %s, icon: %s, " \
 
669
"priority: %i\n", _tmp6_ + 1, _tmp7_, _tmp8_, _tmp9_);
 
670
#line 89 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
671
        _tmp10_ = replaces_id;
 
672
#line 89 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
673
        if (_tmp10_ != ((guint32) 0)) {
 
674
#line 674 "pantheon-notify.c"
 
675
                gboolean found_one = FALSE;
 
676
                gboolean _tmp48_ = FALSE;
 
677
                guint32 _tmp60_ = 0U;
 
678
#line 91 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
679
                found_one = FALSE;
 
680
#line 680 "pantheon-notify.c"
 
681
                {
 
682
                        gint i = 0;
 
683
#line 92 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
684
                        i = 0;
 
685
#line 685 "pantheon-notify.c"
 
686
                        {
 
687
                                gboolean _tmp11_ = FALSE;
 
688
#line 92 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
689
                                _tmp11_ = TRUE;
 
690
#line 92 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
691
                                while (TRUE) {
 
692
#line 692 "pantheon-notify.c"
 
693
                                        gboolean _tmp12_ = FALSE;
 
694
                                        gint _tmp14_ = 0;
 
695
                                        ClutterBox* _tmp15_ = NULL;
 
696
                                        GList* _tmp16_ = NULL;
 
697
                                        GList* _tmp17_ = NULL;
 
698
                                        guint _tmp18_ = 0U;
 
699
                                        gboolean _tmp19_ = FALSE;
 
700
                                        ClutterBox* _tmp20_ = NULL;
 
701
                                        GList* _tmp21_ = NULL;
 
702
                                        GList* _tmp22_ = NULL;
 
703
                                        gint _tmp23_ = 0;
 
704
                                        gconstpointer _tmp24_ = NULL;
 
705
                                        guint32 _tmp25_ = 0U;
 
706
                                        guint32 _tmp26_ = 0U;
 
707
                                        gboolean _tmp27_ = FALSE;
 
708
#line 92 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
709
                                        _tmp12_ = _tmp11_;
 
710
#line 92 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
711
                                        if (!_tmp12_) {
 
712
#line 712 "pantheon-notify.c"
 
713
                                                gint _tmp13_ = 0;
 
714
#line 92 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
715
                                                _tmp13_ = i;
 
716
#line 92 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
717
                                                i = _tmp13_ + 1;
 
718
#line 718 "pantheon-notify.c"
 
719
                                        }
 
720
#line 92 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
721
                                        _tmp11_ = FALSE;
 
722
#line 92 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
723
                                        _tmp14_ = i;
 
724
#line 92 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
725
                                        _tmp15_ = self->box;
 
726
#line 92 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
727
                                        _tmp16_ = clutter_container_get_children ((ClutterContainer*) _tmp15_);
 
728
#line 92 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
729
                                        _tmp17_ = _tmp16_;
 
730
#line 92 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
731
                                        _tmp18_ = g_list_length (_tmp17_);
 
732
#line 92 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
733
                                        _tmp19_ = !(((guint) _tmp14_) < _tmp18_);
 
734
#line 92 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
735
                                        _g_list_free0 (_tmp17_);
 
736
#line 92 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
737
                                        if (_tmp19_) {
 
738
#line 92 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
739
                                                break;
 
740
#line 740 "pantheon-notify.c"
 
741
                                        }
 
742
#line 93 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
743
                                        _tmp20_ = self->box;
 
744
#line 93 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
745
                                        _tmp21_ = clutter_container_get_children ((ClutterContainer*) _tmp20_);
 
746
#line 93 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
747
                                        _tmp22_ = _tmp21_;
 
748
#line 93 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
749
                                        _tmp23_ = i;
 
750
#line 93 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
751
                                        _tmp24_ = g_list_nth_data (_tmp22_, (guint) _tmp23_);
 
752
#line 93 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
753
                                        _tmp25_ = G_TYPE_CHECK_INSTANCE_CAST ((ClutterActor*) _tmp24_, TYPE_NOTIFICATION, Notification)->id;
 
754
#line 93 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
755
                                        _tmp26_ = replaces_id;
 
756
#line 93 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
757
                                        _tmp27_ = _tmp25_ == _tmp26_;
 
758
#line 93 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
759
                                        _g_list_free0 (_tmp22_);
 
760
#line 93 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
761
                                        if (_tmp27_) {
 
762
#line 762 "pantheon-notify.c"
 
763
                                                ClutterBox* _tmp28_ = NULL;
 
764
                                                GList* _tmp29_ = NULL;
 
765
                                                GList* _tmp30_ = NULL;
 
766
                                                gint _tmp31_ = 0;
 
767
                                                gconstpointer _tmp32_ = NULL;
 
768
                                                const gchar* _tmp33_ = NULL;
 
769
                                                const gchar* _tmp34_ = NULL;
 
770
                                                ClutterBox* _tmp35_ = NULL;
 
771
                                                GList* _tmp36_ = NULL;
 
772
                                                GList* _tmp37_ = NULL;
 
773
                                                gint _tmp38_ = 0;
 
774
                                                gconstpointer _tmp39_ = NULL;
 
775
                                                GHashTable* _tmp40_ = NULL;
 
776
                                                const gchar* _tmp41_ = NULL;
 
777
                                                const gchar* _tmp42_ = NULL;
 
778
                                                ClutterBox* _tmp43_ = NULL;
 
779
                                                GList* _tmp44_ = NULL;
 
780
                                                GList* _tmp45_ = NULL;
 
781
                                                gint _tmp46_ = 0;
 
782
                                                gconstpointer _tmp47_ = NULL;
 
783
#line 95 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
784
                                                _tmp28_ = self->box;
 
785
#line 95 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
786
                                                _tmp29_ = clutter_container_get_children ((ClutterContainer*) _tmp28_);
 
787
#line 95 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
788
                                                _tmp30_ = _tmp29_;
 
789
#line 95 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
790
                                                _tmp31_ = i;
 
791
#line 95 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
792
                                                _tmp32_ = g_list_nth_data (_tmp30_, (guint) _tmp31_);
 
793
#line 95 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
794
                                                _tmp33_ = summary;
 
795
#line 95 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
796
                                                _tmp34_ = body;
 
797
#line 95 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
798
                                                notification_set_text (G_TYPE_CHECK_INSTANCE_CAST ((ClutterActor*) _tmp32_, TYPE_NOTIFICATION, Notification), _tmp33_, _tmp34_);
 
799
#line 95 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
800
                                                _g_list_free0 (_tmp30_);
 
801
#line 96 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
802
                                                _tmp35_ = self->box;
 
803
#line 96 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
804
                                                _tmp36_ = clutter_container_get_children ((ClutterContainer*) _tmp35_);
 
805
#line 96 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
806
                                                _tmp37_ = _tmp36_;
 
807
#line 96 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
808
                                                _tmp38_ = i;
 
809
#line 96 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
810
                                                _tmp39_ = g_list_nth_data (_tmp37_, (guint) _tmp38_);
 
811
#line 96 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
812
                                                _tmp40_ = hints;
 
813
#line 96 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
814
                                                _tmp41_ = app_name;
 
815
#line 96 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
816
                                                _tmp42_ = app_icon;
 
817
#line 96 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
818
                                                notification_set_pix (G_TYPE_CHECK_INSTANCE_CAST ((ClutterActor*) _tmp39_, TYPE_NOTIFICATION, Notification), _tmp40_, _tmp41_, _tmp42_);
 
819
#line 96 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
820
                                                _g_list_free0 (_tmp37_);
 
821
#line 97 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
822
                                                _tmp43_ = self->box;
 
823
#line 97 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
824
                                                _tmp44_ = clutter_container_get_children ((ClutterContainer*) _tmp43_);
 
825
#line 97 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
826
                                                _tmp45_ = _tmp44_;
 
827
#line 97 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
828
                                                _tmp46_ = i;
 
829
#line 97 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
830
                                                _tmp47_ = g_list_nth_data (_tmp45_, (guint) _tmp46_);
 
831
#line 97 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
832
                                                notification_updated (G_TYPE_CHECK_INSTANCE_CAST ((ClutterActor*) _tmp47_, TYPE_NOTIFICATION, Notification));
 
833
#line 97 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
834
                                                _g_list_free0 (_tmp45_);
 
835
#line 99 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
836
                                                found_one = TRUE;
 
837
#line 100 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
838
                                                break;
 
839
#line 839 "pantheon-notify.c"
 
840
                                        }
 
841
                                }
 
842
                        }
 
843
                }
 
844
#line 104 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
845
                _tmp48_ = found_one;
 
846
#line 104 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
847
                if (!_tmp48_) {
 
848
#line 848 "pantheon-notify.c"
 
849
                        ClutterBox* _tmp49_ = NULL;
 
850
                        const gchar* _tmp50_ = NULL;
 
851
                        const gchar* _tmp51_ = NULL;
 
852
                        const gchar* _tmp52_ = NULL;
 
853
                        gint32 _tmp53_ = 0;
 
854
                        const gchar* _tmp54_ = NULL;
 
855
                        GHashTable* _tmp55_ = NULL;
 
856
                        guint32 _tmp56_ = 0U;
 
857
                        gchar** _tmp57_ = NULL;
 
858
                        gint _tmp57__length1 = 0;
 
859
                        Notification* _tmp58_ = NULL;
 
860
                        Notification* _tmp59_ = NULL;
 
861
#line 105 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
862
                        _tmp49_ = self->box;
 
863
#line 105 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
864
                        _tmp50_ = summary;
 
865
#line 105 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
866
                        _tmp51_ = body;
 
867
#line 105 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
868
                        _tmp52_ = app_icon;
 
869
#line 105 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
870
                        _tmp53_ = expire_timeout;
 
871
#line 105 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
872
                        _tmp54_ = app_name;
 
873
#line 105 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
874
                        _tmp55_ = hints;
 
875
#line 105 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
876
                        _tmp56_ = replaces_id;
 
877
#line 105 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
878
                        _tmp57_ = actions;
 
879
#line 105 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
880
                        _tmp57__length1 = actions_length1;
 
881
#line 105 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
882
                        _tmp58_ = notification_new (_tmp50_, _tmp51_, _tmp52_, (guint32) _tmp53_, _tmp54_, self, _tmp55_, _tmp56_, _tmp57_, _tmp57__length1);
 
883
#line 105 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
884
                        g_object_ref_sink (_tmp58_);
 
885
#line 105 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
886
                        _tmp59_ = _tmp58_;
 
887
#line 105 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
888
                        clutter_actor_insert_child_at_index ((ClutterActor*) _tmp49_, (ClutterActor*) _tmp59_, 0);
 
889
#line 105 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
890
                        _g_object_unref0 (_tmp59_);
 
891
#line 891 "pantheon-notify.c"
 
892
                }
 
893
#line 108 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
894
                notify_server_update_input_shape (self);
 
895
#line 110 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
896
                _tmp60_ = replaces_id;
 
897
#line 110 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
898
                result = _tmp60_;
 
899
#line 110 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
900
                return result;
 
901
#line 901 "pantheon-notify.c"
 
902
        } else {
 
903
                Notification* notification = NULL;
 
904
                const gchar* _tmp61_ = NULL;
 
905
                const gchar* _tmp62_ = NULL;
 
906
                const gchar* _tmp63_ = NULL;
 
907
                gint32 _tmp64_ = 0;
 
908
                const gchar* _tmp65_ = NULL;
 
909
                GHashTable* _tmp66_ = NULL;
 
910
                gint _tmp67_ = 0;
 
911
                gchar** _tmp68_ = NULL;
 
912
                gint _tmp68__length1 = 0;
 
913
                Notification* _tmp69_ = NULL;
 
914
                ClutterBox* _tmp70_ = NULL;
 
915
                Notification* _tmp71_ = NULL;
 
916
                gint _tmp72_ = 0;
 
917
#line 113 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
918
                _tmp61_ = summary;
 
919
#line 113 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
920
                _tmp62_ = body;
 
921
#line 113 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
922
                _tmp63_ = app_icon;
 
923
#line 113 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
924
                _tmp64_ = expire_timeout;
 
925
#line 113 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
926
                _tmp65_ = app_name;
 
927
#line 113 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
928
                _tmp66_ = hints;
 
929
#line 113 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
930
                _tmp67_ = self->id_counter;
 
931
#line 113 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
932
                _tmp68_ = actions;
 
933
#line 113 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
934
                _tmp68__length1 = actions_length1;
 
935
#line 113 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
936
                _tmp69_ = notification_new (_tmp61_, _tmp62_, _tmp63_, (guint32) _tmp64_, _tmp65_, self, _tmp66_, (guint32) (_tmp67_ + 1), _tmp68_, _tmp68__length1);
 
937
#line 113 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
938
                g_object_ref_sink (_tmp69_);
 
939
#line 113 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
940
                notification = _tmp69_;
 
941
#line 115 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
942
                _tmp70_ = self->box;
 
943
#line 115 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
944
                _tmp71_ = notification;
 
945
#line 115 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
946
                clutter_actor_insert_child_at_index ((ClutterActor*) _tmp70_, (ClutterActor*) _tmp71_, 0);
 
947
#line 117 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
948
                notify_server_update_input_shape (self);
 
949
#line 118 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
950
                _tmp72_ = self->id_counter;
 
951
#line 118 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
952
                self->id_counter = _tmp72_ + 1;
 
953
#line 118 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
954
                result = (guint32) _tmp72_;
 
955
#line 118 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
956
                _g_object_unref0 (notification);
 
957
#line 118 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
958
                return result;
 
959
#line 959 "pantheon-notify.c"
 
960
        }
 
961
}
 
962
 
 
963
 
 
964
static void notify_server_class_init (NotifyServerClass * klass) {
 
965
#line 10 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
966
        notify_server_parent_class = g_type_class_peek_parent (klass);
 
967
#line 10 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
968
        G_OBJECT_CLASS (klass)->finalize = notify_server_finalize;
 
969
#line 969 "pantheon-notify.c"
 
970
}
 
971
 
 
972
 
 
973
static void notify_server_instance_init (NotifyServer * self) {
 
974
#line 12 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
975
        self->id_counter = 0;
 
976
#line 976 "pantheon-notify.c"
 
977
}
 
978
 
 
979
 
 
980
static void notify_server_finalize (GObject* obj) {
 
981
        NotifyServer * self;
 
982
#line 10 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
983
        self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_NOTIFY_SERVER, NotifyServer);
 
984
#line 14 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
985
        _g_object_unref0 (self->main_window);
 
986
#line 15 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
987
        _g_object_unref0 (self->box);
 
988
#line 10 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
989
        G_OBJECT_CLASS (notify_server_parent_class)->finalize (obj);
 
990
#line 990 "pantheon-notify.c"
 
991
}
 
992
 
 
993
 
 
994
GType notify_server_get_type (void) {
 
995
        static volatile gsize notify_server_type_id__volatile = 0;
 
996
        if (g_once_init_enter (&notify_server_type_id__volatile)) {
 
997
                static const GTypeInfo g_define_type_info = { sizeof (NotifyServerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) notify_server_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (NotifyServer), 0, (GInstanceInitFunc) notify_server_instance_init, NULL };
 
998
                GType notify_server_type_id;
 
999
                notify_server_type_id = g_type_register_static (G_TYPE_OBJECT, "NotifyServer", &g_define_type_info, 0);
 
1000
                g_type_set_qdata (notify_server_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) notify_server_register_object);
 
1001
                g_once_init_leave (&notify_server_type_id__volatile, notify_server_type_id);
 
1002
        }
 
1003
        return notify_server_type_id__volatile;
 
1004
}
 
1005
 
 
1006
 
 
1007
static void _dbus_notify_server_reposition (NotifyServer* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
 
1008
        GError* error = NULL;
 
1009
        GVariantIter _arguments_iter;
 
1010
        GDBusMessage* _reply_message;
 
1011
        GVariant* _reply;
 
1012
        GVariantBuilder _reply_builder;
 
1013
        g_variant_iter_init (&_arguments_iter, parameters);
 
1014
        notify_server_reposition (self);
 
1015
        _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
 
1016
        g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
 
1017
        _reply = g_variant_builder_end (&_reply_builder);
 
1018
        g_dbus_message_set_body (_reply_message, _reply);
 
1019
        g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
 
1020
        g_object_unref (invocation);
 
1021
        g_object_unref (_reply_message);
 
1022
}
 
1023
 
 
1024
 
 
1025
static void _dbus_notify_server_update_input_shape (NotifyServer* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
 
1026
        GError* error = NULL;
 
1027
        GVariantIter _arguments_iter;
 
1028
        GDBusMessage* _reply_message;
 
1029
        GVariant* _reply;
 
1030
        GVariantBuilder _reply_builder;
 
1031
        g_variant_iter_init (&_arguments_iter, parameters);
 
1032
        notify_server_update_input_shape (self);
 
1033
        _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
 
1034
        g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
 
1035
        _reply = g_variant_builder_end (&_reply_builder);
 
1036
        g_dbus_message_set_body (_reply_message, _reply);
 
1037
        g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
 
1038
        g_object_unref (invocation);
 
1039
        g_object_unref (_reply_message);
 
1040
}
 
1041
 
 
1042
 
 
1043
static void _dbus_notify_server_close_notification (NotifyServer* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
 
1044
        GError* error = NULL;
 
1045
        GVariantIter _arguments_iter;
 
1046
        guint32 id = 0U;
 
1047
        GVariant* _tmp0_;
 
1048
        GDBusMessage* _reply_message;
 
1049
        GVariant* _reply;
 
1050
        GVariantBuilder _reply_builder;
 
1051
        g_variant_iter_init (&_arguments_iter, parameters);
 
1052
        _tmp0_ = g_variant_iter_next_value (&_arguments_iter);
 
1053
        id = g_variant_get_uint32 (_tmp0_);
 
1054
        g_variant_unref (_tmp0_);
 
1055
        notify_server_close_notification (self, id);
 
1056
        _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
 
1057
        g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
 
1058
        _reply = g_variant_builder_end (&_reply_builder);
 
1059
        g_dbus_message_set_body (_reply_message, _reply);
 
1060
        g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
 
1061
        g_object_unref (invocation);
 
1062
        g_object_unref (_reply_message);
 
1063
}
 
1064
 
 
1065
 
 
1066
static void _dbus_notify_server_get_capabilities (NotifyServer* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
 
1067
        GError* error = NULL;
 
1068
        GVariantIter _arguments_iter;
 
1069
        GDBusMessage* _reply_message;
 
1070
        GVariant* _reply;
 
1071
        GVariantBuilder _reply_builder;
 
1072
        gchar** result;
 
1073
        int result_length1 = 0;
 
1074
        gchar** _tmp1_;
 
1075
        GVariantBuilder _tmp2_;
 
1076
        int _tmp3_;
 
1077
        g_variant_iter_init (&_arguments_iter, parameters);
 
1078
        result = notify_server_get_capabilities (self, &result_length1);
 
1079
        _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
 
1080
        g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
 
1081
        _tmp1_ = result;
 
1082
        g_variant_builder_init (&_tmp2_, G_VARIANT_TYPE ("as"));
 
1083
        for (_tmp3_ = 0; _tmp3_ < result_length1; _tmp3_++) {
 
1084
                g_variant_builder_add_value (&_tmp2_, g_variant_new_string (*_tmp1_));
 
1085
                _tmp1_++;
 
1086
        }
 
1087
        g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp2_));
 
1088
        result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL);
 
1089
        _reply = g_variant_builder_end (&_reply_builder);
 
1090
        g_dbus_message_set_body (_reply_message, _reply);
 
1091
        g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
 
1092
        g_object_unref (invocation);
 
1093
        g_object_unref (_reply_message);
 
1094
}
 
1095
 
 
1096
 
 
1097
static void _dbus_notify_server_get_server_information (NotifyServer* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
 
1098
        GError* error = NULL;
 
1099
        GVariantIter _arguments_iter;
 
1100
        GDBusMessage* _reply_message;
 
1101
        GVariant* _reply;
 
1102
        GVariantBuilder _reply_builder;
 
1103
        gchar* name = NULL;
 
1104
        gchar* vendor = NULL;
 
1105
        gchar* version = NULL;
 
1106
        gchar* spec_version = NULL;
 
1107
        g_variant_iter_init (&_arguments_iter, parameters);
 
1108
        notify_server_get_server_information (self, &name, &vendor, &version, &spec_version);
 
1109
        _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
 
1110
        g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
 
1111
        g_variant_builder_add_value (&_reply_builder, g_variant_new_string (name));
 
1112
        g_variant_builder_add_value (&_reply_builder, g_variant_new_string (vendor));
 
1113
        g_variant_builder_add_value (&_reply_builder, g_variant_new_string (version));
 
1114
        g_variant_builder_add_value (&_reply_builder, g_variant_new_string (spec_version));
 
1115
        _reply = g_variant_builder_end (&_reply_builder);
 
1116
        g_dbus_message_set_body (_reply_message, _reply);
 
1117
        _g_free0 (name);
 
1118
        _g_free0 (vendor);
 
1119
        _g_free0 (version);
 
1120
        _g_free0 (spec_version);
 
1121
        g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
 
1122
        g_object_unref (invocation);
 
1123
        g_object_unref (_reply_message);
 
1124
}
 
1125
 
 
1126
 
 
1127
static void _dbus_notify_server_notify (NotifyServer* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
 
1128
        GError* error = NULL;
 
1129
        GVariantIter _arguments_iter;
 
1130
        gchar* app_name = NULL;
 
1131
        GVariant* _tmp4_;
 
1132
        guint32 replaces_id = 0U;
 
1133
        GVariant* _tmp5_;
 
1134
        gchar* app_icon = NULL;
 
1135
        GVariant* _tmp6_;
 
1136
        gchar* summary = NULL;
 
1137
        GVariant* _tmp7_;
 
1138
        gchar* body = NULL;
 
1139
        GVariant* _tmp8_;
 
1140
        gchar** actions = NULL;
 
1141
        int actions_length1 = 0;
 
1142
        GVariant* _tmp9_;
 
1143
        gchar** _tmp10_;
 
1144
        int _tmp10__length;
 
1145
        int _tmp10__size;
 
1146
        int _tmp10__length1;
 
1147
        GVariantIter _tmp11_;
 
1148
        GVariant* _tmp12_;
 
1149
        GHashTable* hints = NULL;
 
1150
        GVariant* _tmp13_;
 
1151
        GHashTable* _tmp14_;
 
1152
        GVariantIter _tmp15_;
 
1153
        GVariant* _tmp16_;
 
1154
        GVariant* _tmp17_;
 
1155
        gint32 expire_timeout = 0;
 
1156
        GVariant* _tmp18_;
 
1157
        GDBusMessage* _reply_message;
 
1158
        GVariant* _reply;
 
1159
        GVariantBuilder _reply_builder;
 
1160
        guint32 result;
 
1161
        g_variant_iter_init (&_arguments_iter, parameters);
 
1162
        _tmp4_ = g_variant_iter_next_value (&_arguments_iter);
 
1163
        app_name = g_variant_dup_string (_tmp4_, NULL);
 
1164
        g_variant_unref (_tmp4_);
 
1165
        _tmp5_ = g_variant_iter_next_value (&_arguments_iter);
 
1166
        replaces_id = g_variant_get_uint32 (_tmp5_);
 
1167
        g_variant_unref (_tmp5_);
 
1168
        _tmp6_ = g_variant_iter_next_value (&_arguments_iter);
 
1169
        app_icon = g_variant_dup_string (_tmp6_, NULL);
 
1170
        g_variant_unref (_tmp6_);
 
1171
        _tmp7_ = g_variant_iter_next_value (&_arguments_iter);
 
1172
        summary = g_variant_dup_string (_tmp7_, NULL);
 
1173
        g_variant_unref (_tmp7_);
 
1174
        _tmp8_ = g_variant_iter_next_value (&_arguments_iter);
 
1175
        body = g_variant_dup_string (_tmp8_, NULL);
 
1176
        g_variant_unref (_tmp8_);
 
1177
        _tmp9_ = g_variant_iter_next_value (&_arguments_iter);
 
1178
        _tmp10_ = g_new (gchar*, 5);
 
1179
        _tmp10__length = 0;
 
1180
        _tmp10__size = 4;
 
1181
        _tmp10__length1 = 0;
 
1182
        g_variant_iter_init (&_tmp11_, _tmp9_);
 
1183
        for (; (_tmp12_ = g_variant_iter_next_value (&_tmp11_)) != NULL; _tmp10__length1++) {
 
1184
                if (_tmp10__size == _tmp10__length) {
 
1185
                        _tmp10__size = 2 * _tmp10__size;
 
1186
                        _tmp10_ = g_renew (gchar*, _tmp10_, _tmp10__size + 1);
 
1187
                }
 
1188
                _tmp10_[_tmp10__length++] = g_variant_dup_string (_tmp12_, NULL);
 
1189
                g_variant_unref (_tmp12_);
 
1190
        }
 
1191
        actions_length1 = _tmp10__length1;
 
1192
        _tmp10_[_tmp10__length] = NULL;
 
1193
        actions = _tmp10_;
 
1194
        g_variant_unref (_tmp9_);
 
1195
        _tmp13_ = g_variant_iter_next_value (&_arguments_iter);
 
1196
        _tmp14_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
 
1197
        g_variant_iter_init (&_tmp15_, _tmp13_);
 
1198
        while (g_variant_iter_loop (&_tmp15_, "{?*}", &_tmp16_, &_tmp17_)) {
 
1199
                g_hash_table_insert (_tmp14_, g_variant_dup_string (_tmp16_, NULL), g_variant_get_variant (_tmp17_));
 
1200
        }
 
1201
        hints = _tmp14_;
 
1202
        g_variant_unref (_tmp13_);
 
1203
        _tmp18_ = g_variant_iter_next_value (&_arguments_iter);
 
1204
        expire_timeout = g_variant_get_int32 (_tmp18_);
 
1205
        g_variant_unref (_tmp18_);
 
1206
        result = notify_server_notify (self, app_name, replaces_id, app_icon, summary, body, actions, actions_length1, hints, expire_timeout, g_dbus_method_invocation_get_sender (invocation));
 
1207
        _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
 
1208
        g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
 
1209
        g_variant_builder_add_value (&_reply_builder, g_variant_new_uint32 (result));
 
1210
        _reply = g_variant_builder_end (&_reply_builder);
 
1211
        g_dbus_message_set_body (_reply_message, _reply);
 
1212
        _g_free0 (app_name);
 
1213
        _g_free0 (app_icon);
 
1214
        _g_free0 (summary);
 
1215
        _g_free0 (body);
 
1216
        actions = (_vala_array_free (actions, actions_length1, (GDestroyNotify) g_free), NULL);
 
1217
        _g_hash_table_unref0 (hints);
 
1218
        g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
 
1219
        g_object_unref (invocation);
 
1220
        g_object_unref (_reply_message);
 
1221
}
 
1222
 
 
1223
 
 
1224
static void notify_server_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data) {
 
1225
        gpointer* data;
 
1226
        gpointer object;
 
1227
        data = user_data;
 
1228
        object = data[0];
 
1229
        if (strcmp (method_name, "Reposition") == 0) {
 
1230
                _dbus_notify_server_reposition (object, parameters, invocation);
 
1231
        } else if (strcmp (method_name, "UpdateInputShape") == 0) {
 
1232
                _dbus_notify_server_update_input_shape (object, parameters, invocation);
 
1233
        } else if (strcmp (method_name, "CloseNotification") == 0) {
 
1234
                _dbus_notify_server_close_notification (object, parameters, invocation);
 
1235
        } else if (strcmp (method_name, "GetCapabilities") == 0) {
 
1236
                _dbus_notify_server_get_capabilities (object, parameters, invocation);
 
1237
        } else if (strcmp (method_name, "GetServerInformation") == 0) {
 
1238
                _dbus_notify_server_get_server_information (object, parameters, invocation);
 
1239
        } else if (strcmp (method_name, "Notify") == 0) {
 
1240
                _dbus_notify_server_notify (object, parameters, invocation);
 
1241
        } else {
 
1242
                g_object_unref (invocation);
 
1243
        }
 
1244
}
 
1245
 
 
1246
 
 
1247
static GVariant* notify_server_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data) {
 
1248
        gpointer* data;
 
1249
        gpointer object;
 
1250
        data = user_data;
 
1251
        object = data[0];
 
1252
        return NULL;
 
1253
}
 
1254
 
 
1255
 
 
1256
static gboolean notify_server_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data) {
 
1257
        gpointer* data;
 
1258
        gpointer object;
 
1259
        data = user_data;
 
1260
        object = data[0];
 
1261
        return FALSE;
 
1262
}
 
1263
 
 
1264
 
 
1265
guint notify_server_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) {
 
1266
        guint result;
 
1267
        gpointer *data;
 
1268
        data = g_new (gpointer, 3);
 
1269
        data[0] = g_object_ref (object);
 
1270
        data[1] = g_object_ref (connection);
 
1271
        data[2] = g_strdup (path);
 
1272
        result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_notify_server_dbus_interface_info), &_notify_server_dbus_interface_vtable, data, _notify_server_unregister_object, error);
 
1273
        if (!result) {
 
1274
                return 0;
 
1275
        }
 
1276
        return result;
 
1277
}
 
1278
 
 
1279
 
 
1280
static void _notify_server_unregister_object (gpointer user_data) {
 
1281
        gpointer* data;
 
1282
        data = user_data;
 
1283
        g_object_unref (data[0]);
 
1284
        g_object_unref (data[1]);
 
1285
        g_free (data[2]);
 
1286
        g_free (data);
 
1287
}
 
1288
 
 
1289
 
 
1290
static Block1Data* block1_data_ref (Block1Data* _data1_) {
 
1291
#line 123 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1292
        g_atomic_int_inc (&_data1_->_ref_count_);
 
1293
#line 123 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1294
        return _data1_;
 
1295
#line 1295 "pantheon-notify.c"
 
1296
}
 
1297
 
 
1298
 
 
1299
static void block1_data_unref (void * _userdata_) {
 
1300
        Block1Data* _data1_;
 
1301
        _data1_ = (Block1Data*) _userdata_;
 
1302
#line 123 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1303
        if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
 
1304
#line 123 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1305
                _g_object_unref0 (_data1_->n);
 
1306
#line 123 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1307
                g_slice_free (Block1Data, _data1_);
 
1308
#line 1308 "pantheon-notify.c"
 
1309
        }
 
1310
}
 
1311
 
 
1312
 
 
1313
static void __lambda7_ (Block1Data* _data1_, GDBusConnection* con) {
 
1314
        GError * _inner_error_ = NULL;
 
1315
#line 136 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1316
        g_return_if_fail (con != NULL);
 
1317
#line 1317 "pantheon-notify.c"
 
1318
        {
 
1319
                GDBusConnection* _tmp0_ = NULL;
 
1320
#line 138 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1321
                _tmp0_ = con;
 
1322
#line 138 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1323
                notify_server_register_object (_data1_->n, _tmp0_, "/org/freedesktop/Notifications", &_inner_error_);
 
1324
#line 138 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1325
                if (_inner_error_ != NULL) {
 
1326
#line 1326 "pantheon-notify.c"
 
1327
                        goto __catch0_g_error;
 
1328
                }
 
1329
        }
 
1330
        goto __finally0;
 
1331
        __catch0_g_error:
 
1332
        {
 
1333
                GError* e = NULL;
 
1334
                GError* _tmp1_ = NULL;
 
1335
                const gchar* _tmp2_ = NULL;
 
1336
#line 137 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1337
                e = _inner_error_;
 
1338
#line 137 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1339
                _inner_error_ = NULL;
 
1340
#line 139 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1341
                _tmp1_ = e;
 
1342
#line 139 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1343
                _tmp2_ = _tmp1_->message;
 
1344
#line 139 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1345
                g_warning ("pantheon-notify.vala:139: %s", _tmp2_);
 
1346
#line 137 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1347
                _g_error_free0 (e);
 
1348
#line 1348 "pantheon-notify.c"
 
1349
        }
 
1350
        __finally0:
 
1351
#line 137 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1352
        if (_inner_error_ != NULL) {
 
1353
#line 137 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1354
                g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
 
1355
#line 137 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1356
                g_clear_error (&_inner_error_);
 
1357
#line 137 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1358
                return;
 
1359
#line 1359 "pantheon-notify.c"
 
1360
        }
 
1361
}
 
1362
 
 
1363
 
 
1364
static void ___lambda7__gbus_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self) {
 
1365
#line 132 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1366
        __lambda7_ (self, connection);
 
1367
#line 1367 "pantheon-notify.c"
 
1368
}
 
1369
 
 
1370
 
 
1371
static void __lambda8_ (void) {
 
1372
}
 
1373
 
 
1374
 
 
1375
static void ___lambda8__gbus_name_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self) {
 
1376
#line 132 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1377
        __lambda8_ ();
 
1378
#line 1378 "pantheon-notify.c"
 
1379
}
 
1380
 
 
1381
 
 
1382
static void __lambda9_ (GDBusConnection* con, const gchar* name) {
 
1383
        const gchar* _tmp0_ = NULL;
 
1384
#line 142 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1385
        g_return_if_fail (con != NULL);
 
1386
#line 142 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1387
        g_return_if_fail (name != NULL);
 
1388
#line 142 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1389
        _tmp0_ = name;
 
1390
#line 142 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1391
        g_warning ("pantheon-notify.vala:142: Could not aquire bus %s", _tmp0_);
 
1392
#line 1392 "pantheon-notify.c"
 
1393
}
 
1394
 
 
1395
 
 
1396
static void ___lambda9__gbus_name_lost_callback (GDBusConnection* connection, const gchar* name, gpointer self) {
 
1397
#line 132 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1398
        __lambda9_ (connection, name);
 
1399
#line 1399 "pantheon-notify.c"
 
1400
}
 
1401
 
 
1402
 
 
1403
void _vala_main (gchar** args, int args_length1) {
 
1404
        Block1Data* _data1_;
 
1405
        ClutterInitError cl = 0;
 
1406
        ClutterInitError _tmp0_ = 0;
 
1407
        GraniteServicesLogLevel _tmp1_ = 0;
 
1408
        GraniteServicesLogLevel _tmp2_ = 0;
 
1409
        NotifyServer* _tmp3_ = NULL;
 
1410
#line 123 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1411
        _data1_ = g_slice_new0 (Block1Data);
 
1412
#line 123 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1413
        _data1_->_ref_count_ = 1;
 
1414
#line 124 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1415
        _tmp0_ = gtk_clutter_init (&args_length1, &args);
 
1416
#line 124 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1417
        cl = _tmp0_;
 
1418
#line 125 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1419
        if (cl != CLUTTER_INIT_SUCCESS) {
 
1420
#line 126 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1421
                g_error ("pantheon-notify.vala:126: Clutter failed to initialize");
 
1422
#line 1422 "pantheon-notify.c"
 
1423
        }
 
1424
#line 128 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1425
        granite_services_logger_initialize ("pantheon-notifications");
 
1426
#line 129 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1427
        _tmp1_ = granite_services_logger_get_DisplayLevel ();
 
1428
#line 129 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1429
        _tmp2_ = _tmp1_;
 
1430
#line 129 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1431
        granite_services_logger_set_DisplayLevel (GRANITE_SERVICES_LOG_LEVEL_DEBUG);
 
1432
#line 131 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1433
        _tmp3_ = notify_server_new ();
 
1434
#line 131 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1435
        _data1_->n = _tmp3_;
 
1436
#line 132 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1437
        g_bus_own_name_with_closures (G_BUS_TYPE_SESSION, "org.freedesktop.Notifications", G_BUS_NAME_OWNER_FLAGS_NONE, (GClosure*) ((___lambda7__gbus_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda7__gbus_acquired_callback, block1_data_ref (_data1_), block1_data_unref)), (GClosure*) ((___lambda8__gbus_name_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda8__gbus_name_acquired_callback, NULL, NULL)), (GClosure*) ((___lambda9__gbus_name_lost_callback == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda9__gbus_name_lost_callback, NULL, NULL)));
 
1438
#line 144 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1439
        gtk_main ();
 
1440
#line 123 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1441
        block1_data_unref (_data1_);
 
1442
#line 123 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1443
        _data1_ = NULL;
 
1444
#line 1444 "pantheon-notify.c"
 
1445
}
 
1446
 
 
1447
 
 
1448
int main (int argc, char ** argv) {
 
1449
#line 123 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1450
        g_type_init ();
 
1451
#line 123 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1452
        _vala_main (argv, argc);
 
1453
#line 123 "/home/cjgomes/builds/pantheon-notify/src/pantheon-notify.vala"
 
1454
        return 0;
 
1455
#line 1455 "pantheon-notify.c"
 
1456
}
 
1457
 
 
1458
 
 
1459
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
 
1460
        if ((array != NULL) && (destroy_func != NULL)) {
 
1461
                int i;
 
1462
                for (i = 0; i < array_length; i = i + 1) {
 
1463
                        if (((gpointer*) array)[i] != NULL) {
 
1464
                                destroy_func (((gpointer*) array)[i]);
 
1465
                        }
 
1466
                }
 
1467
        }
 
1468
}
 
1469
 
 
1470
 
 
1471
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
 
1472
        _vala_array_destroy (array, array_length, destroy_func);
 
1473
        g_free (array);
 
1474
}
 
1475
 
 
1476
 
 
1477