static void vala_dmap_db_real_foreach (DMAPDb* base, GHFunc func, void* func_target) { ValaDMAPDb * self; gint i = 0; self = (ValaDMAPDb*) base; { gboolean _tmp0_; i = 0; _tmp0_ = TRUE; while (TRUE) { gint _tmp1_; void* _tmp2_ = NULL; gpointer _tmp3_ = NULL; if (!_tmp0_) { i++; } _tmp0_ = FALSE; _tmp1_ = gee_collection_get_size ((GeeCollection*) self->priv->db); if (!(i < _tmp1_)) { break; } _tmp2_ = GINT_TO_POINTER (i + 1); _tmp3_ = gee_abstract_list_get ((GeeAbstractList*) self->priv->db, i); func (_tmp2_, (DMAPRecord*) _tmp3_, func_target); } } }
static DMAPRecord* vala_dmap_db_real_lookup_by_id (DMAPDb* base, guint id) { ValaDMAPDb * self; DMAPRecord* result = NULL; gpointer _tmp0_ = NULL; self = (ValaDMAPDb*) base; _tmp0_ = gee_abstract_list_get ((GeeAbstractList*) self->priv->db, ((gint) id) - 1); result = (DMAPRecord*) _tmp0_; return result; }
static void vala_dmap_container_db_real_foreach (DMAPContainerDb* base, GHFunc func, void* func_target) { ValaDMAPContainerDb * self; gint i = 0; self = (ValaDMAPContainerDb*) base; { gboolean _tmp0_; i = 0; _tmp0_ = TRUE; while (TRUE) { gboolean _tmp1_; gint _tmp3_; GeeArrayList* _tmp4_; gint _tmp5_; gint _tmp6_; GHFunc _tmp7_; void* _tmp7__target; gint _tmp8_; void* _tmp9_ = NULL; GeeArrayList* _tmp10_; gint _tmp11_; gpointer _tmp12_ = NULL; _tmp1_ = _tmp0_; if (!_tmp1_) { gint _tmp2_; _tmp2_ = i; i = _tmp2_ + 1; } _tmp0_ = FALSE; _tmp3_ = i; _tmp4_ = self->priv->db; _tmp5_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp4_); _tmp6_ = _tmp5_; if (!(_tmp3_ < _tmp6_)) { break; } _tmp7_ = func; _tmp7__target = func_target; _tmp8_ = i; _tmp9_ = GINT_TO_POINTER (_tmp8_); _tmp10_ = self->priv->db; _tmp11_ = i; _tmp12_ = gee_abstract_list_get ((GeeAbstractList*) _tmp10_, _tmp11_); _tmp7_ (_tmp9_, (DMAPRecord*) _tmp12_, _tmp7__target); } } }
int main (void) { GeeArrayList* list; gint i; gpointer p; list = gee_array_list_new (G_TYPE_INT, NULL, NULL, NULL, NULL, NULL); gee_abstract_collection_add ((GeeAbstractCollection*) list, (gpointer) ((gintptr) 1)); gee_abstract_collection_add ((GeeAbstractCollection*) list, (gpointer) ((gintptr) 2)); gee_abstract_collection_add ((GeeAbstractCollection*) list, (gpointer) ((gintptr) 5)); gee_abstract_collection_add ((GeeAbstractCollection*) list, (gpointer) ((gintptr) 4)); gee_abstract_list_insert ((GeeAbstractList*) list, 2, (gpointer) ((gintptr) 3)); gee_abstract_list_remove_at ((GeeAbstractList*) list, 3); gee_abstract_list_set ((GeeAbstractList*) list, 2, (gpointer) ((gintptr) 10)); p = gee_abstract_list_get ((GeeAbstractList*) list, 2); i = (gint) ((gintptr) p); assert (10 == i); g_object_unref (list); return 0; }
static void soy_widgets_vbox_real_resize_children (soywidgetsContainer* base, gint x, gint y, gint width, gint height) { soywidgetsVBox * self; gint childy; gfloat totalHeight; self = (soywidgetsVBox*) base; childy = 0; totalHeight = 0.0f; { GeeLinkedList* _tmp0_; GeeLinkedList* _tmp1_; GeeLinkedList* _widget_list; GeeLinkedList* _tmp2_; gint _tmp3_; gint _tmp4_; gint _widget_size; gint _widget_index; _tmp0_ = ((soywidgetsContainer*) self)->children; _tmp1_ = _g_object_ref0 (_tmp0_); _widget_list = _tmp1_; _tmp2_ = _widget_list; _tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_); _tmp4_ = _tmp3_; _widget_size = _tmp4_; _widget_index = -1; while (TRUE) { gint _tmp5_; gint _tmp6_; gint _tmp7_; GeeLinkedList* _tmp8_; gint _tmp9_; gpointer _tmp10_ = NULL; soywidgetsWidget* widget; gfloat _tmp11_; soywidgetsWidget* _tmp12_; gint _tmp13_; _tmp5_ = _widget_index; _widget_index = _tmp5_ + 1; _tmp6_ = _widget_index; _tmp7_ = _widget_size; if (!(_tmp6_ < _tmp7_)) { break; } _tmp8_ = _widget_list; _tmp9_ = _widget_index; _tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_); widget = (soywidgetsWidget*) _tmp10_; _tmp11_ = totalHeight; _tmp12_ = widget; _tmp13_ = _tmp12_->height; totalHeight = _tmp11_ + _tmp13_; _g_object_unref0 (widget); } _g_object_unref0 (_widget_list); } { GeeLinkedList* _tmp14_; GeeLinkedList* _tmp15_; GeeLinkedList* _widget_list; GeeLinkedList* _tmp16_; gint _tmp17_; gint _tmp18_; gint _widget_size; gint _widget_index; _tmp14_ = ((soywidgetsContainer*) self)->children; _tmp15_ = _g_object_ref0 (_tmp14_); _widget_list = _tmp15_; _tmp16_ = _widget_list; _tmp17_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp16_); _tmp18_ = _tmp17_; _widget_size = _tmp18_; _widget_index = -1; while (TRUE) { gint _tmp19_; gint _tmp20_; gint _tmp21_; GeeLinkedList* _tmp22_; gint _tmp23_; gpointer _tmp24_ = NULL; soywidgetsWidget* widget; gint childheight; gfloat _tmp25_; soywidgetsWidget* _tmp30_; gint _tmp31_; gint _tmp32_; soyatomsSize* _tmp33_; soyatomsSize* _tmp34_; gint _tmp35_; gint _tmp36_; _tmp19_ = _widget_index; _widget_index = _tmp19_ + 1; _tmp20_ = _widget_index; _tmp21_ = _widget_size; if (!(_tmp20_ < _tmp21_)) { break; } _tmp22_ = _widget_list; _tmp23_ = _widget_index; _tmp24_ = gee_abstract_list_get ((GeeAbstractList*) _tmp22_, _tmp23_); widget = (soywidgetsWidget*) _tmp24_; childheight = 0; _tmp25_ = totalHeight; if (_tmp25_ > ((gfloat) 0)) { soywidgetsWidget* _tmp26_; gint _tmp27_; gfloat _tmp28_; gint _tmp29_; _tmp26_ = widget; _tmp27_ = _tmp26_->height; _tmp28_ = totalHeight; _tmp29_ = height; childheight = (gint) ((_tmp27_ / _tmp28_) * _tmp29_); } _tmp30_ = widget; _tmp31_ = width; _tmp32_ = childheight; _tmp33_ = soy_atoms_size_new ((gfloat) _tmp31_, (gfloat) _tmp32_, 0.0f); _tmp34_ = _tmp33_; soy_widgets_widget_set_size (_tmp30_, _tmp34_); _g_object_unref0 (_tmp34_); _tmp35_ = childy; _tmp36_ = childheight; childy = _tmp35_ + _tmp36_; _g_object_unref0 (widget); } _g_object_unref0 (_widget_list); } }
static void soy_widgets_vbox_real_render (soywidgetsWidget* base, gint x, gint y, gint width, gint height) { soywidgetsVBox * self; gint _tmp0_; gint _x; gint _tmp1_; gint _y; self = (soywidgetsVBox*) base; _tmp0_ = x; _x = _tmp0_; _tmp1_ = y; _y = _tmp1_; { GeeLinkedList* _tmp2_; GeeLinkedList* _tmp3_; GeeLinkedList* _widget_list; GeeLinkedList* _tmp4_; gint _tmp5_; gint _tmp6_; gint _widget_size; gint _widget_index; _tmp2_ = ((soywidgetsContainer*) self)->children; _tmp3_ = _g_object_ref0 (_tmp2_); _widget_list = _tmp3_; _tmp4_ = _widget_list; _tmp5_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp4_); _tmp6_ = _tmp5_; _widget_size = _tmp6_; _widget_index = -1; while (TRUE) { gint _tmp7_; gint _tmp8_; gint _tmp9_; GeeLinkedList* _tmp10_; gint _tmp11_; gpointer _tmp12_ = NULL; soywidgetsWidget* widget; soywidgetsWidget* _tmp13_; gint _tmp14_; gint _tmp15_; soywidgetsWidget* _tmp16_; gint _tmp17_; soywidgetsWidget* _tmp18_; gint _tmp19_; gint _tmp20_; soywidgetsWidget* _tmp21_; gint _tmp22_; _tmp7_ = _widget_index; _widget_index = _tmp7_ + 1; _tmp8_ = _widget_index; _tmp9_ = _widget_size; if (!(_tmp8_ < _tmp9_)) { break; } _tmp10_ = _widget_list; _tmp11_ = _widget_index; _tmp12_ = gee_abstract_list_get ((GeeAbstractList*) _tmp10_, _tmp11_); widget = (soywidgetsWidget*) _tmp12_; _tmp13_ = widget; _tmp14_ = _x; _tmp15_ = _y; _tmp16_ = widget; _tmp17_ = _tmp16_->width; _tmp18_ = widget; _tmp19_ = _tmp18_->height; soy_widgets_widget_render (_tmp13_, _tmp14_, _tmp15_, _tmp17_, _tmp19_); _tmp20_ = _y; _tmp21_ = widget; _tmp22_ = _tmp21_->height; _y = _tmp20_ + _tmp22_; _g_object_unref0 (widget); } _g_object_unref0 (_widget_list); } }
static void plank_services_logger_write (PlankServicesLogLevel level, const gchar* msg) { PlankServicesLogLevel _tmp0_ = 0; PlankServicesLogLevel _tmp1_ = 0; PlankServicesLogLevel _tmp2_ = 0; gboolean _tmp3_ = FALSE; GError * _inner_error_ = NULL; g_return_if_fail (msg != NULL); _tmp0_ = level; _tmp1_ = plank_services_logger_get_DisplayLevel (); _tmp2_ = _tmp1_; if (_tmp0_ < _tmp2_) { return; } _tmp3_ = plank_services_logger_is_writing; if (_tmp3_) { { GObject* _tmp4_ = NULL; _tmp4_ = plank_services_logger_queue_lock; g_rec_mutex_lock (&__lock_plank_services_logger_queue_lock); { GeeArrayList* _tmp5_ = NULL; PlankServicesLogLevel _tmp6_ = 0; const gchar* _tmp7_ = NULL; PlankServicesLoggerLogMessage* _tmp8_ = NULL; PlankServicesLoggerLogMessage* _tmp9_ = NULL; _tmp5_ = plank_services_logger_log_queue; _tmp6_ = level; _tmp7_ = msg; _tmp8_ = plank_services_logger_log_message_new (_tmp6_, _tmp7_); _tmp9_ = _tmp8_; gee_abstract_collection_add ((GeeAbstractCollection*) _tmp5_, _tmp9_); _g_object_unref0 (_tmp9_); } __finally32: { GObject* _tmp10_ = NULL; _tmp10_ = plank_services_logger_queue_lock; g_rec_mutex_unlock (&__lock_plank_services_logger_queue_lock); } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); return; } } } else { GeeArrayList* _tmp11_ = NULL; gint _tmp12_ = 0; gint _tmp13_ = 0; PlankServicesLogLevel _tmp31_ = 0; const gchar* _tmp32_ = NULL; PlankServicesLoggerLogMessage* _tmp33_ = NULL; PlankServicesLoggerLogMessage* _tmp34_ = NULL; plank_services_logger_is_writing = TRUE; _tmp11_ = plank_services_logger_log_queue; _tmp12_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp11_); _tmp13_ = _tmp12_; if (_tmp13_ > 0) { GeeArrayList* logs = NULL; GeeArrayList* _tmp14_ = NULL; GeeArrayList* _tmp15_ = NULL; _tmp14_ = plank_services_logger_log_queue; _tmp15_ = _g_object_ref0 (_tmp14_); logs = _tmp15_; { GObject* _tmp16_ = NULL; _tmp16_ = plank_services_logger_queue_lock; g_rec_mutex_lock (&__lock_plank_services_logger_queue_lock); { GeeArrayList* _tmp17_ = NULL; _tmp17_ = gee_array_list_new (PLANK_SERVICES_LOGGER_TYPE_LOG_MESSAGE, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL); _g_object_unref0 (plank_services_logger_log_queue); plank_services_logger_log_queue = _tmp17_; } __finally33: { GObject* _tmp18_ = NULL; _tmp18_ = plank_services_logger_queue_lock; g_rec_mutex_unlock (&__lock_plank_services_logger_queue_lock); } if (_inner_error_ != NULL) { _g_object_unref0 (logs); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); return; } } { GeeArrayList* _log_list = NULL; GeeArrayList* _tmp19_ = NULL; GeeArrayList* _tmp20_ = NULL; gint _log_size = 0; GeeArrayList* _tmp21_ = NULL; gint _tmp22_ = 0; gint _tmp23_ = 0; gint _log_index = 0; _tmp19_ = logs; _tmp20_ = _g_object_ref0 (_tmp19_); _log_list = _tmp20_; _tmp21_ = _log_list; _tmp22_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp21_); _tmp23_ = _tmp22_; _log_size = _tmp23_; _log_index = -1; while (TRUE) { gint _tmp24_ = 0; gint _tmp25_ = 0; gint _tmp26_ = 0; PlankServicesLoggerLogMessage* log = NULL; GeeArrayList* _tmp27_ = NULL; gint _tmp28_ = 0; gpointer _tmp29_ = NULL; PlankServicesLoggerLogMessage* _tmp30_ = NULL; _tmp24_ = _log_index; _log_index = _tmp24_ + 1; _tmp25_ = _log_index; _tmp26_ = _log_size; if (!(_tmp25_ < _tmp26_)) { break; } _tmp27_ = _log_list; _tmp28_ = _log_index; _tmp29_ = gee_abstract_list_get ((GeeAbstractList*) _tmp27_, _tmp28_); log = (PlankServicesLoggerLogMessage*) _tmp29_; _tmp30_ = log; plank_services_logger_print_log (_tmp30_); _g_object_unref0 (log); } _g_object_unref0 (_log_list); } _g_object_unref0 (logs); } _tmp31_ = level; _tmp32_ = msg; _tmp33_ = plank_services_logger_log_message_new (_tmp31_, _tmp32_); _tmp34_ = _tmp33_; plank_services_logger_print_log (_tmp34_); _g_object_unref0 (_tmp34_); plank_services_logger_is_writing = FALSE; } }
void slingshot_backend_gmenu_entries_enumerate_apps (GeeArrayList* source, GeeHashMap* icons, gint icon_size, GeeArrayList** list) { GeeArrayList* _vala_list = NULL; GtkIconTheme* _tmp0_ = NULL; GtkIconTheme* _tmp1_; GtkIconTheme* icon_theme; GeeArrayList* _tmp2_; GError * _inner_error_ = NULL; g_return_if_fail (source != NULL); g_return_if_fail (icons != NULL); _tmp0_ = gtk_icon_theme_get_default (); _tmp1_ = _g_object_ref0 (_tmp0_); icon_theme = _tmp1_; _tmp2_ = gee_array_list_new (GEE_TYPE_HASH_MAP, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL); _g_object_unref0 (_vala_list); _vala_list = _tmp2_; { GeeArrayList* _tmp3_; GeeArrayList* _tmp4_; GeeArrayList* _app_list; GeeArrayList* _tmp5_; gint _tmp6_; gint _tmp7_; gint _app_size; gint _app_index; _tmp3_ = source; _tmp4_ = _g_object_ref0 (_tmp3_); _app_list = _tmp4_; _tmp5_ = _app_list; _tmp6_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp5_); _tmp7_ = _tmp6_; _app_size = _tmp7_; _app_index = -1; while (TRUE) { gint _tmp8_; gint _tmp9_; gint _tmp10_; GeeArrayList* _tmp11_; gint _tmp12_; gpointer _tmp13_ = NULL; GMenuTreeEntry* app; gboolean _tmp14_ = FALSE; gboolean _tmp15_ = FALSE; GMenuTreeEntry* _tmp16_; gboolean _tmp17_ = FALSE; gboolean _tmp20_; gboolean _tmp23_; _tmp8_ = _app_index; _app_index = _tmp8_ + 1; _tmp9_ = _app_index; _tmp10_ = _app_size; if (!(_tmp9_ < _tmp10_)) { break; } _tmp11_ = _app_list; _tmp12_ = _app_index; _tmp13_ = gee_abstract_list_get ((GeeAbstractList*) _tmp11_, _tmp12_); app = (GMenuTreeEntry*) _tmp13_; _tmp16_ = app; _tmp17_ = gmenu_tree_entry_get_is_nodisplay (_tmp16_); if (_tmp17_ == FALSE) { GMenuTreeEntry* _tmp18_; gboolean _tmp19_ = FALSE; _tmp18_ = app; _tmp19_ = gmenu_tree_entry_get_is_excluded (_tmp18_); _tmp15_ = _tmp19_ == FALSE; } else { _tmp15_ = FALSE; } _tmp20_ = _tmp15_; if (_tmp20_) { GMenuTreeEntry* _tmp21_; const gchar* _tmp22_ = NULL; _tmp21_ = app; _tmp22_ = gmenu_tree_entry_get_icon (_tmp21_); _tmp14_ = _tmp22_ != NULL; } else { _tmp14_ = FALSE; } _tmp23_ = _tmp14_; if (_tmp23_) { GeeHashMap* _tmp24_; GeeHashMap* app_to_add; GeeHashMap* _tmp25_; GMenuTreeEntry* _tmp26_; const gchar* _tmp27_ = NULL; GeeHashMap* _tmp28_; GMenuTreeEntry* _tmp29_; const gchar* _tmp30_ = NULL; GeeHashMap* _tmp31_; GMenuTreeEntry* _tmp32_; const gchar* _tmp33_ = NULL; GeeHashMap* _tmp34_; GMenuTreeEntry* _tmp35_; const gchar* _tmp36_ = NULL; GeeHashMap* _tmp37_; GeeHashMap* _tmp38_; gpointer _tmp39_ = NULL; gchar* _tmp40_; gboolean _tmp41_ = FALSE; gboolean _tmp42_; GeeArrayList* _tmp102_; GeeHashMap* _tmp103_; _tmp24_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL); app_to_add = _tmp24_; _tmp25_ = app_to_add; _tmp26_ = app; _tmp27_ = gmenu_tree_entry_get_comment (_tmp26_); gee_abstract_map_set ((GeeAbstractMap*) _tmp25_, "description", _tmp27_); _tmp28_ = app_to_add; _tmp29_ = app; _tmp30_ = gmenu_tree_entry_get_name (_tmp29_); gee_abstract_map_set ((GeeAbstractMap*) _tmp28_, "name", _tmp30_); _tmp31_ = app_to_add; _tmp32_ = app; _tmp33_ = gmenu_tree_entry_get_exec (_tmp32_); gee_abstract_map_set ((GeeAbstractMap*) _tmp31_, "command", _tmp33_); _tmp34_ = app_to_add; _tmp35_ = app; _tmp36_ = gmenu_tree_entry_get_desktop_file_path (_tmp35_); gee_abstract_map_set ((GeeAbstractMap*) _tmp34_, "desktop_file", _tmp36_); _tmp37_ = icons; _tmp38_ = app_to_add; _tmp39_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp38_, "command"); _tmp40_ = (gchar*) _tmp39_; _tmp41_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp37_, _tmp40_); _tmp42_ = !_tmp41_; _g_free0 (_tmp40_); if (_tmp42_) { GMenuTreeEntry* _tmp43_; const gchar* _tmp44_ = NULL; gchar* _tmp45_; gchar* app_icon; GtkIconTheme* _tmp46_; const gchar* _tmp47_; gboolean _tmp48_ = FALSE; _tmp43_ = app; _tmp44_ = gmenu_tree_entry_get_icon (_tmp43_); _tmp45_ = g_strdup (_tmp44_); app_icon = _tmp45_; _tmp46_ = icon_theme; _tmp47_ = app_icon; _tmp48_ = gtk_icon_theme_has_icon (_tmp46_, _tmp47_); if (_tmp48_) { GtkIconTheme* _tmp49_; const gchar* _tmp50_; gint _tmp51_; GtkIconInfo* _tmp52_ = NULL; GtkIconInfo* _tmp53_; GdkPixbuf* _tmp54_ = NULL; GdkPixbuf* _tmp55_; GdkPixbuf* _tmp56_; GeeHashMap* _tmp57_; GeeHashMap* _tmp58_; gpointer _tmp59_ = NULL; gchar* _tmp60_; GdkPixbuf* _tmp61_; _tmp49_ = icon_theme; _tmp50_ = app_icon; _tmp51_ = icon_size; _tmp52_ = gtk_icon_theme_lookup_icon (_tmp49_, _tmp50_, _tmp51_, 0); _tmp53_ = _tmp52_; _tmp54_ = gtk_icon_info_load_icon (_tmp53_, &_inner_error_); _tmp55_ = _tmp54_; _gtk_icon_info_free0 (_tmp53_); _tmp56_ = _tmp55_; if (_inner_error_ != NULL) { _g_free0 (app_icon); _g_object_unref0 (app_to_add); _gmenu_tree_item_unref0 (app); _g_object_unref0 (_app_list); _g_object_unref0 (icon_theme); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); return; } _tmp57_ = icons; _tmp58_ = app_to_add; _tmp59_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp58_, "command"); _tmp60_ = (gchar*) _tmp59_; _tmp61_ = _tmp56_; gee_abstract_map_set ((GeeAbstractMap*) _tmp57_, _tmp60_, _tmp61_); _g_object_unref0 (_tmp61_); _g_free0 (_tmp60_); } else { const gchar* _tmp62_; GFile* _tmp63_ = NULL; GFile* _tmp64_; gboolean _tmp65_ = FALSE; gboolean _tmp66_; _tmp62_ = app_icon; _tmp63_ = g_file_new_for_path (_tmp62_); _tmp64_ = _tmp63_; _tmp65_ = g_file_query_exists (_tmp64_, NULL); _tmp66_ = _tmp65_; _g_object_unref0 (_tmp64_); if (_tmp66_) { { const gchar* _tmp67_; const gchar* _tmp68_ = NULL; gint _tmp69_; GdkPixbuf* _tmp70_; GdkPixbuf* _tmp71_; GeeHashMap* _tmp72_; GeeHashMap* _tmp73_; gpointer _tmp74_ = NULL; gchar* _tmp75_; GdkPixbuf* _tmp76_; _tmp67_ = app_icon; _tmp68_ = string_to_string (_tmp67_); _tmp69_ = icon_size; _tmp70_ = gdk_pixbuf_new_from_file_at_scale (_tmp68_, -1, _tmp69_, TRUE, &_inner_error_); _tmp71_ = _tmp70_; if (_inner_error_ != NULL) { goto __catch1_g_error; } _tmp72_ = icons; _tmp73_ = app_to_add; _tmp74_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp73_, "command"); _tmp75_ = (gchar*) _tmp74_; _tmp76_ = _tmp71_; gee_abstract_map_set ((GeeAbstractMap*) _tmp72_, _tmp75_, _tmp76_); _g_object_unref0 (_tmp76_); _g_free0 (_tmp75_); } goto __finally1; __catch1_g_error: { GtkIconTheme* _tmp77_; gint _tmp78_; GtkIconInfo* _tmp79_ = NULL; GtkIconInfo* _tmp80_; GdkPixbuf* _tmp81_ = NULL; GdkPixbuf* _tmp82_; GdkPixbuf* _tmp83_; GeeHashMap* _tmp84_; GeeHashMap* _tmp85_; gpointer _tmp86_ = NULL; gchar* _tmp87_; GdkPixbuf* _tmp88_; FILE* _tmp89_; g_clear_error (&_inner_error_); _inner_error_ = NULL; _tmp77_ = icon_theme; _tmp78_ = icon_size; _tmp79_ = gtk_icon_theme_lookup_icon (_tmp77_, "application-default-icon", _tmp78_, 0); _tmp80_ = _tmp79_; _tmp81_ = gtk_icon_info_load_icon (_tmp80_, &_inner_error_); _tmp82_ = _tmp81_; _gtk_icon_info_free0 (_tmp80_); _tmp83_ = _tmp82_; if (_inner_error_ != NULL) { goto __finally1; } _tmp84_ = icons; _tmp85_ = app_to_add; _tmp86_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp85_, "command"); _tmp87_ = (gchar*) _tmp86_; _tmp88_ = _tmp83_; gee_abstract_map_set ((GeeAbstractMap*) _tmp84_, _tmp87_, _tmp88_); _g_object_unref0 (_tmp88_); _g_free0 (_tmp87_); _tmp89_ = stdout; fprintf (_tmp89_, "Failed to load icon from file.\n"); } __finally1: if (_inner_error_ != NULL) { _g_free0 (app_icon); _g_object_unref0 (app_to_add); _gmenu_tree_item_unref0 (app); _g_object_unref0 (_app_list); _g_object_unref0 (icon_theme); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); return; } } else { GtkIconTheme* _tmp90_; gint _tmp91_; GtkIconInfo* _tmp92_ = NULL; GtkIconInfo* _tmp93_; GdkPixbuf* _tmp94_ = NULL; GdkPixbuf* _tmp95_; GdkPixbuf* _tmp96_; GeeHashMap* _tmp97_; GeeHashMap* _tmp98_; gpointer _tmp99_ = NULL; gchar* _tmp100_; GdkPixbuf* _tmp101_; _tmp90_ = icon_theme; _tmp91_ = icon_size; _tmp92_ = gtk_icon_theme_lookup_icon (_tmp90_, "application-default-icon", _tmp91_, 0); _tmp93_ = _tmp92_; _tmp94_ = gtk_icon_info_load_icon (_tmp93_, &_inner_error_); _tmp95_ = _tmp94_; _gtk_icon_info_free0 (_tmp93_); _tmp96_ = _tmp95_; if (_inner_error_ != NULL) { _g_free0 (app_icon); _g_object_unref0 (app_to_add); _gmenu_tree_item_unref0 (app); _g_object_unref0 (_app_list); _g_object_unref0 (icon_theme); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); return; } _tmp97_ = icons; _tmp98_ = app_to_add; _tmp99_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp98_, "command"); _tmp100_ = (gchar*) _tmp99_; _tmp101_ = _tmp96_; gee_abstract_map_set ((GeeAbstractMap*) _tmp97_, _tmp100_, _tmp101_); _g_object_unref0 (_tmp101_); _g_free0 (_tmp100_); } } _g_free0 (app_icon); } _tmp102_ = _vala_list; _tmp103_ = app_to_add; gee_abstract_collection_add ((GeeAbstractCollection*) _tmp102_, _tmp103_); _g_object_unref0 (app_to_add); } _gmenu_tree_item_unref0 (app); } _g_object_unref0 (_app_list); } _g_object_unref0 (icon_theme); if (list) { *list = _vala_list; } else { _g_object_unref0 (_vala_list); } }
GdkPixbuf* plank_drawing_drawing_service_load_icon (const gchar* names, gint width, gint height) { GdkPixbuf* result = NULL; GeeArrayList* all_names = NULL; GeeArrayList* _tmp0_ = NULL; const gchar* _tmp1_ = NULL; gchar** _tmp2_ = NULL; gchar** _tmp3_ = NULL; gchar** _tmp7_ = NULL; gchar** _tmp8_ = NULL; GdkPixbuf* pbuf = NULL; GdkPixbuf* _tmp42_ = NULL; gint _tmp60_ = 0; gint _tmp61_ = 0; gint _tmp62_ = 0; gint _tmp63_ = 0; GdkPixbuf* _tmp64_ = NULL; g_return_val_if_fail (names != NULL, NULL); _tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL); all_names = _tmp0_; _tmp1_ = names; _tmp3_ = _tmp2_ = g_strsplit (_tmp1_, ";;", 0); { gchar** s_collection = NULL; gint s_collection_length1 = 0; gint _s_collection_size_ = 0; gint s_it = 0; s_collection = _tmp3_; s_collection_length1 = _vala_array_length (_tmp2_); for (s_it = 0; s_it < _vala_array_length (_tmp2_); s_it = s_it + 1) { gchar* _tmp4_ = NULL; gchar* s = NULL; _tmp4_ = g_strdup (s_collection[s_it]); s = _tmp4_; { GeeArrayList* _tmp5_ = NULL; const gchar* _tmp6_ = NULL; _tmp5_ = all_names; _tmp6_ = s; gee_abstract_collection_add ((GeeAbstractCollection*) _tmp5_, _tmp6_); _g_free0 (s); } } s_collection = (_vala_array_free (s_collection, s_collection_length1, (GDestroyNotify) g_free), NULL); } _tmp8_ = _tmp7_ = g_strsplit (PLANK_DRAWING_DRAWING_SERVICE_MISSING_ICONS, ";;", 0); { gchar** s_collection = NULL; gint s_collection_length1 = 0; gint _s_collection_size_ = 0; gint s_it = 0; s_collection = _tmp8_; s_collection_length1 = _vala_array_length (_tmp7_); for (s_it = 0; s_it < _vala_array_length (_tmp7_); s_it = s_it + 1) { gchar* _tmp9_ = NULL; gchar* s = NULL; _tmp9_ = g_strdup (s_collection[s_it]); s = _tmp9_; { GeeArrayList* _tmp10_ = NULL; const gchar* _tmp11_ = NULL; _tmp10_ = all_names; _tmp11_ = s; gee_abstract_collection_add ((GeeAbstractCollection*) _tmp10_, _tmp11_); _g_free0 (s); } } s_collection = (_vala_array_free (s_collection, s_collection_length1, (GDestroyNotify) g_free), NULL); } pbuf = NULL; { GeeArrayList* _name_list = NULL; GeeArrayList* _tmp12_ = NULL; GeeArrayList* _tmp13_ = NULL; gint _name_size = 0; GeeArrayList* _tmp14_ = NULL; gint _tmp15_ = 0; gint _tmp16_ = 0; gint _name_index = 0; _tmp12_ = all_names; _tmp13_ = _g_object_ref0 (_tmp12_); _name_list = _tmp13_; _tmp14_ = _name_list; _tmp15_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp14_); _tmp16_ = _tmp15_; _name_size = _tmp16_; _name_index = -1; while (TRUE) { gint _tmp17_ = 0; gint _tmp18_ = 0; gint _tmp19_ = 0; gchar* name = NULL; GeeArrayList* _tmp20_ = NULL; gint _tmp21_ = 0; gpointer _tmp22_ = NULL; const gchar* _tmp23_ = NULL; gboolean _tmp24_ = FALSE; const gchar* _tmp30_ = NULL; gint _tmp31_ = 0; gint _tmp32_ = 0; gint _tmp33_ = 0; GdkPixbuf* _tmp34_ = NULL; GdkPixbuf* _tmp35_ = NULL; const gchar* _tmp36_ = NULL; GeeArrayList* _tmp37_ = NULL; gpointer _tmp38_ = NULL; gchar* _tmp39_ = NULL; gboolean _tmp40_ = FALSE; _tmp17_ = _name_index; _name_index = _tmp17_ + 1; _tmp18_ = _name_index; _tmp19_ = _name_size; if (!(_tmp18_ < _tmp19_)) { break; } _tmp20_ = _name_list; _tmp21_ = _name_index; _tmp22_ = gee_abstract_list_get ((GeeAbstractList*) _tmp20_, _tmp21_); name = (gchar*) _tmp22_; _tmp23_ = name; _tmp24_ = plank_drawing_drawing_service_icon_is_file (_tmp23_); if (_tmp24_) { const gchar* _tmp25_ = NULL; gint _tmp26_ = 0; gint _tmp27_ = 0; GdkPixbuf* _tmp28_ = NULL; GdkPixbuf* _tmp29_ = NULL; _tmp25_ = name; _tmp26_ = width; _tmp27_ = height; _tmp28_ = plank_drawing_drawing_service_load_pixbuf_from_file (_tmp25_, _tmp26_, _tmp27_); _g_object_unref0 (pbuf); pbuf = _tmp28_; _tmp29_ = pbuf; if (_tmp29_ != NULL) { _g_free0 (name); break; } } _tmp30_ = name; _tmp31_ = width; _tmp32_ = height; _tmp33_ = MAX (_tmp31_, _tmp32_); _tmp34_ = plank_drawing_drawing_service_load_pixbuf (_tmp30_, _tmp33_); _g_object_unref0 (pbuf); pbuf = _tmp34_; _tmp35_ = pbuf; if (_tmp35_ != NULL) { _g_free0 (name); break; } _tmp36_ = name; _tmp37_ = all_names; _tmp38_ = gee_abstract_list_last ((GeeAbstractList*) _tmp37_); _tmp39_ = (gchar*) _tmp38_; _tmp40_ = g_strcmp0 (_tmp36_, _tmp39_) != 0; _g_free0 (_tmp39_); if (_tmp40_) { const gchar* _tmp41_ = NULL; _tmp41_ = name; g_message ("DrawingService.vala:137: Could not find icon '%s'", _tmp41_); } _g_free0 (name); } _g_object_unref0 (_name_list); } _tmp42_ = pbuf; if (_tmp42_ != NULL) { gboolean _tmp43_ = FALSE; gboolean _tmp44_ = FALSE; gint _tmp45_ = 0; _tmp45_ = width; if (_tmp45_ != (-1)) { gint _tmp46_ = 0; _tmp46_ = height; _tmp44_ = _tmp46_ != (-1); } else { _tmp44_ = FALSE; } if (_tmp44_) { gboolean _tmp47_ = FALSE; gint _tmp48_ = 0; GdkPixbuf* _tmp49_ = NULL; gint _tmp50_ = 0; gint _tmp51_ = 0; _tmp48_ = width; _tmp49_ = pbuf; _tmp50_ = gdk_pixbuf_get_width (_tmp49_); _tmp51_ = _tmp50_; if (_tmp48_ != _tmp51_) { _tmp47_ = TRUE; } else { gint _tmp52_ = 0; GdkPixbuf* _tmp53_ = NULL; gint _tmp54_ = 0; gint _tmp55_ = 0; _tmp52_ = height; _tmp53_ = pbuf; _tmp54_ = gdk_pixbuf_get_height (_tmp53_); _tmp55_ = _tmp54_; _tmp47_ = _tmp52_ != _tmp55_; } _tmp43_ = _tmp47_; } else { _tmp43_ = FALSE; } if (_tmp43_) { GdkPixbuf* _tmp56_ = NULL; gint _tmp57_ = 0; gint _tmp58_ = 0; GdkPixbuf* _tmp59_ = NULL; _tmp56_ = pbuf; _tmp57_ = width; _tmp58_ = height; _tmp59_ = plank_drawing_drawing_service_ar_scale (_tmp56_, _tmp57_, _tmp58_); result = _tmp59_; _g_object_unref0 (pbuf); _g_object_unref0 (all_names); return result; } result = pbuf; _g_object_unref0 (all_names); return result; } g_warning ("DrawingService.vala:146: No icon found, return empty pixbuf"); _tmp60_ = width; _tmp61_ = MAX (1, _tmp60_); _tmp62_ = height; _tmp63_ = MAX (1, _tmp62_); _tmp64_ = plank_drawing_drawing_service_get_empty_pixbuf (_tmp61_, _tmp63_); result = _tmp64_; _g_object_unref0 (pbuf); _g_object_unref0 (all_names); return result; }
static void elektro_sim_ground_real_draw_image (ElektroSimComponent* base, cairo_t* cr) { ElektroSimGround * self; gint p1_x = 0; GeeArrayList* _tmp0_ = NULL; gpointer _tmp1_ = NULL; ElektroSimPoint* _tmp2_ = NULL; gint _tmp3_ = 0; gint _tmp4_ = 0; gint _tmp5_ = 0; gint p1_y = 0; GeeArrayList* _tmp6_ = NULL; gpointer _tmp7_ = NULL; ElektroSimPoint* _tmp8_ = NULL; gint _tmp9_ = 0; gint _tmp10_ = 0; gint _tmp11_ = 0; cairo_t* _tmp12_ = NULL; gint _tmp13_ = 0; gint _tmp14_ = 0; ElektroSimComponentOrientation _tmp15_ = 0; ElektroSimComponentOrientation _tmp16_ = 0; cairo_t* _tmp33_ = NULL; cairo_t* _tmp34_ = NULL; gint _tmp35_ = 0; gint _tmp36_ = 0; ElektroSimComponentOrientation _tmp37_ = 0; ElektroSimComponentOrientation _tmp38_ = 0; cairo_t* _tmp65_ = NULL; const gchar* _tmp66_ = NULL; const gchar* _tmp67_ = NULL; cairo_t* _tmp68_ = NULL; self = (ElektroSimGround*) base; g_return_if_fail (cr != NULL); _tmp0_ = ((ElektroSimComponent*) self)->connections; _tmp1_ = gee_abstract_list_get ((GeeAbstractList*) _tmp0_, 0); _tmp2_ = (ElektroSimPoint*) _tmp1_; _tmp3_ = elektro_sim_point_get_x (_tmp2_); _tmp4_ = _tmp3_; _tmp5_ = _tmp4_; _elektro_sim_point_unref0 (_tmp2_); p1_x = _tmp5_; _tmp6_ = ((ElektroSimComponent*) self)->connections; _tmp7_ = gee_abstract_list_get ((GeeAbstractList*) _tmp6_, 0); _tmp8_ = (ElektroSimPoint*) _tmp7_; _tmp9_ = elektro_sim_point_get_y (_tmp8_); _tmp10_ = _tmp9_; _tmp11_ = _tmp10_; _elektro_sim_point_unref0 (_tmp8_); p1_y = _tmp11_; _tmp12_ = cr; _tmp13_ = p1_x; _tmp14_ = p1_y; cairo_move_to (_tmp12_, (gdouble) _tmp13_, (gdouble) _tmp14_); _tmp15_ = elektro_sim_component_get_orientation ((ElektroSimComponent*) self); _tmp16_ = _tmp15_; if (_tmp16_ == ELEKTRO_SIM_COMPONENT_ORIENTATION_RIGHT) { cairo_t* _tmp17_ = NULL; gint _tmp18_ = 0; gint _tmp19_ = 0; _tmp17_ = cr; _tmp18_ = elektro_sim_component_get_width ((ElektroSimComponent*) self); _tmp19_ = _tmp18_; cairo_rel_line_to (_tmp17_, (gdouble) _tmp19_, (gdouble) 0); } else { ElektroSimComponentOrientation _tmp20_ = 0; ElektroSimComponentOrientation _tmp21_ = 0; _tmp20_ = elektro_sim_component_get_orientation ((ElektroSimComponent*) self); _tmp21_ = _tmp20_; if (_tmp21_ == ELEKTRO_SIM_COMPONENT_ORIENTATION_LEFT) { cairo_t* _tmp22_ = NULL; gint _tmp23_ = 0; gint _tmp24_ = 0; _tmp22_ = cr; _tmp23_ = elektro_sim_component_get_width ((ElektroSimComponent*) self); _tmp24_ = _tmp23_; cairo_rel_line_to (_tmp22_, (gdouble) (-_tmp24_), (gdouble) 0); } else { ElektroSimComponentOrientation _tmp25_ = 0; ElektroSimComponentOrientation _tmp26_ = 0; _tmp25_ = elektro_sim_component_get_orientation ((ElektroSimComponent*) self); _tmp26_ = _tmp25_; if (_tmp26_ == ELEKTRO_SIM_COMPONENT_ORIENTATION_UP) { cairo_t* _tmp27_ = NULL; gint _tmp28_ = 0; gint _tmp29_ = 0; _tmp27_ = cr; _tmp28_ = elektro_sim_component_get_width ((ElektroSimComponent*) self); _tmp29_ = _tmp28_; cairo_rel_line_to (_tmp27_, (gdouble) 0, (gdouble) (-_tmp29_)); } else { cairo_t* _tmp30_ = NULL; gint _tmp31_ = 0; gint _tmp32_ = 0; _tmp30_ = cr; _tmp31_ = elektro_sim_component_get_width ((ElektroSimComponent*) self); _tmp32_ = _tmp31_; cairo_rel_line_to (_tmp30_, (gdouble) 0, (gdouble) _tmp32_); } } } _tmp33_ = cr; cairo_stroke (_tmp33_); _tmp34_ = cr; _tmp35_ = elektro_sim_component_get_height ((ElektroSimComponent*) self); _tmp36_ = _tmp35_; cairo_set_font_size (_tmp34_, _tmp36_ * 0.4); _tmp37_ = elektro_sim_component_get_orientation ((ElektroSimComponent*) self); _tmp38_ = _tmp37_; if (_tmp38_ == ELEKTRO_SIM_COMPONENT_ORIENTATION_RIGHT) { cairo_t* _tmp39_ = NULL; gint _tmp40_ = 0; gint _tmp41_ = 0; gint _tmp42_ = 0; gint _tmp43_ = 0; _tmp39_ = cr; _tmp40_ = p1_x; _tmp41_ = elektro_sim_component_get_width ((ElektroSimComponent*) self); _tmp42_ = _tmp41_; _tmp43_ = p1_y; cairo_move_to (_tmp39_, _tmp40_ + (_tmp42_ * 0.15), (gdouble) (_tmp43_ - 5)); } else { ElektroSimComponentOrientation _tmp44_ = 0; ElektroSimComponentOrientation _tmp45_ = 0; _tmp44_ = elektro_sim_component_get_orientation ((ElektroSimComponent*) self); _tmp45_ = _tmp44_; if (_tmp45_ == ELEKTRO_SIM_COMPONENT_ORIENTATION_LEFT) { cairo_t* _tmp46_ = NULL; gint _tmp47_ = 0; gint _tmp48_ = 0; gint _tmp49_ = 0; gint _tmp50_ = 0; _tmp46_ = cr; _tmp47_ = p1_x; _tmp48_ = elektro_sim_component_get_width ((ElektroSimComponent*) self); _tmp49_ = _tmp48_; _tmp50_ = p1_y; cairo_move_to (_tmp46_, (gdouble) (_tmp47_ - _tmp49_), (gdouble) (_tmp50_ - 5)); } else { ElektroSimComponentOrientation _tmp51_ = 0; ElektroSimComponentOrientation _tmp52_ = 0; _tmp51_ = elektro_sim_component_get_orientation ((ElektroSimComponent*) self); _tmp52_ = _tmp51_; if (_tmp52_ == ELEKTRO_SIM_COMPONENT_ORIENTATION_UP) { cairo_t* _tmp53_ = NULL; gint _tmp54_ = 0; gint _tmp55_ = 0; gint _tmp56_ = 0; gint _tmp57_ = 0; _tmp53_ = cr; _tmp54_ = p1_x; _tmp55_ = p1_y; _tmp56_ = elektro_sim_component_get_width ((ElektroSimComponent*) self); _tmp57_ = _tmp56_; cairo_move_to (_tmp53_, (gdouble) (_tmp54_ + 5), _tmp55_ - (_tmp57_ * 0.8)); } else { ElektroSimComponentOrientation _tmp58_ = 0; ElektroSimComponentOrientation _tmp59_ = 0; _tmp58_ = elektro_sim_component_get_orientation ((ElektroSimComponent*) self); _tmp59_ = _tmp58_; if (_tmp59_ == ELEKTRO_SIM_COMPONENT_ORIENTATION_DOWN) { cairo_t* _tmp60_ = NULL; gint _tmp61_ = 0; gint _tmp62_ = 0; gint _tmp63_ = 0; gint _tmp64_ = 0; _tmp60_ = cr; _tmp61_ = p1_x; _tmp62_ = p1_y; _tmp63_ = elektro_sim_component_get_width ((ElektroSimComponent*) self); _tmp64_ = _tmp63_; cairo_move_to (_tmp60_, (gdouble) (_tmp61_ + 5), _tmp62_ + (_tmp64_ * 0.95)); } } } } _tmp65_ = cr; _tmp66_ = gtk_widget_get_name ((GtkWidget*) self); _tmp67_ = _tmp66_; cairo_text_path (_tmp65_, _tmp67_); _tmp68_ = cr; cairo_fill (_tmp68_); }
gint _vala_main (gchar** args, int args_length1) { gint result = 0; GtkWindow* _tmp0_; GtkWindow* window; GtkMusicGuitar* _tmp1_; GtkMusicGuitar* guitar; GeeArrayList* _tmp2_; gpointer _tmp3_ = NULL; GtkMusicGuitarString* _tmp4_; GeeArrayList* _tmp5_; gpointer _tmp6_ = NULL; GtkMusicGuitarString* _tmp7_; gfloat* _tmp8_ = NULL; gfloat* _tmp9_; gint _tmp9__length1; gfloat* _tmp10_ = NULL; gfloat* _tmp11_; gint _tmp11__length1; gfloat* _tmp12_ = NULL; gfloat* _tmp13_; gint _tmp13__length1; gfloat* _tmp14_ = NULL; gfloat* _tmp15_; gint _tmp15__length1; gfloat* _tmp16_ = NULL; gfloat* _tmp17_; gint _tmp17__length1; gfloat* _tmp18_ = NULL; gfloat* _tmp19_; gint _tmp19__length1; gfloat* _tmp20_ = NULL; gfloat* _tmp21_; gint _tmp21__length1; gtk_init (&args_length1, &args); _tmp0_ = (GtkWindow*) gtk_window_new (GTK_WINDOW_TOPLEVEL); g_object_ref_sink (_tmp0_); window = _tmp0_; _tmp1_ = gtk_music_guitar_new (); g_object_ref_sink (_tmp1_); guitar = _tmp1_; g_signal_connect (guitar, "note-pressed", (GCallback) _note_pressed_callback_gtk_music_guitar_note_pressed, NULL); _tmp2_ = guitar->guitarStrings; _tmp3_ = gee_abstract_list_get ((GeeAbstractList*) _tmp2_, 0); _tmp4_ = (GtkMusicGuitarString*) _tmp3_; _tmp4_->vibrate = TRUE; _gtk_music_guitar_string_unref0 (_tmp4_); _tmp5_ = guitar->guitarStrings; _tmp6_ = gee_abstract_list_get ((GeeAbstractList*) _tmp5_, 5); _tmp7_ = (GtkMusicGuitarString*) _tmp6_; _tmp7_->vibrate = TRUE; _gtk_music_guitar_string_unref0 (_tmp7_); gtk_music_guitar_start_animation (guitar); _tmp8_ = g_new0 (gfloat, 4); _tmp8_[0] = 0.4f; _tmp8_[1] = 0.0f; _tmp8_[2] = 0.0f; _tmp8_[3] = 1.0f; _tmp9_ = _tmp8_; _tmp9__length1 = 4; gtk_music_guitar_mark_position (guitar, (gushort) 0, (gushort) 0, _tmp9_, 4); _tmp9_ = (g_free (_tmp9_), NULL); _tmp10_ = g_new0 (gfloat, 4); _tmp10_[0] = 0.0f; _tmp10_[1] = 0.0f; _tmp10_[2] = 0.0f; _tmp10_[3] = 1.0f; _tmp11_ = _tmp10_; _tmp11__length1 = 4; gtk_music_guitar_mark_position (guitar, (gushort) 1, (gushort) 1, _tmp11_, 4); _tmp11_ = (g_free (_tmp11_), NULL); _tmp12_ = g_new0 (gfloat, 4); _tmp12_[0] = 0.0f; _tmp12_[1] = 0.0f; _tmp12_[2] = 0.0f; _tmp12_[3] = 1.0f; _tmp13_ = _tmp12_; _tmp13__length1 = 4; gtk_music_guitar_mark_position (guitar, (gushort) 2, (gushort) 1, _tmp13_, 4); _tmp13_ = (g_free (_tmp13_), NULL); _tmp14_ = g_new0 (gfloat, 4); _tmp14_[0] = 0.0f; _tmp14_[1] = 0.0f; _tmp14_[2] = 0.0f; _tmp14_[3] = 1.0f; _tmp15_ = _tmp14_; _tmp15__length1 = 4; gtk_music_guitar_mark_position (guitar, (gushort) 3, (gushort) 0, _tmp15_, 4); _tmp15_ = (g_free (_tmp15_), NULL); _tmp16_ = g_new0 (gfloat, 4); _tmp16_[0] = 0.0f; _tmp16_[1] = 0.0f; _tmp16_[2] = 0.0f; _tmp16_[3] = 1.0f; _tmp17_ = _tmp16_; _tmp17__length1 = 4; gtk_music_guitar_mark_position (guitar, (gushort) 5, (gushort) 3, _tmp17_, 4); _tmp17_ = (g_free (_tmp17_), NULL); _tmp18_ = g_new0 (gfloat, 4); _tmp18_[0] = 0.0f; _tmp18_[1] = 0.4f; _tmp18_[2] = 0.0f; _tmp18_[3] = 1.0f; _tmp19_ = _tmp18_; _tmp19__length1 = 4; gtk_music_guitar_mark_note (guitar, "A3", _tmp19_, 4); _tmp19_ = (g_free (_tmp19_), NULL); _tmp20_ = g_new0 (gfloat, 4); _tmp20_[0] = 0.0f; _tmp20_[1] = 0.0f; _tmp20_[2] = 0.4f; _tmp20_[3] = 0.7f; _tmp21_ = _tmp20_; _tmp21__length1 = 4; gtk_music_guitar_mark_note (guitar, "C", _tmp21_, 4); _tmp21_ = (g_free (_tmp21_), NULL); gtk_container_add ((GtkContainer*) window, (GtkWidget*) guitar); g_signal_connect ((GtkWidget*) window, "destroy", (GCallback) _gtk_main_quit_gtk_widget_destroy, NULL); gtk_widget_show_all ((GtkWidget*) window); gtk_main (); result = 0; _g_object_unref0 (guitar); _g_object_unref0 (window); return result; }
static void _soy_scenes_td_side_align_to_z_axis (soyscenesTDSide* self) { #line 64 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" g_return_if_fail (self != NULL); #line 405 "TDSide.c" { GeeLinkedList* _body_list = NULL; GeeLinkedList* _tmp0_ = NULL; GeeLinkedList* _tmp1_ = NULL; gint _body_size = 0; GeeLinkedList* _tmp2_ = NULL; gint _tmp3_ = 0; gint _tmp4_ = 0; gint _body_index = 0; #line 65 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp0_ = self->tdbodies; #line 65 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp1_ = _g_object_ref0 (_tmp0_); #line 65 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _body_list = _tmp1_; #line 65 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp2_ = _body_list; #line 65 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_); #line 65 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp4_ = _tmp3_; #line 65 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _body_size = _tmp4_; #line 65 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _body_index = -1; #line 65 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" while (TRUE) { #line 433 "TDSide.c" gint _tmp5_ = 0; gint _tmp6_ = 0; gint _tmp7_ = 0; soybodiesBody* body = NULL; GeeLinkedList* _tmp8_ = NULL; gint _tmp9_ = 0; gpointer _tmp10_ = NULL; dxVector3* rot = NULL; soybodiesBody* _tmp11_ = NULL; struct dxBody* _tmp12_ = NULL; dxVector3* _tmp13_ = NULL; dxQuaternion* quat = NULL; soybodiesBody* _tmp14_ = NULL; struct dxBody* _tmp15_ = NULL; dxQuaternion* _tmp16_ = NULL; dReal quat_len = 0.0; dxQuaternion* _tmp17_ = NULL; dxQuaternion* _tmp18_ = NULL; dxQuaternion* _tmp19_ = NULL; dReal _tmp20_ = 0.0; dxQuaternion* _tmp21_ = NULL; dReal _tmp22_ = 0.0; dxQuaternion* _tmp23_ = NULL; dReal _tmp24_ = 0.0; dxQuaternion* _tmp25_ = NULL; dReal _tmp26_ = 0.0; gfloat _tmp27_ = 0.0F; dxQuaternion* _tmp28_ = NULL; dxQuaternion* _tmp29_ = NULL; dReal _tmp30_ = 0.0; dReal _tmp31_ = 0.0; dxQuaternion* _tmp32_ = NULL; dxQuaternion* _tmp33_ = NULL; dReal _tmp34_ = 0.0; dReal _tmp35_ = 0.0; soybodiesBody* _tmp36_ = NULL; struct dxBody* _tmp37_ = NULL; dxQuaternion* _tmp38_ = NULL; soybodiesBody* _tmp39_ = NULL; struct dxBody* _tmp40_ = NULL; dxVector3* _tmp41_ = NULL; dReal _tmp42_ = 0.0; #line 65 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp5_ = _body_index; #line 65 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _body_index = _tmp5_ + 1; #line 65 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp6_ = _body_index; #line 65 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp7_ = _body_size; #line 65 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" if (!(_tmp6_ < _tmp7_)) { #line 65 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" break; #line 488 "TDSide.c" } #line 65 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp8_ = _body_list; #line 65 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp9_ = _body_index; #line 65 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_); #line 65 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" body = (soybodiesBody*) _tmp10_; #line 66 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp11_ = body; #line 66 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp12_ = _tmp11_->body; #line 66 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp13_ = dBodyGetAngularVel (_tmp12_); #line 66 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" rot = _tmp13_; #line 67 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp14_ = body; #line 67 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp15_ = _tmp14_->body; #line 67 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp16_ = dBodyGetQuaternion (_tmp15_); #line 67 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" quat = _tmp16_; #line 69 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp17_ = quat; #line 69 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp17_->x = (dReal) 0; #line 70 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp18_ = quat; #line 70 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp18_->y = (dReal) 0; #line 71 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp19_ = quat; #line 71 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp20_ = _tmp19_->w; #line 71 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp21_ = quat; #line 71 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp22_ = _tmp21_->w; #line 71 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp23_ = quat; #line 71 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp24_ = _tmp23_->z; #line 71 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp25_ = quat; #line 71 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp26_ = _tmp25_->z; #line 71 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp27_ = sqrtf ((((gfloat) _tmp20_) * ((gfloat) _tmp22_)) + (((gfloat) _tmp24_) * ((gfloat) _tmp26_))); #line 71 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" quat_len = (dReal) _tmp27_; #line 72 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp28_ = quat; #line 72 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp29_ = quat; #line 72 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp30_ = _tmp29_->w; #line 72 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp31_ = quat_len; #line 72 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp29_->w = _tmp30_ / _tmp31_; #line 73 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp32_ = quat; #line 73 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp33_ = quat; #line 73 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp34_ = _tmp33_->z; #line 73 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp35_ = quat_len; #line 73 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp33_->z = _tmp34_ / _tmp35_; #line 75 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp36_ = body; #line 75 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp37_ = _tmp36_->body; #line 75 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp38_ = quat; #line 75 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" dBodySetQuaternion (_tmp37_, _tmp38_); #line 76 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp39_ = body; #line 76 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp40_ = _tmp39_->body; #line 76 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp41_ = rot; #line 76 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _tmp42_ = _tmp41_->z; #line 76 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" dBodySetAngularVel (_tmp40_, (dReal) 0, (dReal) 0, _tmp42_); #line 65 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _g_object_unref0 (body); #line 582 "TDSide.c" } #line 65 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs" _g_object_unref0 (_body_list); #line 586 "TDSide.c" } }
static void soy_fields_monopole_real_commit (soyfieldsField* base) { soyfieldsMonopole * self; GeeArrayList* _tmp91_; self = (soyfieldsMonopole*) base; { GeeArrayList* _tmp0_; GeeArrayList* _tmp1_; GeeArrayList* _other_list; GeeArrayList* _tmp2_; gint _tmp3_; gint _tmp4_; gint _other_size; gint _other_index; _tmp0_ = self->priv->_affected; _tmp1_ = _g_object_ref0 (_tmp0_); _other_list = _tmp1_; _tmp2_ = _other_list; _tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_); _tmp4_ = _tmp3_; _other_size = _tmp4_; _other_index = -1; while (TRUE) { gint _tmp5_; gint _tmp6_; gint _tmp7_; GeeArrayList* _tmp8_; gint _tmp9_; gpointer _tmp10_ = NULL; soybodiesBody* other; soybodiesBody* _tmp11_; soyatomsPosition* _tmp12_; soyatomsPosition* _tmp13_; soyatomsPosition* _tmp14_; gfloat _tmp15_; gfloat _tmp16_; soyatomsPosition* _tmp17_; soyatomsPosition* _tmp18_; soyatomsPosition* _tmp19_; gfloat _tmp20_; gfloat _tmp21_; gfloat _tmp22_; gfloat xd; soybodiesBody* _tmp23_; soyatomsPosition* _tmp24_; soyatomsPosition* _tmp25_; soyatomsPosition* _tmp26_; gfloat _tmp27_; gfloat _tmp28_; soyatomsPosition* _tmp29_; soyatomsPosition* _tmp30_; soyatomsPosition* _tmp31_; gfloat _tmp32_; gfloat _tmp33_; gfloat _tmp34_; gfloat yd; soybodiesBody* _tmp35_; soyatomsPosition* _tmp36_; soyatomsPosition* _tmp37_; soyatomsPosition* _tmp38_; gfloat _tmp39_; gfloat _tmp40_; soyatomsPosition* _tmp41_; soyatomsPosition* _tmp42_; soyatomsPosition* _tmp43_; gfloat _tmp44_; gfloat _tmp45_; gfloat _tmp46_; gfloat zd; gfloat _tmp47_; gfloat _tmp48_; gfloat _tmp49_; gfloat _tmp50_; gfloat _tmp51_; gfloat _tmp52_; gfloat d2; gfloat _tmp53_; _tmp5_ = _other_index; _other_index = _tmp5_ + 1; _tmp6_ = _other_index; _tmp7_ = _other_size; if (!(_tmp6_ < _tmp7_)) { break; } _tmp8_ = _other_list; _tmp9_ = _other_index; _tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_); other = (soybodiesBody*) _tmp10_; _tmp11_ = other; _tmp12_ = soy_bodies_body_get_position (_tmp11_); _tmp13_ = _tmp12_; _tmp14_ = _tmp13_; _tmp15_ = soy_atoms_position_get_x (_tmp14_); _tmp16_ = _tmp15_; _tmp17_ = soy_bodies_body_get_position ((soybodiesBody*) self); _tmp18_ = _tmp17_; _tmp19_ = _tmp18_; _tmp20_ = soy_atoms_position_get_x (_tmp19_); _tmp21_ = _tmp20_; _tmp22_ = _tmp16_ - _tmp21_; _g_object_unref0 (_tmp19_); _g_object_unref0 (_tmp14_); xd = _tmp22_; _tmp23_ = other; _tmp24_ = soy_bodies_body_get_position (_tmp23_); _tmp25_ = _tmp24_; _tmp26_ = _tmp25_; _tmp27_ = soy_atoms_position_get_y (_tmp26_); _tmp28_ = _tmp27_; _tmp29_ = soy_bodies_body_get_position ((soybodiesBody*) self); _tmp30_ = _tmp29_; _tmp31_ = _tmp30_; _tmp32_ = soy_atoms_position_get_y (_tmp31_); _tmp33_ = _tmp32_; _tmp34_ = _tmp28_ - _tmp33_; _g_object_unref0 (_tmp31_); _g_object_unref0 (_tmp26_); yd = _tmp34_; _tmp35_ = other; _tmp36_ = soy_bodies_body_get_position (_tmp35_); _tmp37_ = _tmp36_; _tmp38_ = _tmp37_; _tmp39_ = soy_atoms_position_get_z (_tmp38_); _tmp40_ = _tmp39_; _tmp41_ = soy_bodies_body_get_position ((soybodiesBody*) self); _tmp42_ = _tmp41_; _tmp43_ = _tmp42_; _tmp44_ = soy_atoms_position_get_z (_tmp43_); _tmp45_ = _tmp44_; _tmp46_ = _tmp40_ - _tmp45_; _g_object_unref0 (_tmp43_); _g_object_unref0 (_tmp38_); zd = _tmp46_; _tmp47_ = xd; _tmp48_ = xd; _tmp49_ = yd; _tmp50_ = yd; _tmp51_ = zd; _tmp52_ = zd; d2 = ((_tmp47_ * _tmp48_) + (_tmp49_ * _tmp50_)) + (_tmp51_ * _tmp52_); _tmp53_ = d2; if (_tmp53_ != ((gfloat) 0)) { gfloat _tmp54_; gfloat _tmp55_ = 0.0F; gfloat d; soybodiesBody* _tmp56_; soyMass* _tmp57_; soyMass* _tmp58_; gfloat _tmp59_; gfloat _tmp60_; gfloat mm2; soybodiesBody* _tmp61_; GeeHashMap* _tmp62_; GeeHashMap* _tmp63_; GeeHashMap* _tmp64_; gboolean _tmp65_ = FALSE; gboolean _tmp66_; gfloat _tmp73_; gfloat _tmp74_; soyMass* _tmp75_; soyMass* _tmp76_; gfloat _tmp77_; gfloat _tmp78_; gfloat _tmp79_; gfloat _tmp80_; gfloat f; soybodiesBody* _tmp81_; gfloat _tmp82_; gfloat _tmp83_; gfloat _tmp84_; gfloat _tmp85_; gfloat _tmp86_; gfloat _tmp87_; gfloat _tmp88_; gfloat _tmp89_; gfloat _tmp90_; _tmp54_ = d2; _tmp55_ = sqrtf (_tmp54_); d = _tmp55_; _tmp56_ = other; _tmp57_ = soy_bodies_body_get_mass (_tmp56_); _tmp58_ = _tmp57_; _tmp59_ = soy_mass_get_mass (_tmp58_); _tmp60_ = _tmp59_; mm2 = _tmp60_; _tmp61_ = other; _tmp62_ = soy_bodies_body_get_tags (_tmp61_); _tmp63_ = _tmp62_; _tmp64_ = _tmp63_; _tmp65_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp64_, "bmass"); _tmp66_ = _tmp65_; _g_object_unref0 (_tmp64_); if (_tmp66_) { soybodiesBody* _tmp67_; GeeHashMap* _tmp68_; GeeHashMap* _tmp69_; GeeHashMap* _tmp70_; gpointer _tmp71_ = NULL; gfloat* _tmp72_; _tmp67_ = other; _tmp68_ = soy_bodies_body_get_tags (_tmp67_); _tmp69_ = _tmp68_; _tmp70_ = _tmp69_; _tmp71_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp70_, "bmass"); _tmp72_ = (gfloat*) _tmp71_; mm2 = *_tmp72_; _g_free0 (_tmp72_); _g_object_unref0 (_tmp70_); } _tmp73_ = soy_fields_monopole_get_multiplier (self); _tmp74_ = _tmp73_; _tmp75_ = soy_bodies_body_get_mass ((soybodiesBody*) self); _tmp76_ = _tmp75_; _tmp77_ = soy_mass_get_mass (_tmp76_); _tmp78_ = _tmp77_; _tmp79_ = mm2; _tmp80_ = d2; f = ((_tmp74_ * _tmp78_) * _tmp79_) / _tmp80_; _tmp81_ = other; _tmp82_ = f; _tmp83_ = xd; _tmp84_ = d; _tmp85_ = f; _tmp86_ = yd; _tmp87_ = d; _tmp88_ = f; _tmp89_ = zd; _tmp90_ = d; soy_bodies_body_addForce (_tmp81_, (dReal) ((_tmp82_ * _tmp83_) / _tmp84_), (dReal) ((_tmp85_ * _tmp86_) / _tmp87_), (dReal) ((_tmp88_ * _tmp89_) / _tmp90_)); } _g_object_unref0 (other); } _g_object_unref0 (_other_list); } _tmp91_ = self->priv->_affected; gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp91_); }
static void _soy_textures_bumpmap_texel_weak (soytexturesBumpmap* self, GObject* vector) { GeeArrayList* _tmp0_; GeeArrayList* garbage; g_return_if_fail (self != NULL); g_return_if_fail (vector != NULL); _tmp0_ = gee_array_list_new (G_TYPE_INT, NULL, NULL, NULL); garbage = _tmp0_; { GeeHashMap* _tmp1_; GeeSet* _tmp2_; GeeSet* _tmp3_; GeeSet* _tmp4_; GeeIterator* _tmp5_ = NULL; GeeIterator* _tmp6_; GeeIterator* _index_it; _tmp1_ = self->priv->_texel_objs; _tmp2_ = gee_abstract_map_get_keys ((GeeMap*) _tmp1_); _tmp3_ = _tmp2_; _tmp4_ = _tmp3_; _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_); _tmp6_ = _tmp5_; _g_object_unref0 (_tmp4_); _index_it = _tmp6_; while (TRUE) { GeeIterator* _tmp7_; gboolean _tmp8_ = FALSE; GeeIterator* _tmp9_; gpointer _tmp10_ = NULL; gint index; GeeHashMap* _tmp11_; gint _tmp12_; gpointer _tmp13_ = NULL; GObject* _tmp14_; _tmp7_ = _index_it; _tmp8_ = gee_iterator_next (_tmp7_); if (!_tmp8_) { break; } _tmp9_ = _index_it; _tmp10_ = gee_iterator_get (_tmp9_); index = (gint) ((gintptr) _tmp10_); _tmp11_ = self->priv->_texel_objs; _tmp12_ = index; _tmp13_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp11_, (gpointer) ((gintptr) _tmp12_)); _tmp14_ = vector; if (G_TYPE_CHECK_INSTANCE_CAST ((soyatomsVector*) _tmp13_, G_TYPE_OBJECT, GObject) == _tmp14_) { GeeArrayList* _tmp15_; gint _tmp16_; _tmp15_ = garbage; _tmp16_ = index; gee_abstract_collection_add ((GeeAbstractCollection*) _tmp15_, (gpointer) ((gintptr) _tmp16_)); } } _g_object_unref0 (_index_it); } { GeeArrayList* _tmp17_; GeeArrayList* _tmp18_; GeeArrayList* _index_list; GeeArrayList* _tmp19_; gint _tmp20_; gint _tmp21_; gint _index_size; gint _index_index; _tmp17_ = garbage; _tmp18_ = _g_object_ref0 (_tmp17_); _index_list = _tmp18_; _tmp19_ = _index_list; _tmp20_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp19_); _tmp21_ = _tmp20_; _index_size = _tmp21_; _index_index = -1; while (TRUE) { gint _tmp22_; gint _tmp23_; gint _tmp24_; GeeArrayList* _tmp25_; gint _tmp26_; gpointer _tmp27_ = NULL; gint index; GeeHashMap* _tmp28_; gint _tmp29_; _tmp22_ = _index_index; _index_index = _tmp22_ + 1; _tmp23_ = _index_index; _tmp24_ = _index_size; if (!(_tmp23_ < _tmp24_)) { break; } _tmp25_ = _index_list; _tmp26_ = _index_index; _tmp27_ = gee_abstract_list_get ((GeeAbstractList*) _tmp25_, _tmp26_); index = (gint) ((gintptr) _tmp27_); _tmp28_ = self->priv->_texel_objs; _tmp29_ = index; gee_abstract_map_unset ((GeeAbstractMap*) _tmp28_, (gpointer) ((gintptr) _tmp29_), NULL); } _g_object_unref0 (_index_list); } _g_object_unref0 (garbage); }
static void soy_fields_monopole_real_commit (soyfieldsField* base) { soyfieldsMonopole * self; GeeArrayList* _tmp90_ = NULL; #line 51 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" self = (soyfieldsMonopole*) base; #line 227 "Monopole.c" { GeeArrayList* _other_list = NULL; GeeArrayList* _tmp0_ = NULL; GeeArrayList* _tmp1_ = NULL; gint _other_size = 0; GeeArrayList* _tmp2_ = NULL; gint _tmp3_ = 0; gint _tmp4_ = 0; gint _other_index = 0; #line 52 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp0_ = self->priv->_affected; #line 52 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp1_ = _g_object_ref0 (_tmp0_); #line 52 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _other_list = _tmp1_; #line 52 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp2_ = _other_list; #line 52 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_); #line 52 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp4_ = _tmp3_; #line 52 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _other_size = _tmp4_; #line 52 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _other_index = -1; #line 52 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" while (TRUE) { #line 255 "Monopole.c" gint _tmp5_ = 0; gint _tmp6_ = 0; gint _tmp7_ = 0; soybodiesBody* other = NULL; GeeArrayList* _tmp8_ = NULL; gint _tmp9_ = 0; gpointer _tmp10_ = NULL; gfloat xd = 0.0F; soybodiesBody* _tmp11_ = NULL; soyatomsPosition* _tmp12_ = NULL; soyatomsPosition* _tmp13_ = NULL; soyatomsPosition* _tmp14_ = NULL; gfloat _tmp15_ = 0.0F; gfloat _tmp16_ = 0.0F; soyatomsPosition* _tmp17_ = NULL; soyatomsPosition* _tmp18_ = NULL; soyatomsPosition* _tmp19_ = NULL; gfloat _tmp20_ = 0.0F; gfloat _tmp21_ = 0.0F; gfloat _tmp22_ = 0.0F; gfloat yd = 0.0F; soybodiesBody* _tmp23_ = NULL; soyatomsPosition* _tmp24_ = NULL; soyatomsPosition* _tmp25_ = NULL; soyatomsPosition* _tmp26_ = NULL; gfloat _tmp27_ = 0.0F; gfloat _tmp28_ = 0.0F; soyatomsPosition* _tmp29_ = NULL; soyatomsPosition* _tmp30_ = NULL; soyatomsPosition* _tmp31_ = NULL; gfloat _tmp32_ = 0.0F; gfloat _tmp33_ = 0.0F; gfloat _tmp34_ = 0.0F; gfloat zd = 0.0F; soybodiesBody* _tmp35_ = NULL; soyatomsPosition* _tmp36_ = NULL; soyatomsPosition* _tmp37_ = NULL; soyatomsPosition* _tmp38_ = NULL; gfloat _tmp39_ = 0.0F; gfloat _tmp40_ = 0.0F; soyatomsPosition* _tmp41_ = NULL; soyatomsPosition* _tmp42_ = NULL; soyatomsPosition* _tmp43_ = NULL; gfloat _tmp44_ = 0.0F; gfloat _tmp45_ = 0.0F; gfloat _tmp46_ = 0.0F; gfloat d2 = 0.0F; gfloat _tmp47_ = 0.0F; gfloat _tmp48_ = 0.0F; gfloat _tmp49_ = 0.0F; gfloat _tmp50_ = 0.0F; gfloat _tmp51_ = 0.0F; gfloat _tmp52_ = 0.0F; gfloat _tmp53_ = 0.0F; #line 52 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp5_ = _other_index; #line 52 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _other_index = _tmp5_ + 1; #line 52 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp6_ = _other_index; #line 52 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp7_ = _other_size; #line 52 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" if (!(_tmp6_ < _tmp7_)) { #line 52 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" break; #line 322 "Monopole.c" } #line 52 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp8_ = _other_list; #line 52 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp9_ = _other_index; #line 52 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_); #line 52 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" other = (soybodiesBody*) _tmp10_; #line 53 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp11_ = other; #line 53 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp12_ = soy_bodies_body_get_position (_tmp11_); #line 53 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp13_ = _tmp12_; #line 53 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp14_ = _tmp13_; #line 53 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp15_ = soy_atoms_position_get_x (_tmp14_); #line 53 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp16_ = _tmp15_; #line 53 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp17_ = soy_bodies_body_get_position ((soybodiesBody*) self); #line 53 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp18_ = _tmp17_; #line 53 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp19_ = _tmp18_; #line 53 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp20_ = soy_atoms_position_get_x (_tmp19_); #line 53 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp21_ = _tmp20_; #line 53 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp22_ = _tmp16_ - _tmp21_; #line 53 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _g_object_unref0 (_tmp19_); #line 53 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _g_object_unref0 (_tmp14_); #line 53 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" xd = _tmp22_; #line 54 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp23_ = other; #line 54 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp24_ = soy_bodies_body_get_position (_tmp23_); #line 54 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp25_ = _tmp24_; #line 54 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp26_ = _tmp25_; #line 54 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp27_ = soy_atoms_position_get_y (_tmp26_); #line 54 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp28_ = _tmp27_; #line 54 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp29_ = soy_bodies_body_get_position ((soybodiesBody*) self); #line 54 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp30_ = _tmp29_; #line 54 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp31_ = _tmp30_; #line 54 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp32_ = soy_atoms_position_get_y (_tmp31_); #line 54 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp33_ = _tmp32_; #line 54 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp34_ = _tmp28_ - _tmp33_; #line 54 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _g_object_unref0 (_tmp31_); #line 54 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _g_object_unref0 (_tmp26_); #line 54 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" yd = _tmp34_; #line 55 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp35_ = other; #line 55 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp36_ = soy_bodies_body_get_position (_tmp35_); #line 55 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp37_ = _tmp36_; #line 55 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp38_ = _tmp37_; #line 55 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp39_ = soy_atoms_position_get_z (_tmp38_); #line 55 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp40_ = _tmp39_; #line 55 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp41_ = soy_bodies_body_get_position ((soybodiesBody*) self); #line 55 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp42_ = _tmp41_; #line 55 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp43_ = _tmp42_; #line 55 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp44_ = soy_atoms_position_get_z (_tmp43_); #line 55 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp45_ = _tmp44_; #line 55 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp46_ = _tmp40_ - _tmp45_; #line 55 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _g_object_unref0 (_tmp43_); #line 55 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _g_object_unref0 (_tmp38_); #line 55 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" zd = _tmp46_; #line 58 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp47_ = xd; #line 58 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp48_ = xd; #line 58 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp49_ = yd; #line 58 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp50_ = yd; #line 58 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp51_ = zd; #line 58 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp52_ = zd; #line 58 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" d2 = ((_tmp47_ * _tmp48_) + (_tmp49_ * _tmp50_)) + (_tmp51_ * _tmp52_); #line 59 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp53_ = d2; #line 59 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" if (_tmp53_ != ((gfloat) 0)) { #line 440 "Monopole.c" gfloat d = 0.0F; gfloat _tmp54_ = 0.0F; gfloat _tmp55_ = 0.0F; gfloat mm2 = 0.0F; soybodiesBody* _tmp56_ = NULL; gfloat _tmp57_ = 0.0F; gfloat _tmp58_ = 0.0F; soybodiesBody* _tmp59_ = NULL; gfloat _tmp60_ = 0.0F; soybodiesBody* _tmp61_ = NULL; GeeHashMap* _tmp62_ = NULL; GeeHashMap* _tmp63_ = NULL; GeeHashMap* _tmp64_ = NULL; gboolean _tmp65_ = FALSE; gboolean _tmp66_ = FALSE; gfloat f = 0.0F; gfloat _tmp73_ = 0.0F; gfloat _tmp74_ = 0.0F; gfloat _tmp75_ = 0.0F; gfloat _tmp76_ = 0.0F; gfloat _tmp77_ = 0.0F; gfloat _tmp78_ = 0.0F; gfloat _tmp79_ = 0.0F; soybodiesBody* _tmp80_ = NULL; gfloat _tmp81_ = 0.0F; gfloat _tmp82_ = 0.0F; gfloat _tmp83_ = 0.0F; gfloat _tmp84_ = 0.0F; gfloat _tmp85_ = 0.0F; gfloat _tmp86_ = 0.0F; gfloat _tmp87_ = 0.0F; gfloat _tmp88_ = 0.0F; gfloat _tmp89_ = 0.0F; #line 60 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp54_ = d2; #line 60 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp55_ = sqrtf (_tmp54_); #line 60 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" d = _tmp55_; #line 62 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp56_ = other; #line 62 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp57_ = soy_bodies_body_get_density (_tmp56_); #line 62 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp58_ = _tmp57_; #line 62 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp59_ = other; #line 62 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp60_ = soy_bodies_body_volume (_tmp59_); #line 62 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" mm2 = _tmp58_ * _tmp60_; #line 63 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp61_ = other; #line 63 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp62_ = soy_bodies_body_get_tags (_tmp61_); #line 63 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp63_ = _tmp62_; #line 63 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp64_ = _tmp63_; #line 63 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp65_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp64_, "bmass"); #line 63 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp66_ = _tmp65_; #line 63 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _g_object_unref0 (_tmp64_); #line 63 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" if (_tmp66_) { #line 508 "Monopole.c" soybodiesBody* _tmp67_ = NULL; GeeHashMap* _tmp68_ = NULL; GeeHashMap* _tmp69_ = NULL; GeeHashMap* _tmp70_ = NULL; gpointer _tmp71_ = NULL; gfloat* _tmp72_ = NULL; #line 64 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp67_ = other; #line 64 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp68_ = soy_bodies_body_get_tags (_tmp67_); #line 64 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp69_ = _tmp68_; #line 64 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp70_ = _tmp69_; #line 64 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp71_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp70_, "bmass"); #line 64 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp72_ = (gfloat*) _tmp71_; #line 64 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" mm2 = *_tmp72_; #line 64 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _g_free0 (_tmp72_); #line 64 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _g_object_unref0 (_tmp70_); #line 533 "Monopole.c" } #line 66 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp73_ = soy_fields_monopole_get_multiplier (self); #line 66 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp74_ = _tmp73_; #line 66 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp75_ = soy_bodies_body_get_density ((soybodiesBody*) self); #line 66 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp76_ = _tmp75_; #line 66 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp77_ = soy_bodies_body_volume ((soybodiesBody*) self); #line 66 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp78_ = mm2; #line 66 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp79_ = d2; #line 66 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" f = (((_tmp74_ * _tmp76_) * _tmp77_) * _tmp78_) / _tmp79_; #line 68 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp80_ = other; #line 68 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp81_ = f; #line 68 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp82_ = xd; #line 68 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp83_ = d; #line 68 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp84_ = f; #line 68 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp85_ = yd; #line 68 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp86_ = d; #line 68 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp87_ = f; #line 68 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp88_ = zd; #line 68 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp89_ = d; #line 68 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" soy_bodies_body_addForce (_tmp80_, (dReal) ((_tmp81_ * _tmp82_) / _tmp83_), (dReal) ((_tmp84_ * _tmp85_) / _tmp86_), (dReal) ((_tmp87_ * _tmp88_) / _tmp89_)); #line 573 "Monopole.c" } #line 52 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _g_object_unref0 (other); #line 577 "Monopole.c" } #line 52 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _g_object_unref0 (_other_list); #line 581 "Monopole.c" } #line 69 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" _tmp90_ = self->priv->_affected; #line 69 "/home/jeff/Documents/libraries/libsoy/src/fields/Monopole.gs" gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp90_); #line 587 "Monopole.c" }
static void specific_items_manager_on_root_changed (SpecificItemsManager* self, GObject* newroot) { GObject* _tmp0_; DbusmenuClient* _tmp19_; DbusmenuMenuitem* _tmp20_ = NULL; DbusmenuMenuitem* _tmp21_; DbusmenuMenuitem* root; DbusmenuMenuitem* _tmp22_; DbusmenuMenuitem* _tmp23_; DbusmenuMenuitem* _tmp24_; GList* _tmp25_ = NULL; GList* _tmp26_ = NULL; GList* children; GList* _tmp27_; g_return_if_fail (self != NULL); _tmp0_ = newroot; if (_tmp0_ == NULL) { GeeArrayList* _tmp15_; GeeArrayList* _tmp16_; gint _tmp17_; gint _tmp18_; g_debug ("specific-items-manager.vala:70: root disappeared -remove proxyitems"); { GeeArrayList* _tmp1_; GeeArrayList* _tmp2_; GeeArrayList* _p_list; GeeArrayList* _tmp3_; gint _tmp4_; gint _tmp5_; gint _p_size; gint _p_index; _tmp1_ = self->priv->_proxy_items; _tmp2_ = _g_object_ref0 (_tmp1_); _p_list = _tmp2_; _tmp3_ = _p_list; _tmp4_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp3_); _tmp5_ = _tmp4_; _p_size = _tmp5_; _p_index = -1; while (TRUE) { gint _tmp6_; gint _tmp7_; gint _tmp8_; GeeArrayList* _tmp9_; gint _tmp10_; gpointer _tmp11_ = NULL; DbusmenuMenuitemProxy* p; PlayerController* _tmp12_; DbusmenuMenuitem* _tmp13_; DbusmenuMenuitemProxy* _tmp14_; _tmp6_ = _p_index; _p_index = _tmp6_ + 1; _tmp7_ = _p_index; _tmp8_ = _p_size; if (!(_tmp7_ < _tmp8_)) { break; } _tmp9_ = _p_list; _tmp10_ = _p_index; _tmp11_ = gee_abstract_list_get ((GeeAbstractList*) _tmp9_, _tmp10_); p = (DbusmenuMenuitemProxy*) _tmp11_; _tmp12_ = self->priv->_owner; _tmp13_ = _tmp12_->root_menu; _tmp14_ = p; dbusmenu_menuitem_child_delete (_tmp13_, (DbusmenuMenuitem*) _tmp14_); _g_object_unref0 (p); } _g_object_unref0 (_p_list); } _tmp15_ = self->priv->_proxy_items; gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp15_); _tmp16_ = self->priv->_proxy_items; _tmp17_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp16_); _tmp18_ = _tmp17_; g_debug ("specific-items-manager.vala:75: array list size is now %i", _tmp18_); return; } _tmp19_ = self->priv->client; _tmp20_ = dbusmenu_client_get_root (_tmp19_); _tmp21_ = _g_object_ref0 (_tmp20_); root = _tmp21_; _tmp22_ = root; g_signal_connect_object (_tmp22_, "child-added", (GCallback) _specific_items_manager_on_child_added_dbusmenu_menuitem_child_added, self, 0); _tmp23_ = root; g_signal_connect_object (_tmp23_, "child-removed", (GCallback) _specific_items_manager_on_child_removed_dbusmenu_menuitem_child_removed, self, 0); _tmp24_ = root; _tmp25_ = dbusmenu_menuitem_get_children (_tmp24_); _tmp26_ = g_list_copy (_tmp25_); children = _tmp26_; _tmp27_ = children; { GList* child_collection = NULL; GList* child_it = NULL; child_collection = _tmp27_; for (child_it = child_collection; child_it != NULL; child_it = child_it->next) { void* child = NULL; child = child_it->data; { gint _tmp28_ = 0; gint pos; void* _tmp29_; DbusmenuMenuitem* item; DbusmenuMenuitem* _tmp30_; DbusmenuMenuitemProxy* _tmp31_; DbusmenuMenuitemProxy* proxy; GeeArrayList* _tmp32_; DbusmenuMenuitemProxy* _tmp33_; DbusmenuMenuitem* _tmp34_; const gchar* _tmp35_ = NULL; PlayerController* _tmp36_; DbusmenuMenuitem* _tmp37_; DbusmenuMenuitemProxy* _tmp38_; gint _tmp39_; _tmp28_ = specific_items_manager_figure_out_positioning (self); pos = _tmp28_; _tmp29_ = child; item = DBUSMENU_MENUITEM (_tmp29_); _tmp30_ = item; _tmp31_ = dbusmenu_menuitem_proxy_new (_tmp30_); proxy = _tmp31_; _tmp32_ = self->priv->_proxy_items; _tmp33_ = proxy; gee_abstract_collection_add ((GeeAbstractCollection*) _tmp32_, _tmp33_); _tmp34_ = item; _tmp35_ = dbusmenu_menuitem_property_get (_tmp34_, DBUSMENU_MENUITEM_PROP_LABEL); g_debug ("specific-items-manager.vala:92: Proxy item of label = %s added to coll" \ "ection", _tmp35_); _tmp36_ = self->priv->_owner; _tmp37_ = _tmp36_->root_menu; _tmp38_ = proxy; _tmp39_ = pos; dbusmenu_menuitem_child_add_position (_tmp37_, (DbusmenuMenuitem*) _tmp38_, (guint) _tmp39_); _g_object_unref0 (proxy); } } } _g_list_free0 (children); _g_object_unref0 (root); }
guchar* soy_sg_k2_png_converter_get_png (soySGK2PNGConverter* self, int* result_length1) { guchar* result = NULL; guchar* data = NULL; GeeArrayList* _tmp0_ = NULL; gint _tmp1_ = 0; gint _tmp2_ = 0; guchar* _tmp3_ = NULL; gint data_length1 = 0; gint _data_size_ = 0; gint i = 0; guchar* _tmp20_ = NULL; gint _tmp20__length1 = 0; #line 46 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" g_return_val_if_fail (self != NULL, NULL); #line 47 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp0_ = self->priv->_png_data; #line 47 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp1_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp0_); #line 47 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp2_ = _tmp1_; #line 47 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp3_ = g_new0 (guchar, _tmp2_); #line 47 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" data = _tmp3_; #line 47 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" data_length1 = _tmp2_; #line 47 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _data_size_ = data_length1; #line 48 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" i = 0; #line 308 "sgk2png.c" { GeeArrayList* _character_list = NULL; GeeArrayList* _tmp4_ = NULL; GeeArrayList* _tmp5_ = NULL; gint _character_size = 0; GeeArrayList* _tmp6_ = NULL; gint _tmp7_ = 0; gint _tmp8_ = 0; gint _character_index = 0; #line 49 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp4_ = self->priv->_png_data; #line 49 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp5_ = _g_object_ref0 (_tmp4_); #line 49 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _character_list = _tmp5_; #line 49 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp6_ = _character_list; #line 49 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp7_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp6_); #line 49 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp8_ = _tmp7_; #line 49 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _character_size = _tmp8_; #line 49 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _character_index = -1; #line 49 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" while (TRUE) { #line 336 "sgk2png.c" gint _tmp9_ = 0; gint _tmp10_ = 0; gint _tmp11_ = 0; guchar character = '\0'; GeeArrayList* _tmp12_ = NULL; gint _tmp13_ = 0; gpointer _tmp14_ = NULL; guchar* _tmp15_ = NULL; gint _tmp15__length1 = 0; gint _tmp16_ = 0; guchar _tmp17_ = '\0'; guchar _tmp18_ = '\0'; gint _tmp19_ = 0; #line 49 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp9_ = _character_index; #line 49 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _character_index = _tmp9_ + 1; #line 49 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp10_ = _character_index; #line 49 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp11_ = _character_size; #line 49 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" if (!(_tmp10_ < _tmp11_)) { #line 49 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" break; #line 362 "sgk2png.c" } #line 49 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp12_ = _character_list; #line 49 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp13_ = _character_index; #line 49 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp14_ = gee_abstract_list_get ((GeeAbstractList*) _tmp12_, _tmp13_); #line 49 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" character = (guchar) ((guintptr) _tmp14_); #line 50 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp15_ = data; #line 50 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp15__length1 = data_length1; #line 50 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp16_ = i; #line 50 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp17_ = character; #line 50 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp15_[_tmp16_] = _tmp17_; #line 50 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp18_ = _tmp15_[_tmp16_]; #line 51 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp19_ = i; #line 51 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" i = _tmp19_ + 1; #line 388 "sgk2png.c" } #line 49 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _g_object_unref0 (_character_list); #line 392 "sgk2png.c" } #line 52 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp20_ = data; #line 52 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" _tmp20__length1 = data_length1; #line 52 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" if (result_length1) { #line 52 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" *result_length1 = _tmp20__length1; #line 402 "sgk2png.c" } #line 52 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" result = _tmp20_; #line 52 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs" return result; #line 408 "sgk2png.c" }
GeeArrayList* slingshot_backend_gmenu_entries_get_all (void) { GeeArrayList* result = NULL; GeeArrayList* _tmp0_; GeeArrayList* the_apps; GeeArrayList* _tmp1_ = NULL; GeeArrayList* all_categories; _tmp0_ = gee_array_list_new (G_TYPE_POINTER, (GBoxedCopyFunc) gmenu_tree_item_ref, gmenu_tree_item_unref, NULL); the_apps = _tmp0_; _tmp1_ = slingshot_backend_gmenu_entries_get_categories (); all_categories = _tmp1_; { GeeArrayList* _tmp2_; GeeArrayList* _tmp3_; GeeArrayList* _directory_list; GeeArrayList* _tmp4_; gint _tmp5_; gint _tmp6_; gint _directory_size; gint _directory_index; _tmp2_ = all_categories; _tmp3_ = _g_object_ref0 (_tmp2_); _directory_list = _tmp3_; _tmp4_ = _directory_list; _tmp5_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp4_); _tmp6_ = _tmp5_; _directory_size = _tmp6_; _directory_index = -1; while (TRUE) { gint _tmp7_; gint _tmp8_; gint _tmp9_; GeeArrayList* _tmp10_; gint _tmp11_; gpointer _tmp12_ = NULL; GMenuTreeDirectory* directory; GMenuTreeDirectory* _tmp13_; GeeArrayList* _tmp14_ = NULL; GeeArrayList* this_category_apps; _tmp7_ = _directory_index; _directory_index = _tmp7_ + 1; _tmp8_ = _directory_index; _tmp9_ = _directory_size; if (!(_tmp8_ < _tmp9_)) { break; } _tmp10_ = _directory_list; _tmp11_ = _directory_index; _tmp12_ = gee_abstract_list_get ((GeeAbstractList*) _tmp10_, _tmp11_); directory = (GMenuTreeDirectory*) _tmp12_; _tmp13_ = directory; _tmp14_ = slingshot_backend_gmenu_entries_get_applications_for_category (_tmp13_); this_category_apps = _tmp14_; { GeeArrayList* _tmp15_; GeeArrayList* _tmp16_; GeeArrayList* _this_app_list; GeeArrayList* _tmp17_; gint _tmp18_; gint _tmp19_; gint _this_app_size; gint _this_app_index; _tmp15_ = this_category_apps; _tmp16_ = _g_object_ref0 (_tmp15_); _this_app_list = _tmp16_; _tmp17_ = _this_app_list; _tmp18_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp17_); _tmp19_ = _tmp18_; _this_app_size = _tmp19_; _this_app_index = -1; while (TRUE) { gint _tmp20_; gint _tmp21_; gint _tmp22_; GeeArrayList* _tmp23_; gint _tmp24_; gpointer _tmp25_ = NULL; GMenuTreeEntry* this_app; GeeArrayList* _tmp26_; GMenuTreeEntry* _tmp27_; _tmp20_ = _this_app_index; _this_app_index = _tmp20_ + 1; _tmp21_ = _this_app_index; _tmp22_ = _this_app_size; if (!(_tmp21_ < _tmp22_)) { break; } _tmp23_ = _this_app_list; _tmp24_ = _this_app_index; _tmp25_ = gee_abstract_list_get ((GeeAbstractList*) _tmp23_, _tmp24_); this_app = (GMenuTreeEntry*) _tmp25_; _tmp26_ = the_apps; _tmp27_ = this_app; gee_abstract_collection_add ((GeeAbstractCollection*) _tmp26_, _tmp27_); _gmenu_tree_item_unref0 (this_app); } _g_object_unref0 (_this_app_list); } _g_object_unref0 (this_category_apps); _gmenu_tree_item_unref0 (directory); } _g_object_unref0 (_directory_list); } result = the_apps; _g_object_unref0 (all_categories); return result; }
static void soy_widgets_vscroll_real_render (soywidgetsWidget* base, gint x, gint y, gint width, gint height) { soywidgetsVScroll * self; gint _tmp0_; gint _x; gint _tmp1_; gint _y; gboolean _tmp23_; GLfloat* _tmp24_ = NULL; GLushort* _tmp25_ = NULL; gboolean _tmp26_ = FALSE; GLuint _tmp27_; gboolean _tmp29_; gdouble _posy; soyatomsSize* _tmp38_; gfloat _tmp39_; gfloat _tmp40_; gdouble _tmp41_; gint _tmp42_; soyatomsSize* _tmp43_; soyatomsSize* _tmp44_; soyatomsSize* _tmp45_; gfloat _tmp46_; gfloat _tmp47_; gdouble viewPort2Height; soyatomsSize* _tmp48_; soyatomsSize* _tmp49_; soyatomsSize* _tmp50_; gfloat _tmp51_; gfloat _tmp52_; gfloat _tmp53_; gboolean _tmp54_; soyatomsSize* _tmp66_; gfloat _tmp67_; gfloat _tmp68_; soyatomsPosition* _tmp69_; gfloat _tmp70_; gfloat _tmp71_; gint _tmp72_; gdouble _tmp73_; self = (soywidgetsVScroll*) base; _tmp0_ = x; _x = _tmp0_; _tmp1_ = y; _y = _tmp1_; { GeeLinkedList* _tmp2_; GeeLinkedList* _tmp3_; GeeLinkedList* _widget_list; GeeLinkedList* _tmp4_; gint _tmp5_; gint _tmp6_; gint _widget_size; gint _widget_index; _tmp2_ = ((soywidgetsContainer*) self)->children; _tmp3_ = _g_object_ref0 (_tmp2_); _widget_list = _tmp3_; _tmp4_ = _widget_list; _tmp5_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp4_); _tmp6_ = _tmp5_; _widget_size = _tmp6_; _widget_index = -1; while (TRUE) { gint _tmp7_; gint _tmp8_; gint _tmp9_; GeeLinkedList* _tmp10_; gint _tmp11_; gpointer _tmp12_ = NULL; soywidgetsWidget* widget; soywidgetsWidget* _tmp13_; gint _tmp14_; gint _tmp15_; soywidgetsWidget* _tmp16_; gint _tmp17_; soywidgetsWidget* _tmp18_; gint _tmp19_; gint _tmp20_; soywidgetsWidget* _tmp21_; gint _tmp22_; _tmp7_ = _widget_index; _widget_index = _tmp7_ + 1; _tmp8_ = _widget_index; _tmp9_ = _widget_size; if (!(_tmp8_ < _tmp9_)) { break; } _tmp10_ = _widget_list; _tmp11_ = _widget_index; _tmp12_ = gee_abstract_list_get ((GeeAbstractList*) _tmp10_, _tmp11_); widget = (soywidgetsWidget*) _tmp12_; _tmp13_ = widget; _tmp14_ = _x; _tmp15_ = _y; _tmp16_ = widget; _tmp17_ = _tmp16_->width; _tmp18_ = widget; _tmp19_ = _tmp18_->height; soy_widgets_widget_render (_tmp13_, _tmp14_, _tmp15_, _tmp17_, _tmp19_); _tmp20_ = _y; _tmp21_ = widget; _tmp22_ = _tmp21_->height; _y = _tmp20_ + _tmp22_; _g_object_unref0 (widget); } _g_object_unref0 (_widget_list); } _tmp23_ = self->priv->_hasBar; if (!_tmp23_) { return; } _tmp24_ = g_new0 (GLfloat, 20); _tmp24_[0] = (GLfloat) 0.0f; _tmp24_[1] = (GLfloat) 0.0f; _tmp24_[2] = (GLfloat) 0.0f; _tmp24_[3] = (GLfloat) 0.0f; _tmp24_[4] = (GLfloat) 0.0f; _tmp24_[5] = (GLfloat) 1.0f; _tmp24_[6] = (GLfloat) 0.0f; _tmp24_[7] = (GLfloat) 0.0f; _tmp24_[8] = (GLfloat) 1.0f; _tmp24_[9] = (GLfloat) 0.0f; _tmp24_[10] = (GLfloat) 1.0f; _tmp24_[11] = (GLfloat) 1.0f; _tmp24_[12] = (GLfloat) 0.0f; _tmp24_[13] = (GLfloat) 1.0f; _tmp24_[14] = (GLfloat) 1.0f; _tmp24_[15] = (GLfloat) 0.0f; _tmp24_[16] = (GLfloat) 1.0f; _tmp24_[17] = (GLfloat) 0.0f; _tmp24_[18] = (GLfloat) 0.0f; _tmp24_[19] = (GLfloat) 1.0f; soy_widgets_vscroll__verts = (g_free (soy_widgets_vscroll__verts), NULL); soy_widgets_vscroll__verts = _tmp24_; soy_widgets_vscroll__verts_length1 = 20; _soy_widgets_vscroll__verts_size_ = soy_widgets_vscroll__verts_length1; _tmp25_ = g_new0 (GLushort, 6); _tmp25_[0] = (GLushort) 0; _tmp25_[1] = (GLushort) 1; _tmp25_[2] = (GLushort) 2; _tmp25_[3] = (GLushort) 2; _tmp25_[4] = (GLushort) 3; _tmp25_[5] = (GLushort) 0; soy_widgets_vscroll__faces = (g_free (soy_widgets_vscroll__faces), NULL); soy_widgets_vscroll__faces = _tmp25_; soy_widgets_vscroll__faces_length1 = 6; _soy_widgets_vscroll__faces_size_ = soy_widgets_vscroll__faces_length1; _tmp27_ = self->priv->_vbuffer; if (_tmp27_ == ((GLuint) 0)) { _tmp26_ = TRUE; } else { GLuint _tmp28_; _tmp28_ = self->priv->_ibuffer; _tmp26_ = _tmp28_ == ((GLuint) 0); } _tmp29_ = _tmp26_; if (_tmp29_) { GLuint _tmp30_ = 0U; GLuint _tmp31_; GLfloat* _tmp32_; gint _tmp32__length1; GLuint _tmp33_ = 0U; GLuint _tmp34_; GLushort* _tmp35_; gint _tmp35__length1; glGenBuffers ((GLsizei) 1, &_tmp30_); self->priv->_vbuffer = _tmp30_; _tmp31_ = self->priv->_vbuffer; glBindBuffer (GL_ARRAY_BUFFER, _tmp31_); _tmp32_ = soy_widgets_vscroll__verts; _tmp32__length1 = soy_widgets_vscroll__verts_length1; glBufferData (GL_ARRAY_BUFFER, ((GLsizei) sizeof (GLfloat)) * 20, _tmp32_, GL_STATIC_DRAW); glGenBuffers ((GLsizei) 1, &_tmp33_); self->priv->_ibuffer = _tmp33_; _tmp34_ = self->priv->_ibuffer; glBindBuffer (GL_ELEMENT_ARRAY_BUFFER, _tmp34_); _tmp35_ = soy_widgets_vscroll__faces; _tmp35__length1 = soy_widgets_vscroll__faces_length1; glBufferData (GL_ELEMENT_ARRAY_BUFFER, ((GLsizei) sizeof (GLushort)) * 6, _tmp35_, GL_STATIC_DRAW); } else { GLuint _tmp36_; GLuint _tmp37_; _tmp36_ = self->priv->_vbuffer; glBindBuffer (GL_ARRAY_BUFFER, _tmp36_); _tmp37_ = self->priv->_ibuffer; glBindBuffer (GL_ELEMENT_ARRAY_BUFFER, _tmp37_); } _posy = 0.0; _tmp38_ = self->priv->_viewPort; _tmp39_ = soy_atoms_size_get_width (_tmp38_); _tmp40_ = _tmp39_; _tmp41_ = _posy; _tmp42_ = ((soywidgetsScroller*) self)->scrollbarThickness; _tmp43_ = soy_widgets_widget_get_size ((soywidgetsWidget*) self); _tmp44_ = _tmp43_; _tmp45_ = _tmp44_; _tmp46_ = soy_atoms_size_get_height (_tmp45_); _tmp47_ = _tmp46_; glViewport ((GLint) _tmp40_, (GLint) _tmp41_, (GLsizei) ((GLint) _tmp42_), (GLsizei) ((GLint) _tmp47_)); _g_object_unref0 (_tmp45_); glMatrixMode (GL_PROJECTION); glLoadIdentity (); glOrthof ((GLfloat) 0.0f, (GLfloat) 1.0f, (GLfloat) 1.0f, (GLfloat) 0.0f, (GLfloat) (-1.0f), (GLfloat) 1.0f); glMatrixMode (GL_MODELVIEW); glLoadIdentity (); glDisableClientState (GL_NORMAL_ARRAY); glVertexPointer ((GLint) 3, GL_FLOAT, (GLsizei) 20, (void*) 0); glDrawElements (GL_TRIANGLES, (GLsizei) 6, GL_UNSIGNED_SHORT, (void*) 0); glColor4f ((GLfloat) 0, (GLfloat) 1, (GLfloat) 0, (GLfloat) 1); viewPort2Height = 0.0; _tmp48_ = soy_widgets_widget_get_size ((soywidgetsWidget*) self); _tmp49_ = _tmp48_; _tmp50_ = _tmp49_; _tmp51_ = soy_atoms_size_get_height (_tmp50_); _tmp52_ = _tmp51_; _tmp53_ = self->priv->_totalHeight; _tmp54_ = _tmp52_ < _tmp53_; _g_object_unref0 (_tmp50_); if (_tmp54_) { soyatomsSize* _tmp55_; soyatomsSize* _tmp56_; soyatomsSize* _tmp57_; gfloat _tmp58_; gfloat _tmp59_; gfloat _tmp60_; soyatomsSize* _tmp61_; soyatomsSize* _tmp62_; soyatomsSize* _tmp63_; gfloat _tmp64_; gfloat _tmp65_; _tmp55_ = soy_widgets_widget_get_size ((soywidgetsWidget*) self); _tmp56_ = _tmp55_; _tmp57_ = _tmp56_; _tmp58_ = soy_atoms_size_get_height (_tmp57_); _tmp59_ = _tmp58_; _tmp60_ = self->priv->_totalHeight; _tmp61_ = soy_widgets_widget_get_size ((soywidgetsWidget*) self); _tmp62_ = _tmp61_; _tmp63_ = _tmp62_; _tmp64_ = soy_atoms_size_get_height (_tmp63_); _tmp65_ = _tmp64_; viewPort2Height = (gdouble) ((_tmp59_ / _tmp60_) * _tmp65_); _g_object_unref0 (_tmp63_); _g_object_unref0 (_tmp57_); } _tmp66_ = self->priv->_viewPort; _tmp67_ = soy_atoms_size_get_width (_tmp66_); _tmp68_ = _tmp67_; _tmp69_ = ((soywidgetsScroller*) self)->scrollPosition; _tmp70_ = soy_atoms_position_get_y (_tmp69_); _tmp71_ = _tmp70_; _tmp72_ = ((soywidgetsScroller*) self)->scrollbarThickness; _tmp73_ = viewPort2Height; glViewport ((GLint) _tmp68_, (GLint) _tmp71_, (GLsizei) ((GLint) _tmp72_), (GLsizei) ((GLint) _tmp73_)); glDrawElements (GL_TRIANGLES, (GLsizei) 6, GL_UNSIGNED_SHORT, (void*) 0); glColor4f ((GLfloat) 1, (GLfloat) 1, (GLfloat) 1, (GLfloat) 1); }
static void soy_widgets_vscroll_real_resize_children (soywidgetsContainer* base, gint x, gint y, gint width, gint height) { soywidgetsVScroll * self; gfloat _tmp39_; soyatomsSize* _tmp40_; soyatomsSize* _tmp41_; soyatomsSize* _tmp42_; gfloat _tmp43_; gfloat _tmp44_; gboolean _tmp45_; gfloat viewPortHeight; gboolean _tmp81_; gfloat viewPortWidth; gboolean _tmp88_; soyatomsSize* _tmp100_; gfloat _tmp101_; soyatomsSize* _tmp102_; gfloat _tmp103_; soyatomsSize* _tmp104_; soyatomsSize* _tmp105_; soyatomsSize* _tmp106_; gfloat _tmp107_; gfloat _tmp108_; gfloat _tmp109_; gboolean _tmp110_; soyatomsPosition* _tmp122_; soyatomsSize* _tmp123_; gfloat _tmp124_; gfloat _tmp125_; soyatomsPosition* _tmp126_; soyatomsSize* _tmp127_; gfloat _tmp128_; gfloat _tmp129_; gfloat _tmp130_; gint _tmp131_; gfloat _tmp132_; soyatomsSize* _tmp133_; self = (soywidgetsVScroll*) base; self->priv->_totalHeight = 0.0f; { GeeLinkedList* _tmp0_; GeeLinkedList* _tmp1_; GeeLinkedList* _widget_list; GeeLinkedList* _tmp2_; gint _tmp3_; gint _tmp4_; gint _widget_size; gint _widget_index; _tmp0_ = ((soywidgetsContainer*) self)->children; _tmp1_ = _g_object_ref0 (_tmp0_); _widget_list = _tmp1_; _tmp2_ = _widget_list; _tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_); _tmp4_ = _tmp3_; _widget_size = _tmp4_; _widget_index = -1; while (TRUE) { gint _tmp5_; gint _tmp6_; gint _tmp7_; GeeLinkedList* _tmp8_; gint _tmp9_; gpointer _tmp10_ = NULL; soywidgetsWidget* widget; gfloat _tmp11_; soywidgetsWidget* _tmp12_; soyatomsSize* _tmp13_; soyatomsSize* _tmp14_; soyatomsSize* _tmp15_; gfloat _tmp16_; gfloat _tmp17_; soywidgetsWidget* _tmp18_; soyatomsSize* _tmp19_; soyatomsSize* _tmp20_; soyatomsSize* _tmp21_; gfloat _tmp22_; gfloat _tmp23_; soyatomsSize* _tmp24_; soyatomsSize* _tmp25_; soyatomsSize* _tmp26_; gfloat _tmp27_; gfloat _tmp28_; gboolean _tmp29_; _tmp5_ = _widget_index; _widget_index = _tmp5_ + 1; _tmp6_ = _widget_index; _tmp7_ = _widget_size; if (!(_tmp6_ < _tmp7_)) { break; } _tmp8_ = _widget_list; _tmp9_ = _widget_index; _tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_); widget = (soywidgetsWidget*) _tmp10_; _tmp11_ = self->priv->_totalHeight; _tmp12_ = widget; _tmp13_ = soy_widgets_widget_get_size (_tmp12_); _tmp14_ = _tmp13_; _tmp15_ = _tmp14_; _tmp16_ = soy_atoms_size_get_height (_tmp15_); _tmp17_ = _tmp16_; self->priv->_totalHeight = _tmp11_ + _tmp17_; _g_object_unref0 (_tmp15_); _tmp18_ = widget; _tmp19_ = soy_widgets_widget_get_size (_tmp18_); _tmp20_ = _tmp19_; _tmp21_ = _tmp20_; _tmp22_ = soy_atoms_size_get_width (_tmp21_); _tmp23_ = _tmp22_; _tmp24_ = soy_widgets_widget_get_size ((soywidgetsWidget*) self); _tmp25_ = _tmp24_; _tmp26_ = _tmp25_; _tmp27_ = soy_atoms_size_get_width (_tmp26_); _tmp28_ = _tmp27_; _tmp29_ = _tmp23_ > _tmp28_; _g_object_unref0 (_tmp26_); _g_object_unref0 (_tmp21_); if (_tmp29_) { soywidgetsWidget* _tmp30_; soyatomsSize* _tmp31_; soyatomsSize* _tmp32_; soyatomsSize* _tmp33_; soyatomsSize* _tmp34_; soyatomsSize* _tmp35_; soyatomsSize* _tmp36_; gfloat _tmp37_; gfloat _tmp38_; _tmp30_ = widget; _tmp31_ = soy_widgets_widget_get_size (_tmp30_); _tmp32_ = _tmp31_; _tmp33_ = _tmp32_; _tmp34_ = soy_widgets_widget_get_size ((soywidgetsWidget*) self); _tmp35_ = _tmp34_; _tmp36_ = _tmp35_; _tmp37_ = soy_atoms_size_get_width (_tmp36_); _tmp38_ = _tmp37_; soy_atoms_size_set_width (_tmp33_, _tmp38_); _g_object_unref0 (_tmp36_); _g_object_unref0 (_tmp33_); } _g_object_unref0 (widget); } _g_object_unref0 (_widget_list); } _tmp39_ = self->priv->_totalHeight; _tmp40_ = soy_widgets_widget_get_size ((soywidgetsWidget*) self); _tmp41_ = _tmp40_; _tmp42_ = _tmp41_; _tmp43_ = soy_atoms_size_get_height (_tmp42_); _tmp44_ = _tmp43_; _tmp45_ = _tmp39_ > _tmp44_; _g_object_unref0 (_tmp42_); if (_tmp45_) { self->priv->_hasBar = TRUE; { GeeLinkedList* _tmp46_; GeeLinkedList* _tmp47_; GeeLinkedList* _widget_list; GeeLinkedList* _tmp48_; gint _tmp49_; gint _tmp50_; gint _widget_size; gint _widget_index; _tmp46_ = ((soywidgetsContainer*) self)->children; _tmp47_ = _g_object_ref0 (_tmp46_); _widget_list = _tmp47_; _tmp48_ = _widget_list; _tmp49_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp48_); _tmp50_ = _tmp49_; _widget_size = _tmp50_; _widget_index = -1; while (TRUE) { gint _tmp51_; gint _tmp52_; gint _tmp53_; GeeLinkedList* _tmp54_; gint _tmp55_; gpointer _tmp56_ = NULL; soywidgetsWidget* widget; soywidgetsWidget* _tmp57_; soyatomsSize* _tmp58_; soyatomsSize* _tmp59_; soyatomsSize* _tmp60_; gfloat _tmp61_; gfloat _tmp62_; soyatomsSize* _tmp63_; soyatomsSize* _tmp64_; soyatomsSize* _tmp65_; gfloat _tmp66_; gfloat _tmp67_; gint _tmp68_; gboolean _tmp69_; _tmp51_ = _widget_index; _widget_index = _tmp51_ + 1; _tmp52_ = _widget_index; _tmp53_ = _widget_size; if (!(_tmp52_ < _tmp53_)) { break; } _tmp54_ = _widget_list; _tmp55_ = _widget_index; _tmp56_ = gee_abstract_list_get ((GeeAbstractList*) _tmp54_, _tmp55_); widget = (soywidgetsWidget*) _tmp56_; _tmp57_ = widget; _tmp58_ = soy_widgets_widget_get_size (_tmp57_); _tmp59_ = _tmp58_; _tmp60_ = _tmp59_; _tmp61_ = soy_atoms_size_get_width (_tmp60_); _tmp62_ = _tmp61_; _tmp63_ = soy_widgets_widget_get_size ((soywidgetsWidget*) self); _tmp64_ = _tmp63_; _tmp65_ = _tmp64_; _tmp66_ = soy_atoms_size_get_width (_tmp65_); _tmp67_ = _tmp66_; _tmp68_ = ((soywidgetsScroller*) self)->scrollbarThickness; _tmp69_ = _tmp62_ >= (_tmp67_ - _tmp68_); _g_object_unref0 (_tmp65_); _g_object_unref0 (_tmp60_); if (_tmp69_) { soywidgetsWidget* _tmp70_; soyatomsSize* _tmp71_; soyatomsSize* _tmp72_; soyatomsSize* _tmp73_; soywidgetsWidget* _tmp74_; soyatomsSize* _tmp75_; soyatomsSize* _tmp76_; soyatomsSize* _tmp77_; gfloat _tmp78_; gfloat _tmp79_; gint _tmp80_; _tmp70_ = widget; _tmp71_ = soy_widgets_widget_get_size (_tmp70_); _tmp72_ = _tmp71_; _tmp73_ = _tmp72_; _tmp74_ = widget; _tmp75_ = soy_widgets_widget_get_size (_tmp74_); _tmp76_ = _tmp75_; _tmp77_ = _tmp76_; _tmp78_ = soy_atoms_size_get_width (_tmp77_); _tmp79_ = _tmp78_; _tmp80_ = ((soywidgetsScroller*) self)->scrollbarThickness; soy_atoms_size_set_width (_tmp77_, _tmp79_ - _tmp80_); _g_object_unref0 (_tmp77_); _g_object_unref0 (_tmp73_); } _g_object_unref0 (widget); } _g_object_unref0 (_widget_list); } } viewPortHeight = 0.0f; _tmp81_ = self->priv->_hasBar; if (_tmp81_) { soyatomsSize* _tmp82_; soyatomsSize* _tmp83_; soyatomsSize* _tmp84_; gfloat _tmp85_; gfloat _tmp86_; _tmp82_ = soy_widgets_widget_get_size ((soywidgetsWidget*) self); _tmp83_ = _tmp82_; _tmp84_ = _tmp83_; _tmp85_ = soy_atoms_size_get_height (_tmp84_); _tmp86_ = _tmp85_; viewPortHeight = _tmp86_; _g_object_unref0 (_tmp84_); } else { gfloat _tmp87_; _tmp87_ = self->priv->_totalHeight; viewPortHeight = _tmp87_; } viewPortWidth = 0.0f; _tmp88_ = self->priv->_hasBar; if (_tmp88_) { soyatomsSize* _tmp89_; soyatomsSize* _tmp90_; soyatomsSize* _tmp91_; gfloat _tmp92_; gfloat _tmp93_; gint _tmp94_; _tmp89_ = soy_widgets_widget_get_size ((soywidgetsWidget*) self); _tmp90_ = _tmp89_; _tmp91_ = _tmp90_; _tmp92_ = soy_atoms_size_get_width (_tmp91_); _tmp93_ = _tmp92_; _tmp94_ = ((soywidgetsScroller*) self)->scrollbarThickness; viewPortWidth = _tmp93_ - _tmp94_; _g_object_unref0 (_tmp91_); } else { soyatomsSize* _tmp95_; soyatomsSize* _tmp96_; soyatomsSize* _tmp97_; gfloat _tmp98_; gfloat _tmp99_; _tmp95_ = soy_widgets_widget_get_size ((soywidgetsWidget*) self); _tmp96_ = _tmp95_; _tmp97_ = _tmp96_; _tmp98_ = soy_atoms_size_get_width (_tmp97_); _tmp99_ = _tmp98_; viewPortWidth = _tmp99_; _g_object_unref0 (_tmp97_); } _tmp100_ = self->priv->_viewPort; _tmp101_ = viewPortWidth; soy_atoms_size_set_width (_tmp100_, _tmp101_); _tmp102_ = self->priv->_viewPort; _tmp103_ = viewPortHeight; soy_atoms_size_set_height (_tmp102_, _tmp103_); _tmp104_ = soy_widgets_widget_get_size ((soywidgetsWidget*) self); _tmp105_ = _tmp104_; _tmp106_ = _tmp105_; _tmp107_ = soy_atoms_size_get_height (_tmp106_); _tmp108_ = _tmp107_; _tmp109_ = self->priv->_totalHeight; _tmp110_ = _tmp108_ >= _tmp109_; _g_object_unref0 (_tmp106_); if (_tmp110_) { self->priv->_scrollHeight = (gfloat) 0; } else { soyatomsSize* _tmp111_; soyatomsSize* _tmp112_; soyatomsSize* _tmp113_; gfloat _tmp114_; gfloat _tmp115_; gfloat _tmp116_; soyatomsSize* _tmp117_; soyatomsSize* _tmp118_; soyatomsSize* _tmp119_; gfloat _tmp120_; gfloat _tmp121_; _tmp111_ = soy_widgets_widget_get_size ((soywidgetsWidget*) self); _tmp112_ = _tmp111_; _tmp113_ = _tmp112_; _tmp114_ = soy_atoms_size_get_height (_tmp113_); _tmp115_ = _tmp114_; _tmp116_ = self->priv->_totalHeight; _tmp117_ = soy_widgets_widget_get_size ((soywidgetsWidget*) self); _tmp118_ = _tmp117_; _tmp119_ = _tmp118_; _tmp120_ = soy_atoms_size_get_height (_tmp119_); _tmp121_ = _tmp120_; self->priv->_scrollHeight = (_tmp115_ / _tmp116_) * _tmp121_; _g_object_unref0 (_tmp119_); _g_object_unref0 (_tmp113_); } _tmp122_ = ((soywidgetsScroller*) self)->scrollPosition; _tmp123_ = self->priv->_viewPort; _tmp124_ = soy_atoms_size_get_width (_tmp123_); _tmp125_ = _tmp124_; soy_atoms_position_set_x (_tmp122_, _tmp125_); _tmp126_ = ((soywidgetsScroller*) self)->scrollPosition; _tmp127_ = self->priv->_viewPort; _tmp128_ = soy_atoms_size_get_height (_tmp127_); _tmp129_ = _tmp128_; _tmp130_ = self->priv->_scrollHeight; soy_atoms_position_set_y (_tmp126_, _tmp129_ - _tmp130_); _tmp131_ = ((soywidgetsScroller*) self)->scrollbarThickness; _tmp132_ = self->priv->_scrollHeight; _tmp133_ = soy_atoms_size_new ((gfloat) _tmp131_, _tmp132_, 0.0f); _g_object_unref0 (((soywidgetsScroller*) self)->scrollbarSize); ((soywidgetsScroller*) self)->scrollbarSize = _tmp133_; }
static GtkIconView* graph_media_modelos_sentimientos_real_filtrar (GraphMediaModelosFiltrable* base, const gchar* consulta, gint lim) { GraphMediaModelosSentimientos * self; GtkIconView* result = NULL; Block9Data* _data9_; GeeArrayList* sentimientos = NULL; GeeArrayList* _tmp0_ = NULL; GtkListStore* _tmp1_ = NULL; GtkListStore* _tmp2_ = NULL; GtkIconView* _tmp3_ = NULL; GtkIconView* _tmp4_ = NULL; GtkIconView* _tmp5_ = NULL; GtkIconView* _tmp6_ = NULL; GtkIconView* _tmp28_ = NULL; GtkIconView* _tmp29_ = NULL; GtkIconView* _tmp30_ = NULL; self = (GraphMediaModelosSentimientos*) base; g_return_val_if_fail (consulta != NULL, NULL); _data9_ = g_slice_new0 (Block9Data); _data9_->_ref_count_ = 1; _data9_->self = g_object_ref (self); _tmp0_ = graph_media_modelos_sentimientos_lista_sentimientos (self); sentimientos = _tmp0_; _tmp1_ = gtk_list_store_new (3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_INT64, -1); _data9_->model = _tmp1_; _tmp2_ = _data9_->model; _tmp3_ = (GtkIconView*) gtk_icon_view_new_with_model ((GtkTreeModel*) _tmp2_); g_object_ref_sink (_tmp3_); _data9_->vista = _tmp3_; _tmp4_ = _data9_->vista; gtk_icon_view_set_pixbuf_column (_tmp4_, 0); _tmp5_ = _data9_->vista; gtk_icon_view_set_text_column (_tmp5_, 1); _tmp6_ = _data9_->vista; gtk_icon_view_set_item_width (_tmp6_, 120); memset (&_data9_->iter, 0, sizeof (GtkTreeIter)); { GeeArrayList* _a_list = NULL; GeeArrayList* _tmp7_ = NULL; GeeArrayList* _tmp8_ = NULL; gint _a_size = 0; GeeArrayList* _tmp9_ = NULL; gint _tmp10_ = 0; gint _tmp11_ = 0; gint _a_index = 0; _tmp7_ = sentimientos; _tmp8_ = _g_object_ref0 (_tmp7_); _a_list = _tmp8_; _tmp9_ = _a_list; _tmp10_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp9_); _tmp11_ = _tmp10_; _a_size = _tmp11_; _a_index = -1; while (TRUE) { gint _tmp12_ = 0; gint _tmp13_ = 0; gint _tmp14_ = 0; GraphMediaModelosSentimiento* a = NULL; GeeArrayList* _tmp15_ = NULL; gint _tmp16_ = 0; gpointer _tmp17_ = NULL; GtkListStore* _tmp18_ = NULL; GtkTreeIter _tmp19_ = {0}; GtkListStore* _tmp20_ = NULL; GtkTreeIter _tmp21_ = {0}; GdkPixbuf* _tmp22_ = NULL; GdkPixbuf* _tmp23_ = NULL; GraphMediaModelosSentimiento* _tmp24_ = NULL; const gchar* _tmp25_ = NULL; GraphMediaModelosSentimiento* _tmp26_ = NULL; gint64 _tmp27_ = 0LL; _tmp12_ = _a_index; _a_index = _tmp12_ + 1; _tmp13_ = _a_index; _tmp14_ = _a_size; if (!(_tmp13_ < _tmp14_)) { break; } _tmp15_ = _a_list; _tmp16_ = _a_index; _tmp17_ = gee_abstract_list_get ((GeeAbstractList*) _tmp15_, _tmp16_); a = (GraphMediaModelosSentimiento*) _tmp17_; _tmp18_ = _data9_->model; gtk_list_store_append (_tmp18_, &_tmp19_); _data9_->iter = _tmp19_; _tmp20_ = _data9_->model; _tmp21_ = _data9_->iter; _tmp22_ = graph_media_modelos_filtrable_cargar_icono_ubicacion ((GraphMediaModelosFiltrable*) self, "sentimiento", GRAPH_MEDIA_MODELOS_APP_GUI_TAM_ICONO, GRAPH_MEDIA_MODELOS_APP_GUI_TAM_ICONO); _tmp23_ = _tmp22_; _tmp24_ = a; _tmp25_ = _tmp24_->nombre; _tmp26_ = a; _tmp27_ = _tmp26_->id; gtk_list_store_set (_tmp20_, &_tmp21_, 0, _tmp23_, 1, _tmp25_, 2, _tmp27_, -1); _g_object_unref0 (_tmp23_); _graph_media_modelos_sentimiento_unref0 (a); } _g_object_unref0 (_a_list); } _tmp28_ = _data9_->vista; g_signal_connect_data (_tmp28_, "selection-changed", (GCallback) ___lambda5__gtk_icon_view_selection_changed, block9_data_ref (_data9_), (GClosureNotify) block9_data_unref, 0); _tmp29_ = _data9_->vista; _tmp30_ = _g_object_ref0 (_tmp29_); result = _tmp30_; _g_object_unref0 (sentimientos); block9_data_unref (_data9_); _data9_ = NULL; return result; }