forked from enlightenment/efl
efl: add Efl.Gfx.Base and fix inheritance for Evas_Object.
This commit is contained in:
parent
c000ee8099
commit
c08f8e26a6
|
@ -5,6 +5,7 @@ efl_eolian_files = \
|
||||||
lib/efl/interfaces/efl_player.eo \
|
lib/efl/interfaces/efl_player.eo \
|
||||||
lib/efl/interfaces/efl_text.eo \
|
lib/efl/interfaces/efl_text.eo \
|
||||||
lib/efl/interfaces/efl_text_properties.eo \
|
lib/efl/interfaces/efl_text_properties.eo \
|
||||||
|
lib/efl/interfaces/efl_gfx_base.eo \
|
||||||
lib/efl/interfaces/efl_gfx_shape.eo \
|
lib/efl/interfaces/efl_gfx_shape.eo \
|
||||||
lib/efl/interfaces/efl_gfx_gradient.eo \
|
lib/efl/interfaces/efl_gfx_gradient.eo \
|
||||||
lib/efl/interfaces/efl_gfx_gradient_linear.eo \
|
lib/efl/interfaces/efl_gfx_gradient_linear.eo \
|
||||||
|
|
|
@ -8,7 +8,8 @@ generated_efl_cxx_bindings = \
|
||||||
lib/efl/interfaces/efl_image.eo.hh \
|
lib/efl/interfaces/efl_image.eo.hh \
|
||||||
lib/efl/interfaces/efl_player.eo.hh \
|
lib/efl/interfaces/efl_player.eo.hh \
|
||||||
lib/efl/interfaces/efl_text.eo.hh \
|
lib/efl/interfaces/efl_text.eo.hh \
|
||||||
lib/efl/interfaces/efl_text_properties.eo.hh
|
lib/efl/interfaces/efl_text_properties.eo.hh \
|
||||||
|
lib/efl/interfaces/efl_gfx_base.eo.hh
|
||||||
|
|
||||||
lib/efl/Efl.hh: $(generated_efl_cxx_bindings)
|
lib/efl/Efl.hh: $(generated_efl_cxx_bindings)
|
||||||
@echo @ECHO_E@ "#ifndef EFL_CXX_EDJE_HH\n#define EFL_CXX_EDJE_HH\n" > $(top_builddir)/src/lib/efl/Efl.hh
|
@echo @ECHO_E@ "#ifndef EFL_CXX_EDJE_HH\n#define EFL_CXX_EDJE_HH\n" > $(top_builddir)/src/lib/efl/Efl.hh
|
||||||
|
|
|
@ -1422,7 +1422,7 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
|
||||||
if (!chosen_desc->text.min_x)
|
if (!chosen_desc->text.min_x)
|
||||||
{
|
{
|
||||||
eo_do(ep->object,
|
eo_do(ep->object,
|
||||||
evas_obj_size_set(TO_INT(params->eval.w), TO_INT(params->eval.h)),
|
efl_gfx_size_set(TO_INT(params->eval.w), TO_INT(params->eval.h)),
|
||||||
evas_obj_textblock_size_formatted_get(&tw, &th));
|
evas_obj_textblock_size_formatted_get(&tw, &th));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1450,7 +1450,7 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
|
||||||
if (!chosen_desc->text.max_x)
|
if (!chosen_desc->text.max_x)
|
||||||
{
|
{
|
||||||
eo_do(ep->object,
|
eo_do(ep->object,
|
||||||
evas_obj_size_set(TO_INT(params->eval.w), TO_INT(params->eval.h)),
|
efl_gfx_size_set(TO_INT(params->eval.w), TO_INT(params->eval.h)),
|
||||||
evas_obj_textblock_size_formatted_get(&tw, &th));
|
evas_obj_textblock_size_formatted_get(&tw, &th));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1538,7 +1538,7 @@ _edje_part_recalc_single_text(FLOAT_T sc EINA_UNUSED,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Note: No need to add padding to that, it's already in the geometry
|
// Note: No need to add padding to that, it's already in the geometry
|
||||||
eo_do(ep->object, evas_obj_size_get(&mw, &mh));
|
eo_do(ep->object, efl_gfx_size_get(&mw, &mh));
|
||||||
|
|
||||||
if (chosen_desc->text.max_x)
|
if (chosen_desc->text.max_x)
|
||||||
{
|
{
|
||||||
|
@ -1698,7 +1698,7 @@ _edje_part_recalc_single_text(FLOAT_T sc EINA_UNUSED,
|
||||||
eo_do(ep->object,
|
eo_do(ep->object,
|
||||||
evas_obj_text_style_set(style),
|
evas_obj_text_style_set(style),
|
||||||
evas_obj_text_set(text),
|
evas_obj_text_set(text),
|
||||||
evas_obj_size_get(&tw, &th));
|
efl_gfx_size_get(&tw, &th));
|
||||||
if (chosen_desc->text.max_x)
|
if (chosen_desc->text.max_x)
|
||||||
{
|
{
|
||||||
int l, r;
|
int l, r;
|
||||||
|
@ -3918,7 +3918,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
|
||||||
/* visibility and color have no meaning on SWALLOW and GROUP part. */
|
/* visibility and color have no meaning on SWALLOW and GROUP part. */
|
||||||
#ifdef HAVE_EPHYSICS
|
#ifdef HAVE_EPHYSICS
|
||||||
eo_do(ep->object,
|
eo_do(ep->object,
|
||||||
evas_obj_size_set(pf->final.w, pf->final.h));
|
efl_gfx_size_set(pf->final.w, pf->final.h));
|
||||||
if ((ep->part->physics_body) && (!ep->body))
|
if ((ep->part->physics_body) && (!ep->body))
|
||||||
{
|
{
|
||||||
if (_edje_physics_world_geometry_check(ed->world))
|
if (_edje_physics_world_geometry_check(ed->world))
|
||||||
|
@ -3936,19 +3936,19 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
eo_do(ep->object,
|
eo_do(ep->object,
|
||||||
evas_obj_position_set(ed->x + pf->final.x, ed->y + pf->final.y));
|
efl_gfx_position_set(ed->x + pf->final.x, ed->y + pf->final.y));
|
||||||
#else
|
#else
|
||||||
eo_do(ep->object,
|
eo_do(ep->object,
|
||||||
evas_obj_position_set(ed->x + pf->final.x, ed->y + pf->final.y),
|
efl_gfx_position_set(ed->x + pf->final.x, ed->y + pf->final.y),
|
||||||
evas_obj_size_set(pf->final.w, pf->final.h));
|
efl_gfx_size_set(pf->final.w, pf->final.h));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ep->nested_smart)
|
if (ep->nested_smart)
|
||||||
{ /* Move, Resize all nested parts */
|
{ /* Move, Resize all nested parts */
|
||||||
/* Not really needed but will improve the bounding box evaluation done by Evas */
|
/* Not really needed but will improve the bounding box evaluation done by Evas */
|
||||||
eo_do(ep->nested_smart,
|
eo_do(ep->nested_smart,
|
||||||
evas_obj_position_set(ed->x + pf->final.x, ed->y + pf->final.y),
|
efl_gfx_position_set(ed->x + pf->final.x, ed->y + pf->final.y),
|
||||||
evas_obj_size_set(pf->final.w, pf->final.h));
|
efl_gfx_size_set(pf->final.w, pf->final.h));
|
||||||
}
|
}
|
||||||
if (ep->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
|
if (ep->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
|
||||||
_edje_entry_real_part_configure(ed, ep);
|
_edje_entry_real_part_configure(ed, ep);
|
||||||
|
@ -4012,9 +4012,9 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
|
||||||
if (ep->part->type == EDJE_PART_TYPE_GROUP)
|
if (ep->part->type == EDJE_PART_TYPE_GROUP)
|
||||||
vis = evas_object_visible_get(ed->obj);
|
vis = evas_object_visible_get(ed->obj);
|
||||||
eo_do(ep->typedata.swallow->swallowed_object,
|
eo_do(ep->typedata.swallow->swallowed_object,
|
||||||
evas_obj_position_set(ed->x + pf->final.x, ed->y + pf->final.y),
|
efl_gfx_position_set(ed->x + pf->final.x, ed->y + pf->final.y),
|
||||||
evas_obj_size_set(pf->final.w, pf->final.h),
|
efl_gfx_size_set(pf->final.w, pf->final.h),
|
||||||
evas_obj_visibility_set(vis));
|
efl_gfx_visibility_set(vis));
|
||||||
}
|
}
|
||||||
else evas_object_hide(ep->typedata.swallow->swallowed_object);
|
else evas_object_hide(ep->typedata.swallow->swallowed_object);
|
||||||
mo = ep->typedata.swallow->swallowed_object;
|
mo = ep->typedata.swallow->swallowed_object;
|
||||||
|
|
|
@ -18,7 +18,7 @@ static inline void
|
||||||
part_get_geometry(Edje_Real_Part *rp, Evas_Coord *w, Evas_Coord *h)
|
part_get_geometry(Edje_Real_Part *rp, Evas_Coord *w, Evas_Coord *h)
|
||||||
{
|
{
|
||||||
if (!rp->part->use_alternate_font_metrics)
|
if (!rp->part->use_alternate_font_metrics)
|
||||||
eo_do(rp->object, evas_obj_size_get(w, h));
|
eo_do(rp->object, efl_gfx_size_get(w, h));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (w) *w = evas_object_text_horiz_advance_get(rp->object);
|
if (w) *w = evas_object_text_horiz_advance_get(rp->object);
|
||||||
|
@ -100,7 +100,7 @@ _edje_text_fit_x(Edje *ed, Edje_Real_Part *ep,
|
||||||
evas_obj_text_ellipsis_set(chosen_desc->text.min_x ? -1 : params->type.text.ellipsis),
|
evas_obj_text_ellipsis_set(chosen_desc->text.min_x ? -1 : params->type.text.ellipsis),
|
||||||
efl_text_properties_font_set(font, size),
|
efl_text_properties_font_set(font, size),
|
||||||
efl_text_set(text),
|
efl_text_set(text),
|
||||||
evas_obj_size_set(sw, sh));
|
efl_gfx_size_set(sw, sh));
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
@ -519,10 +519,10 @@ arrange_text:
|
||||||
if (!calc_only)
|
if (!calc_only)
|
||||||
{
|
{
|
||||||
eo_do(ep->object,
|
eo_do(ep->object,
|
||||||
evas_obj_position_set(ed->x + TO_INT(params->eval.x) + ep->typedata.text->offset.x,
|
efl_gfx_position_set(ed->x + TO_INT(params->eval.x) + ep->typedata.text->offset.x,
|
||||||
ed->y + TO_INT(params->eval.y) + ep->typedata.text->offset.y);
|
ed->y + TO_INT(params->eval.y) + ep->typedata.text->offset.y);
|
||||||
|
|
||||||
evas_obj_visibility_set(params->visible));
|
efl_gfx_visibility_set(params->visible));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,7 @@ typedef enum _Efl_Gfx_Gradient_Spread
|
||||||
|
|
||||||
#include "interfaces/efl_gfx_utils.h"
|
#include "interfaces/efl_gfx_utils.h"
|
||||||
|
|
||||||
|
#include "interfaces/efl_gfx_base.eo.h"
|
||||||
#include "interfaces/efl_gfx_shape.eo.h"
|
#include "interfaces/efl_gfx_shape.eo.h"
|
||||||
#include "interfaces/efl_gfx_gradient.eo.h"
|
#include "interfaces/efl_gfx_gradient.eo.h"
|
||||||
#include "interfaces/efl_gfx_gradient_linear.eo.h"
|
#include "interfaces/efl_gfx_gradient_linear.eo.h"
|
||||||
|
|
|
@ -0,0 +1,89 @@
|
||||||
|
interface Efl.Gfx.Base {
|
||||||
|
legacy_prefix: null;
|
||||||
|
eo_prefix: efl_gfx;
|
||||||
|
properties {
|
||||||
|
position {
|
||||||
|
set {
|
||||||
|
/*@ Move the given Evas object to the given location inside its canvas' viewport. */
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
/*@ Retrieves the position of the given Evas object. */
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
int x; /*@ in */
|
||||||
|
int y; /*@ in */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
size {
|
||||||
|
set {
|
||||||
|
/*@ Changes the size of the given Evas object. */
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
/*@ Retrieves the (rectangular) size of the given Evas object. */
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
int w; /*@ in */
|
||||||
|
int h; /*@ in */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
color {
|
||||||
|
set {
|
||||||
|
/*@
|
||||||
|
Sets the general/main color of the given Evas object to the given
|
||||||
|
one.
|
||||||
|
|
||||||
|
@see evas_object_color_get() (for an example)
|
||||||
|
@note These color values are expected to be premultiplied by @p a.
|
||||||
|
|
||||||
|
@ingroup Evas_Object_Group_Basic */
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
/*@
|
||||||
|
Retrieves the general/main color of the given Evas object.
|
||||||
|
|
||||||
|
Retrieves the “main” color's RGB component (and alpha channel)
|
||||||
|
values, <b>which range from 0 to 255</b>. For the alpha channel,
|
||||||
|
which defines the object's transparency level, 0 means totally
|
||||||
|
transparent, while 255 means opaque. These color values are
|
||||||
|
premultiplied by the alpha value.
|
||||||
|
|
||||||
|
Usually you’ll use this attribute for text and rectangle objects,
|
||||||
|
where the “main” color is their unique one. If set for objects
|
||||||
|
which themselves have colors, like the images one, those colors get
|
||||||
|
modulated by this one.
|
||||||
|
|
||||||
|
@note All newly created Evas rectangles get the default color
|
||||||
|
values of <code>255 255 255 255</code> (opaque white).
|
||||||
|
|
||||||
|
@note Use @c NULL pointers on the components you're not interested
|
||||||
|
in: they'll be ignored by the function.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
@dontinclude evas-object-manipulation.c
|
||||||
|
@skip int alpha, r, g, b;
|
||||||
|
@until return
|
||||||
|
|
||||||
|
See the full @ref Example_Evas_Object_Manipulation "example".
|
||||||
|
|
||||||
|
@ingroup Evas_Object_Group_Basic */
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
int r; /*@ The red component of the given color. */
|
||||||
|
int g; /*@ The green component of the given color. */
|
||||||
|
int b; /*@ The blue component of the given color. */
|
||||||
|
int a; /*@ The alpha component of the given color. */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
visibility {
|
||||||
|
set {
|
||||||
|
/*@ Makes the given Evas object visible or invisible. */
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
/*@ Retrieves whether or not the given Evas object is visible. */
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
bool v; /*@ @c EINA_TRUE if to make the object visible, @c EINA_FALSE otherwise */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -11,6 +11,7 @@
|
||||||
#include "interfaces/efl_text.eo.c"
|
#include "interfaces/efl_text.eo.c"
|
||||||
#include "interfaces/efl_text_properties.eo.c"
|
#include "interfaces/efl_text_properties.eo.c"
|
||||||
|
|
||||||
|
#include "interfaces/efl_gfx_base.eo.c"
|
||||||
#include "interfaces/efl_gfx_shape.eo.c"
|
#include "interfaces/efl_gfx_shape.eo.c"
|
||||||
#include "interfaces/efl_gfx_gradient.eo.c"
|
#include "interfaces/efl_gfx_gradient.eo.c"
|
||||||
#include "interfaces/efl_gfx_gradient_linear.eo.c"
|
#include "interfaces/efl_gfx_gradient_linear.eo.c"
|
||||||
|
|
|
@ -568,6 +568,86 @@ EAPI void evas_object_show(Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||||
EAPI void evas_object_hide(Evas_Object *obj) EINA_ARG_NONNULL(1);
|
EAPI void evas_object_hide(Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Sets the general/main color of the given Evas object to the given
|
||||||
|
* one.
|
||||||
|
*
|
||||||
|
* @see evas_object_color_get() (for an example)
|
||||||
|
* @note These color values are expected to be premultiplied by @p a.
|
||||||
|
*
|
||||||
|
* @ingroup Evas_Object_Group_Basic
|
||||||
|
*
|
||||||
|
* @param[in] r The red component of the given color.
|
||||||
|
* @param[in] g The green component of the given color.
|
||||||
|
* @param[in] b The blue component of the given color.
|
||||||
|
* @param[in] a The alpha component of the given color.
|
||||||
|
*/
|
||||||
|
EAPI void evas_object_color_set(Evas_Object *obj, int r, int g, int b, int a);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Retrieves the general/main color of the given Evas object.
|
||||||
|
*
|
||||||
|
* Retrieves the “main” color's RGB component (and alpha channel)
|
||||||
|
* values, <b>which range from 0 to 255</b>. For the alpha channel,
|
||||||
|
* which defines the object's transparency level, 0 means totally
|
||||||
|
* transparent, while 255 means opaque. These color values are
|
||||||
|
* premultiplied by the alpha value.
|
||||||
|
*
|
||||||
|
* Usually you’ll use this attribute for text and rectangle objects,
|
||||||
|
* where the “main” color is their unique one. If set for objects
|
||||||
|
* which themselves have colors, like the images one, those colors get
|
||||||
|
* modulated by this one.
|
||||||
|
*
|
||||||
|
* @note All newly created Evas rectangles get the default color
|
||||||
|
* values of <code>255 255 255 255</code> (opaque white).
|
||||||
|
*
|
||||||
|
* @note Use @c NULL pointers on the components you're not interested
|
||||||
|
* in: they'll be ignored by the function.
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* @dontinclude evas-object-manipulation.c
|
||||||
|
* @skip int alpha, r, g, b;
|
||||||
|
* @until return
|
||||||
|
*
|
||||||
|
* See the full @ref Example_Evas_Object_Manipulation "example".
|
||||||
|
*
|
||||||
|
* @ingroup Evas_Object_Group_Basic
|
||||||
|
*
|
||||||
|
* @param[out] r The red component of the given color.
|
||||||
|
* @param[out] g The green component of the given color.
|
||||||
|
* @param[out] b The blue component of the given color.
|
||||||
|
* @param[out] a The alpha component of the given color.
|
||||||
|
*/
|
||||||
|
EAPI void evas_object_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Move the given Evas object to the given location inside its canvas' viewport.
|
||||||
|
*
|
||||||
|
* @param[in] x in
|
||||||
|
* @param[in] y in
|
||||||
|
*/
|
||||||
|
EAPI void evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Changes the size of the given Evas object.
|
||||||
|
*
|
||||||
|
* @param[in] w in
|
||||||
|
* @param[in] h in
|
||||||
|
*/
|
||||||
|
EAPI void evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Retrieves whether or not the given Evas object is visible.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
EAPI Eina_Bool evas_object_visible_get(const Evas_Object *obj);
|
||||||
|
|
||||||
|
|
||||||
#include "canvas/evas_common_interface.eo.legacy.h"
|
#include "canvas/evas_common_interface.eo.legacy.h"
|
||||||
#include "canvas/evas_object.eo.legacy.h"
|
#include "canvas/evas_object.eo.legacy.h"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
abstract Evas.Object (Eo.Base, Evas.Common_Interface)
|
abstract Evas.Object (Eo.Base, Evas.Common_Interface, Efl.Gfx.Base)
|
||||||
{
|
{
|
||||||
eo_prefix: evas_obj;
|
eo_prefix: evas_obj;
|
||||||
data: Evas_Object_Protected_Data;
|
data: Evas_Object_Protected_Data;
|
||||||
|
@ -80,19 +80,6 @@ abstract Evas.Object (Eo.Base, Evas.Common_Interface)
|
||||||
Evas_Coord h; /*@ Integer to use as the preferred height hint. */
|
Evas_Coord h; /*@ Integer to use as the preferred height hint. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
visibility {
|
|
||||||
set {
|
|
||||||
/*@ Makes the given Evas object visible or invisible. */
|
|
||||||
legacy: null;
|
|
||||||
}
|
|
||||||
get {
|
|
||||||
/*@ Retrieves whether or not the given Evas object is visible. */
|
|
||||||
legacy: evas_object_visible_get;
|
|
||||||
}
|
|
||||||
values {
|
|
||||||
bool v; /*@ @c EINA_TRUE if to make the object visible, @c EINA_FALSE otherwise */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type {
|
type {
|
||||||
set {
|
set {
|
||||||
/*@ Sets the type of the given Evas object. */
|
/*@ Sets the type of the given Evas object. */
|
||||||
|
@ -745,20 +732,6 @@ abstract Evas.Object (Eo.Base, Evas.Common_Interface)
|
||||||
clipper, @c EINA_FALSE otherwise. */
|
clipper, @c EINA_FALSE otherwise. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
size {
|
|
||||||
set {
|
|
||||||
/*@ Changes the size of the given Evas object. */
|
|
||||||
legacy: evas_object_resize;
|
|
||||||
}
|
|
||||||
get {
|
|
||||||
/*@ Retrieves the (rectangular) size of the given Evas object. */
|
|
||||||
legacy: null;
|
|
||||||
}
|
|
||||||
values {
|
|
||||||
Evas_Coord w; /*@ in */
|
|
||||||
Evas_Coord h; /*@ in */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
focus {
|
focus {
|
||||||
set {
|
set {
|
||||||
/*@
|
/*@
|
||||||
|
@ -1031,20 +1004,6 @@ abstract Evas.Object (Eo.Base, Evas.Common_Interface)
|
||||||
(@c EINA_FALSE) */
|
(@c EINA_FALSE) */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
position {
|
|
||||||
set {
|
|
||||||
/*@ Move the given Evas object to the given location inside its canvas' viewport. */
|
|
||||||
legacy: evas_object_move;
|
|
||||||
}
|
|
||||||
get {
|
|
||||||
/*@ Retrieves the position of the given Evas object. */
|
|
||||||
legacy: null;
|
|
||||||
}
|
|
||||||
values {
|
|
||||||
Evas_Coord x; /*@ in */
|
|
||||||
Evas_Coord y; /*@ in */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
anti_alias {
|
anti_alias {
|
||||||
set {
|
set {
|
||||||
/*@
|
/*@
|
||||||
|
@ -1062,54 +1021,6 @@ abstract Evas.Object (Eo.Base, Evas.Common_Interface)
|
||||||
bool anti_alias; /*@ (@c EINA_TRUE) if the object is to be anti_aliased, (@c EINA_FALSE) otherwise. */
|
bool anti_alias; /*@ (@c EINA_TRUE) if the object is to be anti_aliased, (@c EINA_FALSE) otherwise. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
color {
|
|
||||||
set {
|
|
||||||
/*@
|
|
||||||
Sets the general/main color of the given Evas object to the given
|
|
||||||
one.
|
|
||||||
|
|
||||||
@see evas_object_color_get() (for an example)
|
|
||||||
@note These color values are expected to be premultiplied by @p a.
|
|
||||||
|
|
||||||
@ingroup Evas_Object_Group_Basic */
|
|
||||||
}
|
|
||||||
get {
|
|
||||||
/*@
|
|
||||||
Retrieves the general/main color of the given Evas object.
|
|
||||||
|
|
||||||
Retrieves the “main” color's RGB component (and alpha channel)
|
|
||||||
values, <b>which range from 0 to 255</b>. For the alpha channel,
|
|
||||||
which defines the object's transparency level, 0 means totally
|
|
||||||
transparent, while 255 means opaque. These color values are
|
|
||||||
premultiplied by the alpha value.
|
|
||||||
|
|
||||||
Usually you’ll use this attribute for text and rectangle objects,
|
|
||||||
where the “main” color is their unique one. If set for objects
|
|
||||||
which themselves have colors, like the images one, those colors get
|
|
||||||
modulated by this one.
|
|
||||||
|
|
||||||
@note All newly created Evas rectangles get the default color
|
|
||||||
values of <code>255 255 255 255</code> (opaque white).
|
|
||||||
|
|
||||||
@note Use @c NULL pointers on the components you're not interested
|
|
||||||
in: they'll be ignored by the function.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
@dontinclude evas-object-manipulation.c
|
|
||||||
@skip int alpha, r, g, b;
|
|
||||||
@until return
|
|
||||||
|
|
||||||
See the full @ref Example_Evas_Object_Manipulation "example".
|
|
||||||
|
|
||||||
@ingroup Evas_Object_Group_Basic */
|
|
||||||
}
|
|
||||||
values {
|
|
||||||
int r; /*@ The red component of the given color. */
|
|
||||||
int g; /*@ The green component of the given color. */
|
|
||||||
int b; /*@ The blue component of the given color. */
|
|
||||||
int a; /*@ The alpha component of the given color. */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
smart_data {
|
smart_data {
|
||||||
get {
|
get {
|
||||||
/*@
|
/*@
|
||||||
|
@ -1522,6 +1433,14 @@ abstract Evas.Object (Eo.Base, Evas.Common_Interface)
|
||||||
Eo.Base.destructor;
|
Eo.Base.destructor;
|
||||||
Eo.Base.dbg_info_get;
|
Eo.Base.dbg_info_get;
|
||||||
Evas.Common_Interface.evas.get;
|
Evas.Common_Interface.evas.get;
|
||||||
|
Efl.Gfx.Base.visibility.set;
|
||||||
|
Efl.Gfx.Base.visibility.get;
|
||||||
|
Efl.Gfx.Base.position.set;
|
||||||
|
Efl.Gfx.Base.position.get;
|
||||||
|
Efl.Gfx.Base.color.set;
|
||||||
|
Efl.Gfx.Base.color.get;
|
||||||
|
Efl.Gfx.Base.size.set;
|
||||||
|
Efl.Gfx.Base.size.get;
|
||||||
}
|
}
|
||||||
events {
|
events {
|
||||||
mouse,in; /*@ Mouse In Event */
|
mouse,in; /*@ Mouse In Event */
|
||||||
|
|
|
@ -750,12 +750,19 @@ evas_object_geometry_set(Evas_Object *eo_obj, Evas_Coord x, Evas_Coord y, Evas_C
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
eo_do(eo_obj,
|
eo_do(eo_obj,
|
||||||
evas_obj_position_set(x, y),
|
efl_gfx_position_set(x, y),
|
||||||
evas_obj_size_set(w, h));
|
efl_gfx_size_set(w, h));
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
||||||
|
{
|
||||||
|
eo_do((Evas_Object *)obj, efl_gfx_position_set(x, y));
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_evas_object_position_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord x, Evas_Coord y)
|
_evas_object_efl_gfx_base_position_set(Eo *eo_obj, Evas_Object_Protected_Data *obj,
|
||||||
|
Evas_Coord x, Evas_Coord y)
|
||||||
{
|
{
|
||||||
|
|
||||||
Eina_Bool is, was = EINA_FALSE;
|
Eina_Bool is, was = EINA_FALSE;
|
||||||
|
@ -838,8 +845,15 @@ _evas_object_position_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coor
|
||||||
evas_object_inform_call_move(eo_obj, obj);
|
evas_object_inform_call_move(eo_obj, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
|
||||||
|
{
|
||||||
|
eo_do((Evas_Object *)obj, efl_gfx_size_set(w, h));
|
||||||
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_evas_object_size_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord w, Evas_Coord h)
|
_evas_object_efl_gfx_base_size_set(Eo *eo_obj, Evas_Object_Protected_Data *obj,
|
||||||
|
Evas_Coord w, Evas_Coord h)
|
||||||
{
|
{
|
||||||
Eina_Bool is, was = EINA_FALSE;
|
Eina_Bool is, was = EINA_FALSE;
|
||||||
Eina_Bool pass = EINA_FALSE, freeze = EINA_FALSE;
|
Eina_Bool pass = EINA_FALSE, freeze = EINA_FALSE;
|
||||||
|
@ -923,33 +937,37 @@ evas_object_geometry_get(const Evas_Object *eo_obj, Evas_Coord *x, Evas_Coord *y
|
||||||
if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0;
|
if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0;
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
eo_do((Eo *)eo_obj, evas_obj_position_get(x, y), evas_obj_size_get(w, h));
|
eo_do((Eo *)eo_obj, efl_gfx_position_get(x, y), efl_gfx_size_get(w, h));
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_evas_object_position_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Evas_Coord *x, Evas_Coord *y)
|
_evas_object_efl_gfx_base_position_get(Eo *obj EINA_UNUSED,
|
||||||
|
Evas_Object_Protected_Data *pd,
|
||||||
|
Evas_Coord *x, Evas_Coord *y)
|
||||||
{
|
{
|
||||||
if ((obj->delete_me) || (!obj->layer))
|
if ((pd->delete_me) || (!pd->layer))
|
||||||
{
|
{
|
||||||
if (x) *x = 0; if (y) *y = 0;
|
if (x) *x = 0; if (y) *y = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x) *x = obj->cur->geometry.x;
|
if (x) *x = pd->cur->geometry.x;
|
||||||
if (y) *y = obj->cur->geometry.y;
|
if (y) *y = pd->cur->geometry.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_evas_object_size_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Evas_Coord *w, Evas_Coord *h)
|
_evas_object_efl_gfx_base_size_get(Eo *obj EINA_UNUSED,
|
||||||
|
Evas_Object_Protected_Data *pd,
|
||||||
|
Evas_Coord *w, Evas_Coord *h)
|
||||||
{
|
{
|
||||||
if (obj->delete_me)
|
if (pd->delete_me)
|
||||||
{
|
{
|
||||||
if (w) *w = 0; if (h) *h = 0;
|
if (w) *w = 0; if (h) *h = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (w) *w = obj->cur->geometry.w;
|
if (w) *w = pd->cur->geometry.w;
|
||||||
if (h) *h = obj->cur->geometry.h;
|
if (h) *h = pd->cur->geometry.h;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1186,18 +1204,28 @@ evas_object_show(Evas_Object *eo_obj)
|
||||||
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
eo_do(eo_obj, evas_obj_visibility_set(EINA_TRUE));
|
eo_do(eo_obj, efl_gfx_visibility_set(EINA_TRUE));
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_hide(Evas_Object *eo_obj)
|
evas_object_hide(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
if (!eo_obj) return;
|
if (!eo_obj) return;
|
||||||
eo_do(eo_obj, evas_obj_visibility_set(EINA_FALSE));
|
eo_do(eo_obj, efl_gfx_visibility_set(EINA_FALSE));
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI Eina_Bool
|
||||||
|
evas_object_visible_get(const Evas_Object *obj)
|
||||||
|
{
|
||||||
|
Eina_Bool ret;
|
||||||
|
|
||||||
|
return eo_do_ret((Evas_Object *)obj, ret, efl_gfx_visibility_get());
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_evas_object_visibility_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Eina_Bool visible)
|
_evas_object_efl_gfx_base_visibility_set(Eo *eo_obj,
|
||||||
|
Evas_Object_Protected_Data *obj,
|
||||||
|
Eina_Bool visible)
|
||||||
{
|
{
|
||||||
evas_object_async_block(obj);
|
evas_object_async_block(obj);
|
||||||
if (visible) _show(eo_obj, obj);
|
if (visible) _show(eo_obj, obj);
|
||||||
|
@ -1373,14 +1401,22 @@ _hide(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_evas_object_visibility_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
_evas_object_efl_gfx_base_visibility_get(Eo *eo_obj EINA_UNUSED,
|
||||||
|
Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
if (obj->delete_me) return EINA_FALSE;
|
if (obj->delete_me) return EINA_FALSE;
|
||||||
return obj->cur->visible;
|
return obj->cur->visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
evas_object_color_set(Evas_Object *obj, int r, int g, int b, int a)
|
||||||
|
{
|
||||||
|
eo_do((Evas_Object *)obj, efl_gfx_color_set(r, g, b, a));
|
||||||
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_evas_object_color_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, int r, int g, int b, int a)
|
_evas_object_efl_gfx_base_color_set(Eo *eo_obj, Evas_Object_Protected_Data *obj,
|
||||||
|
int r, int g, int b, int a)
|
||||||
{
|
{
|
||||||
if (obj->delete_me) return;
|
if (obj->delete_me) return;
|
||||||
if (r > 255) r = 255; if (r < 0) r = 0;
|
if (r > 255) r = 255; if (r < 0) r = 0;
|
||||||
|
@ -1435,8 +1471,16 @@ _evas_object_color_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, int r, int g
|
||||||
evas_object_change(eo_obj, obj);
|
evas_object_change(eo_obj, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
evas_object_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a)
|
||||||
|
{
|
||||||
|
eo_do((Evas_Object *)obj, efl_gfx_color_get(r, g, b, a));
|
||||||
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_evas_object_color_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, int *r, int *g, int *b, int *a)
|
_evas_object_efl_gfx_base_color_get(Eo *eo_obj EINA_UNUSED,
|
||||||
|
Evas_Object_Protected_Data *obj,
|
||||||
|
int *r, int *g, int *b, int *a)
|
||||||
{
|
{
|
||||||
if (obj->delete_me)
|
if (obj->delete_me)
|
||||||
{
|
{
|
||||||
|
@ -1546,18 +1590,18 @@ _evas_object_eo_base_dbg_info_get(Eo *eo_obj, Evas_Object_Protected_Data *obj EI
|
||||||
Eina_Bool clipees_has;
|
Eina_Bool clipees_has;
|
||||||
|
|
||||||
eo_do(eo_obj,
|
eo_do(eo_obj,
|
||||||
visible = evas_obj_visibility_get(),
|
visible = efl_gfx_visibility_get(),
|
||||||
layer = evas_obj_layer_get(),
|
layer = evas_obj_layer_get(),
|
||||||
name = evas_obj_name_get(),
|
name = evas_obj_name_get(),
|
||||||
evas_obj_position_get(&x, &y),
|
efl_gfx_position_get(&x, &y),
|
||||||
evas_obj_size_get(&w, &h),
|
efl_gfx_size_get(&w, &h),
|
||||||
scale = evas_obj_scale_get(),
|
scale = evas_obj_scale_get(),
|
||||||
evas_obj_size_hint_min_get(&minw, &minh),
|
evas_obj_size_hint_min_get(&minw, &minh),
|
||||||
evas_obj_size_hint_max_get(&maxw, &maxh),
|
evas_obj_size_hint_max_get(&maxw, &maxh),
|
||||||
evas_obj_size_hint_request_get(&requestw, &requesth),
|
evas_obj_size_hint_request_get(&requestw, &requesth),
|
||||||
evas_obj_size_hint_align_get(&dblx, &dbly),
|
evas_obj_size_hint_align_get(&dblx, &dbly),
|
||||||
evas_obj_size_hint_weight_get(&dblw, &dblh),
|
evas_obj_size_hint_weight_get(&dblw, &dblh),
|
||||||
evas_obj_color_get(&r, &g, &b, &a),
|
efl_gfx_color_get(&r, &g, &b, &a),
|
||||||
focus = evas_obj_focus_get(),
|
focus = evas_obj_focus_get(),
|
||||||
m = evas_obj_pointer_mode_get(),
|
m = evas_obj_pointer_mode_get(),
|
||||||
pass_event = evas_obj_pass_events_get(),
|
pass_event = evas_obj_pass_events_get(),
|
||||||
|
|
|
@ -926,7 +926,7 @@ _evas_object_text_layout(Evas_Object *eo_obj, Evas_Text_Data *o, Eina_Unicode *t
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_evas_text_evas_object_size_set(Eo *eo_obj, Evas_Text_Data *o, Evas_Coord w, Evas_Coord h)
|
_evas_text_efl_gfx_base_size_set(Eo *eo_obj, Evas_Text_Data *o, int w, int h)
|
||||||
{
|
{
|
||||||
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
|
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
|
||||||
|
|
||||||
|
@ -1235,7 +1235,7 @@ _evas_text_style_set(Eo *eo_obj, Evas_Text_Data *o, Evas_Text_Style_Type style)
|
||||||
h = obj->cur->geometry.h + (t - pt) + (b - pb);
|
h = obj->cur->geometry.h + (t - pt) + (b - pb);
|
||||||
|
|
||||||
eo_do_super(eo_obj, MY_CLASS,
|
eo_do_super(eo_obj, MY_CLASS,
|
||||||
evas_obj_size_set(w, h));
|
efl_gfx_size_set(w, h));
|
||||||
evas_object_change(eo_obj, obj);
|
evas_object_change(eo_obj, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2350,12 +2350,12 @@ _evas_object_text_recalc(Evas_Object *eo_obj, Eina_Unicode *text)
|
||||||
|
|
||||||
min = w + l + r < obj->cur->geometry.w || obj->cur->geometry.w == 0 ? w + l + r : obj->cur->geometry.w;
|
min = w + l + r < obj->cur->geometry.w || obj->cur->geometry.w == 0 ? w + l + r : obj->cur->geometry.w;
|
||||||
eo_do_super(eo_obj, MY_CLASS,
|
eo_do_super(eo_obj, MY_CLASS,
|
||||||
evas_obj_size_set(min, h + t + b));
|
efl_gfx_size_set(min, h + t + b));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
eo_do_super(eo_obj, MY_CLASS,
|
eo_do_super(eo_obj, MY_CLASS,
|
||||||
evas_obj_size_set(w + l + r, h + t + b));
|
efl_gfx_size_set(w + l + r, h + t + b));
|
||||||
}
|
}
|
||||||
//// obj->cur->cache.geometry.validity = 0;
|
//// obj->cur->cache.geometry.validity = 0;
|
||||||
}
|
}
|
||||||
|
@ -2369,7 +2369,7 @@ _evas_object_text_recalc(Evas_Object *eo_obj, Eina_Unicode *text)
|
||||||
evas_filter_program_padding_get(o->cur.filter->chain, &l, &r, &t, &b);
|
evas_filter_program_padding_get(o->cur.filter->chain, &l, &r, &t, &b);
|
||||||
|
|
||||||
eo_do_super(eo_obj, MY_CLASS,
|
eo_do_super(eo_obj, MY_CLASS,
|
||||||
evas_obj_size_set(0, o->max_ascent + o->max_descent + t + b));
|
efl_gfx_size_set(0, o->max_ascent + o->max_descent + t + b));
|
||||||
//// obj->cur->cache.geometry.validity = 0;
|
//// obj->cur->cache.geometry.validity = 0;
|
||||||
}
|
}
|
||||||
o->last_computed.w = obj->cur->geometry.w;
|
o->last_computed.w = obj->cur->geometry.w;
|
||||||
|
|
|
@ -362,7 +362,7 @@ class Evas.Text (Evas.Object, Efl.Text, Efl.Text_Properties)
|
||||||
Eo.Base.constructor;
|
Eo.Base.constructor;
|
||||||
Eo.Base.destructor;
|
Eo.Base.destructor;
|
||||||
Eo.Base.dbg_info_get;
|
Eo.Base.dbg_info_get;
|
||||||
Evas.Object.size.set;
|
Efl.Gfx.Base.size.set;
|
||||||
Efl.Text.text.set;
|
Efl.Text.text.set;
|
||||||
Efl.Text.text.get;
|
Efl.Text.text.get;
|
||||||
Efl.Text_Properties.font.get;
|
Efl.Text_Properties.font.get;
|
||||||
|
|
|
@ -387,14 +387,14 @@ START_TEST(evas_filter_text_render_test)
|
||||||
evas_object_resize(o, 10, 10);
|
evas_object_resize(o, 10, 10);
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
eo_do(to,
|
eo_do(to,
|
||||||
evas_obj_color_set(255, 255, 255, 255),
|
efl_gfx_color_set(255, 255, 255, 255),
|
||||||
evas_obj_text_filter_source_set(tc->source, o),
|
evas_obj_text_filter_source_set(tc->source, o),
|
||||||
evas_obj_text_filter_program_set(tc->code));
|
evas_obj_text_filter_program_set(tc->code));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
eo_do(to,
|
eo_do(to,
|
||||||
evas_obj_color_set(255, 255, 255, 255),
|
efl_gfx_color_set(255, 255, 255, 255),
|
||||||
evas_obj_text_filter_program_set(tc->code));
|
evas_obj_text_filter_program_set(tc->code));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue