/* objects_signals_enum_marshal.c generated by valac, the Vala compiler * generated from objects_signals_enum_marshal.vala, do not modify */ #include #include #include #include #if !defined(VALA_EXTERN) #if defined(_WIN32) || defined(__CYGWIN__) #define VALA_EXTERN __declspec(dllexport) extern #elif __GNUC__ >= 4 #define VALA_EXTERN __attribute__((visibility("default"))) extern #else #define VALA_EXTERN extern #endif #endif typedef enum { FOO_FOO } Foo; #define TYPE_FOO (foo_get_type ()) typedef enum { BAR_BAR = 1 << 0 } Bar; #define TYPE_BAR (bar_get_type ()) #define TYPE_MANAM (manam_get_type ()) #define MANAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MANAM, Manam)) #define MANAM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MANAM, ManamClass)) #define IS_MANAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MANAM)) #define IS_MANAM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MANAM)) #define MANAM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MANAM, ManamClass)) typedef struct _Manam Manam; typedef struct _ManamClass ManamClass; typedef struct _ManamPrivate ManamPrivate; enum { MANAM_0_PROPERTY, MANAM_NUM_PROPERTIES }; static GParamSpec* manam_properties[MANAM_NUM_PROPERTIES]; enum { MANAM_FOO_SIGNAL, MANAM_BAR_SIGNAL, MANAM_NUM_SIGNALS }; static guint manam_signals[MANAM_NUM_SIGNALS] = {0}; #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) struct _Manam { GObject parent_instance; ManamPrivate * priv; }; struct _ManamClass { GObjectClass parent_class; }; static gpointer manam_parent_class = NULL; VALA_EXTERN GType foo_get_type (void) G_GNUC_CONST ; VALA_EXTERN GType bar_get_type (void) G_GNUC_CONST ; VALA_EXTERN GType manam_get_type (void) G_GNUC_CONST ; G_DEFINE_AUTOPTR_CLEANUP_FUNC (Manam, g_object_unref) VALA_EXTERN Manam* manam_new (void); VALA_EXTERN Manam* manam_construct (GType object_type); static void g_cclosure_user_marshal_VOID__ENUM_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); static void g_cclosure_user_marshal_VOID__FLAGS_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); static GType manam_get_type_once (void); static void _vala_main (void); static void _vala_lambda0_ (void); static void __vala_lambda0__manam_foo (Manam* _sender, Foo f, const gchar* s, gpointer self); static void _vala_lambda1_ (void); static void __vala_lambda1__manam_bar (Manam* _sender, Bar b, const gchar* s, gpointer self); static GType foo_get_type_once (void) { static const GEnumValue values[] = {{FOO_FOO, "FOO_FOO", "foo"}, {0, NULL, NULL}}; GType foo_type_id; foo_type_id = g_enum_register_static ("Foo", values); return foo_type_id; } GType foo_get_type (void) { static volatile gsize foo_type_id__once = 0; if (g_once_init_enter (&foo_type_id__once)) { GType foo_type_id; foo_type_id = foo_get_type_once (); g_once_init_leave (&foo_type_id__once, foo_type_id); } return foo_type_id__once; } static GType bar_get_type_once (void) { static const GFlagsValue values[] = {{BAR_BAR, "BAR_BAR", "bar"}, {0, NULL, NULL}}; GType bar_type_id; bar_type_id = g_flags_register_static ("Bar", values); return bar_type_id; } GType bar_get_type (void) { static volatile gsize bar_type_id__once = 0; if (g_once_init_enter (&bar_type_id__once)) { GType bar_type_id; bar_type_id = bar_get_type_once (); g_once_init_leave (&bar_type_id__once, bar_type_id); } return bar_type_id__once; } Manam* manam_construct (GType object_type) { Manam * self = NULL; self = (Manam*) g_object_new (object_type, NULL); return self; } Manam* manam_new (void) { return manam_construct (TYPE_MANAM); } static void g_cclosure_user_marshal_VOID__ENUM_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__ENUM_STRING) (gpointer data1, gint arg_1, const char* arg_2, gpointer data2); register GMarshalFunc_VOID__ENUM_STRING callback; register GCClosure * cc; register gpointer data1; register gpointer data2; cc = (GCClosure *) closure; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = param_values->data[0].v_pointer; } else { data1 = param_values->data[0].v_pointer; data2 = closure->data; } callback = (GMarshalFunc_VOID__ENUM_STRING) (marshal_data ? marshal_data : cc->callback); callback (data1, g_value_get_enum (param_values + 1), g_value_get_string (param_values + 2), data2); } static void g_cclosure_user_marshal_VOID__FLAGS_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__FLAGS_STRING) (gpointer data1, guint arg_1, const char* arg_2, gpointer data2); register GMarshalFunc_VOID__FLAGS_STRING callback; register GCClosure * cc; register gpointer data1; register gpointer data2; cc = (GCClosure *) closure; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = param_values->data[0].v_pointer; } else { data1 = param_values->data[0].v_pointer; data2 = closure->data; } callback = (GMarshalFunc_VOID__FLAGS_STRING) (marshal_data ? marshal_data : cc->callback); callback (data1, g_value_get_flags (param_values + 1), g_value_get_string (param_values + 2), data2); } static void manam_class_init (ManamClass * klass, gpointer klass_data) { manam_parent_class = g_type_class_peek_parent (klass); manam_signals[MANAM_FOO_SIGNAL] = g_signal_new ("foo", TYPE_MANAM, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__ENUM_STRING, G_TYPE_NONE, 2, TYPE_FOO, G_TYPE_STRING); manam_signals[MANAM_BAR_SIGNAL] = g_signal_new ("bar", TYPE_MANAM, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__FLAGS_STRING, G_TYPE_NONE, 2, TYPE_BAR, G_TYPE_STRING); } static void manam_instance_init (Manam * self, gpointer klass) { } static GType manam_get_type_once (void) { static const GTypeInfo g_define_type_info = { sizeof (ManamClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) manam_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Manam), 0, (GInstanceInitFunc) manam_instance_init, NULL }; GType manam_type_id; manam_type_id = g_type_register_static (G_TYPE_OBJECT, "Manam", &g_define_type_info, 0); return manam_type_id; } GType manam_get_type (void) { static volatile gsize manam_type_id__once = 0; if (g_once_init_enter (&manam_type_id__once)) { GType manam_type_id; manam_type_id = manam_get_type_once (); g_once_init_leave (&manam_type_id__once, manam_type_id); } return manam_type_id__once; } static void _vala_lambda0_ (void) { } static void __vala_lambda0__manam_foo (Manam* _sender, Foo f, const gchar* s, gpointer self) { _vala_lambda0_ (); } static void _vala_lambda1_ (void) { } static void __vala_lambda1__manam_bar (Manam* _sender, Bar b, const gchar* s, gpointer self) { _vala_lambda1_ (); } static void _vala_main (void) { Manam* manam = NULL; Manam* _tmp0_; _tmp0_ = manam_new (); manam = _tmp0_; g_signal_connect (manam, "foo", (GCallback) __vala_lambda0__manam_foo, NULL); g_signal_emit (manam, manam_signals[MANAM_FOO_SIGNAL], 0, FOO_FOO, "foo"); g_signal_connect (manam, "bar", (GCallback) __vala_lambda1__manam_bar, NULL); g_signal_emit (manam, manam_signals[MANAM_BAR_SIGNAL], 0, BAR_BAR, "bar"); _g_object_unref0 (manam); } int main (int argc, char ** argv) { _vala_main (); return 0; }