void netstatus_connect_signal_while_alive (gpointer object, const char *detailed_signal, GCallback func, gpointer func_data, gpointer alive_object) { GClosure *closure; GType type; guint signal_id = 0; GQuark detail = 0; type = G_OBJECT_TYPE (object); if (!g_signal_parse_name (detailed_signal, type, &signal_id, &detail, FALSE)) { g_warning (G_STRLOC ": unable to parse signal \"%s\" for type \"%s\"", detailed_signal, g_type_name (type)); return; } closure = g_cclosure_new (func, func_data, NULL); g_object_watch_closure (G_OBJECT (alive_object), closure); g_signal_connect_closure_by_id (object, signal_id, detail, closure, FALSE); }
static PyObject * pyg_remove_emission_hook(PyGObject *self, PyObject *args) { PyObject *pygtype; char *name; guint signal_id; gulong hook_id; GType gtype; if (!PyArg_ParseTuple(args, "Osk:gobject.remove_emission_hook", &pygtype, &name, &hook_id)) return NULL; if ((gtype = pyg_type_from_object(pygtype)) == 0) { return NULL; } if (!g_signal_parse_name(name, gtype, &signal_id, NULL, TRUE)) { PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s", PyString_AsString(PyObject_Repr((PyObject*)self)), name); return NULL; } g_signal_remove_emission_hook(signal_id, hook_id); Py_INCREF(Py_None); return Py_None; }
static void _lambda48_ (EaseSlide* slide, gint index, EaseSlideButtonPanel* self) { #line 212 "ease-slide-button-panel.c" guint _tmp0_; guint _tmp1_; #line 116 "ease-slide-button-panel.vala" g_return_if_fail (slide != NULL); #line 117 "ease-slide-button-panel.vala" g_signal_parse_name ("changed", EASE_TYPE_SLIDE, &_tmp0_, NULL, FALSE); #line 117 "ease-slide-button-panel.vala" g_signal_handlers_disconnect_matched (slide, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 0, NULL, (GCallback) _ease_slide_button_panel_on_slide_changed_ease_slide_changed, self); #line 118 "ease-slide-button-panel.vala" g_signal_parse_name ("background-changed", EASE_TYPE_SLIDE, &_tmp1_, NULL, FALSE); #line 118 "ease-slide-button-panel.vala" g_signal_handlers_disconnect_matched (slide, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _ease_slide_button_panel_on_slide_changed_ease_slide_background_changed, self); #line 225 "ease-slide-button-panel.c" }
static gboolean ToolsCoreRegisterSignal(ToolsAppCtx *ctx, ToolsAppProvider *prov, ToolsPluginData *plugin, gpointer reg) { gboolean valid; guint sigId; GQuark sigDetail; ToolsPluginSignalCb *sig = reg; valid = g_signal_parse_name(sig->signame, G_OBJECT_TYPE(ctx->serviceObj), &sigId, &sigDetail, FALSE); if (valid) { g_signal_connect(ctx->serviceObj, sig->signame, sig->callback, sig->clientData); return TRUE; } g_debug("Plugin '%s' unable to connect to signal '%s'.\n", plugin->name, sig->signame); return FALSE; }
void soy_joints_hinge_set_anchor (soyjointsHinge* self, soyatomsPosition* value) { soyatomsPosition* _tmp0_; soyatomsPosition* _tmp1_; soyatomsPosition* _tmp5_; soyatomsPosition* _tmp6_; soyatomsPosition* _tmp7_; g_return_if_fail (self != NULL); _tmp0_ = value; _soy_joints_hinge_anchor_set (self, _tmp0_); _tmp1_ = self->priv->_anchor_obj; if (_tmp1_ != NULL) { soyatomsPosition* _tmp2_; guint _tmp3_ = 0U; soyatomsPosition* _tmp4_; _tmp2_ = self->priv->_anchor_obj; g_signal_parse_name ("on-set", SOY_ATOMS_TYPE_POSITION, &_tmp3_, NULL, FALSE); g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) __soy_joints_hinge_anchor_set_soy_atoms_position_on_set, self); _tmp4_ = self->priv->_anchor_obj; g_object_weak_unref ((GObject*) _tmp4_, __soy_joints_hinge_anchor_weak_gweak_notify, self); } _tmp5_ = value; self->priv->_anchor_obj = _tmp5_; _tmp6_ = value; g_signal_connect_object (_tmp6_, "on-set", (GCallback) __soy_joints_hinge_anchor_set_soy_atoms_position_on_set, self, 0); _tmp7_ = value; g_object_weak_ref ((GObject*) _tmp7_, __soy_joints_hinge_anchor_weak_gweak_notify, self); g_object_notify ((GObject *) self, "anchor"); }
void soy_bodies_light_set_ambient (soybodiesLight* self, soyatomsColor* value) { soyatomsColor* _tmp0_; soyatomsColor* _tmp1_; soyatomsColor* _tmp5_; soyatomsColor* _tmp6_; soyatomsColor* _tmp7_; g_return_if_fail (self != NULL); _tmp0_ = value; _soy_bodies_light_ambient_set (self, _tmp0_); _tmp1_ = self->priv->_ambient_obj; if (_tmp1_ != NULL) { soyatomsColor* _tmp2_; guint _tmp3_ = 0U; soyatomsColor* _tmp4_; _tmp2_ = self->priv->_ambient_obj; g_signal_parse_name ("on-set", SOY_ATOMS_TYPE_COLOR, &_tmp3_, NULL, FALSE); g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) __soy_bodies_light_ambient_set_soy_atoms_color_on_set, self); _tmp4_ = self->priv->_ambient_obj; g_object_weak_unref ((GObject*) _tmp4_, __soy_bodies_light_ambient_weak_gweak_notify, self); } _tmp5_ = value; self->priv->_ambient_obj = _tmp5_; _tmp6_ = value; g_signal_connect_object (_tmp6_, "on-set", (GCallback) __soy_bodies_light_ambient_set_soy_atoms_color_on_set, self, 0); _tmp7_ = value; g_object_weak_ref ((GObject*) _tmp7_, __soy_bodies_light_ambient_weak_gweak_notify, self); g_object_notify ((GObject *) self, "ambient"); }
void soy_joints_universal_set_axis2 (soyjointsUniversal* self, soyatomsAxis* value) { soyatomsAxis* _tmp0_; soyatomsAxis* _tmp1_; soyatomsAxis* _tmp5_; soyatomsAxis* _tmp6_; soyatomsAxis* _tmp7_; g_return_if_fail (self != NULL); _tmp0_ = value; _soy_joints_universal_axis2_set (self, _tmp0_); _tmp1_ = self->priv->_axis2_obj; if (_tmp1_ != NULL) { soyatomsAxis* _tmp2_; guint _tmp3_ = 0U; soyatomsAxis* _tmp4_; _tmp2_ = self->priv->_axis2_obj; g_signal_parse_name ("on-set", SOY_ATOMS_TYPE_AXIS, &_tmp3_, NULL, FALSE); g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) __soy_joints_universal_axis2_set_soy_atoms_axis_on_set, self); _tmp4_ = self->priv->_axis2_obj; g_object_weak_unref ((GObject*) _tmp4_, __soy_joints_universal_axis2_weak_gweak_notify, self); } _tmp5_ = value; self->priv->_axis2_obj = _tmp5_; _tmp6_ = value; g_signal_connect_object (_tmp6_, "on-set", (GCallback) __soy_joints_universal_axis2_set_soy_atoms_axis_on_set, self, 0); _tmp7_ = value; g_object_weak_ref ((GObject*) _tmp7_, __soy_joints_universal_axis2_weak_gweak_notify, self); g_object_notify ((GObject *) self, "axis2"); }
static void dash_box_fade_done_cb (DashBox* self) { DashBoxMode _tmp0_; g_return_if_fail (self != NULL); _tmp0_ = self->priv->mode; switch (_tmp0_) { case DASH_BOX_MODE_PUSH_FADE_OUT: { GtkWidget* _tmp1_; GreeterList* _tmp2_; self->priv->mode = DASH_BOX_MODE_PUSH_FADE_IN; _tmp1_ = self->priv->orig; gtk_widget_hide (_tmp1_); _tmp2_ = self->priv->pushed; fadable_fade_in ((Fadable*) _tmp2_); break; } case DASH_BOX_MODE_PUSH_FADE_IN: { GreeterList* _tmp3_; self->priv->mode = DASH_BOX_MODE_NORMAL; _tmp3_ = self->priv->pushed; gtk_widget_grab_focus ((GtkWidget*) _tmp3_); break; } case DASH_BOX_MODE_POP_FADE_OUT: { FadeTracker* _tmp4_; GtkWidget* _tmp5_; self->priv->mode = DASH_BOX_MODE_POP_FADE_IN; _tmp4_ = self->priv->orig_tracker; fade_tracker_reset (_tmp4_, FADE_TRACKER_MODE_FADE_IN); _tmp5_ = self->priv->orig; gtk_widget_show (_tmp5_); break; } case DASH_BOX_MODE_POP_FADE_IN: { GreeterList* _tmp6_; guint _tmp7_ = 0U; GreeterList* _tmp8_; GtkWidget* _tmp9_; self->priv->mode = DASH_BOX_MODE_NORMAL; _tmp6_ = self->priv->pushed; g_signal_parse_name ("fade-done", TYPE_FADABLE_BOX, &_tmp7_, NULL, FALSE); g_signal_handlers_disconnect_matched ((FadableBox*) _tmp6_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp7_, 0, NULL, (GCallback) _dash_box_fade_done_cb_fadable_box_fade_done, self); _tmp8_ = self->priv->pushed; gtk_widget_destroy ((GtkWidget*) _tmp8_); _g_object_unref0 (self->priv->pushed); self->priv->pushed = NULL; gtk_widget_queue_resize ((GtkWidget*) self); _tmp9_ = self->priv->orig; gtk_widget_grab_focus (_tmp9_); break; } default: break; } }
static PyObject * pyg_add_emission_hook(PyGObject *self, PyObject *args) { PyObject *first, *callback, *extra_args, *data; gchar *name; gulong hook_id; guint sigid; Py_ssize_t len; GQuark detail = 0; GType gtype; PyObject *pygtype; len = PyTuple_Size(args); if (len < 3) { PyErr_SetString(PyExc_TypeError, "gobject.add_emission_hook requires at least 3 arguments"); return NULL; } first = PySequence_GetSlice(args, 0, 3); if (!PyArg_ParseTuple(first, "OsO:add_emission_hook", &pygtype, &name, &callback)) { Py_DECREF(first); return NULL; } Py_DECREF(first); if ((gtype = pyg_type_from_object(pygtype)) == 0) { return NULL; } if (!PyCallable_Check(callback)) { PyErr_SetString(PyExc_TypeError, "third argument must be callable"); return NULL; } if (!g_signal_parse_name(name, gtype, &sigid, &detail, TRUE)) { PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s", PyString_AsString(PyObject_Repr((PyObject*)self)), name); return NULL; } extra_args = PySequence_GetSlice(args, 3, len); if (extra_args == NULL) return NULL; data = Py_BuildValue("(ON)", callback, extra_args); if (data == NULL) return NULL; hook_id = g_signal_add_emission_hook(sigid, detail, marshal_emission_hook, data, (GDestroyNotify)pyg_destroy_notify); return PyLong_FromUnsignedLong(hook_id); }
/** * Implements * org.gnome.glib.GObject.g_signal_connect(long instance, Object handler, String name, boolean after) * called from * org.gnome.glib.Plumbing.connectSignal(Object instance, Signal handler, String name, boolean after) * called from * <generated package scope classes>.connect(Object instance, Signal handler, boolean after) * * This is where the magic to create a GClosure and hook it up to the GSignal * handling mechanisms is taken care of. A reference is created to the passed * Java object which is used as the callback when the signal is fired. */ JNIEXPORT void JNICALL Java_oscats_glib_GObject_g_1signal_1connect ( JNIEnv *env, jclass cls, jlong _instance, jobject _handler, jobject _receiver, jstring _name, jboolean _after ) { GObject* instance; const gchar* name; gboolean after; guint id; GQuark detail = 0; GClosure* closure; gboolean ok; // translate instance instance = (GObject*) _instance; // translate the signal name name = bindings_java_getString(env, _name); // translate after after = (gboolean) _after; /* * Lookup the signal information. We use this rather than g_signal_lookup() because * it allows us to sidestep the issue of detailed signal names. */ ok = g_signal_parse_name(name, G_OBJECT_TYPE(instance), &id, &detail, TRUE); if (!ok) { bindings_java_throw(env, "Unknown signal name %s for object %s", name, G_OBJECT_TYPE_NAME(instance)); return; } closure = bindings_java_closure_new(env, _handler, (jclass) _receiver, name, id); if (closure == NULL) { // and an exception has already been thrown return; } // returns the handler id, but we don't need it. g_signal_connect_closure_by_id(instance, id, detail, closure, after); // cleanup. Not really necessary as will happen automatically in a moment. bindings_java_releaseString(name); }
static gboolean terminal_has_notification_signal (void) { GQuark quark; guint signal_id; return g_signal_parse_name ("notification-received", VTE_TYPE_TERMINAL, &signal_id, &quark, FALSE); }
static void gb_terminal_view_connect_terminal (GbTerminalView *self, VteTerminal *terminal) { GtkAdjustment *vadj; GQuark quark; guint signal_id; vadj = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (terminal)); if (terminal == self->terminal_top) gtk_range_set_adjustment (GTK_RANGE (self->top_scrollbar), vadj); else gtk_range_set_adjustment (GTK_RANGE (self->bottom_scrollbar), vadj); g_signal_connect_object (terminal, "size-allocate", G_CALLBACK (size_allocate_cb), self, 0); g_signal_connect_object (terminal, "child-exited", G_CALLBACK (child_exited_cb), self, 0); g_signal_connect_object (terminal, "focus-in-event", G_CALLBACK (focus_in_event_cb), self, 0); g_signal_connect_object (terminal, "window-title-changed", G_CALLBACK (window_title_changed_cb), self, 0); if (g_signal_parse_name ("notification-received", VTE_TYPE_TERMINAL, &signal_id, &quark, FALSE)) { g_signal_connect_object (terminal, "notification-received", G_CALLBACK (notification_received_cb), self, 0); } }
static void rotation_plugin_real_deactivate (PeasActivatable* base) { RotationPlugin * self; TotemObject* t = NULL; GObject* _tmp0_ = NULL; GObject* _tmp1_ = NULL; guint _tmp2_ = 0U; guint _tmp3_ = 0U; BaconVideoWidget* _tmp4_ = NULL; self = (RotationPlugin*) base; g_object_get ((PeasActivatable*) self, "object", &_tmp0_, NULL); _tmp1_ = _tmp0_; t = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, totem_object_get_type (), TotemObject); g_signal_parse_name ("file-closed", totem_object_get_type (), &_tmp2_, NULL, FALSE); g_signal_handlers_disconnect_matched (t, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _rotation_plugin_cb_file_closed_totem_object_file_closed, self); g_signal_parse_name ("file-opened", totem_object_get_type (), &_tmp3_, NULL, FALSE); g_signal_handlers_disconnect_matched (t, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _rotation_plugin_cb_file_opened_totem_object_file_opened, self); totem_object_empty_menu_section (t, "rotation-placeholder"); gtk_application_remove_accelerator ((GtkApplication*) t, "app.rotate-right", NULL); gtk_application_remove_accelerator ((GtkApplication*) t, "app.rotate-left", NULL); _tmp4_ = self->priv->bvw; bacon_video_widget_set_rotation (_tmp4_, BVW_ROTATION_R_ZERO); _g_object_unref0 (t); }
gboolean deja_dup_user_focused (GtkWidget* win, GdkEventFocus* e) { gboolean result = FALSE; GtkWidget* _tmp0_; GtkWidget* _tmp1_; guint _tmp2_ = 0U; g_return_val_if_fail (win != NULL, FALSE); g_return_val_if_fail (e != NULL, FALSE); _tmp0_ = win; gtk_window_set_urgency_hint (GTK_WINDOW (_tmp0_), FALSE); _tmp1_ = win; g_signal_parse_name ("focus-in-event", GTK_TYPE_WIDGET, &_tmp2_, NULL, FALSE); g_signal_handlers_disconnect_matched (_tmp1_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _deja_dup_user_focused_gtk_widget_focus_in_event, NULL); result = FALSE; return result; }
static void _matenu_global_menu_item_hierarchy_changed (MatenuGlobalMenuItem* self, GtkWidget* old_toplevel) { GtkWidget* _tmp0_; GtkPlug* toplevel; g_return_if_fail (self != NULL); toplevel = _g_object_ref0 ((_tmp0_ = gtk_widget_get_toplevel ((GtkWidget*) self), GTK_IS_PLUG (_tmp0_) ? ((GtkPlug*) _tmp0_) : NULL)); if (toplevel != NULL) { g_signal_connect_object ((GtkWidget*) toplevel, "configure-event", (GCallback) _matenu_global_menu_item_sync_monitor_num_gtk_widget_configure_event, self, 0); } if (old_toplevel != NULL) { guint _tmp1_; g_signal_parse_name ("configure-event", GTK_TYPE_WIDGET, &_tmp1_, NULL, FALSE); g_signal_handlers_disconnect_matched (old_toplevel, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _matenu_global_menu_item_sync_monitor_num_gtk_widget_configure_event, self); } _g_object_unref0 (toplevel); }
void soy_joints_hinge_set_anchor (soyjointsHinge* self, soyatomsPosition* value) { soyatomsPosition* _tmp0_ = NULL; soyatomsPosition* _tmp1_ = NULL; soyatomsPosition* _tmp5_ = NULL; soyatomsPosition* _tmp6_ = NULL; soyatomsPosition* _tmp7_ = NULL; #line 79 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_return_if_fail (self != NULL); #line 80 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp0_ = value; #line 80 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _soy_joints_hinge_anchor_set (self, _tmp0_); #line 81 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp1_ = self->priv->_anchor_obj; #line 81 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" if (_tmp1_ != NULL) { #line 682 "Hinge.c" soyatomsPosition* _tmp2_ = NULL; guint _tmp3_ = 0U; soyatomsPosition* _tmp4_ = NULL; #line 82 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp2_ = self->priv->_anchor_obj; #line 82 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_signal_parse_name ("on-set", SOY_ATOMS_TYPE_POSITION, &_tmp3_, NULL, FALSE); #line 82 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) __soy_joints_hinge_anchor_set_soy_atoms_position_on_set, self); #line 83 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp4_ = self->priv->_anchor_obj; #line 83 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_object_weak_unref ((GObject*) _tmp4_, __soy_joints_hinge_anchor_weak_gweak_notify, self); #line 696 "Hinge.c" } #line 84 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp5_ = value; #line 84 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" self->priv->_anchor_obj = _tmp5_; #line 85 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp6_ = value; #line 85 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_signal_connect_object (_tmp6_, "on-set", (GCallback) __soy_joints_hinge_anchor_set_soy_atoms_position_on_set, self, 0); #line 86 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp7_ = value; #line 86 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_object_weak_ref ((GObject*) _tmp7_, __soy_joints_hinge_anchor_weak_gweak_notify, self); #line 79 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_object_notify ((GObject *) self, "anchor"); #line 712 "Hinge.c" }
void soy_controllers_pointer_set_position (soycontrollersPointer* self, soyatomsPosition* value) { soyatomsPosition* _tmp0_ = NULL; soyatomsPosition* _tmp1_ = NULL; soyatomsPosition* _tmp5_ = NULL; soyatomsPosition* _tmp6_ = NULL; soyatomsPosition* _tmp7_ = NULL; #line 86 "/home/jeff/Documents/libraries/libsoy/src/controllers/Pointer.gs" g_return_if_fail (self != NULL); #line 87 "/home/jeff/Documents/libraries/libsoy/src/controllers/Pointer.gs" _tmp0_ = value; #line 87 "/home/jeff/Documents/libraries/libsoy/src/controllers/Pointer.gs" _soy_controllers_pointer_position_set (self, _tmp0_); #line 88 "/home/jeff/Documents/libraries/libsoy/src/controllers/Pointer.gs" _tmp1_ = self->priv->_position_obj; #line 88 "/home/jeff/Documents/libraries/libsoy/src/controllers/Pointer.gs" if (_tmp1_ != NULL) { #line 392 "Pointer.c" soyatomsPosition* _tmp2_ = NULL; guint _tmp3_ = 0U; soyatomsPosition* _tmp4_ = NULL; #line 89 "/home/jeff/Documents/libraries/libsoy/src/controllers/Pointer.gs" _tmp2_ = self->priv->_position_obj; #line 89 "/home/jeff/Documents/libraries/libsoy/src/controllers/Pointer.gs" g_signal_parse_name ("on-set", SOY_ATOMS_TYPE_POSITION, &_tmp3_, NULL, FALSE); #line 89 "/home/jeff/Documents/libraries/libsoy/src/controllers/Pointer.gs" g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) __soy_controllers_pointer_position_set_soy_atoms_position_on_set, self); #line 90 "/home/jeff/Documents/libraries/libsoy/src/controllers/Pointer.gs" _tmp4_ = self->priv->_position_obj; #line 90 "/home/jeff/Documents/libraries/libsoy/src/controllers/Pointer.gs" g_object_weak_unref ((GObject*) _tmp4_, __soy_controllers_pointer_position_weak_gweak_notify, self); #line 406 "Pointer.c" } #line 91 "/home/jeff/Documents/libraries/libsoy/src/controllers/Pointer.gs" _tmp5_ = value; #line 91 "/home/jeff/Documents/libraries/libsoy/src/controllers/Pointer.gs" self->priv->_position_obj = _tmp5_; #line 92 "/home/jeff/Documents/libraries/libsoy/src/controllers/Pointer.gs" _tmp6_ = value; #line 92 "/home/jeff/Documents/libraries/libsoy/src/controllers/Pointer.gs" g_signal_connect_object (_tmp6_, "on-set", (GCallback) __soy_controllers_pointer_position_set_soy_atoms_position_on_set, self, 0); #line 93 "/home/jeff/Documents/libraries/libsoy/src/controllers/Pointer.gs" _tmp7_ = value; #line 93 "/home/jeff/Documents/libraries/libsoy/src/controllers/Pointer.gs" g_object_weak_ref ((GObject*) _tmp7_, __soy_controllers_pointer_position_weak_gweak_notify, self); #line 86 "/home/jeff/Documents/libraries/libsoy/src/controllers/Pointer.gs" g_object_notify ((GObject *) self, "position"); #line 422 "Pointer.c" }
void soy_joints_hinge_set_axis (soyjointsHinge* self, soyatomsAxis* value) { soyatomsAxis* _tmp0_ = NULL; soyatomsAxis* _tmp1_ = NULL; soyatomsAxis* _tmp5_ = NULL; soyatomsAxis* _tmp6_ = NULL; soyatomsAxis* _tmp7_ = NULL; #line 124 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_return_if_fail (self != NULL); #line 125 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp0_ = value; #line 125 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _soy_joints_hinge_axis_set (self, _tmp0_); #line 126 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp1_ = self->priv->_axis_obj; #line 126 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" if (_tmp1_ != NULL) { #line 939 "Hinge.c" soyatomsAxis* _tmp2_ = NULL; guint _tmp3_ = 0U; soyatomsAxis* _tmp4_ = NULL; #line 127 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp2_ = self->priv->_axis_obj; #line 127 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_signal_parse_name ("on-set", SOY_ATOMS_TYPE_AXIS, &_tmp3_, NULL, FALSE); #line 127 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) __soy_joints_hinge_axis_set_soy_atoms_axis_on_set, self); #line 128 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp4_ = self->priv->_axis_obj; #line 128 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_object_weak_unref ((GObject*) _tmp4_, __soy_joints_hinge_axis_weak_gweak_notify, self); #line 953 "Hinge.c" } #line 129 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp5_ = value; #line 129 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" self->priv->_axis_obj = _tmp5_; #line 130 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp6_ = value; #line 130 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_signal_connect_object (_tmp6_, "on-set", (GCallback) __soy_joints_hinge_axis_set_soy_atoms_axis_on_set, self, 0); #line 131 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp7_ = value; #line 131 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_object_weak_ref ((GObject*) _tmp7_, __soy_joints_hinge_axis_weak_gweak_notify, self); #line 124 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_object_notify ((GObject *) self, "axis"); #line 969 "Hinge.c" }
static void gb_terminal_view_connect_terminal (GbTerminalView *self, VteTerminal *terminal) { GQuark quark; guint signal_id; g_signal_connect_object (terminal, "size-allocate", G_CALLBACK (size_allocate_cb), self, 0); g_signal_connect_object (terminal, "child-exited", G_CALLBACK (child_exited_cb), self, 0); g_signal_connect_object (terminal, "focus-in-event", G_CALLBACK (focus_in_event_cb), self, 0); g_signal_connect_object (terminal, "window-title-changed", G_CALLBACK (window_title_changed_cb), self, 0); if (g_signal_parse_name ("notification-received", VTE_TYPE_TERMINAL, &signal_id, &quark, FALSE)) { g_signal_connect_object (terminal, "notification-received", G_CALLBACK (notification_received_cb), self, 0); } }
void soy_textures_bumpmap_set (soytexturesBumpmap* self, gint index, GObject* value) { soyatomsVector* vector = NULL; GObject* _tmp0_; GObject* _tmp1_; soyatomsVector* _tmp2_; soyatomsVector* _tmp3_; gfloat _tmp4_; gfloat _tmp5_; soyatomsVector* _tmp11_; gfloat _tmp12_; gfloat _tmp13_; soyatomsVector* _tmp19_; gfloat _tmp20_; gfloat _tmp21_; GeeHashMap* _tmp27_; gint _tmp28_; gboolean _tmp29_ = FALSE; GeeHashMap* _tmp37_; gint _tmp38_; soyatomsVector* _tmp39_; soyatomsVector* _tmp40_; soyatomsVector* _tmp41_; guchar* _tmp42_; gint _tmp43_; soyatomsVector* _tmp44_; gfloat _tmp45_; gfloat _tmp46_; guchar _tmp47_; guchar* _tmp48_; gint _tmp49_; soyatomsVector* _tmp50_; gfloat _tmp51_; gfloat _tmp52_; guchar _tmp53_; guchar* _tmp54_; gint _tmp55_; soyatomsVector* _tmp56_; gfloat _tmp57_; gfloat _tmp58_; guchar _tmp59_; g_return_if_fail (self != NULL); g_return_if_fail (value != NULL); _tmp0_ = value; if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, SOY_ATOMS_TYPE_VECTOR)) { _g_object_unref0 (vector); return; } _tmp1_ = value; _tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SOY_ATOMS_TYPE_VECTOR, soyatomsVector)); _g_object_unref0 (vector); vector = _tmp2_; _tmp3_ = vector; _tmp4_ = soy_atoms_vector_get_x (_tmp3_); _tmp5_ = _tmp4_; if (_tmp5_ > 1.0f) { soyatomsVector* _tmp6_; _tmp6_ = vector; soy_atoms_vector_set_x (_tmp6_, 1.0f); } else { soyatomsVector* _tmp7_; gfloat _tmp8_; gfloat _tmp9_; _tmp7_ = vector; _tmp8_ = soy_atoms_vector_get_x (_tmp7_); _tmp9_ = _tmp8_; if (_tmp9_ < (-1.0f)) { soyatomsVector* _tmp10_; _tmp10_ = vector; soy_atoms_vector_set_x (_tmp10_, -1.0f); } } _tmp11_ = vector; _tmp12_ = soy_atoms_vector_get_y (_tmp11_); _tmp13_ = _tmp12_; if (_tmp13_ > 1.0f) { soyatomsVector* _tmp14_; _tmp14_ = vector; soy_atoms_vector_set_y (_tmp14_, 1.0f); } else { soyatomsVector* _tmp15_; gfloat _tmp16_; gfloat _tmp17_; _tmp15_ = vector; _tmp16_ = soy_atoms_vector_get_y (_tmp15_); _tmp17_ = _tmp16_; if (_tmp17_ < (-1.0f)) { soyatomsVector* _tmp18_; _tmp18_ = vector; soy_atoms_vector_set_y (_tmp18_, -1.0f); } } _tmp19_ = vector; _tmp20_ = soy_atoms_vector_get_z (_tmp19_); _tmp21_ = _tmp20_; if (_tmp21_ > 1.0f) { soyatomsVector* _tmp22_; _tmp22_ = vector; soy_atoms_vector_set_z (_tmp22_, 1.0f); } else { soyatomsVector* _tmp23_; gfloat _tmp24_; gfloat _tmp25_; _tmp23_ = vector; _tmp24_ = soy_atoms_vector_get_z (_tmp23_); _tmp25_ = _tmp24_; if (_tmp25_ < (-1.0f)) { soyatomsVector* _tmp26_; _tmp26_ = vector; soy_atoms_vector_set_z (_tmp26_, -1.0f); } } _tmp27_ = self->priv->_texel_objs; _tmp28_ = index; _tmp29_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp27_, (gpointer) ((gintptr) _tmp28_)); if (_tmp29_) { GeeHashMap* _tmp30_; gint _tmp31_; gpointer _tmp32_ = NULL; soyatomsVector* _tmp33_; soyatomsVector* old; soyatomsVector* _tmp34_; guint _tmp35_ = 0U; soyatomsVector* _tmp36_; _tmp30_ = self->priv->_texel_objs; _tmp31_ = index; _tmp32_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp30_, (gpointer) ((gintptr) _tmp31_)); _tmp33_ = _g_object_ref0 ((soyatomsVector*) _tmp32_); old = _tmp33_; _tmp34_ = old; g_signal_parse_name ("on-set", SOY_ATOMS_TYPE_VECTOR, &_tmp35_, NULL, FALSE); g_signal_handlers_disconnect_matched (_tmp34_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp35_, 0, NULL, (GCallback) __soy_textures_bumpmap_texel_set_soy_atoms_vector_on_set, self); _tmp36_ = old; g_object_weak_unref ((GObject*) _tmp36_, __soy_textures_bumpmap_texel_weak_gweak_notify, self); _g_object_unref0 (old); } _tmp37_ = self->priv->_texel_objs; _tmp38_ = index; _tmp39_ = vector; gee_abstract_map_set ((GeeAbstractMap*) _tmp37_, (gpointer) ((gintptr) _tmp38_), _tmp39_); _tmp40_ = vector; g_signal_connect_object (_tmp40_, "on-set", (GCallback) __soy_textures_bumpmap_texel_set_soy_atoms_vector_on_set, self, 0); _tmp41_ = vector; g_object_weak_ref ((GObject*) _tmp41_, __soy_textures_bumpmap_texel_weak_gweak_notify, self); _tmp42_ = ((soytexturesTexture*) self)->texels; _tmp43_ = index; _tmp44_ = vector; _tmp45_ = soy_atoms_vector_get_x (_tmp44_); _tmp46_ = _tmp45_; _tmp42_[_tmp43_ * 3] = (guchar) ((gchar) (_tmp46_ * 128.0f)); _tmp47_ = _tmp42_[_tmp43_ * 3]; _tmp48_ = ((soytexturesTexture*) self)->texels; _tmp49_ = index; _tmp50_ = vector; _tmp51_ = soy_atoms_vector_get_y (_tmp50_); _tmp52_ = _tmp51_; _tmp48_[(_tmp49_ * 3) + 1] = (guchar) ((gchar) (_tmp52_ * 128.0f)); _tmp53_ = _tmp48_[(_tmp49_ * 3) + 1]; _tmp54_ = ((soytexturesTexture*) self)->texels; _tmp55_ = index; _tmp56_ = vector; _tmp57_ = soy_atoms_vector_get_z (_tmp56_); _tmp58_ = _tmp57_; _tmp54_[(_tmp55_ * 3) + 2] = (guchar) ((gchar) (_tmp58_ * 128.0f)); _tmp59_ = _tmp54_[(_tmp55_ * 3) + 2]; g_mutex_lock (&self->priv->_mutex); ((soytexturesTexture*) self)->updated = TRUE; g_mutex_unlock (&self->priv->_mutex); _g_object_unref0 (vector); }
soyatomsAxis* soy_joints_universal_get_axis2 (soyjointsUniversal* self) { soyatomsAxis* result; dxVector3* _tmp0_; dxVector3* v; struct dxJoint* _tmp1_; dxVector3* _tmp2_; soyatomsAxis* _tmp3_; soyatomsAxis* _tmp4_; soyatomsAxis* value; gboolean _tmp5_ = FALSE; gboolean _tmp6_ = FALSE; gboolean _tmp7_ = FALSE; soyatomsAxis* _tmp8_; gboolean _tmp14_; gboolean _tmp20_; gboolean _tmp26_; g_return_val_if_fail (self != NULL, NULL); _tmp0_ = dvector3_new (); v = _tmp0_; _tmp1_ = ((soyjointsJoint*) self)->joint; _tmp2_ = v; dJointGetUniversalAxis2 ((struct dxJoint*) _tmp1_, _tmp2_); _tmp3_ = self->priv->_axis2_obj; _tmp4_ = _g_object_ref0 (_tmp3_); value = _tmp4_; _tmp8_ = value; if (_tmp8_ == NULL) { _tmp7_ = TRUE; } else { dxVector3* _tmp9_; dReal _tmp10_; soyatomsAxis* _tmp11_; gfloat _tmp12_; gfloat _tmp13_; _tmp9_ = v; _tmp10_ = _tmp9_->x; _tmp11_ = value; _tmp12_ = soy_atoms_axis_get_x (_tmp11_); _tmp13_ = _tmp12_; _tmp7_ = ((gfloat) _tmp10_) != _tmp13_; } _tmp14_ = _tmp7_; if (_tmp14_) { _tmp6_ = TRUE; } else { dxVector3* _tmp15_; dReal _tmp16_; soyatomsAxis* _tmp17_; gfloat _tmp18_; gfloat _tmp19_; _tmp15_ = v; _tmp16_ = _tmp15_->y; _tmp17_ = value; _tmp18_ = soy_atoms_axis_get_y (_tmp17_); _tmp19_ = _tmp18_; _tmp6_ = ((gfloat) _tmp16_) != _tmp19_; } _tmp20_ = _tmp6_; if (_tmp20_) { _tmp5_ = TRUE; } else { dxVector3* _tmp21_; dReal _tmp22_; soyatomsAxis* _tmp23_; gfloat _tmp24_; gfloat _tmp25_; _tmp21_ = v; _tmp22_ = _tmp21_->z; _tmp23_ = value; _tmp24_ = soy_atoms_axis_get_z (_tmp23_); _tmp25_ = _tmp24_; _tmp5_ = ((gfloat) _tmp22_) != _tmp25_; } _tmp26_ = _tmp5_; if (_tmp26_) { soyatomsAxis* _tmp27_; dxVector3* _tmp31_; dReal _tmp32_; dxVector3* _tmp33_; dReal _tmp34_; dxVector3* _tmp35_; dReal _tmp36_; soyatomsAxis* _tmp37_; soyatomsAxis* _tmp38_; soyatomsAxis* _tmp39_; soyatomsAxis* _tmp40_; _tmp27_ = value; if (_tmp27_ != NULL) { soyatomsAxis* _tmp28_; guint _tmp29_ = 0U; soyatomsAxis* _tmp30_; _tmp28_ = self->priv->_axis2_obj; g_signal_parse_name ("on-set", SOY_ATOMS_TYPE_AXIS, &_tmp29_, NULL, FALSE); g_signal_handlers_disconnect_matched (_tmp28_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp29_, 0, NULL, (GCallback) __soy_joints_universal_axis2_set_soy_atoms_axis_on_set, self); _tmp30_ = self->priv->_axis2_obj; g_object_weak_unref ((GObject*) _tmp30_, __soy_joints_universal_axis2_weak_gweak_notify, self); } _tmp31_ = v; _tmp32_ = _tmp31_->x; _tmp33_ = v; _tmp34_ = _tmp33_->y; _tmp35_ = v; _tmp36_ = _tmp35_->z; _tmp37_ = soy_atoms_axis_new ((gfloat) _tmp32_, (gfloat) _tmp34_, (gfloat) _tmp36_); _g_object_unref0 (value); value = _tmp37_; _tmp38_ = value; g_signal_connect_object (_tmp38_, "on-set", (GCallback) __soy_joints_universal_axis2_set_soy_atoms_axis_on_set, self, 0); _tmp39_ = value; g_object_weak_ref ((GObject*) _tmp39_, __soy_joints_universal_axis2_weak_gweak_notify, self); _tmp40_ = value; self->priv->_axis2_obj = _tmp40_; } result = value; _dvector3_free0 (v); return result; }
soyatomsAxis* soy_joints_hinge_get_axis (soyjointsHinge* self) { soyatomsAxis* result; dxVector3* v = NULL; dxVector3* _tmp0_ = NULL; struct dxJoint* _tmp1_ = NULL; dxVector3* _tmp2_ = NULL; soyatomsAxis* value = NULL; soyatomsAxis* _tmp3_ = NULL; soyatomsAxis* _tmp4_ = NULL; gboolean _tmp5_ = FALSE; gboolean _tmp6_ = FALSE; gboolean _tmp7_ = FALSE; soyatomsAxis* _tmp8_ = NULL; gboolean _tmp14_ = FALSE; gboolean _tmp20_ = FALSE; gboolean _tmp26_ = FALSE; #line 107 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_return_val_if_fail (self != NULL, NULL); #line 108 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp0_ = dvector3_new (); #line 108 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" v = _tmp0_; #line 109 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp1_ = ((soyjointsJoint*) self)->joint; #line 109 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp2_ = v; #line 109 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" dJointGetHingeAxis ((struct dxJoint*) _tmp1_, _tmp2_); #line 110 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp3_ = self->priv->_axis_obj; #line 110 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp4_ = _g_object_ref0 (_tmp3_); #line 110 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" value = _tmp4_; #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp8_ = value; #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" if (_tmp8_ == NULL) { #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp7_ = TRUE; #line 770 "Hinge.c" } else { dxVector3* _tmp9_ = NULL; dReal _tmp10_ = 0.0; soyatomsAxis* _tmp11_ = NULL; gfloat _tmp12_ = 0.0F; gfloat _tmp13_ = 0.0F; #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp9_ = v; #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp10_ = _tmp9_->x; #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp11_ = value; #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp12_ = soy_atoms_axis_get_x (_tmp11_); #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp13_ = _tmp12_; #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp7_ = ((gfloat) _tmp10_) != _tmp13_; #line 789 "Hinge.c" } #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp14_ = _tmp7_; #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" if (_tmp14_) { #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp6_ = TRUE; #line 797 "Hinge.c" } else { dxVector3* _tmp15_ = NULL; dReal _tmp16_ = 0.0; soyatomsAxis* _tmp17_ = NULL; gfloat _tmp18_ = 0.0F; gfloat _tmp19_ = 0.0F; #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp15_ = v; #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp16_ = _tmp15_->y; #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp17_ = value; #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp18_ = soy_atoms_axis_get_y (_tmp17_); #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp19_ = _tmp18_; #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp6_ = ((gfloat) _tmp16_) != _tmp19_; #line 816 "Hinge.c" } #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp20_ = _tmp6_; #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" if (_tmp20_) { #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp5_ = TRUE; #line 824 "Hinge.c" } else { dxVector3* _tmp21_ = NULL; dReal _tmp22_ = 0.0; soyatomsAxis* _tmp23_ = NULL; gfloat _tmp24_ = 0.0F; gfloat _tmp25_ = 0.0F; #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp21_ = v; #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp22_ = _tmp21_->z; #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp23_ = value; #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp24_ = soy_atoms_axis_get_z (_tmp23_); #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp25_ = _tmp24_; #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp5_ = ((gfloat) _tmp22_) != _tmp25_; #line 843 "Hinge.c" } #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp26_ = _tmp5_; #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" if (_tmp26_) { #line 849 "Hinge.c" soyatomsAxis* _tmp27_ = NULL; dxVector3* _tmp31_ = NULL; dReal _tmp32_ = 0.0; dxVector3* _tmp33_ = NULL; dReal _tmp34_ = 0.0; dxVector3* _tmp35_ = NULL; dReal _tmp36_ = 0.0; soyatomsAxis* _tmp37_ = NULL; soyatomsAxis* _tmp38_ = NULL; soyatomsAxis* _tmp39_ = NULL; soyatomsAxis* _tmp40_ = NULL; #line 113 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp27_ = value; #line 113 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" if (_tmp27_ != NULL) { #line 865 "Hinge.c" soyatomsAxis* _tmp28_ = NULL; guint _tmp29_ = 0U; soyatomsAxis* _tmp30_ = NULL; #line 114 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp28_ = self->priv->_axis_obj; #line 114 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_signal_parse_name ("on-set", SOY_ATOMS_TYPE_AXIS, &_tmp29_, NULL, FALSE); #line 114 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_signal_handlers_disconnect_matched (_tmp28_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp29_, 0, NULL, (GCallback) __soy_joints_hinge_axis_set_soy_atoms_axis_on_set, self); #line 115 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp30_ = self->priv->_axis_obj; #line 115 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_object_weak_unref ((GObject*) _tmp30_, __soy_joints_hinge_axis_weak_gweak_notify, self); #line 879 "Hinge.c" } #line 116 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp31_ = v; #line 116 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp32_ = _tmp31_->x; #line 116 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp33_ = v; #line 116 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp34_ = _tmp33_->y; #line 116 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp35_ = v; #line 116 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp36_ = _tmp35_->z; #line 116 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp37_ = soy_atoms_axis_new ((gfloat) _tmp32_, (gfloat) _tmp34_, (gfloat) _tmp36_); #line 116 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _g_object_unref0 (value); #line 116 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" value = _tmp37_; #line 119 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp38_ = value; #line 119 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_signal_connect_object (_tmp38_, "on-set", (GCallback) __soy_joints_hinge_axis_set_soy_atoms_axis_on_set, self, 0); #line 120 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp39_ = value; #line 120 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_object_weak_ref ((GObject*) _tmp39_, __soy_joints_hinge_axis_weak_gweak_notify, self); #line 121 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp40_ = value; #line 121 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" self->priv->_axis_obj = _tmp40_; #line 911 "Hinge.c" } #line 122 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" result = value; #line 122 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _dvector3_free0 (v); #line 122 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" return result; #line 919 "Hinge.c" }
void dash_box_set_base (DashBox* self, GtkWidget* w) { GreeterList* _tmp0_; DashBoxMode _tmp1_; GtkWidget* _tmp2_; GtkWidget* _tmp5_; GtkWidget* _tmp6_; GtkWidget* _tmp7_; g_return_if_fail (self != NULL); _tmp0_ = self->priv->pushed; g_return_if_fail (_tmp0_ == NULL); _tmp1_ = self->priv->mode; g_return_if_fail (_tmp1_ == DASH_BOX_MODE_NORMAL); _tmp2_ = self->priv->orig; if (_tmp2_ != NULL) { GtkWidget* _tmp3_; guint _tmp4_ = 0U; _tmp3_ = self->priv->orig; g_signal_parse_name ("size-allocate", GTK_TYPE_WIDGET, &_tmp4_, NULL, FALSE); g_signal_handlers_disconnect_matched (_tmp3_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _dash_box_base_size_allocate_cb_gtk_widget_size_allocate, self); } _tmp5_ = w; _tmp6_ = _g_object_ref0 (_tmp5_); _g_object_unref0 (self->priv->orig); self->priv->orig = _tmp6_; _tmp7_ = self->priv->orig; if (_tmp7_ != NULL) { GtkWidget* _tmp8_; GtkWidget* _tmp9_; FadeTracker* _tmp10_; FadeTracker* _tmp11_; FadeTracker* _tmp12_; FadeTracker* _tmp13_; gdouble _tmp14_; gdouble _tmp15_; _tmp8_ = self->priv->orig; g_signal_connect_object (_tmp8_, "size-allocate", (GCallback) _dash_box_base_size_allocate_cb_gtk_widget_size_allocate, self, 0); _tmp9_ = self->priv->orig; _tmp10_ = fade_tracker_new (_tmp9_); _g_object_unref0 (self->priv->orig_tracker); self->priv->orig_tracker = _tmp10_; _tmp11_ = self->priv->orig_tracker; g_signal_connect_object ((GObject*) _tmp11_, "notify::alpha", (GCallback) ____lambda17__g_object_notify, self, 0); _tmp12_ = self->priv->orig_tracker; g_signal_connect_object (_tmp12_, "done", (GCallback) _dash_box_fade_done_cb_fade_tracker_done, self, 0); _tmp13_ = self->priv->orig_tracker; _tmp14_ = fade_tracker_get_alpha (_tmp13_); _tmp15_ = _tmp14_; dash_box_set_base_alpha (self, _tmp15_); dash_box_set_has_base (self, TRUE); } else { gint _tmp16_ = 0; self->priv->orig_height = -1; gtk_widget_get_preferred_height ((GtkWidget*) self, NULL, &_tmp16_); self->priv->orig_height = _tmp16_; _g_object_unref0 (self->priv->orig_tracker); self->priv->orig_tracker = NULL; dash_box_set_base_alpha (self, 1.0); dash_box_set_has_base (self, FALSE); } gtk_widget_queue_resize ((GtkWidget*) self); }
soyatomsPosition* soy_joints_hinge_get_anchor (soyjointsHinge* self) { soyatomsPosition* result; dxVector3* v = NULL; dxVector3* _tmp0_ = NULL; struct dxJoint* _tmp1_ = NULL; dxVector3* _tmp2_ = NULL; soyatomsPosition* value = NULL; soyatomsPosition* _tmp3_ = NULL; soyatomsPosition* _tmp4_ = NULL; gboolean _tmp5_ = FALSE; gboolean _tmp6_ = FALSE; gboolean _tmp7_ = FALSE; soyatomsPosition* _tmp8_ = NULL; gboolean _tmp14_ = FALSE; gboolean _tmp20_ = FALSE; gboolean _tmp26_ = FALSE; #line 62 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_return_val_if_fail (self != NULL, NULL); #line 63 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp0_ = dvector3_new (); #line 63 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" v = _tmp0_; #line 64 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp1_ = ((soyjointsJoint*) self)->joint; #line 64 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp2_ = v; #line 64 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" dJointGetHingeAnchor ((struct dxJoint*) _tmp1_, _tmp2_); #line 65 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp3_ = self->priv->_anchor_obj; #line 65 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp4_ = _g_object_ref0 (_tmp3_); #line 65 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" value = _tmp4_; #line 66 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp8_ = value; #line 66 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" if (_tmp8_ == NULL) { #line 66 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp7_ = TRUE; #line 513 "Hinge.c" } else { dxVector3* _tmp9_ = NULL; dReal _tmp10_ = 0.0; soyatomsPosition* _tmp11_ = NULL; gfloat _tmp12_ = 0.0F; gfloat _tmp13_ = 0.0F; #line 66 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp9_ = v; #line 66 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp10_ = _tmp9_->x; #line 66 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp11_ = value; #line 66 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp12_ = soy_atoms_position_get_x (_tmp11_); #line 66 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp13_ = _tmp12_; #line 66 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp7_ = ((gfloat) _tmp10_) != _tmp13_; #line 532 "Hinge.c" } #line 66 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp14_ = _tmp7_; #line 66 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" if (_tmp14_) { #line 66 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp6_ = TRUE; #line 540 "Hinge.c" } else { dxVector3* _tmp15_ = NULL; dReal _tmp16_ = 0.0; soyatomsPosition* _tmp17_ = NULL; gfloat _tmp18_ = 0.0F; gfloat _tmp19_ = 0.0F; #line 67 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp15_ = v; #line 67 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp16_ = _tmp15_->y; #line 67 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp17_ = value; #line 67 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp18_ = soy_atoms_position_get_y (_tmp17_); #line 67 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp19_ = _tmp18_; #line 67 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp6_ = ((gfloat) _tmp16_) != _tmp19_; #line 559 "Hinge.c" } #line 66 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp20_ = _tmp6_; #line 66 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" if (_tmp20_) { #line 66 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp5_ = TRUE; #line 567 "Hinge.c" } else { dxVector3* _tmp21_ = NULL; dReal _tmp22_ = 0.0; soyatomsPosition* _tmp23_ = NULL; gfloat _tmp24_ = 0.0F; gfloat _tmp25_ = 0.0F; #line 67 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp21_ = v; #line 67 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp22_ = _tmp21_->z; #line 67 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp23_ = value; #line 67 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp24_ = soy_atoms_position_get_z (_tmp23_); #line 67 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp25_ = _tmp24_; #line 67 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp5_ = ((gfloat) _tmp22_) != _tmp25_; #line 586 "Hinge.c" } #line 66 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp26_ = _tmp5_; #line 66 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" if (_tmp26_) { #line 592 "Hinge.c" soyatomsPosition* _tmp27_ = NULL; dxVector3* _tmp31_ = NULL; dReal _tmp32_ = 0.0; dxVector3* _tmp33_ = NULL; dReal _tmp34_ = 0.0; dxVector3* _tmp35_ = NULL; dReal _tmp36_ = 0.0; soyatomsPosition* _tmp37_ = NULL; soyatomsPosition* _tmp38_ = NULL; soyatomsPosition* _tmp39_ = NULL; soyatomsPosition* _tmp40_ = NULL; #line 68 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp27_ = value; #line 68 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" if (_tmp27_ != NULL) { #line 608 "Hinge.c" soyatomsPosition* _tmp28_ = NULL; guint _tmp29_ = 0U; soyatomsPosition* _tmp30_ = NULL; #line 69 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp28_ = self->priv->_anchor_obj; #line 69 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_signal_parse_name ("on-set", SOY_ATOMS_TYPE_POSITION, &_tmp29_, NULL, FALSE); #line 69 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_signal_handlers_disconnect_matched (_tmp28_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp29_, 0, NULL, (GCallback) __soy_joints_hinge_anchor_set_soy_atoms_position_on_set, self); #line 70 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp30_ = self->priv->_anchor_obj; #line 70 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_object_weak_unref ((GObject*) _tmp30_, __soy_joints_hinge_anchor_weak_gweak_notify, self); #line 622 "Hinge.c" } #line 71 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp31_ = v; #line 71 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp32_ = _tmp31_->x; #line 71 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp33_ = v; #line 71 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp34_ = _tmp33_->y; #line 71 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp35_ = v; #line 71 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp36_ = _tmp35_->z; #line 71 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp37_ = soy_atoms_position_new ((gfloat) _tmp32_, (gfloat) _tmp34_, (gfloat) _tmp36_); #line 71 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _g_object_unref0 (value); #line 71 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" value = _tmp37_; #line 74 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp38_ = value; #line 74 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_signal_connect_object (_tmp38_, "on-set", (GCallback) __soy_joints_hinge_anchor_set_soy_atoms_position_on_set, self, 0); #line 75 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp39_ = value; #line 75 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_object_weak_ref ((GObject*) _tmp39_, __soy_joints_hinge_anchor_weak_gweak_notify, self); #line 76 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp40_ = value; #line 76 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" self->priv->_anchor_obj = _tmp40_; #line 654 "Hinge.c" } #line 77 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" result = value; #line 77 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _dvector3_free0 (v); #line 77 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" return result; #line 662 "Hinge.c" }
static void ease_main_remove_window (EaseEditorWindow* win) { #line 859 "ease-main.c" guint _tmp0_; guint _tmp1_; gboolean _tmp2_ = FALSE; #line 278 "ease-main.vala" g_return_if_fail (win != NULL); #line 865 "ease-main.c" { GeeIterator* _info_it; #line 280 "ease-main.vala" _info_it = gee_abstract_collection_iterator ((GeeAbstractCollection*) ease_main_windows); #line 280 "ease-main.vala" while (TRUE) { #line 872 "ease-main.c" EaseMainEditorWindowInfo* info; #line 280 "ease-main.vala" if (!gee_iterator_next (_info_it)) { #line 280 "ease-main.vala" break; #line 878 "ease-main.c" } #line 280 "ease-main.vala" info = (EaseMainEditorWindowInfo*) gee_iterator_get (_info_it); #line 282 "ease-main.vala" if (info->window == win) { #line 284 "ease-main.vala" gee_abstract_collection_remove ((GeeAbstractCollection*) ease_main_windows, info); #line 886 "ease-main.c" _ease_main_editor_window_info_unref0 (info); #line 285 "ease-main.vala" break; #line 890 "ease-main.c" } _ease_main_editor_window_info_unref0 (info); } _g_object_unref0 (_info_it); } #line 288 "ease-main.vala" g_signal_parse_name ("play", EASE_TYPE_EDITOR_WINDOW, &_tmp0_, NULL, FALSE); #line 288 "ease-main.vala" g_signal_handlers_disconnect_matched (win, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 0, NULL, (GCallback) _ease_main_on_play_ease_editor_window_play, NULL); #line 289 "ease-main.vala" g_signal_parse_name ("close", EASE_TYPE_EDITOR_WINDOW, &_tmp1_, NULL, FALSE); #line 289 "ease-main.vala" g_signal_handlers_disconnect_matched (win, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _ease_main_on_close_ease_editor_window_close, NULL); #line 291 "ease-main.vala" if (gee_collection_get_size ((GeeCollection*) ease_main_windows) == 0) { #line 291 "ease-main.vala" _tmp2_ = ease_main_welcome == NULL; #line 908 "ease-main.c" } else { #line 291 "ease-main.vala" _tmp2_ = FALSE; #line 912 "ease-main.c" } #line 291 "ease-main.vala" if (_tmp2_) { #line 293 "ease-main.vala" gtk_main_quit (); #line 918 "ease-main.c" } }
static void rygel_media_export_metadata_extractor_on_done (RygelMediaExportMetadataExtractor *self, GstDiscovererInfo *gst_info, GError *err) { RygelMediaExportMetadataExtractorPrivate *priv; guint signal_id; const gchar *uri; GeeAbstractMap *abstract_file_hash; GstDiscovererResult result; GFile *file; g_return_if_fail (RYGEL_MEDIA_EXPORT_IS_METADATA_EXTRACTOR (self)); g_return_if_fail (GST_IS_DISCOVERER_INFO (gst_info)); priv = self->priv; signal_id = 0; g_signal_parse_name ("discovered", GST_TYPE_DISCOVERER, &signal_id, NULL, FALSE); g_signal_handlers_disconnect_matched (priv->discoverer, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, signal_id, 0, NULL, G_CALLBACK (rygel_media_export_metadata_extractor_on_done_gst_discoverer_discovered), self); g_object_unref (priv->discoverer); priv->discoverer = NULL; uri = gst_discoverer_info_get_uri (gst_info); abstract_file_hash = GEE_ABSTRACT_MAP (priv->file_hash); file = G_FILE (gee_abstract_map_get (abstract_file_hash, uri)); if (!file) { g_warning ("File %s already handled, ignoring event", uri); return; } gee_abstract_map_unset (abstract_file_hash, uri, NULL); result = gst_discoverer_info_get_result (gst_info); if ((result & GST_DISCOVERER_ERROR) == GST_DISCOVERER_ERROR) { g_signal_emit (self, signals[ERROR], 0, file, err); } else { GUPnPDLNAProfile *dlna_profile; if ((result & GST_DISCOVERER_TIMEOUT) == GST_DISCOVERER_TIMEOUT) { gchar* file_uri = g_file_get_uri (file); g_debug ("Extraction timed out on %s", file_uri); g_free (file_uri); dlna_profile = NULL; } else { GUPnPDLNAInformation *dlna_info = gupnp_dlna_gst_utils_information_from_discoverer_info (gst_info); dlna_profile = gupnp_dlna_profile_guesser_guess_profile_from_info (priv->guesser, dlna_info); g_object_unref (dlna_info); } rygel_media_export_metadata_extractor_extract_basic_information (self, file, gst_info, dlna_profile); } g_object_unref (file); }
static void parse_signal (ParserData *data, const gchar *element_name, const gchar **names, const gchar **values, GError **error) { SignalInfo *info; const gchar *name; const gchar *handler = NULL; const gchar *object = NULL; gboolean after = FALSE; gboolean swapped = -1; ObjectInfo *object_info; guint id = 0; GQuark detail = 0; object_info = state_peek_info (data, ObjectInfo); if (!object_info || !(strcmp (object_info->tag.name, "object") == 0 || strcmp (object_info->tag.name, "template") == 0)) { error_invalid_tag (data, element_name, NULL, error); return; } if (!g_markup_collect_attributes (element_name, names, values, error, G_MARKUP_COLLECT_STRING, "name", &name, G_MARKUP_COLLECT_STRING, "handler", &handler, G_MARKUP_COLLECT_STRING|G_MARKUP_COLLECT_OPTIONAL, "object", &object, G_MARKUP_COLLECT_STRING|G_MARKUP_COLLECT_OPTIONAL, "last_modification_time", NULL, G_MARKUP_COLLECT_BOOLEAN|G_MARKUP_COLLECT_OPTIONAL, "after", &after, G_MARKUP_COLLECT_TRISTATE|G_MARKUP_COLLECT_OPTIONAL, "swapped", &swapped, G_MARKUP_COLLECT_INVALID)) { _gtk_builder_prefix_error (data->builder, data->ctx, error); return; } if (!g_signal_parse_name (name, object_info->type, &id, &detail, FALSE)) { g_set_error (error, GTK_BUILDER_ERROR, GTK_BUILDER_ERROR_INVALID_SIGNAL, "Invalid signal '%s' for type '%s'", name, g_type_name (object_info->type)); _gtk_builder_prefix_error (data->builder, data->ctx, error); return; } /* Swapped defaults to FALSE except when object is set */ if (swapped == -1) { if (object) swapped = TRUE; else swapped = FALSE; } info = g_slice_new0 (SignalInfo); info->id = id; info->detail = detail; info->handler = g_strdup (handler); if (after) info->flags |= G_CONNECT_AFTER; if (swapped) info->flags |= G_CONNECT_SWAPPED; info->connect_object_name = g_strdup (object); state_push (data, info); info->tag.name = element_name; }
static VALUE rbclt_script_do_connect_signal (VALUE user_data) { AutoConnectData *data = (AutoConnectData *) user_data; guint signal_id; GQuark detail; GClosure *rclosure; if (NIL_P (data->proc)) { ID mid; VALUE args; VALUE func; if (!g_signal_parse_name (data->signal_name, G_TYPE_FROM_INSTANCE (data->object), &signal_id, &detail, TRUE)) rb_raise (eNoSignalError, "no such signal: %s", data->signal_name); /* Create a method closure for the given object and method name */ mid = rb_intern (data->handler_name); func = rb_funcall (data->obj, id_method, 1, rb_str_new2 (data->handler_name)); if (data->connect_object) args = rb_ary_new3 (1, GOBJ2RVAL (data->connect_object)); else args = data->args; rclosure = g_rclosure_new (func, args, rbgobj_get_signal_func (signal_id)); g_rclosure_attach ((GClosure *) rclosure, GOBJ2RVAL (data->object)); g_signal_connect_closure_by_id (data->object, signal_id, detail, rclosure, (data->connect_flags & G_CONNECT_AFTER) ? TRUE : FALSE); } else { VALUE args; int i; /* Just pass the details on to the application's function to do the actual connection */ args = rb_ary_new3 (5, GOBJ2RVAL (data->object), rb_str_new2 (data->signal_name), rb_str_new2 (data->handler_name), GOBJ2RVAL (data->connect_object), GENUM2RVAL (data->connect_flags, rbclt_connect_flags_get_type ())); for (i = 0; i < RARRAY_LEN (data->args); i++) rb_ary_push (args, RARRAY_PTR (data->args)[i]); rb_funcall2 (data->proc, id_call, RARRAY_LEN (args), RARRAY_PTR (args)); } return Qnil; }