soywidgetsHScroll* soy_widgets_hscroll_construct (GType object_type, soywidgetsContainer* parent) { soywidgetsHScroll * self = NULL; soywidgetsContainer* _tmp0_; soyatomsSize* _tmp1_; soyatomsSize* _tmp2_; soyatomsSize* _tmp3_; gfloat _tmp4_; gfloat _tmp5_; soyatomsSize* _tmp6_; soyatomsSize* _tmp7_; soyatomsSize* _tmp8_; gfloat _tmp9_; gfloat _tmp10_; soyatomsSize* _tmp11_; soyatomsPosition* _tmp12_; soyatomsPosition* _tmp13_; _tmp0_ = parent; self = (soywidgetsHScroll*) soy_widgets_scroller_construct (object_type, _tmp0_); _tmp1_ = soy_widgets_widget_get_size ((soywidgetsWidget*) self); _tmp2_ = _tmp1_; _tmp3_ = _tmp2_; _tmp4_ = soy_atoms_size_get_width (_tmp3_); _tmp5_ = _tmp4_; _tmp6_ = soy_widgets_widget_get_size ((soywidgetsWidget*) self); _tmp7_ = _tmp6_; _tmp8_ = _tmp7_; _tmp9_ = soy_atoms_size_get_height (_tmp8_); _tmp10_ = _tmp9_; _tmp11_ = soy_atoms_size_new (_tmp5_, _tmp10_, 0.0f); _g_object_unref0 (self->priv->_viewPort); self->priv->_viewPort = _tmp11_; _g_object_unref0 (_tmp8_); _g_object_unref0 (_tmp3_); self->priv->_hasBar = FALSE; _tmp12_ = soy_atoms_position_new (0.0f, 0.0f, 0.0f); _g_object_unref0 (self->priv->_testpos); self->priv->_testpos = _tmp12_; _tmp13_ = soy_atoms_position_new (0.0f, 0.0f, 0.0f); _g_object_unref0 (((soywidgetsScroller*) self)->scrollPosition); ((soywidgetsScroller*) self)->scrollPosition = _tmp13_; return self; }
static int nb_bool (SELF self) { soyatomsSize* size = soy_widgets_widget_get_size((soywidgetsWidget*) self->g); int ret; // Window is open when width > 0 ret = soy_atoms_size_get_width(size); // Decref size before returning g_object_unref(size); return ret; }
static void soy_widgets_vbox_real_add (soywidgetsWidget* base, soywidgetsContainer* parent) { soywidgetsVBox * self; soywidgetsContainer* _tmp0_; soyatomsSize* _tmp1_; soyatomsSize* _tmp2_; soyatomsSize* _tmp3_; self = (soywidgetsVBox*) base; g_return_if_fail (parent != NULL); _tmp0_ = parent; _tmp1_ = soy_widgets_widget_get_size ((soywidgetsWidget*) _tmp0_); _tmp2_ = _tmp1_; _tmp3_ = _tmp2_; soy_widgets_widget_set_size ((soywidgetsWidget*) self, _tmp3_); _g_object_unref0 (_tmp3_); }
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 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); }