Imported Upstream version 1.5.4
[platform/upstream/ibus.git] / ui / gtk3 / candidatearea.c
1 /* candidatearea.c generated by valac 0.20.1, the Vala compiler
2  * generated from candidatearea.vala, do not modify */
3
4 /* vim:set et sts=4 sw=4:
5  *
6  * ibus - The Input Bus
7  *
8  * Copyright(c) 2011 Peng Huang <shawn.p.huang@gmail.com>
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 2.1 of the License, or (at your option) any later version.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with this library; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
23  * USA
24  */
25
26 #include <glib.h>
27 #include <glib-object.h>
28 #include <gtk/gtk.h>
29 #include <ibus.h>
30 #include <stdlib.h>
31 #include <string.h>
32 #include <pango/pango.h>
33 #include <gdk/gdk.h>
34
35
36 #define TYPE_CANDIDATE_AREA (candidate_area_get_type ())
37 #define CANDIDATE_AREA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CANDIDATE_AREA, CandidateArea))
38 #define CANDIDATE_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CANDIDATE_AREA, CandidateAreaClass))
39 #define IS_CANDIDATE_AREA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CANDIDATE_AREA))
40 #define IS_CANDIDATE_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CANDIDATE_AREA))
41 #define CANDIDATE_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CANDIDATE_AREA, CandidateAreaClass))
42
43 typedef struct _CandidateArea CandidateArea;
44 typedef struct _CandidateAreaClass CandidateAreaClass;
45 typedef struct _CandidateAreaPrivate CandidateAreaPrivate;
46 #define _pango_attribute_destroy0(var) ((var == NULL) ? NULL : (var = (pango_attribute_destroy (var), NULL)))
47 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
48 #define __vala_PangoAttrList_free0(var) ((var == NULL) ? NULL : (var = (_vala_PangoAttrList_free (var), NULL)))
49 #define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
50
51 #define TYPE_VSEPARATOR (vseparator_get_type ())
52 #define VSEPARATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VSEPARATOR, VSeparator))
53 #define VSEPARATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VSEPARATOR, VSeparatorClass))
54 #define IS_VSEPARATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VSEPARATOR))
55 #define IS_VSEPARATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VSEPARATOR))
56 #define VSEPARATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VSEPARATOR, VSeparatorClass))
57
58 typedef struct _VSeparator VSeparator;
59 typedef struct _VSeparatorClass VSeparatorClass;
60
61 #define TYPE_HSEPARATOR (hseparator_get_type ())
62 #define HSEPARATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_HSEPARATOR, HSeparator))
63 #define HSEPARATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_HSEPARATOR, HSeparatorClass))
64 #define IS_HSEPARATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_HSEPARATOR))
65 #define IS_HSEPARATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_HSEPARATOR))
66 #define HSEPARATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_HSEPARATOR, HSeparatorClass))
67
68 typedef struct _HSeparator HSeparator;
69 typedef struct _HSeparatorClass HSeparatorClass;
70 typedef struct _Block1Data Block1Data;
71 typedef struct _Block2Data Block2Data;
72 typedef struct _Block3Data Block3Data;
73 #define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
74
75 struct _CandidateArea {
76         GtkBox parent_instance;
77         CandidateAreaPrivate * priv;
78 };
79
80 struct _CandidateAreaClass {
81         GtkBoxClass parent_class;
82 };
83
84 struct _CandidateAreaPrivate {
85         gboolean m_vertical;
86         GtkLabel** m_labels;
87         gint m_labels_length1;
88         gint _m_labels_size_;
89         GtkLabel** m_candidates;
90         gint m_candidates_length1;
91         gint _m_candidates_size_;
92         GtkWidget** m_widgets;
93         gint m_widgets_length1;
94         gint _m_widgets_size_;
95         IBusText** m_ibus_candidates;
96         gint m_ibus_candidates_length1;
97         gint _m_ibus_candidates_size_;
98         guint m_focus_candidate;
99         gboolean m_show_cursor;
100 };
101
102 struct _Block1Data {
103         int _ref_count_;
104         CandidateArea * self;
105         gint i;
106 };
107
108 struct _Block2Data {
109         int _ref_count_;
110         Block1Data * _data1_;
111         gint index;
112 };
113
114 struct _Block3Data {
115         int _ref_count_;
116         CandidateArea * self;
117         gint index;
118 };
119
120
121 static gpointer candidate_area_parent_class = NULL;
122
123 GType candidate_area_get_type (void) G_GNUC_CONST;
124 #define CANDIDATE_AREA_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_CANDIDATE_AREA, CandidateAreaPrivate))
125 enum  {
126         CANDIDATE_AREA_DUMMY_PROPERTY
127 };
128 CandidateArea* candidate_area_new (gboolean vertical);
129 CandidateArea* candidate_area_construct (GType object_type, gboolean vertical);
130 void candidate_area_set_vertical (CandidateArea* self, gboolean vertical, gboolean force);
131 static void candidate_area_recreate_ui (CandidateArea* self);
132 void candidate_area_set_candidates (CandidateArea* self, IBusText** candidates, int candidates_length1, guint focus_candidate, gboolean show_cursor);
133 void candidate_area_set_labels (CandidateArea* self, IBusText** labels, int labels_length1);
134 static IBusText** _vala_array_dup1 (IBusText** self, int length);
135 PangoAttrList* get_pango_attr_list_from_ibus_text (IBusText* text);
136 static void _vala_PangoAttrList_free (PangoAttrList* self);
137 static void __lambda2_ (CandidateArea* self, GtkButton* b);
138 static void ___lambda2__gtk_button_clicked (GtkButton* _sender, gpointer self);
139 static void __lambda3_ (CandidateArea* self, GtkButton* b);
140 static void ___lambda3__gtk_button_clicked (GtkButton* _sender, gpointer self);
141 VSeparator* vseparator_new (void);
142 VSeparator* vseparator_construct (GType object_type);
143 GType vseparator_get_type (void) G_GNUC_CONST;
144 HSeparator* hseparator_new (void);
145 HSeparator* hseparator_construct (GType object_type);
146 GType hseparator_get_type (void) G_GNUC_CONST;
147 static Block1Data* block1_data_ref (Block1Data* _data1_);
148 static void block1_data_unref (void * _userdata_);
149 static Block2Data* block2_data_ref (Block2Data* _data2_);
150 static void block2_data_unref (void * _userdata_);
151 static void _vala_array_add1 (GtkLabel*** array, int* length, int* size, GtkLabel* value);
152 static void _vala_array_add2 (GtkLabel*** array, int* length, int* size, GtkLabel* value);
153 static gboolean ______lambda4_ (Block2Data* _data2_, GtkWidget* w, GdkEventButton* e);
154 static gboolean _______lambda4__gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self);
155 static void _vala_array_add3 (GtkWidget*** array, int* length, int* size, GtkWidget* value);
156 static gboolean ______lambda5_ (Block2Data* _data2_, GtkWidget* w, GdkEventButton* e);
157 static gboolean _______lambda5__gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self);
158 static void _vala_array_add4 (GtkWidget*** array, int* length, int* size, GtkWidget* value);
159 static Block3Data* block3_data_ref (Block3Data* _data3_);
160 static void block3_data_unref (void * _userdata_);
161 static void _vala_array_add5 (GtkLabel*** array, int* length, int* size, GtkLabel* value);
162 static void _vala_array_add6 (GtkLabel*** array, int* length, int* size, GtkLabel* value);
163 static gboolean ______lambda6_ (Block3Data* _data3_, GtkWidget* w, GdkEventButton* e);
164 static gboolean _______lambda6__gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self);
165 static void _vala_array_add7 (GtkWidget*** array, int* length, int* size, GtkWidget* value);
166 static void g_cclosure_user_marshal_VOID__UINT_UINT_UINT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
167 static void candidate_area_finalize (GObject* obj);
168 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
169 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
170
171 static const gchar* CANDIDATE_AREA_LABELS[16] = {"1.", "2.", "3.", "4.", "5.", "6.", "7.", "8.", "9.", "0.", "a.", "b.", "c.", "d.", "e.", "f."};
172 static const gchar* CANDIDATE_AREA_PREV_PAGE_ICONS[2] = {GTK_STOCK_GO_BACK, GTK_STOCK_GO_UP};
173 static const gchar* CANDIDATE_AREA_NEXT_PAGE_ICONS[2] = {GTK_STOCK_GO_FORWARD, GTK_STOCK_GO_DOWN};
174
175 CandidateArea* candidate_area_construct (GType object_type, gboolean vertical) {
176         CandidateArea * self = NULL;
177         gboolean _tmp0_;
178         self = (CandidateArea*) g_object_new (object_type, NULL);
179         _tmp0_ = vertical;
180         candidate_area_set_vertical (self, _tmp0_, TRUE);
181         return self;
182 }
183
184
185 CandidateArea* candidate_area_new (gboolean vertical) {
186         return candidate_area_construct (TYPE_CANDIDATE_AREA, vertical);
187 }
188
189
190 void candidate_area_set_vertical (CandidateArea* self, gboolean vertical, gboolean force) {
191         gboolean _tmp0_ = FALSE;
192         gboolean _tmp1_;
193         gboolean _tmp4_;
194         gboolean _tmp5_;
195         GtkOrientation _tmp6_ = 0;
196         gboolean _tmp7_;
197         GtkOrientation _tmp8_;
198         IBusText** _tmp9_;
199         gint _tmp9__length1;
200         g_return_if_fail (self != NULL);
201         _tmp1_ = force;
202         if (!_tmp1_) {
203                 gboolean _tmp2_;
204                 gboolean _tmp3_;
205                 _tmp2_ = self->priv->m_vertical;
206                 _tmp3_ = vertical;
207                 _tmp0_ = _tmp2_ == _tmp3_;
208         } else {
209                 _tmp0_ = FALSE;
210         }
211         _tmp4_ = _tmp0_;
212         if (_tmp4_) {
213                 return;
214         }
215         _tmp5_ = vertical;
216         self->priv->m_vertical = _tmp5_;
217         _tmp7_ = vertical;
218         if (_tmp7_) {
219                 _tmp6_ = GTK_ORIENTATION_VERTICAL;
220         } else {
221                 _tmp6_ = GTK_ORIENTATION_HORIZONTAL;
222         }
223         _tmp8_ = _tmp6_;
224         gtk_orientable_set_orientation ((GtkOrientable*) self, _tmp8_);
225         candidate_area_recreate_ui (self);
226         _tmp9_ = self->priv->m_ibus_candidates;
227         _tmp9__length1 = self->priv->m_ibus_candidates_length1;
228         if (_tmp9__length1 > 0) {
229                 IBusText** _tmp10_;
230                 gint _tmp10__length1;
231                 IBusText** _tmp11_;
232                 gint _tmp11__length1;
233                 guint _tmp12_;
234                 gboolean _tmp13_;
235                 _tmp10_ = self->priv->m_ibus_candidates;
236                 _tmp10__length1 = self->priv->m_ibus_candidates_length1;
237                 self->priv->m_ibus_candidates = NULL;
238                 _tmp11_ = _tmp10_;
239                 _tmp11__length1 = _tmp10__length1;
240                 _tmp12_ = self->priv->m_focus_candidate;
241                 _tmp13_ = self->priv->m_show_cursor;
242                 candidate_area_set_candidates (self, _tmp11_, _tmp10__length1, _tmp12_, _tmp13_);
243                 _tmp11_ = (_vala_array_free (_tmp11_, _tmp11__length1, (GDestroyNotify) g_object_unref), NULL);
244                 gtk_widget_show_all ((GtkWidget*) self);
245         }
246 }
247
248
249 void candidate_area_set_labels (CandidateArea* self, IBusText** labels, int labels_length1) {
250         gint i = 0;
251         g_return_if_fail (self != NULL);
252         {
253                 gboolean _tmp0_;
254                 i = 0;
255                 _tmp0_ = TRUE;
256                 while (TRUE) {
257                         gboolean _tmp1_;
258                         gint _tmp3_;
259                         IBusText** _tmp4_;
260                         gint _tmp4__length1;
261                         gint _tmp5_ = 0;
262                         GtkLabel** _tmp6_;
263                         gint _tmp6__length1;
264                         gint _tmp7_;
265                         GtkLabel* _tmp8_;
266                         IBusText** _tmp9_;
267                         gint _tmp9__length1;
268                         gint _tmp10_;
269                         IBusText* _tmp11_;
270                         const gchar* _tmp12_ = NULL;
271                         _tmp1_ = _tmp0_;
272                         if (!_tmp1_) {
273                                 gint _tmp2_;
274                                 _tmp2_ = i;
275                                 i = _tmp2_ + 1;
276                         }
277                         _tmp0_ = FALSE;
278                         _tmp3_ = i;
279                         _tmp4_ = labels;
280                         _tmp4__length1 = labels_length1;
281                         _tmp5_ = MIN (16, _tmp4__length1);
282                         if (!(_tmp3_ < _tmp5_)) {
283                                 break;
284                         }
285                         _tmp6_ = self->priv->m_labels;
286                         _tmp6__length1 = self->priv->m_labels_length1;
287                         _tmp7_ = i;
288                         _tmp8_ = _tmp6_[_tmp7_];
289                         _tmp9_ = labels;
290                         _tmp9__length1 = labels_length1;
291                         _tmp10_ = i;
292                         _tmp11_ = _tmp9_[_tmp10_];
293                         _tmp12_ = ibus_text_get_text (_tmp11_);
294                         gtk_label_set_text (_tmp8_, _tmp12_);
295                 }
296         }
297         {
298                 gboolean _tmp13_;
299                 _tmp13_ = TRUE;
300                 while (TRUE) {
301                         gboolean _tmp14_;
302                         gint _tmp16_;
303                         GtkLabel** _tmp17_;
304                         gint _tmp17__length1;
305                         gint _tmp18_;
306                         GtkLabel* _tmp19_;
307                         gint _tmp20_;
308                         const gchar* _tmp21_;
309                         _tmp14_ = _tmp13_;
310                         if (!_tmp14_) {
311                                 gint _tmp15_;
312                                 _tmp15_ = i;
313                                 i = _tmp15_ + 1;
314                         }
315                         _tmp13_ = FALSE;
316                         _tmp16_ = i;
317                         if (!(_tmp16_ < 16)) {
318                                 break;
319                         }
320                         _tmp17_ = self->priv->m_labels;
321                         _tmp17__length1 = self->priv->m_labels_length1;
322                         _tmp18_ = i;
323                         _tmp19_ = _tmp17_[_tmp18_];
324                         _tmp20_ = i;
325                         _tmp21_ = CANDIDATE_AREA_LABELS[_tmp20_];
326                         gtk_label_set_text (_tmp19_, _tmp21_);
327                 }
328         }
329 }
330
331
332 static gpointer _g_object_ref0 (gpointer self) {
333         return self ? g_object_ref (self) : NULL;
334 }
335
336
337 static IBusText** _vala_array_dup1 (IBusText** self, int length) {
338         IBusText** result;
339         int i;
340         result = g_new0 (IBusText*, length + 1);
341         for (i = 0; i < length; i++) {
342                 IBusText* _tmp0_;
343                 _tmp0_ = _g_object_ref0 (self[i]);
344                 result[i] = _tmp0_;
345         }
346         return result;
347 }
348
349
350 static void _vala_PangoAttrList_free (PangoAttrList* self) {
351         g_boxed_free (pango_attr_list_get_type (), self);
352 }
353
354
355 void candidate_area_set_candidates (CandidateArea* self, IBusText** candidates, int candidates_length1, guint focus_candidate, gboolean show_cursor) {
356         IBusText** _tmp0_;
357         gint _tmp0__length1;
358         IBusText** _tmp1_;
359         gint _tmp1__length1;
360         guint _tmp2_;
361         gboolean _tmp3_;
362         IBusText** _tmp4_;
363         gint _tmp4__length1;
364         g_return_if_fail (self != NULL);
365         _tmp0_ = candidates;
366         _tmp0__length1 = candidates_length1;
367         _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup1 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
368         _tmp1__length1 = _tmp0__length1;
369         self->priv->m_ibus_candidates = (_vala_array_free (self->priv->m_ibus_candidates, self->priv->m_ibus_candidates_length1, (GDestroyNotify) g_object_unref), NULL);
370         self->priv->m_ibus_candidates = _tmp1_;
371         self->priv->m_ibus_candidates_length1 = _tmp1__length1;
372         self->priv->_m_ibus_candidates_size_ = self->priv->m_ibus_candidates_length1;
373         _tmp2_ = focus_candidate;
374         self->priv->m_focus_candidate = _tmp2_;
375         _tmp3_ = show_cursor;
376         self->priv->m_show_cursor = _tmp3_;
377         _tmp4_ = candidates;
378         _tmp4__length1 = candidates_length1;
379         _vala_assert (_tmp4__length1 < 16, "candidates.length < 16");
380         {
381                 gint i;
382                 i = 0;
383                 {
384                         gboolean _tmp5_;
385                         _tmp5_ = TRUE;
386                         while (TRUE) {
387                                 gboolean _tmp6_;
388                                 gint _tmp8_;
389                                 GtkLabel** _tmp9_;
390                                 gint _tmp9__length1;
391                                 gint _tmp10_;
392                                 GtkLabel* _tmp11_;
393                                 GtkLabel* _tmp12_;
394                                 GtkLabel* label;
395                                 gboolean visible;
396                                 gint _tmp13_;
397                                 IBusText** _tmp14_;
398                                 gint _tmp14__length1;
399                                 gboolean _tmp84_;
400                                 _tmp6_ = _tmp5_;
401                                 if (!_tmp6_) {
402                                         gint _tmp7_;
403                                         _tmp7_ = i;
404                                         i = _tmp7_ + 1;
405                                 }
406                                 _tmp5_ = FALSE;
407                                 _tmp8_ = i;
408                                 if (!(_tmp8_ < 16)) {
409                                         break;
410                                 }
411                                 _tmp9_ = self->priv->m_candidates;
412                                 _tmp9__length1 = self->priv->m_candidates_length1;
413                                 _tmp10_ = i;
414                                 _tmp11_ = _tmp9_[_tmp10_];
415                                 _tmp12_ = _g_object_ref0 (_tmp11_);
416                                 label = _tmp12_;
417                                 visible = FALSE;
418                                 _tmp13_ = i;
419                                 _tmp14_ = candidates;
420                                 _tmp14__length1 = candidates_length1;
421                                 if (_tmp13_ < _tmp14__length1) {
422                                         IBusText** _tmp15_;
423                                         gint _tmp15__length1;
424                                         gint _tmp16_;
425                                         IBusText* _tmp17_;
426                                         PangoAttrList* _tmp18_ = NULL;
427                                         PangoAttrList* attrs;
428                                         gboolean _tmp19_ = FALSE;
429                                         gint _tmp20_;
430                                         guint _tmp21_;
431                                         gboolean _tmp23_;
432                                         GtkLabel* _tmp73_;
433                                         IBusText** _tmp74_;
434                                         gint _tmp74__length1;
435                                         gint _tmp75_;
436                                         IBusText* _tmp76_;
437                                         const gchar* _tmp77_ = NULL;
438                                         GtkLabel* _tmp78_;
439                                         PangoAttrList* _tmp79_;
440                                         _tmp15_ = candidates;
441                                         _tmp15__length1 = candidates_length1;
442                                         _tmp16_ = i;
443                                         _tmp17_ = _tmp15_[_tmp16_];
444                                         _tmp18_ = get_pango_attr_list_from_ibus_text (_tmp17_);
445                                         attrs = _tmp18_;
446                                         _tmp20_ = i;
447                                         _tmp21_ = focus_candidate;
448                                         if (((guint) _tmp20_) == _tmp21_) {
449                                                 gboolean _tmp22_;
450                                                 _tmp22_ = show_cursor;
451                                                 _tmp19_ = _tmp22_;
452                                         } else {
453                                                 _tmp19_ = FALSE;
454                                         }
455                                         _tmp23_ = _tmp19_;
456                                         if (_tmp23_) {
457                                                 GtkLabel** _tmp24_;
458                                                 gint _tmp24__length1;
459                                                 gint _tmp25_;
460                                                 GtkLabel* _tmp26_;
461                                                 GtkStyleContext* _tmp27_ = NULL;
462                                                 GtkStyleContext* _tmp28_;
463                                                 GtkStyleContext* context;
464                                                 GtkStyleContext* _tmp29_;
465                                                 GdkRGBA _tmp30_ = {0};
466                                                 GdkRGBA color;
467                                                 GdkRGBA _tmp31_;
468                                                 gdouble _tmp32_;
469                                                 guint16 _tmp33_;
470                                                 GdkRGBA _tmp34_;
471                                                 gdouble _tmp35_;
472                                                 guint16 _tmp36_;
473                                                 GdkRGBA _tmp37_;
474                                                 gdouble _tmp38_;
475                                                 guint16 _tmp39_;
476                                                 PangoAttribute* _tmp40_ = NULL;
477                                                 PangoAttribute* pango_attr;
478                                                 PangoAttribute* _tmp41_;
479                                                 PangoAttribute* _tmp42_;
480                                                 IBusText** _tmp43_;
481                                                 gint _tmp43__length1;
482                                                 gint _tmp44_;
483                                                 IBusText* _tmp45_;
484                                                 const gchar* _tmp46_ = NULL;
485                                                 gint _tmp47_;
486                                                 gint _tmp48_;
487                                                 PangoAttrList* _tmp49_;
488                                                 PangoAttribute* _tmp50_;
489                                                 GtkStyleContext* _tmp51_;
490                                                 GdkRGBA _tmp52_ = {0};
491                                                 GdkRGBA _tmp53_;
492                                                 gdouble _tmp54_;
493                                                 guint16 _tmp55_;
494                                                 GdkRGBA _tmp56_;
495                                                 gdouble _tmp57_;
496                                                 guint16 _tmp58_;
497                                                 GdkRGBA _tmp59_;
498                                                 gdouble _tmp60_;
499                                                 guint16 _tmp61_;
500                                                 PangoAttribute* _tmp62_ = NULL;
501                                                 PangoAttribute* _tmp63_;
502                                                 PangoAttribute* _tmp64_;
503                                                 IBusText** _tmp65_;
504                                                 gint _tmp65__length1;
505                                                 gint _tmp66_;
506                                                 IBusText* _tmp67_;
507                                                 const gchar* _tmp68_ = NULL;
508                                                 gint _tmp69_;
509                                                 gint _tmp70_;
510                                                 PangoAttrList* _tmp71_;
511                                                 PangoAttribute* _tmp72_;
512                                                 _tmp24_ = self->priv->m_candidates;
513                                                 _tmp24__length1 = self->priv->m_candidates_length1;
514                                                 _tmp25_ = i;
515                                                 _tmp26_ = _tmp24_[_tmp25_];
516                                                 _tmp27_ = gtk_widget_get_style_context ((GtkWidget*) _tmp26_);
517                                                 _tmp28_ = _g_object_ref0 (_tmp27_);
518                                                 context = _tmp28_;
519                                                 _tmp29_ = context;
520                                                 gtk_style_context_get_color (_tmp29_, GTK_STATE_FLAG_SELECTED, &_tmp30_);
521                                                 color = _tmp30_;
522                                                 _tmp31_ = color;
523                                                 _tmp32_ = _tmp31_.red;
524                                                 _tmp33_ = G_MAXUINT16;
525                                                 _tmp34_ = color;
526                                                 _tmp35_ = _tmp34_.green;
527                                                 _tmp36_ = G_MAXUINT16;
528                                                 _tmp37_ = color;
529                                                 _tmp38_ = _tmp37_.blue;
530                                                 _tmp39_ = G_MAXUINT16;
531                                                 _tmp40_ = pango_attr_foreground_new ((guint16) (_tmp32_ * _tmp33_), (guint16) (_tmp35_ * _tmp36_), (guint16) (_tmp38_ * _tmp39_));
532                                                 pango_attr = _tmp40_;
533                                                 _tmp41_ = pango_attr;
534                                                 _tmp41_->start_index = (guint) 0;
535                                                 _tmp42_ = pango_attr;
536                                                 _tmp43_ = candidates;
537                                                 _tmp43__length1 = candidates_length1;
538                                                 _tmp44_ = i;
539                                                 _tmp45_ = _tmp43_[_tmp44_];
540                                                 _tmp46_ = ibus_text_get_text (_tmp45_);
541                                                 _tmp47_ = strlen (_tmp46_);
542                                                 _tmp48_ = _tmp47_;
543                                                 _tmp42_->end_index = (guint) _tmp48_;
544                                                 _tmp49_ = attrs;
545                                                 _tmp50_ = pango_attr;
546                                                 pango_attr = NULL;
547                                                 pango_attr_list_insert (_tmp49_, _tmp50_);
548                                                 _tmp51_ = context;
549                                                 gtk_style_context_get_background_color (_tmp51_, GTK_STATE_FLAG_SELECTED, &_tmp52_);
550                                                 color = _tmp52_;
551                                                 _tmp53_ = color;
552                                                 _tmp54_ = _tmp53_.red;
553                                                 _tmp55_ = G_MAXUINT16;
554                                                 _tmp56_ = color;
555                                                 _tmp57_ = _tmp56_.green;
556                                                 _tmp58_ = G_MAXUINT16;
557                                                 _tmp59_ = color;
558                                                 _tmp60_ = _tmp59_.blue;
559                                                 _tmp61_ = G_MAXUINT16;
560                                                 _tmp62_ = pango_attr_background_new ((guint16) (_tmp54_ * _tmp55_), (guint16) (_tmp57_ * _tmp58_), (guint16) (_tmp60_ * _tmp61_));
561                                                 _pango_attribute_destroy0 (pango_attr);
562                                                 pango_attr = _tmp62_;
563                                                 _tmp63_ = pango_attr;
564                                                 _tmp63_->start_index = (guint) 0;
565                                                 _tmp64_ = pango_attr;
566                                                 _tmp65_ = candidates;
567                                                 _tmp65__length1 = candidates_length1;
568                                                 _tmp66_ = i;
569                                                 _tmp67_ = _tmp65_[_tmp66_];
570                                                 _tmp68_ = ibus_text_get_text (_tmp67_);
571                                                 _tmp69_ = strlen (_tmp68_);
572                                                 _tmp70_ = _tmp69_;
573                                                 _tmp64_->end_index = (guint) _tmp70_;
574                                                 _tmp71_ = attrs;
575                                                 _tmp72_ = pango_attr;
576                                                 pango_attr = NULL;
577                                                 pango_attr_list_insert (_tmp71_, _tmp72_);
578                                                 _pango_attribute_destroy0 (pango_attr);
579                                                 _g_object_unref0 (context);
580                                         }
581                                         _tmp73_ = label;
582                                         _tmp74_ = candidates;
583                                         _tmp74__length1 = candidates_length1;
584                                         _tmp75_ = i;
585                                         _tmp76_ = _tmp74_[_tmp75_];
586                                         _tmp77_ = ibus_text_get_text (_tmp76_);
587                                         gtk_label_set_text (_tmp73_, _tmp77_);
588                                         _tmp78_ = label;
589                                         _tmp79_ = attrs;
590                                         gtk_label_set_attributes (_tmp78_, _tmp79_);
591                                         visible = TRUE;
592                                         __vala_PangoAttrList_free0 (attrs);
593                                 } else {
594                                         GtkLabel* _tmp80_;
595                                         GtkLabel* _tmp81_;
596                                         PangoAttrList* _tmp82_;
597                                         PangoAttrList* _tmp83_;
598                                         _tmp80_ = label;
599                                         gtk_label_set_text (_tmp80_, "");
600                                         _tmp81_ = label;
601                                         _tmp82_ = pango_attr_list_new ();
602                                         _tmp83_ = _tmp82_;
603                                         gtk_label_set_attributes (_tmp81_, _tmp83_);
604                                         __vala_PangoAttrList_free0 (_tmp83_);
605                                 }
606                                 _tmp84_ = self->priv->m_vertical;
607                                 if (_tmp84_) {
608                                         GtkWidget** _tmp85_;
609                                         gint _tmp85__length1;
610                                         gint _tmp86_;
611                                         GtkWidget* _tmp87_;
612                                         gboolean _tmp88_;
613                                         GtkWidget** _tmp89_;
614                                         gint _tmp89__length1;
615                                         gint _tmp90_;
616                                         GtkWidget* _tmp91_;
617                                         gboolean _tmp92_;
618                                         _tmp85_ = self->priv->m_widgets;
619                                         _tmp85__length1 = self->priv->m_widgets_length1;
620                                         _tmp86_ = i;
621                                         _tmp87_ = _tmp85_[_tmp86_ * 2];
622                                         _tmp88_ = visible;
623                                         gtk_widget_set_visible (_tmp87_, _tmp88_);
624                                         _tmp89_ = self->priv->m_widgets;
625                                         _tmp89__length1 = self->priv->m_widgets_length1;
626                                         _tmp90_ = i;
627                                         _tmp91_ = _tmp89_[(_tmp90_ * 2) + 1];
628                                         _tmp92_ = visible;
629                                         gtk_widget_set_visible (_tmp91_, _tmp92_);
630                                 } else {
631                                         GtkWidget** _tmp93_;
632                                         gint _tmp93__length1;
633                                         gint _tmp94_;
634                                         GtkWidget* _tmp95_;
635                                         gboolean _tmp96_;
636                                         _tmp93_ = self->priv->m_widgets;
637                                         _tmp93__length1 = self->priv->m_widgets_length1;
638                                         _tmp94_ = i;
639                                         _tmp95_ = _tmp93_[_tmp94_];
640                                         _tmp96_ = visible;
641                                         gtk_widget_set_visible (_tmp95_, _tmp96_);
642                                 }
643                                 _g_object_unref0 (label);
644                         }
645                 }
646         }
647 }
648
649
650 static void __lambda2_ (CandidateArea* self, GtkButton* b) {
651         g_return_if_fail (b != NULL);
652         g_signal_emit_by_name (self, "page-up");
653 }
654
655
656 static void ___lambda2__gtk_button_clicked (GtkButton* _sender, gpointer self) {
657         __lambda2_ (self, _sender);
658 }
659
660
661 static void __lambda3_ (CandidateArea* self, GtkButton* b) {
662         g_return_if_fail (b != NULL);
663         g_signal_emit_by_name (self, "page-down");
664 }
665
666
667 static void ___lambda3__gtk_button_clicked (GtkButton* _sender, gpointer self) {
668         __lambda3_ (self, _sender);
669 }
670
671
672 static Block1Data* block1_data_ref (Block1Data* _data1_) {
673         g_atomic_int_inc (&_data1_->_ref_count_);
674         return _data1_;
675 }
676
677
678 static void block1_data_unref (void * _userdata_) {
679         Block1Data* _data1_;
680         _data1_ = (Block1Data*) _userdata_;
681         if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
682                 CandidateArea * self;
683                 self = _data1_->self;
684                 _g_object_unref0 (self);
685                 g_slice_free (Block1Data, _data1_);
686         }
687 }
688
689
690 static Block2Data* block2_data_ref (Block2Data* _data2_) {
691         g_atomic_int_inc (&_data2_->_ref_count_);
692         return _data2_;
693 }
694
695
696 static void block2_data_unref (void * _userdata_) {
697         Block2Data* _data2_;
698         _data2_ = (Block2Data*) _userdata_;
699         if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
700                 CandidateArea * self;
701                 self = _data2_->_data1_->self;
702                 block1_data_unref (_data2_->_data1_);
703                 _data2_->_data1_ = NULL;
704                 g_slice_free (Block2Data, _data2_);
705         }
706 }
707
708
709 static void _vala_array_add1 (GtkLabel*** array, int* length, int* size, GtkLabel* value) {
710         if ((*length) == (*size)) {
711                 *size = (*size) ? (2 * (*size)) : 4;
712                 *array = g_renew (GtkLabel*, *array, (*size) + 1);
713         }
714         (*array)[(*length)++] = value;
715         (*array)[*length] = NULL;
716 }
717
718
719 static void _vala_array_add2 (GtkLabel*** array, int* length, int* size, GtkLabel* value) {
720         if ((*length) == (*size)) {
721                 *size = (*size) ? (2 * (*size)) : 4;
722                 *array = g_renew (GtkLabel*, *array, (*size) + 1);
723         }
724         (*array)[(*length)++] = value;
725         (*array)[*length] = NULL;
726 }
727
728
729 static gboolean ______lambda4_ (Block2Data* _data2_, GtkWidget* w, GdkEventButton* e) {
730         Block1Data* _data1_;
731         CandidateArea * self;
732         gboolean result = FALSE;
733         gint _tmp0_;
734         GdkEventButton _tmp1_;
735         guint _tmp2_;
736         GdkEventButton _tmp3_;
737         GdkModifierType _tmp4_;
738         _data1_ = _data2_->_data1_;
739         self = _data1_->self;
740         g_return_val_if_fail (w != NULL, FALSE);
741         g_return_val_if_fail (e != NULL, FALSE);
742         _tmp0_ = _data1_->i;
743         _tmp1_ = *e;
744         _tmp2_ = _tmp1_.button;
745         _tmp3_ = *e;
746         _tmp4_ = _tmp3_.state;
747         g_signal_emit_by_name (self, "candidate-clicked", (guint) _tmp0_, _tmp2_, (guint) _tmp4_);
748         result = TRUE;
749         return result;
750 }
751
752
753 static gboolean _______lambda4__gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
754         gboolean result;
755         result = ______lambda4_ (self, _sender, event);
756         return result;
757 }
758
759
760 static void _vala_array_add3 (GtkWidget*** array, int* length, int* size, GtkWidget* value) {
761         if ((*length) == (*size)) {
762                 *size = (*size) ? (2 * (*size)) : 4;
763                 *array = g_renew (GtkWidget*, *array, (*size) + 1);
764         }
765         (*array)[(*length)++] = value;
766         (*array)[*length] = NULL;
767 }
768
769
770 static gboolean ______lambda5_ (Block2Data* _data2_, GtkWidget* w, GdkEventButton* e) {
771         Block1Data* _data1_;
772         CandidateArea * self;
773         gboolean result = FALSE;
774         gint _tmp0_;
775         GdkEventButton _tmp1_;
776         guint _tmp2_;
777         GdkEventButton _tmp3_;
778         GdkModifierType _tmp4_;
779         _data1_ = _data2_->_data1_;
780         self = _data1_->self;
781         g_return_val_if_fail (w != NULL, FALSE);
782         g_return_val_if_fail (e != NULL, FALSE);
783         _tmp0_ = _data2_->index;
784         _tmp1_ = *e;
785         _tmp2_ = _tmp1_.button;
786         _tmp3_ = *e;
787         _tmp4_ = _tmp3_.state;
788         g_signal_emit_by_name (self, "candidate-clicked", (guint) _tmp0_, _tmp2_, (guint) _tmp4_);
789         result = TRUE;
790         return result;
791 }
792
793
794 static gboolean _______lambda5__gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
795         gboolean result;
796         result = ______lambda5_ (self, _sender, event);
797         return result;
798 }
799
800
801 static void _vala_array_add4 (GtkWidget*** array, int* length, int* size, GtkWidget* value) {
802         if ((*length) == (*size)) {
803                 *size = (*size) ? (2 * (*size)) : 4;
804                 *array = g_renew (GtkWidget*, *array, (*size) + 1);
805         }
806         (*array)[(*length)++] = value;
807         (*array)[*length] = NULL;
808 }
809
810
811 static Block3Data* block3_data_ref (Block3Data* _data3_) {
812         g_atomic_int_inc (&_data3_->_ref_count_);
813         return _data3_;
814 }
815
816
817 static void block3_data_unref (void * _userdata_) {
818         Block3Data* _data3_;
819         _data3_ = (Block3Data*) _userdata_;
820         if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
821                 CandidateArea * self;
822                 self = _data3_->self;
823                 _g_object_unref0 (self);
824                 g_slice_free (Block3Data, _data3_);
825         }
826 }
827
828
829 static void _vala_array_add5 (GtkLabel*** array, int* length, int* size, GtkLabel* value) {
830         if ((*length) == (*size)) {
831                 *size = (*size) ? (2 * (*size)) : 4;
832                 *array = g_renew (GtkLabel*, *array, (*size) + 1);
833         }
834         (*array)[(*length)++] = value;
835         (*array)[*length] = NULL;
836 }
837
838
839 static void _vala_array_add6 (GtkLabel*** array, int* length, int* size, GtkLabel* value) {
840         if ((*length) == (*size)) {
841                 *size = (*size) ? (2 * (*size)) : 4;
842                 *array = g_renew (GtkLabel*, *array, (*size) + 1);
843         }
844         (*array)[(*length)++] = value;
845         (*array)[*length] = NULL;
846 }
847
848
849 static gboolean ______lambda6_ (Block3Data* _data3_, GtkWidget* w, GdkEventButton* e) {
850         CandidateArea * self;
851         gboolean result = FALSE;
852         gint _tmp0_;
853         GdkEventButton _tmp1_;
854         guint _tmp2_;
855         GdkEventButton _tmp3_;
856         GdkModifierType _tmp4_;
857         self = _data3_->self;
858         g_return_val_if_fail (w != NULL, FALSE);
859         g_return_val_if_fail (e != NULL, FALSE);
860         _tmp0_ = _data3_->index;
861         _tmp1_ = *e;
862         _tmp2_ = _tmp1_.button;
863         _tmp3_ = *e;
864         _tmp4_ = _tmp3_.state;
865         g_signal_emit_by_name (self, "candidate-clicked", (guint) _tmp0_, _tmp2_, (guint) _tmp4_);
866         result = TRUE;
867         return result;
868 }
869
870
871 static gboolean _______lambda6__gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
872         gboolean result;
873         result = ______lambda6_ (self, _sender, event);
874         return result;
875 }
876
877
878 static void _vala_array_add7 (GtkWidget*** array, int* length, int* size, GtkWidget* value) {
879         if ((*length) == (*size)) {
880                 *size = (*size) ? (2 * (*size)) : 4;
881                 *array = g_renew (GtkWidget*, *array, (*size) + 1);
882         }
883         (*array)[(*length)++] = value;
884         (*array)[*length] = NULL;
885 }
886
887
888 static void candidate_area_recreate_ui (CandidateArea* self) {
889         GList* _tmp0_ = NULL;
890         GtkButton* _tmp3_;
891         GtkButton* prev_button;
892         GtkButton* _tmp4_;
893         GtkButton* _tmp5_;
894         GtkOrientation _tmp6_;
895         GtkOrientation _tmp7_;
896         const gchar* _tmp8_;
897         GtkImage* _tmp9_;
898         GtkImage* _tmp10_;
899         GtkButton* _tmp11_;
900         GtkButton* _tmp12_;
901         GtkButton* next_button;
902         GtkButton* _tmp13_;
903         GtkButton* _tmp14_;
904         GtkOrientation _tmp15_;
905         GtkOrientation _tmp16_;
906         const gchar* _tmp17_;
907         GtkImage* _tmp18_;
908         GtkImage* _tmp19_;
909         GtkButton* _tmp20_;
910         gboolean _tmp21_;
911         g_return_if_fail (self != NULL);
912         _tmp0_ = gtk_container_get_children ((GtkContainer*) self);
913         {
914                 GList* w_collection = NULL;
915                 GList* w_it = NULL;
916                 w_collection = _tmp0_;
917                 for (w_it = w_collection; w_it != NULL; w_it = w_it->next) {
918                         GtkWidget* _tmp1_;
919                         GtkWidget* w = NULL;
920                         _tmp1_ = _g_object_ref0 ((GtkWidget*) w_it->data);
921                         w = _tmp1_;
922                         {
923                                 GtkWidget* _tmp2_;
924                                 _tmp2_ = w;
925                                 gtk_widget_destroy (_tmp2_);
926                                 _g_object_unref0 (w);
927                         }
928                 }
929                 _g_list_free0 (w_collection);
930         }
931         _tmp3_ = (GtkButton*) gtk_button_new ();
932         g_object_ref_sink (_tmp3_);
933         prev_button = _tmp3_;
934         _tmp4_ = prev_button;
935         g_signal_connect_object (_tmp4_, "clicked", (GCallback) ___lambda2__gtk_button_clicked, self, 0);
936         _tmp5_ = prev_button;
937         _tmp6_ = gtk_orientable_get_orientation ((GtkOrientable*) self);
938         _tmp7_ = _tmp6_;
939         _tmp8_ = CANDIDATE_AREA_PREV_PAGE_ICONS[_tmp7_];
940         _tmp9_ = (GtkImage*) gtk_image_new_from_stock (_tmp8_, GTK_ICON_SIZE_MENU);
941         g_object_ref_sink (_tmp9_);
942         _tmp10_ = _tmp9_;
943         gtk_button_set_image (_tmp5_, (GtkWidget*) _tmp10_);
944         _g_object_unref0 (_tmp10_);
945         _tmp11_ = prev_button;
946         gtk_button_set_relief (_tmp11_, GTK_RELIEF_NONE);
947         _tmp12_ = (GtkButton*) gtk_button_new ();
948         g_object_ref_sink (_tmp12_);
949         next_button = _tmp12_;
950         _tmp13_ = next_button;
951         g_signal_connect_object (_tmp13_, "clicked", (GCallback) ___lambda3__gtk_button_clicked, self, 0);
952         _tmp14_ = next_button;
953         _tmp15_ = gtk_orientable_get_orientation ((GtkOrientable*) self);
954         _tmp16_ = _tmp15_;
955         _tmp17_ = CANDIDATE_AREA_NEXT_PAGE_ICONS[_tmp16_];
956         _tmp18_ = (GtkImage*) gtk_image_new_from_stock (_tmp17_, GTK_ICON_SIZE_MENU);
957         g_object_ref_sink (_tmp18_);
958         _tmp19_ = _tmp18_;
959         gtk_button_set_image (_tmp14_, (GtkWidget*) _tmp19_);
960         _g_object_unref0 (_tmp19_);
961         _tmp20_ = next_button;
962         gtk_button_set_relief (_tmp20_, GTK_RELIEF_NONE);
963         _tmp21_ = self->priv->m_vertical;
964         if (_tmp21_) {
965                 GtkBox* _tmp22_;
966                 GtkBox* candidates_hbox;
967                 GtkBox* _tmp23_;
968                 GtkBox* _tmp24_;
969                 GtkBox* labels_vbox;
970                 GtkBox* _tmp25_;
971                 GtkBox* _tmp26_;
972                 GtkBox* candidates_vbox;
973                 GtkBox* _tmp27_;
974                 GtkBox* _tmp28_;
975                 GtkBox* _tmp29_;
976                 GtkBox* _tmp30_;
977                 VSeparator* _tmp31_;
978                 VSeparator* _tmp32_;
979                 GtkBox* _tmp33_;
980                 GtkBox* _tmp34_;
981                 HSeparator* _tmp35_;
982                 HSeparator* _tmp36_;
983                 GtkBox* _tmp37_;
984                 GtkBox* buttons_hbox;
985                 GtkLabel* _tmp38_;
986                 GtkLabel* state_label;
987                 GtkLabel* _tmp39_;
988                 GtkBox* _tmp40_;
989                 GtkLabel* _tmp41_;
990                 GtkBox* _tmp42_;
991                 GtkButton* _tmp43_;
992                 GtkBox* _tmp44_;
993                 GtkButton* _tmp45_;
994                 GtkBox* _tmp46_;
995                 GtkLabel** _tmp47_ = NULL;
996                 GtkLabel** _tmp48_ = NULL;
997                 GtkWidget** _tmp49_ = NULL;
998                 _tmp22_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
999                 g_object_ref_sink (_tmp22_);
1000                 candidates_hbox = _tmp22_;
1001                 _tmp23_ = candidates_hbox;
1002                 gtk_box_pack_start ((GtkBox*) self, (GtkWidget*) _tmp23_, FALSE, FALSE, (guint) 0);
1003                 _tmp24_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
1004                 g_object_ref_sink (_tmp24_);
1005                 labels_vbox = _tmp24_;
1006                 _tmp25_ = labels_vbox;
1007                 gtk_box_set_homogeneous (_tmp25_, TRUE);
1008                 _tmp26_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
1009                 g_object_ref_sink (_tmp26_);
1010                 candidates_vbox = _tmp26_;
1011                 _tmp27_ = candidates_vbox;
1012                 gtk_box_set_homogeneous (_tmp27_, TRUE);
1013                 _tmp28_ = candidates_hbox;
1014                 _tmp29_ = labels_vbox;
1015                 gtk_box_pack_start (_tmp28_, (GtkWidget*) _tmp29_, FALSE, FALSE, (guint) 4);
1016                 _tmp30_ = candidates_hbox;
1017                 _tmp31_ = vseparator_new ();
1018                 g_object_ref_sink (_tmp31_);
1019                 _tmp32_ = _tmp31_;
1020                 gtk_box_pack_start (_tmp30_, (GtkWidget*) _tmp32_, FALSE, FALSE, (guint) 0);
1021                 _g_object_unref0 (_tmp32_);
1022                 _tmp33_ = candidates_hbox;
1023                 _tmp34_ = candidates_vbox;
1024                 gtk_box_pack_start (_tmp33_, (GtkWidget*) _tmp34_, TRUE, TRUE, (guint) 4);
1025                 _tmp35_ = hseparator_new ();
1026                 g_object_ref_sink (_tmp35_);
1027                 _tmp36_ = _tmp35_;
1028                 gtk_box_pack_start ((GtkBox*) self, (GtkWidget*) _tmp36_, FALSE, FALSE, (guint) 0);
1029                 _g_object_unref0 (_tmp36_);
1030                 _tmp37_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
1031                 g_object_ref_sink (_tmp37_);
1032                 buttons_hbox = _tmp37_;
1033                 _tmp38_ = (GtkLabel*) gtk_label_new (NULL);
1034                 g_object_ref_sink (_tmp38_);
1035                 state_label = _tmp38_;
1036                 _tmp39_ = state_label;
1037                 gtk_widget_set_size_request ((GtkWidget*) _tmp39_, 20, -1);
1038                 _tmp40_ = buttons_hbox;
1039                 _tmp41_ = state_label;
1040                 gtk_box_pack_start (_tmp40_, (GtkWidget*) _tmp41_, TRUE, TRUE, (guint) 0);
1041                 _tmp42_ = buttons_hbox;
1042                 _tmp43_ = prev_button;
1043                 gtk_box_pack_start (_tmp42_, (GtkWidget*) _tmp43_, FALSE, FALSE, (guint) 0);
1044                 _tmp44_ = buttons_hbox;
1045                 _tmp45_ = next_button;
1046                 gtk_box_pack_start (_tmp44_, (GtkWidget*) _tmp45_, FALSE, FALSE, (guint) 0);
1047                 _tmp46_ = buttons_hbox;
1048                 gtk_box_pack_start ((GtkBox*) self, (GtkWidget*) _tmp46_, FALSE, FALSE, (guint) 0);
1049                 _tmp47_ = g_new0 (GtkLabel*, 0 + 1);
1050                 self->priv->m_labels = (_vala_array_free (self->priv->m_labels, self->priv->m_labels_length1, (GDestroyNotify) g_object_unref), NULL);
1051                 self->priv->m_labels = _tmp47_;
1052                 self->priv->m_labels_length1 = 0;
1053                 self->priv->_m_labels_size_ = self->priv->m_labels_length1;
1054                 _tmp48_ = g_new0 (GtkLabel*, 0 + 1);
1055                 self->priv->m_candidates = (_vala_array_free (self->priv->m_candidates, self->priv->m_candidates_length1, (GDestroyNotify) g_object_unref), NULL);
1056                 self->priv->m_candidates = _tmp48_;
1057                 self->priv->m_candidates_length1 = 0;
1058                 self->priv->_m_candidates_size_ = self->priv->m_candidates_length1;
1059                 _tmp49_ = g_new0 (GtkWidget*, 0 + 1);
1060                 self->priv->m_widgets = (_vala_array_free (self->priv->m_widgets, self->priv->m_widgets_length1, (GDestroyNotify) g_object_unref), NULL);
1061                 self->priv->m_widgets = _tmp49_;
1062                 self->priv->m_widgets_length1 = 0;
1063                 self->priv->_m_widgets_size_ = self->priv->m_widgets_length1;
1064                 {
1065                         Block1Data* _data1_;
1066                         _data1_ = g_slice_new0 (Block1Data);
1067                         _data1_->_ref_count_ = 1;
1068                         _data1_->self = g_object_ref (self);
1069                         _data1_->i = 0;
1070                         {
1071                                 gboolean _tmp50_;
1072                                 _tmp50_ = TRUE;
1073                                 while (TRUE) {
1074                                         Block2Data* _data2_;
1075                                         gboolean _tmp51_;
1076                                         gint _tmp53_;
1077                                         gint _tmp54_;
1078                                         const gchar* _tmp55_;
1079                                         GtkLabel* _tmp56_;
1080                                         GtkLabel* label;
1081                                         GtkLabel* _tmp57_;
1082                                         GtkLabel* _tmp58_;
1083                                         GtkLabel** _tmp59_;
1084                                         gint _tmp59__length1;
1085                                         GtkLabel* _tmp60_;
1086                                         GtkLabel* _tmp61_;
1087                                         GtkLabel* _tmp62_;
1088                                         GtkLabel* candidate;
1089                                         GtkLabel* _tmp63_;
1090                                         GtkLabel* _tmp64_;
1091                                         GtkLabel** _tmp65_;
1092                                         gint _tmp65__length1;
1093                                         GtkLabel* _tmp66_;
1094                                         GtkLabel* _tmp67_;
1095                                         GtkLabel* _tmp68_;
1096                                         GValue _tmp69_ = {0};
1097                                         GtkLabel* _tmp70_;
1098                                         GValue _tmp71_ = {0};
1099                                         gint _tmp72_;
1100                                         GtkEventBox* _tmp73_;
1101                                         GtkEventBox* label_ebox;
1102                                         GtkEventBox* _tmp74_;
1103                                         GtkEventBox* _tmp75_;
1104                                         GtkEventBox* _tmp76_;
1105                                         GtkLabel* _tmp77_;
1106                                         GtkBox* _tmp78_;
1107                                         GtkEventBox* _tmp79_;
1108                                         GtkWidget** _tmp80_;
1109                                         gint _tmp80__length1;
1110                                         GtkEventBox* _tmp81_;
1111                                         GtkWidget* _tmp82_;
1112                                         GtkEventBox* _tmp83_;
1113                                         GtkEventBox* candidate_ebox;
1114                                         GtkEventBox* _tmp84_;
1115                                         GtkEventBox* _tmp85_;
1116                                         GtkEventBox* _tmp86_;
1117                                         GtkLabel* _tmp87_;
1118                                         GtkBox* _tmp88_;
1119                                         GtkEventBox* _tmp89_;
1120                                         GtkWidget** _tmp90_;
1121                                         gint _tmp90__length1;
1122                                         GtkEventBox* _tmp91_;
1123                                         GtkWidget* _tmp92_;
1124                                         _data2_ = g_slice_new0 (Block2Data);
1125                                         _data2_->_ref_count_ = 1;
1126                                         _data2_->_data1_ = block1_data_ref (_data1_);
1127                                         _tmp51_ = _tmp50_;
1128                                         if (!_tmp51_) {
1129                                                 gint _tmp52_;
1130                                                 _tmp52_ = _data1_->i;
1131                                                 _data1_->i = _tmp52_ + 1;
1132                                         }
1133                                         _tmp50_ = FALSE;
1134                                         _tmp53_ = _data1_->i;
1135                                         if (!(_tmp53_ < 16)) {
1136                                                 block2_data_unref (_data2_);
1137                                                 _data2_ = NULL;
1138                                                 break;
1139                                         }
1140                                         _tmp54_ = _data1_->i;
1141                                         _tmp55_ = CANDIDATE_AREA_LABELS[_tmp54_];
1142                                         _tmp56_ = (GtkLabel*) gtk_label_new (_tmp55_);
1143                                         g_object_ref_sink (_tmp56_);
1144                                         label = _tmp56_;
1145                                         _tmp57_ = label;
1146                                         gtk_misc_set_alignment ((GtkMisc*) _tmp57_, 0.0f, 0.5f);
1147                                         _tmp58_ = label;
1148                                         gtk_widget_show ((GtkWidget*) _tmp58_);
1149                                         _tmp59_ = self->priv->m_labels;
1150                                         _tmp59__length1 = self->priv->m_labels_length1;
1151                                         _tmp60_ = label;
1152                                         _tmp61_ = _g_object_ref0 (_tmp60_);
1153                                         _vala_array_add1 (&self->priv->m_labels, &self->priv->m_labels_length1, &self->priv->_m_labels_size_, _tmp61_);
1154                                         _tmp62_ = (GtkLabel*) gtk_label_new ("test");
1155                                         g_object_ref_sink (_tmp62_);
1156                                         candidate = _tmp62_;
1157                                         _tmp63_ = candidate;
1158                                         gtk_misc_set_alignment ((GtkMisc*) _tmp63_, 0.0f, 0.5f);
1159                                         _tmp64_ = candidate;
1160                                         gtk_widget_show ((GtkWidget*) _tmp64_);
1161                                         _tmp65_ = self->priv->m_candidates;
1162                                         _tmp65__length1 = self->priv->m_candidates_length1;
1163                                         _tmp66_ = candidate;
1164                                         _tmp67_ = _g_object_ref0 (_tmp66_);
1165                                         _vala_array_add2 (&self->priv->m_candidates, &self->priv->m_candidates_length1, &self->priv->_m_candidates_size_, _tmp67_);
1166                                         _tmp68_ = label;
1167                                         g_value_init (&_tmp69_, G_TYPE_INT);
1168                                         g_value_set_int (&_tmp69_, 8);
1169                                         g_object_set_property ((GObject*) _tmp68_, "xpad", &_tmp69_);
1170                                         G_IS_VALUE (&_tmp69_) ? (g_value_unset (&_tmp69_), NULL) : NULL;
1171                                         _tmp70_ = candidate;
1172                                         g_value_init (&_tmp71_, G_TYPE_INT);
1173                                         g_value_set_int (&_tmp71_, 8);
1174                                         g_object_set_property ((GObject*) _tmp70_, "xpad", &_tmp71_);
1175                                         G_IS_VALUE (&_tmp71_) ? (g_value_unset (&_tmp71_), NULL) : NULL;
1176                                         _tmp72_ = _data1_->i;
1177                                         _data2_->index = _tmp72_;
1178                                         _tmp73_ = (GtkEventBox*) gtk_event_box_new ();
1179                                         g_object_ref_sink (_tmp73_);
1180                                         label_ebox = _tmp73_;
1181                                         _tmp74_ = label_ebox;
1182                                         gtk_widget_set_no_show_all ((GtkWidget*) _tmp74_, TRUE);
1183                                         _tmp75_ = label_ebox;
1184                                         g_signal_connect_data ((GtkWidget*) _tmp75_, "button-press-event", (GCallback) _______lambda4__gtk_widget_button_press_event, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
1185                                         _tmp76_ = label_ebox;
1186                                         _tmp77_ = label;
1187                                         gtk_container_add ((GtkContainer*) _tmp76_, (GtkWidget*) _tmp77_);
1188                                         _tmp78_ = labels_vbox;
1189                                         _tmp79_ = label_ebox;
1190                                         gtk_box_pack_start (_tmp78_, (GtkWidget*) _tmp79_, FALSE, FALSE, (guint) 2);
1191                                         _tmp80_ = self->priv->m_widgets;
1192                                         _tmp80__length1 = self->priv->m_widgets_length1;
1193                                         _tmp81_ = label_ebox;
1194                                         _tmp82_ = _g_object_ref0 ((GtkWidget*) _tmp81_);
1195                                         _vala_array_add3 (&self->priv->m_widgets, &self->priv->m_widgets_length1, &self->priv->_m_widgets_size_, _tmp82_);
1196                                         _tmp83_ = (GtkEventBox*) gtk_event_box_new ();
1197                                         g_object_ref_sink (_tmp83_);
1198                                         candidate_ebox = _tmp83_;
1199                                         _tmp84_ = candidate_ebox;
1200                                         gtk_widget_set_no_show_all ((GtkWidget*) _tmp84_, TRUE);
1201                                         _tmp85_ = candidate_ebox;
1202                                         g_signal_connect_data ((GtkWidget*) _tmp85_, "button-press-event", (GCallback) _______lambda5__gtk_widget_button_press_event, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
1203                                         _tmp86_ = candidate_ebox;
1204                                         _tmp87_ = candidate;
1205                                         gtk_container_add ((GtkContainer*) _tmp86_, (GtkWidget*) _tmp87_);
1206                                         _tmp88_ = candidates_vbox;
1207                                         _tmp89_ = candidate_ebox;
1208                                         gtk_box_pack_start (_tmp88_, (GtkWidget*) _tmp89_, FALSE, FALSE, (guint) 2);
1209                                         _tmp90_ = self->priv->m_widgets;
1210                                         _tmp90__length1 = self->priv->m_widgets_length1;
1211                                         _tmp91_ = candidate_ebox;
1212                                         _tmp92_ = _g_object_ref0 ((GtkWidget*) _tmp91_);
1213                                         _vala_array_add4 (&self->priv->m_widgets, &self->priv->m_widgets_length1, &self->priv->_m_widgets_size_, _tmp92_);
1214                                         _g_object_unref0 (candidate_ebox);
1215                                         _g_object_unref0 (label_ebox);
1216                                         _g_object_unref0 (candidate);
1217                                         _g_object_unref0 (label);
1218                                         block2_data_unref (_data2_);
1219                                         _data2_ = NULL;
1220                                 }
1221                         }
1222                         block1_data_unref (_data1_);
1223                         _data1_ = NULL;
1224                 }
1225                 _g_object_unref0 (state_label);
1226                 _g_object_unref0 (buttons_hbox);
1227                 _g_object_unref0 (candidates_vbox);
1228                 _g_object_unref0 (labels_vbox);
1229                 _g_object_unref0 (candidates_hbox);
1230         } else {
1231                 GtkBox* _tmp93_;
1232                 GtkBox* hbox;
1233                 GtkBox* _tmp94_;
1234                 GtkLabel** _tmp95_ = NULL;
1235                 GtkLabel** _tmp96_ = NULL;
1236                 GtkWidget** _tmp97_ = NULL;
1237                 GtkBox* _tmp133_;
1238                 VSeparator* _tmp134_;
1239                 VSeparator* _tmp135_;
1240                 GtkBox* _tmp136_;
1241                 GtkButton* _tmp137_;
1242                 GtkBox* _tmp138_;
1243                 GtkButton* _tmp139_;
1244                 _tmp93_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
1245                 g_object_ref_sink (_tmp93_);
1246                 hbox = _tmp93_;
1247                 _tmp94_ = hbox;
1248                 gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp94_);
1249                 _tmp95_ = g_new0 (GtkLabel*, 0 + 1);
1250                 self->priv->m_labels = (_vala_array_free (self->priv->m_labels, self->priv->m_labels_length1, (GDestroyNotify) g_object_unref), NULL);
1251                 self->priv->m_labels = _tmp95_;
1252                 self->priv->m_labels_length1 = 0;
1253                 self->priv->_m_labels_size_ = self->priv->m_labels_length1;
1254                 _tmp96_ = g_new0 (GtkLabel*, 0 + 1);
1255                 self->priv->m_candidates = (_vala_array_free (self->priv->m_candidates, self->priv->m_candidates_length1, (GDestroyNotify) g_object_unref), NULL);
1256                 self->priv->m_candidates = _tmp96_;
1257                 self->priv->m_candidates_length1 = 0;
1258                 self->priv->_m_candidates_size_ = self->priv->m_candidates_length1;
1259                 _tmp97_ = g_new0 (GtkWidget*, 0 + 1);
1260                 self->priv->m_widgets = (_vala_array_free (self->priv->m_widgets, self->priv->m_widgets_length1, (GDestroyNotify) g_object_unref), NULL);
1261                 self->priv->m_widgets = _tmp97_;
1262                 self->priv->m_widgets_length1 = 0;
1263                 self->priv->_m_widgets_size_ = self->priv->m_widgets_length1;
1264                 {
1265                         gint i;
1266                         i = 0;
1267                         {
1268                                 gboolean _tmp98_;
1269                                 _tmp98_ = TRUE;
1270                                 while (TRUE) {
1271                                         Block3Data* _data3_;
1272                                         gboolean _tmp99_;
1273                                         gint _tmp101_;
1274                                         gint _tmp102_;
1275                                         const gchar* _tmp103_;
1276                                         GtkLabel* _tmp104_;
1277                                         GtkLabel* label;
1278                                         GtkLabel* _tmp105_;
1279                                         GtkLabel* _tmp106_;
1280                                         GtkLabel** _tmp107_;
1281                                         gint _tmp107__length1;
1282                                         GtkLabel* _tmp108_;
1283                                         GtkLabel* _tmp109_;
1284                                         GtkLabel* _tmp110_;
1285                                         GtkLabel* candidate;
1286                                         GtkLabel* _tmp111_;
1287                                         GtkLabel* _tmp112_;
1288                                         GtkLabel** _tmp113_;
1289                                         gint _tmp113__length1;
1290                                         GtkLabel* _tmp114_;
1291                                         GtkLabel* _tmp115_;
1292                                         GtkBox* _tmp116_;
1293                                         GtkBox* candidate_hbox;
1294                                         GtkBox* _tmp117_;
1295                                         GtkBox* _tmp118_;
1296                                         GtkLabel* _tmp119_;
1297                                         GtkBox* _tmp120_;
1298                                         GtkLabel* _tmp121_;
1299                                         gint _tmp122_;
1300                                         GtkEventBox* _tmp123_;
1301                                         GtkEventBox* ebox;
1302                                         GtkEventBox* _tmp124_;
1303                                         GtkEventBox* _tmp125_;
1304                                         GtkEventBox* _tmp126_;
1305                                         GtkBox* _tmp127_;
1306                                         GtkBox* _tmp128_;
1307                                         GtkEventBox* _tmp129_;
1308                                         GtkWidget** _tmp130_;
1309                                         gint _tmp130__length1;
1310                                         GtkEventBox* _tmp131_;
1311                                         GtkWidget* _tmp132_;
1312                                         _data3_ = g_slice_new0 (Block3Data);
1313                                         _data3_->_ref_count_ = 1;
1314                                         _data3_->self = g_object_ref (self);
1315                                         _tmp99_ = _tmp98_;
1316                                         if (!_tmp99_) {
1317                                                 gint _tmp100_;
1318                                                 _tmp100_ = i;
1319                                                 i = _tmp100_ + 1;
1320                                         }
1321                                         _tmp98_ = FALSE;
1322                                         _tmp101_ = i;
1323                                         if (!(_tmp101_ < 16)) {
1324                                                 block3_data_unref (_data3_);
1325                                                 _data3_ = NULL;
1326                                                 break;
1327                                         }
1328                                         _tmp102_ = i;
1329                                         _tmp103_ = CANDIDATE_AREA_LABELS[_tmp102_];
1330                                         _tmp104_ = (GtkLabel*) gtk_label_new (_tmp103_);
1331                                         g_object_ref_sink (_tmp104_);
1332                                         label = _tmp104_;
1333                                         _tmp105_ = label;
1334                                         gtk_misc_set_alignment ((GtkMisc*) _tmp105_, 0.0f, 0.5f);
1335                                         _tmp106_ = label;
1336                                         gtk_widget_show ((GtkWidget*) _tmp106_);
1337                                         _tmp107_ = self->priv->m_labels;
1338                                         _tmp107__length1 = self->priv->m_labels_length1;
1339                                         _tmp108_ = label;
1340                                         _tmp109_ = _g_object_ref0 (_tmp108_);
1341                                         _vala_array_add5 (&self->priv->m_labels, &self->priv->m_labels_length1, &self->priv->_m_labels_size_, _tmp109_);
1342                                         _tmp110_ = (GtkLabel*) gtk_label_new ("test");
1343                                         g_object_ref_sink (_tmp110_);
1344                                         candidate = _tmp110_;
1345                                         _tmp111_ = candidate;
1346                                         gtk_misc_set_alignment ((GtkMisc*) _tmp111_, 0.0f, 0.5f);
1347                                         _tmp112_ = candidate;
1348                                         gtk_widget_show ((GtkWidget*) _tmp112_);
1349                                         _tmp113_ = self->priv->m_candidates;
1350                                         _tmp113__length1 = self->priv->m_candidates_length1;
1351                                         _tmp114_ = candidate;
1352                                         _tmp115_ = _g_object_ref0 (_tmp114_);
1353                                         _vala_array_add6 (&self->priv->m_candidates, &self->priv->m_candidates_length1, &self->priv->_m_candidates_size_, _tmp115_);
1354                                         _tmp116_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
1355                                         g_object_ref_sink (_tmp116_);
1356                                         candidate_hbox = _tmp116_;
1357                                         _tmp117_ = candidate_hbox;
1358                                         gtk_widget_show ((GtkWidget*) _tmp117_);
1359                                         _tmp118_ = candidate_hbox;
1360                                         _tmp119_ = label;
1361                                         gtk_box_pack_start (_tmp118_, (GtkWidget*) _tmp119_, FALSE, FALSE, (guint) 2);
1362                                         _tmp120_ = candidate_hbox;
1363                                         _tmp121_ = candidate;
1364                                         gtk_box_pack_start (_tmp120_, (GtkWidget*) _tmp121_, FALSE, FALSE, (guint) 2);
1365                                         _tmp122_ = i;
1366                                         _data3_->index = _tmp122_;
1367                                         _tmp123_ = (GtkEventBox*) gtk_event_box_new ();
1368                                         g_object_ref_sink (_tmp123_);
1369                                         ebox = _tmp123_;
1370                                         _tmp124_ = ebox;
1371                                         gtk_widget_set_no_show_all ((GtkWidget*) _tmp124_, TRUE);
1372                                         _tmp125_ = ebox;
1373                                         g_signal_connect_data ((GtkWidget*) _tmp125_, "button-press-event", (GCallback) _______lambda6__gtk_widget_button_press_event, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
1374                                         _tmp126_ = ebox;
1375                                         _tmp127_ = candidate_hbox;
1376                                         gtk_container_add ((GtkContainer*) _tmp126_, (GtkWidget*) _tmp127_);
1377                                         _tmp128_ = hbox;
1378                                         _tmp129_ = ebox;
1379                                         gtk_box_pack_start (_tmp128_, (GtkWidget*) _tmp129_, FALSE, FALSE, (guint) 4);
1380                                         _tmp130_ = self->priv->m_widgets;
1381                                         _tmp130__length1 = self->priv->m_widgets_length1;
1382                                         _tmp131_ = ebox;
1383                                         _tmp132_ = _g_object_ref0 ((GtkWidget*) _tmp131_);
1384                                         _vala_array_add7 (&self->priv->m_widgets, &self->priv->m_widgets_length1, &self->priv->_m_widgets_size_, _tmp132_);
1385                                         _g_object_unref0 (ebox);
1386                                         _g_object_unref0 (candidate_hbox);
1387                                         _g_object_unref0 (candidate);
1388                                         _g_object_unref0 (label);
1389                                         block3_data_unref (_data3_);
1390                                         _data3_ = NULL;
1391                                 }
1392                         }
1393                 }
1394                 _tmp133_ = hbox;
1395                 _tmp134_ = vseparator_new ();
1396                 g_object_ref_sink (_tmp134_);
1397                 _tmp135_ = _tmp134_;
1398                 gtk_box_pack_start (_tmp133_, (GtkWidget*) _tmp135_, FALSE, FALSE, (guint) 0);
1399                 _g_object_unref0 (_tmp135_);
1400                 _tmp136_ = hbox;
1401                 _tmp137_ = prev_button;
1402                 gtk_box_pack_start (_tmp136_, (GtkWidget*) _tmp137_, FALSE, FALSE, (guint) 0);
1403                 _tmp138_ = hbox;
1404                 _tmp139_ = next_button;
1405                 gtk_box_pack_start (_tmp138_, (GtkWidget*) _tmp139_, FALSE, FALSE, (guint) 0);
1406                 _g_object_unref0 (hbox);
1407         }
1408         _g_object_unref0 (next_button);
1409         _g_object_unref0 (prev_button);
1410 }
1411
1412
1413 static void g_cclosure_user_marshal_VOID__UINT_UINT_UINT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
1414         typedef void (*GMarshalFunc_VOID__UINT_UINT_UINT) (gpointer data1, guint arg_1, guint arg_2, guint arg_3, gpointer data2);
1415         register GMarshalFunc_VOID__UINT_UINT_UINT callback;
1416         register GCClosure * cc;
1417         register gpointer data1;
1418         register gpointer data2;
1419         cc = (GCClosure *) closure;
1420         g_return_if_fail (n_param_values == 4);
1421         if (G_CCLOSURE_SWAP_DATA (closure)) {
1422                 data1 = closure->data;
1423                 data2 = param_values->data[0].v_pointer;
1424         } else {
1425                 data1 = param_values->data[0].v_pointer;
1426                 data2 = closure->data;
1427         }
1428         callback = (GMarshalFunc_VOID__UINT_UINT_UINT) (marshal_data ? marshal_data : cc->callback);
1429         callback (data1, g_value_get_uint (param_values + 1), g_value_get_uint (param_values + 2), g_value_get_uint (param_values + 3), data2);
1430 }
1431
1432
1433 static void candidate_area_class_init (CandidateAreaClass * klass) {
1434         candidate_area_parent_class = g_type_class_peek_parent (klass);
1435         g_type_class_add_private (klass, sizeof (CandidateAreaPrivate));
1436         G_OBJECT_CLASS (klass)->finalize = candidate_area_finalize;
1437         g_signal_new ("candidate_clicked", TYPE_CANDIDATE_AREA, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT_UINT, G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT);
1438         g_signal_new ("page_up", TYPE_CANDIDATE_AREA, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
1439         g_signal_new ("page_down", TYPE_CANDIDATE_AREA, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
1440         g_signal_new ("cursor_up", TYPE_CANDIDATE_AREA, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
1441         g_signal_new ("cursor_down", TYPE_CANDIDATE_AREA, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
1442 }
1443
1444
1445 static void candidate_area_instance_init (CandidateArea * self) {
1446         self->priv = CANDIDATE_AREA_GET_PRIVATE (self);
1447 }
1448
1449
1450 static void candidate_area_finalize (GObject* obj) {
1451         CandidateArea * self;
1452         self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_CANDIDATE_AREA, CandidateArea);
1453         self->priv->m_labels = (_vala_array_free (self->priv->m_labels, self->priv->m_labels_length1, (GDestroyNotify) g_object_unref), NULL);
1454         self->priv->m_candidates = (_vala_array_free (self->priv->m_candidates, self->priv->m_candidates_length1, (GDestroyNotify) g_object_unref), NULL);
1455         self->priv->m_widgets = (_vala_array_free (self->priv->m_widgets, self->priv->m_widgets_length1, (GDestroyNotify) g_object_unref), NULL);
1456         self->priv->m_ibus_candidates = (_vala_array_free (self->priv->m_ibus_candidates, self->priv->m_ibus_candidates_length1, (GDestroyNotify) g_object_unref), NULL);
1457         G_OBJECT_CLASS (candidate_area_parent_class)->finalize (obj);
1458 }
1459
1460
1461 GType candidate_area_get_type (void) {
1462         static volatile gsize candidate_area_type_id__volatile = 0;
1463         if (g_once_init_enter (&candidate_area_type_id__volatile)) {
1464                 static const GTypeInfo g_define_type_info = { sizeof (CandidateAreaClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) candidate_area_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CandidateArea), 0, (GInstanceInitFunc) candidate_area_instance_init, NULL };
1465                 GType candidate_area_type_id;
1466                 candidate_area_type_id = g_type_register_static (GTK_TYPE_BOX, "CandidateArea", &g_define_type_info, 0);
1467                 g_once_init_leave (&candidate_area_type_id__volatile, candidate_area_type_id);
1468         }
1469         return candidate_area_type_id__volatile;
1470 }
1471
1472
1473 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
1474         if ((array != NULL) && (destroy_func != NULL)) {
1475                 int i;
1476                 for (i = 0; i < array_length; i = i + 1) {
1477                         if (((gpointer*) array)[i] != NULL) {
1478                                 destroy_func (((gpointer*) array)[i]);
1479                         }
1480                 }
1481         }
1482 }
1483
1484
1485 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
1486         _vala_array_destroy (array, array_length, destroy_func);
1487         g_free (array);
1488 }
1489
1490
1491