Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.28 KB | None | 0 0
  1. /* test.c generated by valac 0.11.1, the Vala compiler
  2.  * generated from test.vala, do not modify */
  3.  
  4.  
  5. #include <glib.h>
  6. #include <glib-object.h>
  7. #include <stdlib.h>
  8. #include <string.h>
  9. #include <stdio.h>
  10.  
  11.  
  12. #define TYPE_TEST (test_get_type ())
  13. #define TEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TEST, Test))
  14. #define TEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TEST, TestClass))
  15. #define IS_TEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TEST))
  16. #define IS_TEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TEST))
  17. #define TEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TEST, TestClass))
  18.  
  19. typedef struct _Test Test;
  20. typedef struct _TestClass TestClass;
  21. typedef struct _TestPrivate TestPrivate;
  22.  
  23. struct _Test {
  24.     GObject parent_instance;
  25.     TestPrivate * priv;
  26. };
  27.  
  28. struct _TestClass {
  29.     GObjectClass parent_class;
  30. };
  31.  
  32.  
  33. static gpointer test_parent_class = NULL;
  34.  
  35. GType test_get_type (void) G_GNUC_CONST;
  36. enum  {
  37.     TEST_DUMMY_PROPERTY
  38. };
  39. Test* test_new (void);
  40. Test* test_construct (GType object_type);
  41. void _vala_main (gchar** args, int args_length1);
  42.  
  43.  
  44. Test* test_construct (GType object_type) {
  45.     Test * self = NULL;
  46.     self = (Test*) g_object_new (object_type, NULL);
  47.     return self;
  48. }
  49.  
  50.  
  51. Test* test_new (void) {
  52.     return test_construct (TYPE_TEST);
  53. }
  54.  
  55.  
  56. static void test_class_init (TestClass * klass) {
  57.     test_parent_class = g_type_class_peek_parent (klass);
  58. }
  59.  
  60.  
  61. static void test_instance_init (Test * self) {
  62. }
  63.  
  64.  
  65. GType test_get_type (void) {
  66.     static volatile gsize test_type_id__volatile = 0;
  67.     if (g_once_init_enter (&test_type_id__volatile)) {
  68.         static const GTypeInfo g_define_type_info = { sizeof (TestClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) test_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Test), 0, (GInstanceInitFunc) test_instance_init, NULL };
  69.         GType test_type_id;
  70.         test_type_id = g_type_register_static (G_TYPE_OBJECT, "Test", &g_define_type_info, 0);
  71.         g_once_init_leave (&test_type_id__volatile, test_type_id);
  72.     }
  73.     return test_type_id__volatile;
  74. }
  75.  
  76.  
  77. void _vala_main (gchar** args, int args_length1) {
  78.     fprintf (stdout, "sideof(Test) = %d\n", (gint) sizeof (Test*));
  79. }
  80.  
  81.  
  82. int main (int argc, char ** argv) {
  83.     g_type_init ();
  84.     _vala_main (argv, argc);
  85.     return 0;
  86. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement