Exemple #1
0
static PyObject*
tp_str (SELF self) {
	char* str;
	PyObject* ret;

	str = g_strdup_printf("<Area ((%f, %f), (%f, %f))>",
						  soy_atoms_area_get_x1(self->g),
						  soy_atoms_area_get_y1(self->g),
						  soy_atoms_area_get_x2(self->g),
						  soy_atoms_area_get_y2(self->g));
	ret = PyUnicode_FromString(str);

	g_free(str);
	return ret;
}
Exemple #2
0
static void _vala_soy_atoms_area_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	soyatomsArea * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SOY_ATOMS_TYPE_AREA, soyatomsArea);
	switch (property_id) {
		case SOY_ATOMS_AREA_X1:
		g_value_set_float (value, soy_atoms_area_get_x1 (self));
		break;
		case SOY_ATOMS_AREA_Y1:
		g_value_set_float (value, soy_atoms_area_get_y1 (self));
		break;
		case SOY_ATOMS_AREA_X2:
		g_value_set_float (value, soy_atoms_area_get_x2 (self));
		break;
		case SOY_ATOMS_AREA_Y2:
		g_value_set_float (value, soy_atoms_area_get_y2 (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}
Exemple #3
0
static void _vala_soy_atoms_area_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	soyatomsArea * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SOY_ATOMS_TYPE_AREA, soyatomsArea);
#line 25 "/home/jeff/Documents/libraries/libsoy/src/atoms/Area.gs"
	switch (property_id) {
#line 25 "/home/jeff/Documents/libraries/libsoy/src/atoms/Area.gs"
		case SOY_ATOMS_AREA_X1:
#line 25 "/home/jeff/Documents/libraries/libsoy/src/atoms/Area.gs"
		g_value_set_float (value, soy_atoms_area_get_x1 (self));
#line 25 "/home/jeff/Documents/libraries/libsoy/src/atoms/Area.gs"
		break;
#line 25 "/home/jeff/Documents/libraries/libsoy/src/atoms/Area.gs"
		case SOY_ATOMS_AREA_Y1:
#line 25 "/home/jeff/Documents/libraries/libsoy/src/atoms/Area.gs"
		g_value_set_float (value, soy_atoms_area_get_y1 (self));
#line 25 "/home/jeff/Documents/libraries/libsoy/src/atoms/Area.gs"
		break;
#line 25 "/home/jeff/Documents/libraries/libsoy/src/atoms/Area.gs"
		case SOY_ATOMS_AREA_X2:
#line 25 "/home/jeff/Documents/libraries/libsoy/src/atoms/Area.gs"
		g_value_set_float (value, soy_atoms_area_get_x2 (self));
#line 25 "/home/jeff/Documents/libraries/libsoy/src/atoms/Area.gs"
		break;
#line 25 "/home/jeff/Documents/libraries/libsoy/src/atoms/Area.gs"
		case SOY_ATOMS_AREA_Y2:
#line 25 "/home/jeff/Documents/libraries/libsoy/src/atoms/Area.gs"
		g_value_set_float (value, soy_atoms_area_get_y2 (self));
#line 25 "/home/jeff/Documents/libraries/libsoy/src/atoms/Area.gs"
		break;
#line 358 "Area.c"
		default:
#line 25 "/home/jeff/Documents/libraries/libsoy/src/atoms/Area.gs"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 25 "/home/jeff/Documents/libraries/libsoy/src/atoms/Area.gs"
		break;
#line 364 "Area.c"
	}
}