daily pastebin goal
68%
SHARE
TWEET

Untitled

a guest Mar 1st, 2014 9 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* hello.c generated by valac 0.22.1, the Vala compiler
  2.  * generated from hello.vala, do not modify */
  3.  
  4.  
  5. #include <glib.h>
  6. #include <glib-object.h>
  7. #include <gtk/gtk.h>
  8. #include <stdlib.h>
  9. #include <string.h>
  10.  
  11.  
  12. #define TYPE_FENSTER (fenster_get_type ())
  13. #define FENSTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FENSTER, Fenster))
  14. #define FENSTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FENSTER, FensterClass))
  15. #define IS_FENSTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FENSTER))
  16. #define IS_FENSTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FENSTER))
  17. #define FENSTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FENSTER, FensterClass))
  18.  
  19. typedef struct _Fenster Fenster;
  20. typedef struct _FensterClass FensterClass;
  21. typedef struct _FensterPrivate FensterPrivate;
  22. #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
  23.  
  24. struct _Fenster {
  25.         GtkWindow parent_instance;
  26.         FensterPrivate * priv;
  27. };
  28.  
  29. struct _FensterClass {
  30.         GtkWindowClass parent_class;
  31. };
  32.  
  33. struct _FensterPrivate {
  34.         GtkButton* b;
  35. };
  36.  
  37.  
  38. static gpointer fenster_parent_class = NULL;
  39.  
  40. GType fenster_get_type (void) G_GNUC_CONST;
  41. #define FENSTER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_FENSTER, FensterPrivate))
  42. enum  {
  43.         FENSTER_DUMMY_PROPERTY
  44. };
  45. Fenster* fenster_new (const gchar* label);
  46. Fenster* fenster_construct (GType object_type, const gchar* label);
  47. static void fenster_finalize (GObject* obj);
  48. gint _vala_main (gchar** args, int args_length1);
  49.  
  50.  
  51. Fenster* fenster_construct (GType object_type, const gchar* label) {
  52.         Fenster * self = NULL;
  53.         const gchar* _tmp0_ = NULL;
  54.         GtkButton* _tmp1_ = NULL;
  55.         GtkButton* _tmp2_ = NULL;
  56.         g_return_val_if_fail (label != NULL, NULL);
  57.         self = (Fenster*) g_object_new (object_type, NULL);
  58.         _tmp0_ = label;
  59.         _tmp1_ = (GtkButton*) gtk_button_new_with_label (_tmp0_);
  60.         g_object_ref_sink (_tmp1_);
  61.         _g_object_unref0 (self->priv->b);
  62.         self->priv->b = _tmp1_;
  63.         _tmp2_ = self->priv->b;
  64.         gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp2_);
  65.         gtk_widget_show_all ((GtkWidget*) self);
  66.         return self;
  67. }
  68.  
  69.  
  70. Fenster* fenster_new (const gchar* label) {
  71.         return fenster_construct (TYPE_FENSTER, label);
  72. }
  73.  
  74.  
  75. static void fenster_class_init (FensterClass * klass) {
  76.         fenster_parent_class = g_type_class_peek_parent (klass);
  77.         g_type_class_add_private (klass, sizeof (FensterPrivate));
  78.         G_OBJECT_CLASS (klass)->finalize = fenster_finalize;
  79. }
  80.  
  81.  
  82. static void fenster_instance_init (Fenster * self) {
  83.         self->priv = FENSTER_GET_PRIVATE (self);
  84. }
  85.  
  86.  
  87. static void fenster_finalize (GObject* obj) {
  88.         Fenster * self;
  89.         self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_FENSTER, Fenster);
  90.         _g_object_unref0 (self->priv->b);
  91.         G_OBJECT_CLASS (fenster_parent_class)->finalize (obj);
  92. }
  93.  
  94.  
  95. GType fenster_get_type (void) {
  96.         static volatile gsize fenster_type_id__volatile = 0;
  97.         if (g_once_init_enter (&fenster_type_id__volatile)) {
  98.                 static const GTypeInfo g_define_type_info = { sizeof (FensterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fenster_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Fenster), 0, (GInstanceInitFunc) fenster_instance_init, NULL };
  99.                 GType fenster_type_id;
  100.                 fenster_type_id = g_type_register_static (GTK_TYPE_WINDOW, "Fenster", &g_define_type_info, 0);
  101.                 g_once_init_leave (&fenster_type_id__volatile, fenster_type_id);
  102.         }
  103.         return fenster_type_id__volatile;
  104. }
  105.  
  106.  
  107. gint _vala_main (gchar** args, int args_length1) {
  108.         gint result = 0;
  109.         Fenster* f = NULL;
  110.         Fenster* _tmp0_ = NULL;
  111.         gtk_init (&args_length1, &args);
  112.         _tmp0_ = fenster_new ("Hallo Welt");
  113.         g_object_ref_sink (_tmp0_);
  114.         f = _tmp0_;
  115.         gtk_main ();
  116.         result = 0;
  117.         _g_object_unref0 (f);
  118.         return result;
  119. }
  120.  
  121.  
  122. int main (int argc, char ** argv) {
  123.         g_type_init ();
  124.         return _vala_main (argv, argc);
  125. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top