New upstream version 1.0.3
[moonshot-ui.git] / src / moonshot-custom-vbox.c
1 /* moonshot-custom-vbox.c generated by valac 0.34.9, the Vala compiler
2  * generated from moonshot-custom-vbox.vala, do not modify */
3
4 /*
5  * Copyright (c) 2011-2016, JANET(UK)
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright
13  *    notice, this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright
16  *    notice, this list of conditions and the following disclaimer in the
17  *    documentation and/or other materials provided with the distribution.
18  *
19  * 3. Neither the name of JANET(UK) nor the names of its contributors
20  *    may be used to endorse or promote products derived from this software
21  *    without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
27  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33  * SUCH DAMAGE.
34 */
35
36 #include <glib.h>
37 #include <glib-object.h>
38 #include <gtk/gtk.h>
39 #include <stdlib.h>
40 #include <string.h>
41
42
43 #define TYPE_CUSTOM_VBOX (custom_vbox_get_type ())
44 #define CUSTOM_VBOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CUSTOM_VBOX, CustomVBox))
45 #define CUSTOM_VBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CUSTOM_VBOX, CustomVBoxClass))
46 #define IS_CUSTOM_VBOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CUSTOM_VBOX))
47 #define IS_CUSTOM_VBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CUSTOM_VBOX))
48 #define CUSTOM_VBOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CUSTOM_VBOX, CustomVBoxClass))
49
50 typedef struct _CustomVBox CustomVBox;
51 typedef struct _CustomVBoxClass CustomVBoxClass;
52 typedef struct _CustomVBoxPrivate CustomVBoxPrivate;
53
54 #define TYPE_IDENTITY_MANAGER_VIEW (identity_manager_view_get_type ())
55 #define IDENTITY_MANAGER_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IDENTITY_MANAGER_VIEW, IdentityManagerView))
56 #define IDENTITY_MANAGER_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IDENTITY_MANAGER_VIEW, IdentityManagerViewClass))
57 #define IS_IDENTITY_MANAGER_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IDENTITY_MANAGER_VIEW))
58 #define IS_IDENTITY_MANAGER_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IDENTITY_MANAGER_VIEW))
59 #define IDENTITY_MANAGER_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IDENTITY_MANAGER_VIEW, IdentityManagerViewClass))
60
61 typedef struct _IdentityManagerView IdentityManagerView;
62 typedef struct _IdentityManagerViewClass IdentityManagerViewClass;
63
64 #define TYPE_MOONSHOT_LOGGER (moonshot_logger_get_type ())
65 #define MOONSHOT_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MOONSHOT_LOGGER, MoonshotLogger))
66 #define MOONSHOT_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MOONSHOT_LOGGER, MoonshotLoggerClass))
67 #define IS_MOONSHOT_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MOONSHOT_LOGGER))
68 #define IS_MOONSHOT_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MOONSHOT_LOGGER))
69 #define MOONSHOT_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MOONSHOT_LOGGER, MoonshotLoggerClass))
70
71 typedef struct _MoonshotLogger MoonshotLogger;
72 typedef struct _MoonshotLoggerClass MoonshotLoggerClass;
73 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
74
75 #define TYPE_ID_CARD_WIDGET (id_card_widget_get_type ())
76 #define ID_CARD_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ID_CARD_WIDGET, IdCardWidget))
77 #define ID_CARD_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ID_CARD_WIDGET, IdCardWidgetClass))
78 #define IS_ID_CARD_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ID_CARD_WIDGET))
79 #define IS_ID_CARD_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ID_CARD_WIDGET))
80 #define ID_CARD_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ID_CARD_WIDGET, IdCardWidgetClass))
81
82 typedef struct _IdCardWidget IdCardWidget;
83 typedef struct _IdCardWidgetClass IdCardWidgetClass;
84 #define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
85
86 #define TYPE_ID_CARD (id_card_get_type ())
87 #define ID_CARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ID_CARD, IdCard))
88 #define ID_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ID_CARD, IdCardClass))
89 #define IS_ID_CARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ID_CARD))
90 #define IS_ID_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ID_CARD))
91 #define ID_CARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ID_CARD, IdCardClass))
92
93 typedef struct _IdCard IdCard;
94 typedef struct _IdCardClass IdCardClass;
95
96 struct _CustomVBox {
97         GtkVBox parent_instance;
98         CustomVBoxPrivate * priv;
99 };
100
101 struct _CustomVBoxClass {
102         GtkVBoxClass parent_class;
103 };
104
105 struct _CustomVBoxPrivate {
106         IdentityManagerView* main_window;
107         gint next_pos;
108 };
109
110
111 static gpointer custom_vbox_parent_class = NULL;
112 static MoonshotLogger* custom_vbox_logger;
113 static MoonshotLogger* custom_vbox_logger = NULL;
114
115 GType custom_vbox_get_type (void) G_GNUC_CONST;
116 GType identity_manager_view_get_type (void) G_GNUC_CONST;
117 #define CUSTOM_VBOX_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_CUSTOM_VBOX, CustomVBoxPrivate))
118 enum  {
119         CUSTOM_VBOX_DUMMY_PROPERTY
120 };
121 GType moonshot_logger_get_type (void) G_GNUC_CONST;
122 MoonshotLogger* get_logger (const gchar* name);
123 CustomVBox* custom_vbox_new (IdentityManagerView* window, gboolean homogeneous, gint spacing);
124 CustomVBox* custom_vbox_construct (GType object_type, IdentityManagerView* window, gboolean homogeneous, gint spacing);
125 GType id_card_widget_get_type (void) G_GNUC_CONST;
126 void custom_vbox_receive_expanded_event (CustomVBox* self, IdCardWidget* id_card_widget);
127 void id_card_widget_collapse (IdCardWidget* self);
128 void custom_vbox_receive_collapsed_event (CustomVBox* self, IdCardWidget* id_card_widget);
129 void custom_vbox_add_id_card_widget (CustomVBox* self, IdCardWidget* id_card_widget);
130 void id_card_widget_set_position (IdCardWidget* self, gint value);
131 GType id_card_get_type (void) G_GNUC_CONST;
132 IdCardWidget* custom_vbox_find_idcard_widget (CustomVBox* self, IdCard* card);
133 IdCard* id_card_widget_get_id_card (IdCardWidget* self);
134 void custom_vbox_clear (CustomVBox* self);
135 void moonshot_logger_trace (MoonshotLogger* self, const gchar* message, GError* e);
136 static void custom_vbox_finalize (GObject* obj);
137
138
139 static gpointer _g_object_ref0 (gpointer self) {
140 #line 42 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
141         return self ? g_object_ref (self) : NULL;
142 #line 143 "moonshot-custom-vbox.c"
143 }
144
145
146 CustomVBox* custom_vbox_construct (GType object_type, IdentityManagerView* window, gboolean homogeneous, gint spacing) {
147         CustomVBox * self = NULL;
148         IdentityManagerView* _tmp0_ = NULL;
149         IdentityManagerView* _tmp1_ = NULL;
150         gboolean _tmp2_ = FALSE;
151         gint _tmp3_ = 0;
152 #line 40 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
153         g_return_val_if_fail (window != NULL, NULL);
154 #line 40 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
155         self = (CustomVBox*) g_object_new (object_type, NULL);
156 #line 42 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
157         _tmp0_ = window;
158 #line 42 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
159         _tmp1_ = _g_object_ref0 (_tmp0_);
160 #line 42 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
161         _g_object_unref0 (self->priv->main_window);
162 #line 42 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
163         self->priv->main_window = _tmp1_;
164 #line 43 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
165         _tmp2_ = homogeneous;
166 #line 43 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
167         gtk_box_set_homogeneous ((GtkBox*) self, _tmp2_);
168 #line 44 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
169         _tmp3_ = spacing;
170 #line 44 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
171         gtk_box_set_spacing ((GtkBox*) self, _tmp3_);
172 #line 40 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
173         return self;
174 #line 175 "moonshot-custom-vbox.c"
175 }
176
177
178 CustomVBox* custom_vbox_new (IdentityManagerView* window, gboolean homogeneous, gint spacing) {
179 #line 40 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
180         return custom_vbox_construct (TYPE_CUSTOM_VBOX, window, homogeneous, spacing);
181 #line 182 "moonshot-custom-vbox.c"
182 }
183
184
185 void custom_vbox_receive_expanded_event (CustomVBox* self, IdCardWidget* id_card_widget) {
186         GList* list = NULL;
187         GList* _tmp0_ = NULL;
188         GList* _tmp1_ = NULL;
189 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
190         g_return_if_fail (self != NULL);
191 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
192         g_return_if_fail (id_card_widget != NULL);
193 #line 49 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
194         _tmp0_ = gtk_container_get_children ((GtkContainer*) self);
195 #line 49 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
196         list = _tmp0_;
197 #line 50 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
198         _tmp1_ = list;
199 #line 200 "moonshot-custom-vbox.c"
200         {
201                 GList* id_card_collection = NULL;
202                 GList* id_card_it = NULL;
203 #line 50 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
204                 id_card_collection = _tmp1_;
205 #line 50 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
206                 for (id_card_it = id_card_collection; id_card_it != NULL; id_card_it = id_card_it->next) {
207 #line 208 "moonshot-custom-vbox.c"
208                         GtkWidget* _tmp2_ = NULL;
209                         GtkWidget* id_card = NULL;
210 #line 50 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
211                         _tmp2_ = _g_object_ref0 ((GtkWidget*) id_card_it->data);
212 #line 50 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
213                         id_card = _tmp2_;
214 #line 215 "moonshot-custom-vbox.c"
215                         {
216                                 GtkWidget* _tmp3_ = NULL;
217                                 IdCardWidget* _tmp4_ = NULL;
218 #line 52 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
219                                 _tmp3_ = id_card;
220 #line 52 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
221                                 _tmp4_ = id_card_widget;
222 #line 52 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
223                                 if (_tmp3_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GTK_TYPE_WIDGET, GtkWidget)) {
224 #line 225 "moonshot-custom-vbox.c"
225                                         GtkWidget* _tmp5_ = NULL;
226 #line 53 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
227                                         _tmp5_ = id_card;
228 #line 53 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
229                                         id_card_widget_collapse (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_ID_CARD_WIDGET, IdCardWidget));
230 #line 231 "moonshot-custom-vbox.c"
231                                 }
232 #line 50 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
233                                 _g_object_unref0 (id_card);
234 #line 235 "moonshot-custom-vbox.c"
235                         }
236                 }
237         }
238 #line 56 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
239         gtk_container_check_resize ((GtkContainer*) self);
240 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
241         _g_list_free0 (list);
242 #line 243 "moonshot-custom-vbox.c"
243 }
244
245
246 void custom_vbox_receive_collapsed_event (CustomVBox* self, IdCardWidget* id_card_widget) {
247 #line 59 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
248         g_return_if_fail (self != NULL);
249 #line 59 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
250         g_return_if_fail (id_card_widget != NULL);
251 #line 61 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
252         gtk_container_check_resize ((GtkContainer*) self);
253 #line 254 "moonshot-custom-vbox.c"
254 }
255
256
257 void custom_vbox_add_id_card_widget (CustomVBox* self, IdCardWidget* id_card_widget) {
258         IdCardWidget* _tmp0_ = NULL;
259         IdCardWidget* _tmp1_ = NULL;
260         gint _tmp2_ = 0;
261 #line 64 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
262         g_return_if_fail (self != NULL);
263 #line 64 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
264         g_return_if_fail (id_card_widget != NULL);
265 #line 66 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
266         _tmp0_ = id_card_widget;
267 #line 66 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
268         gtk_box_pack_start ((GtkBox*) self, (GtkWidget*) _tmp0_, FALSE, FALSE, (guint) 0);
269 #line 67 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
270         _tmp1_ = id_card_widget;
271 #line 67 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
272         _tmp2_ = self->priv->next_pos;
273 #line 67 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
274         self->priv->next_pos = _tmp2_ + 1;
275 #line 67 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
276         id_card_widget_set_position (_tmp1_, _tmp2_);
277 #line 278 "moonshot-custom-vbox.c"
278 }
279
280
281 IdCardWidget* custom_vbox_find_idcard_widget (CustomVBox* self, IdCard* card) {
282         IdCardWidget* result = NULL;
283         IdCard* _tmp0_ = NULL;
284         GList* _tmp1_ = NULL;
285 #line 70 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
286         g_return_val_if_fail (self != NULL, NULL);
287 #line 71 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
288         _tmp0_ = card;
289 #line 71 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
290         if (_tmp0_ == NULL) {
291 #line 72 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
292                 result = NULL;
293 #line 72 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
294                 return result;
295 #line 296 "moonshot-custom-vbox.c"
296         }
297 #line 74 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
298         _tmp1_ = gtk_container_get_children ((GtkContainer*) self);
299 #line 300 "moonshot-custom-vbox.c"
300         {
301                 GList* w_collection = NULL;
302                 GList* w_it = NULL;
303 #line 74 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
304                 w_collection = _tmp1_;
305 #line 74 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
306                 for (w_it = w_collection; w_it != NULL; w_it = w_it->next) {
307 #line 308 "moonshot-custom-vbox.c"
308                         GtkWidget* w = NULL;
309 #line 74 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
310                         w = (GtkWidget*) w_it->data;
311 #line 312 "moonshot-custom-vbox.c"
312                         {
313                                 IdCardWidget* widget = NULL;
314                                 GtkWidget* _tmp2_ = NULL;
315                                 IdCardWidget* _tmp3_ = NULL;
316                                 IdCardWidget* _tmp4_ = NULL;
317                                 IdCard* _tmp5_ = NULL;
318                                 IdCard* _tmp6_ = NULL;
319                                 IdCard* _tmp7_ = NULL;
320 #line 75 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
321                                 _tmp2_ = w;
322 #line 75 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
323                                 _tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_ID_CARD_WIDGET, IdCardWidget));
324 #line 75 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
325                                 widget = _tmp3_;
326 #line 76 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
327                                 _tmp4_ = widget;
328 #line 76 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
329                                 _tmp5_ = id_card_widget_get_id_card (_tmp4_);
330 #line 76 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
331                                 _tmp6_ = _tmp5_;
332 #line 76 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
333                                 _tmp7_ = card;
334 #line 76 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
335                                 if (_tmp6_ == _tmp7_) {
336 #line 77 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
337                                         result = widget;
338 #line 77 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
339                                         _g_list_free0 (w_collection);
340 #line 77 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
341                                         return result;
342 #line 343 "moonshot-custom-vbox.c"
343                                 }
344 #line 74 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
345                                 _g_object_unref0 (widget);
346 #line 347 "moonshot-custom-vbox.c"
347                         }
348                 }
349 #line 74 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
350                 _g_list_free0 (w_collection);
351 #line 352 "moonshot-custom-vbox.c"
352         }
353 #line 80 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
354         result = NULL;
355 #line 80 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
356         return result;
357 #line 358 "moonshot-custom-vbox.c"
358 }
359
360
361 void custom_vbox_clear (CustomVBox* self) {
362         MoonshotLogger* _tmp0_ = NULL;
363         GList* children = NULL;
364         GList* _tmp1_ = NULL;
365         GList* _tmp2_ = NULL;
366 #line 83 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
367         g_return_if_fail (self != NULL);
368 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
369         _tmp0_ = custom_vbox_logger;
370 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
371         moonshot_logger_trace (_tmp0_, "clear", NULL);
372 #line 87 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
373         _tmp1_ = gtk_container_get_children ((GtkContainer*) self);
374 #line 87 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
375         children = _tmp1_;
376 #line 88 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
377         _tmp2_ = children;
378 #line 379 "moonshot-custom-vbox.c"
379         {
380                 GList* id_card_widget_collection = NULL;
381                 GList* id_card_widget_it = NULL;
382 #line 88 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
383                 id_card_widget_collection = _tmp2_;
384 #line 88 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
385                 for (id_card_widget_it = id_card_widget_collection; id_card_widget_it != NULL; id_card_widget_it = id_card_widget_it->next) {
386 #line 387 "moonshot-custom-vbox.c"
387                         GtkWidget* id_card_widget = NULL;
388 #line 88 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
389                         id_card_widget = (GtkWidget*) id_card_widget_it->data;
390 #line 391 "moonshot-custom-vbox.c"
391                         {
392                                 GtkWidget* _tmp3_ = NULL;
393 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
394                                 _tmp3_ = id_card_widget;
395 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
396                                 gtk_container_remove ((GtkContainer*) self, _tmp3_);
397 #line 398 "moonshot-custom-vbox.c"
398                         }
399                 }
400         }
401 #line 92 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
402         self->priv->next_pos = 0;
403 #line 83 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
404         _g_list_free0 (children);
405 #line 406 "moonshot-custom-vbox.c"
406 }
407
408
409 static void custom_vbox_class_init (CustomVBoxClass * klass) {
410         MoonshotLogger* _tmp0_ = NULL;
411 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
412         custom_vbox_parent_class = g_type_class_peek_parent (klass);
413 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
414         g_type_class_add_private (klass, sizeof (CustomVBoxPrivate));
415 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
416         G_OBJECT_CLASS (klass)->finalize = custom_vbox_finalize;
417 #line 36 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
418         _tmp0_ = get_logger ("CustomVBox");
419 #line 36 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
420         custom_vbox_logger = _tmp0_;
421 #line 422 "moonshot-custom-vbox.c"
422 }
423
424
425 static void custom_vbox_instance_init (CustomVBox * self) {
426 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
427         self->priv = CUSTOM_VBOX_GET_PRIVATE (self);
428 #line 38 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
429         self->priv->next_pos = 0;
430 #line 431 "moonshot-custom-vbox.c"
431 }
432
433
434 static void custom_vbox_finalize (GObject* obj) {
435         CustomVBox * self;
436 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
437         self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_CUSTOM_VBOX, CustomVBox);
438 #line 37 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
439         _g_object_unref0 (self->priv->main_window);
440 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-custom-vbox.vala"
441         G_OBJECT_CLASS (custom_vbox_parent_class)->finalize (obj);
442 #line 443 "moonshot-custom-vbox.c"
443 }
444
445
446 GType custom_vbox_get_type (void) {
447         static volatile gsize custom_vbox_type_id__volatile = 0;
448         if (g_once_init_enter (&custom_vbox_type_id__volatile)) {
449                 static const GTypeInfo g_define_type_info = { sizeof (CustomVBoxClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) custom_vbox_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CustomVBox), 0, (GInstanceInitFunc) custom_vbox_instance_init, NULL };
450                 GType custom_vbox_type_id;
451                 custom_vbox_type_id = g_type_register_static (GTK_TYPE_VBOX, "CustomVBox", &g_define_type_info, 0);
452                 g_once_init_leave (&custom_vbox_type_id__volatile, custom_vbox_type_id);
453         }
454         return custom_vbox_type_id__volatile;
455 }
456
457
458