Exemple #1
0
soyatomsSize* soy_bodies_box_get_size (soybodiesBox* self) {
	soyatomsSize* result;
	soyatomsSize* _tmp0_;
	soyatomsSize* _tmp1_;
	soyatomsSize* value;
	soyatomsSize* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_size_obj;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	value = _tmp1_;
	_tmp2_ = value;
	if (_tmp2_ == NULL) {
		GLfloat _tmp3_;
		GLfloat _tmp4_;
		GLfloat _tmp5_;
		soyatomsSize* _tmp6_;
		soyatomsSize* _tmp7_;
		soyatomsSize* _tmp8_;
		soyatomsSize* _tmp9_;
		_tmp3_ = self->priv->_width;
		_tmp4_ = self->priv->_height;
		_tmp5_ = self->priv->_depth;
		_tmp6_ = soy_atoms_size_new ((gfloat) _tmp3_, (gfloat) _tmp4_, (gfloat) _tmp5_);
		_g_object_unref0 (value);
		value = _tmp6_;
		_tmp7_ = value;
		g_signal_connect_object (_tmp7_, "on-set", (GCallback) __soy_bodies_box_size_set_soy_atoms_size_on_set, self, 0);
		_tmp8_ = value;
		g_object_weak_ref ((GObject*) _tmp8_, __soy_bodies_box_size_weak_gweak_notify, self);
		_tmp9_ = value;
		self->priv->_size_obj = _tmp9_;
	}
	result = value;
	return result;
}
Exemple #2
0
static PyObject*
tp_new (PyTypeObject* type, PyObject* args, PyObject* kwds) {
    SELF self;
    float width, height, depth = 0;

    // Ensure no keywords were given
    if (!_PyArg_NoKeywords("soy.atoms.Size", kwds));

    // Try to parse 2 or 3 dimensions
    if (!PyArg_ParseTuple(args, "(ff)", &width, &height)) {
        PyErr_Clear();
        if (!PyArg_ParseTuple(args, "(fff)", &width, &height, &depth))
            return NULL;
    }

    // inherit base type
    self = (SELF) PyType_GenericNew(type, args, kwds);
    if (!self)
        return NULL;

    // new gobject
    self->g = soy_atoms_size_new(width, height, depth);

    // return self
    return (PyObject*) self;
}
Exemple #3
0
static void soy_widgets_vbox_real_remove (soywidgetsWidget* base) {
	soywidgetsVBox * self;
	soyatomsSize* _tmp0_;
	soyatomsSize* _tmp1_;
	self = (soywidgetsVBox*) base;
	_tmp0_ = soy_atoms_size_new ((gfloat) 0, (gfloat) 0, (gfloat) 0);
	_tmp1_ = _tmp0_;
	soy_widgets_widget_set_size ((soywidgetsWidget*) self, _tmp1_);
	_g_object_unref0 (_tmp1_);
}
Exemple #4
0
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;
}
Exemple #5
0
static PyObject*
tp_new (PyTypeObject* type, PyObject* args, PyObject* kwds) {
    SELF self;
    PyObject* py_position = NULL;
    PyObject* py_size = NULL;
    PySoy_materials_Material_Object* py_material = NULL;
    soyatomsPosition* position = NULL;
    soyatomsSize* size = NULL;
    soymaterialsMaterial* material = NULL;
    float x, y, z;

    static char* kw[] = {"position", "size", "material", NULL};

    // Parse arguments
    if (!PyArg_ParseTupleAndKeywords(
            args, kwds, "|OOO!", kw,
            &py_position,
            &py_size,
            &PySoy_materials_Material_Type, &py_material))
        return NULL;

    // Parse py_position if its neither NULL or a Position type
    if (py_position) {
        if (PySoy_atoms_Position_Check(py_position)) {
            position = (soyatomsPosition*) ((PySoy__G_Object*) py_position)->g;
            g_object_ref(position);
        }
        else {
            if (!PyArg_ParseTuple(py_position, "fff", &x, &y, &z)) {
                PyErr_SetString(PyExc_ValueError,
                                "Argument 1 must be either a soy.atoms.Position or a sequence of 3 floats");
                return NULL;
            }
            position = soy_atoms_position_new(x, y, z);
        }
    }

    // Parse py_size if its neither NULL or a Size type
    if (py_size) {
        if (PySoy_atoms_Size_Check(py_size)) {
            size = (soyatomsSize*) ((PySoy__G_Object*) py_size)->g;
            g_object_ref(size);
        }
        else {
            if (!PyArg_ParseTuple(py_size, "fff", &x, &y, &z)) {
                PyErr_SetString(PyExc_ValueError,
                                "Argument 2 must be either a soy.atoms.Size or a sequence of 3 floats");
                return NULL;
            }
            size = soy_atoms_size_new(x, y, z);
        }
    }

    // Grab material's gobject
    material = (py_material) ? py_material->g : NULL;

    // inherit base type
    self = (SELF) PyType_GenericNew(type, args, kwds);
    if (!self)
      return NULL;

    // new gobject
    self->g = soy_bodies_box_new(position, size, material);

    // unref position and size
    if (position) g_object_unref(position);
    if (size) g_object_unref(size);

    // return self
    return (PyObject*) self;
}
Exemple #6
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);
	}
}
Exemple #7
0
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_;
}