1 /* ~~~~~testfile.vala.c generated by valac, the Vala compiler
2 * generated from ~~~~~testfile.vala, do not modify */
6 #include <glib-object.h>
13 #define TYPE_ABOUT (about_get_type ())
14 #define ABOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ABOUT, About))
15 #define ABOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ABOUT, AboutClass))
16 #define IS_ABOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ABOUT))
17 #define IS_ABOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ABOUT))
18 #define ABOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ABOUT, AboutClass))
20 typedef struct _About About;
21 typedef struct _AboutClass AboutClass;
22 typedef struct _AboutPrivate AboutPrivate;
23 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
26 GObject parent_instance;
32 GObjectClass parent_class;
35 struct _AboutPrivate {
42 static gpointer about_parent_class = NULL;
44 GType about_get_type (void) G_GNUC_CONST;
45 #define ABOUT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ABOUT, AboutPrivate))
49 About* about_singleton (void);
50 About* about_new (void);
51 About* about_construct (GType object_type);
52 static gboolean __lambda2_ (About* self, GtkWidget* _self_, GdkEventAny* event);
53 static gboolean ___lambda2__gtk_widget_delete_event (GtkWidget* _sender, GdkEventAny* event, gpointer self);
54 static void __lambda3_ (About* self, gint rid);
55 static void ___lambda3__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self);
56 void about_show (About* self, GtkWindow* parent);
57 static void about_finalize (GObject* obj);
58 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
59 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
62 static gpointer _g_object_ref0 (gpointer self) {
63 return self ? g_object_ref (self) : NULL;
67 About* about_singleton (void) {
75 _tmp1_ = about_new ();
76 _g_object_unref0 (_About);
80 _tmp3_ = _g_object_ref0 (_tmp2_);
86 static gboolean __lambda2_ (About* self, GtkWidget* _self_, GdkEventAny* event) {
87 gboolean result = FALSE;
88 GtkAboutDialog* _tmp0_ = NULL;
90 gtk_widget_hide ((GtkWidget*) _tmp0_);
96 static gboolean ___lambda2__gtk_widget_delete_event (GtkWidget* _sender, GdkEventAny* event, gpointer self) {
98 result = __lambda2_ ((About*) self, _sender, event);
103 static void __lambda3_ (About* self, gint rid) {
104 GtkAboutDialog* _tmp0_ = NULL;
106 gtk_widget_hide ((GtkWidget*) _tmp0_);
110 static void ___lambda3__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self) {
111 __lambda3_ ((About*) self, response_id);
115 About* about_construct (GType object_type) {
117 About* _tmp0_ = NULL;
118 GtkAboutDialog* _tmp1_ = NULL;
119 GtkAboutDialog* _tmp2_ = NULL;
120 GtkAboutDialog* _tmp3_ = NULL;
121 GtkAboutDialog* _tmp4_ = NULL;
122 gchar* _tmp5_ = NULL;
123 gchar** _tmp6_ = NULL;
124 gchar** _tmp7_ = NULL;
125 gint _tmp7__length1 = 0;
126 GtkAboutDialog* _tmp8_ = NULL;
127 GtkAboutDialog* _tmp9_ = NULL;
128 GtkAboutDialog* _tmp10_ = NULL;
129 GtkAboutDialog* _tmp11_ = NULL;
130 GtkAboutDialog* _tmp12_ = NULL;
131 self = (About*) g_object_new (object_type, NULL);
132 _tmp0_ = _g_object_ref0 (self);
133 _g_object_unref0 (self->priv->_this);
134 self->priv->_this = _tmp0_;
135 _tmp1_ = (GtkAboutDialog*) gtk_about_dialog_new ();
136 g_object_ref_sink (_tmp1_);
137 _g_object_unref0 (self->el);
140 gtk_about_dialog_set_program_name (_tmp2_, "app.Builder.js");
142 gtk_about_dialog_set_license (_tmp3_, "LGPL");
144 _tmp5_ = g_strdup ("Alan Knowles");
145 _tmp6_ = g_new0 (gchar*, 1 + 1);
149 gtk_about_dialog_set_authors (_tmp4_, _tmp7_);
150 _tmp7_ = (_vala_array_free (_tmp7_, _tmp7__length1, (GDestroyNotify) g_free), NULL);
152 gtk_about_dialog_set_website (_tmp8_, "http://www.akbkhome.com/blog.php");
154 gtk_window_set_modal ((GtkWindow*) _tmp9_, TRUE);
156 gtk_about_dialog_set_copyright (_tmp10_, "LGPL");
158 g_signal_connect_object ((GtkWidget*) _tmp11_, "delete-event", (GCallback) ___lambda2__gtk_widget_delete_event, self, 0);
160 g_signal_connect_object ((GtkDialog*) _tmp12_, "response", (GCallback) ___lambda3__gtk_dialog_response, self, 0);
165 About* about_new (void) {
166 return about_construct (TYPE_ABOUT);
170 void about_show (About* self, GtkWindow* parent) {
171 GtkAboutDialog* _tmp0_ = NULL;
172 GtkWindow* _tmp1_ = NULL;
173 GtkAboutDialog* _tmp2_ = NULL;
174 GtkAboutDialog* _tmp3_ = NULL;
177 gtk_window_set_transient_for ((GtkWindow*) _tmp0_, _tmp1_);
179 gtk_window_set_modal ((GtkWindow*) _tmp2_, TRUE);
181 gtk_widget_show ((GtkWidget*) _tmp3_);
185 static void about_class_init (AboutClass * klass) {
186 about_parent_class = g_type_class_peek_parent (klass);
187 g_type_class_add_private (klass, sizeof (AboutPrivate));
188 G_OBJECT_CLASS (klass)->finalize = about_finalize;
192 static void about_instance_init (About * self) {
193 self->priv = ABOUT_GET_PRIVATE (self);
197 static void about_finalize (GObject* obj) {
199 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ABOUT, About);
200 _g_object_unref0 (self->el);
201 _g_object_unref0 (self->priv->_this);
202 G_OBJECT_CLASS (about_parent_class)->finalize (obj);
206 GType about_get_type (void) {
207 static volatile gsize about_type_id__volatile = 0;
208 if (g_once_init_enter (&about_type_id__volatile)) {
209 static const GTypeInfo g_define_type_info = { sizeof (AboutClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) about_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (About), 0, (GInstanceInitFunc) about_instance_init, NULL };
211 about_type_id = g_type_register_static (G_TYPE_OBJECT, "About", &g_define_type_info, 0);
212 g_once_init_leave (&about_type_id__volatile, about_type_id);
214 return about_type_id__volatile;
218 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
219 if ((array != NULL) && (destroy_func != NULL)) {
221 for (i = 0; i < array_length; i = i + 1) {
222 if (((gpointer*) array)[i] != NULL) {
223 destroy_func (((gpointer*) array)[i]);
230 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
231 _vala_array_destroy (array, array_length, destroy_func);