eo_prefix: efl_gfx;
methods {
@property position {
+ [[The 2D position of a canvas object.
+
+ The position is absolute, in pixels, relative to the top-left corner
+ of the window, within its border decorations (application space).
+ ]]
set {
- [[Move the given Evas object to the given location inside its
+ [[Moves the given Evas object to the given location inside its
canvas' viewport.
]]
}
}
}
@property size {
+ [[The 2D size of a canvas object.]]
set {
- [[Changes the size of the given Evas object.]]
+ [[Changes the size of the given object.
+
+ Note that setting the actual size of an object might be the job
+ of its container, so this function might have no effect.
+ Look at $Efl.Gfx.Size.Hint instead, when manipulating
+ widgets.
+ ]]
}
get {
[[Retrieves the (rectangular) size of the given Evas object.]]
h: int;
}
}
+ @property geometry {
+ [[Rectangular geometry that combines both position and size.]]
+ values {
+ x: int;
+ y: int;
+ w: int;
+ h: int;
+ }
+ }
@property color {
set {
[[Sets the general/main color of the given Evas object to the given
eo_destructor(eo_super(eo_obj, MY_CLASS));
}
+EOLIAN static void
+_evas_object_efl_gfx_geometry_set(Eo *obj, Evas_Object_Protected_Data *pd EINA_UNUSED,
+ int x, int y, int w, int h)
+{
+ efl_gfx_position_set(obj, x, y);
+ efl_gfx_size_set(obj, w, h);
+}
+
EAPI void
evas_object_geometry_set(Evas_Object *eo_obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
{
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
return;
MAGIC_CHECK_END();
- efl_gfx_position_set(eo_obj, x, y);
- efl_gfx_size_set(eo_obj, w, h);
+ efl_gfx_geometry_set(eo_obj, x, y, w, h);
}
EAPI void
evas_object_inform_call_resize(eo_obj);
}
+EOLIAN void
+_evas_object_efl_gfx_geometry_get(Eo *obj, Evas_Object_Protected_Data *pd EINA_UNUSED,
+ int *x, int *y, int *w, int *h)
+{
+ efl_gfx_position_get(obj, x, y);
+ efl_gfx_size_get(obj, w, h);
+}
+
EAPI void
evas_object_geometry_get(const Evas_Object *eo_obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
{
if (h) *h = 0;
return;
MAGIC_CHECK_END();
- efl_gfx_position_get((Eo *)eo_obj, x, y);
- efl_gfx_size_get((Eo *)eo_obj, w, h);
+ efl_gfx_geometry_get(eo_obj, x, y, w, h);
}
EOLIAN static void
if (h) *h = r.h;
}
+EOLIAN static void
+_efl_vg_efl_gfx_geometry_get(Eo *obj, Efl_VG_Data *pd EINA_UNUSED,
+ int *x, int *y, int *w, int *h)
+{
+ efl_gfx_position_get(obj, x, y);
+ efl_gfx_size_get(obj, w, h);
+}
+
// Parent should be a container otherwise dismissing the stacking operation
static Eina_Bool
_efl_vg_parent_checked_get(Eo *obj,