lib/edje/edje_text.c \
lib/edje/edje_textblock_styles.c \
lib/edje/edje_util.c \
+lib/edje/edje_legacy.c \
lib/edje/edje_var.c \
lib/edje/edje_signal.c \
lib/edje/edje_part.c \
EAPI const char *edje_load_error_str (Edje_Load_Error error);
/**
+ * @brief Retrieves the geometry of a given Edje part, in a given Edje object's
+ * group definition, relative to the object's area.
+ *
+ * This function gets the geometry of an Edje part within its group. The x and
+ * y coordinates are relative to the top left corner of the whole obj object's
+ * area.
+ *
+ * @note Use @c null pointers on the geometry components you're not interested
+ * in: they'll be ignored by the function.
+ *
+ * @note On failure, this function will make all non-$null geometry pointers'
+ * pointed variables be set to zero.
+ *
+ * @param[in] part The Edje part's name
+ * @param[out] x A pointer to a variable where to store the part's x coordinate
+ * @param[out] y A pointer to a variable where to store the part's y coordinate
+ * @param[out] w A pointer to a variable where to store the part's width
+ * @param[out] h A pointer to a variable where to store the part's height
+ *
+ * @return @c true on success, @c false otherwise
+ *
+ * @ingroup Edje_Object
+ */
+EAPI Eina_Bool edje_object_part_geometry_get(const Edje_Object *obj, const char * part, int *x, int *y, int *w, int *h);
+
+/**
* @brief Gets a handle to the Evas object implementing a given Edje part, in
* an Edje object.
*
--- /dev/null
+/* Legacy API implementations based on internal EO calls */
+
+#include "edje_private.h"
+
+EAPI Eina_Bool
+edje_object_part_geometry_get(const Edje_Object *obj, const char *part, int *x, int *y, int *w, int *h)
+{
+ Edje_Real_Part *rp;
+ Edje *ed;
+
+ // Similar to geometry_get(efl_part(obj, part), x, y, w, h) but the bool
+ // return value matters here.
+
+ ed = _edje_fetch(obj);
+ if ((!ed) || (!part))
+ {
+ if (x) *x = 0;
+ if (y) *y = 0;
+ if (w) *w = 0;
+ if (h) *h = 0;
+ return EINA_FALSE;
+ }
+
+ /* Need to recalc before providing the object. */
+ _edje_recalc_do(ed);
+
+ rp = _edje_real_part_recursive_get(&ed, part);
+ if (!rp)
+ {
+ if (x) *x = 0;
+ if (y) *y = 0;
+ if (w) *w = 0;
+ if (h) *h = 0;
+ return EINA_FALSE;
+ }
+ if (x) *x = rp->x;
+ if (y) *y = rp->y;
+ if (w) *w = rp->w;
+ if (h) *h = rp->h;
+ return EINA_TRUE;
+}
val_ret: double; [[Part state value]]
}
}
- @property part_geometry {
- get {
- [[Retrieves the geometry of a given Edje part, in a given Edje
- object's group definition, relative to the object's area.
-
- This function gets the geometry of an Edje part within its
- group. The x and y coordinates are relative to the top left
- corner of the whole obj object's area.
-
- Note: Use $null pointers on the geometry components you're not
- interested in: they'll be ignored by the function.
-
- Note: On failure, this function will make all non-$null geometry
- pointers' pointed variables be set to zero.]]
- return: bool; [[$true on success, $false otherwise]]
- }
- keys {
- part: string; [[The Edje part's name]]
- }
- values {
- x: int; [[A pointer to a variable where to store the part's x coordinate]]
- y: int; [[A pointer to a variable where to store the part's y coordinate]]
- w: int; [[A pointer to a variable where to store the part's width]]
- h: int; [[A pointer to a variable where to store the part's height]]
- }
- }
@property part_drag_value {
set {
[[Sets the dragable object location.
#include "edje_private.h"
#include "edje_part_helper.h"
+#define MY_CLASS EFL_CANVAS_LAYOUT_INTERNAL_CLASS
PROXY_INIT(box)
PROXY_INIT(table)
_swallow_shutdown();
}
-/* Internal EO API */
+void
+_edje_real_part_set(Eo *obj, void *ed, void *rp, const char *part)
+{
+ PROXY_DATA_GET(obj, pd);
+ pd->ed = ed;
+ pd->rp = rp;
+ pd->part = part;
+ pd->temp = 1;
+ efl_parent_set(obj, pd->ed->obj);
+}
-EOAPI EFL_VOID_FUNC_BODYV(_efl_canvas_layout_internal_real_part_set, EFL_FUNC_CALL(ed, rp, part), void *ed, void *rp, const char *part)
+EOLIAN static Efl_Object *
+_efl_canvas_layout_internal_efl_object_finalize(Eo *obj, Efl_Canvas_Layout_Internal_Data *pd)
+{
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(pd->rp && pd->ed && pd->part, NULL);
+ return efl_finalize(efl_super(obj, MY_CLASS));
+}
-#define EFL_CANVAS_LAYOUT_INTERNAL_EXTRA_OPS \
- EFL_OBJECT_OP_FUNC(_efl_canvas_layout_internal_real_part_set, NULL)
+EOLIAN void
+_efl_canvas_layout_internal_efl_gfx_geometry_get(Eo *obj EINA_UNUSED, Efl_Canvas_Layout_Internal_Data *pd, int *x, int *y, int *w, int *h)
+{
+ Edje_Real_Part *rp = pd->rp;
+
+ _edje_recalc_do(pd->ed);
+ if (!rp)
+ {
+ if (x) *x = 0;
+ if (y) *y = 0;
+ if (w) *w = 0;
+ if (h) *h = 0;
+ }
+
+ if (x) *x = rp->x;
+ if (y) *y = rp->y;
+ if (w) *w = rp->w;
+ if (h) *h = rp->h;
+ RETURN_VOID;
+}
#include "efl_canvas_layout_internal.eo.c"
RETURN_VAL(EFL_ORIENT_NONE);
}
-/* Internal EO API */
-
-#define EFL_CANVAS_LAYOUT_INTERNAL_BOX_EXTRA_OPS \
- EFL_OBJECT_OP_FUNC(_efl_canvas_layout_internal_real_part_set, _efl_canvas_layout_internal_box_efl_canvas_layout_internal_real_part_set)
-
#include "efl_canvas_layout_internal_box.eo.c"
#include "edje_private.h"
#include "efl_canvas_layout_internal.eo.h"
-EOAPI void _efl_canvas_layout_internal_real_part_set(Eo *obj, void *ed, void *rp, const char *part);
-
typedef struct _Efl_Canvas_Layout_Internal_Data Efl_Canvas_Layout_Internal_Data;
struct _Efl_Canvas_Layout_Internal_Data
#define RETURN_VOID do { PROXY_UNREF(obj, pd); return; } while(0)
#define PROXY_CALL(a) ({ PROXY_REF(obj, pd); a; })
+void _edje_real_part_set(Eo *obj, void *ed, void *rp, const char *part);
+
/* ugly macros to avoid code duplication */
#define PROXY_RESET(type) \
static Eo * _ ## type ## _proxy = NULL; \
\
static void \
-type ## _del_cb(Eo *proxy) \
+_ ## type ## _del_cb(Eo *proxy) \
{ \
if (_ ## type ## _proxy) \
{ \
ERR("Found invalid handle for efl_part. Reset."); \
_ ## type ## _proxy = NULL; \
} \
- return efl_add(MY_CLASS, ed->obj, \
- _efl_canvas_layout_internal_real_part_set(efl_added, ed, rp, rp->part->name)); \
+ proxy = efl_add(MY_CLASS, ed->obj, \
+ _edje_real_part_set(efl_added, ed, rp, rp->part->name)); \
+ efl_del_intercept_set(proxy, _ ## type ## _del_cb); \
+ return proxy; \
} \
\
if (EINA_UNLIKELY(pd->temp)) \
} \
proxy = _ ## type ## _proxy; \
_ ## type ## _proxy = NULL; \
- _efl_canvas_layout_internal_real_part_set(proxy, ed, rp, rp->part->name); \
+ _edje_real_part_set(proxy, ed, rp, rp->part->name); \
+ efl_del_intercept_set(proxy, _ ## type ## _del_cb); \
return proxy; \
-} \
-\
-EOLIAN static void \
-_efl_canvas_layout_internal_ ## type ## _efl_canvas_layout_internal_real_part_set(Eo *obj, void *_pd EINA_UNUSED, void *ed, void *rp, const char *part) \
-{ \
- PROXY_DATA_GET(obj, pd); \
- pd->ed = ed; \
- pd->rp = rp; \
- pd->part = part; \
- pd->temp = 1; \
- efl_del_intercept_set(obj, type ## _del_cb); \
- efl_parent_set(obj, pd->ed->obj); \
-} \
-\
-EOLIAN static Efl_Object * \
-_efl_canvas_layout_internal_ ## type ## _efl_object_finalize(Eo *obj, void *_pd EINA_UNUSED) \
-{ \
- PROXY_DATA_GET(obj, pd); \
- EINA_SAFETY_ON_FALSE_RETURN_VAL(pd->rp && pd->ed && pd->part, NULL); \
- return efl_finalize(efl_super(obj, MY_CLASS)); \
}
#ifdef DEBUG
RETURN_VAL(content);
}
-/* Internal EO APIs */
-
-#define EFL_CANVAS_LAYOUT_INTERNAL_SWALLOW_EXTRA_OPS \
- EFL_OBJECT_OP_FUNC(_efl_canvas_layout_internal_real_part_set, _efl_canvas_layout_internal_swallow_efl_canvas_layout_internal_real_part_set),
-
#include "efl_canvas_layout_internal_swallow.eo.c"
return efl_pack_unpack_all(table);
}
-/* Internal EO APIs */
-
-#define EFL_CANVAS_LAYOUT_INTERNAL_TABLE_EXTRA_OPS \
- EFL_OBJECT_OP_FUNC(_efl_canvas_layout_internal_real_part_set, _efl_canvas_layout_internal_table_efl_canvas_layout_internal_real_part_set),
-
#include "efl_canvas_layout_internal_table.eo.c"
return rp->object;
}
-EOLIAN Eina_Bool
-_edje_object_part_geometry_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
-{
- Edje_Real_Part *rp;
-
- if ((!ed) || (!part))
- {
- if (x) *x = 0;
- if (y) *y = 0;
- if (w) *w = 0;
- if (h) *h = 0;
- return EINA_FALSE;
- }
-
- /* Need to recalc before providing the object. */
- _edje_recalc_do(ed);
-
- rp = _edje_real_part_recursive_get(&ed, part);
- if (!rp)
- {
- if (x) *x = 0;
- if (y) *y = 0;
- if (w) *w = 0;
- if (h) *h = 0;
- return EINA_FALSE;
- }
- if (x) *x = rp->x;
- if (y) *y = rp->y;
- if (w) *w = rp->w;
- if (h) *h = rp->h;
-
- return EINA_TRUE;
-}
-
EOLIAN void
_edje_object_item_provider_set(Eo *obj EINA_UNUSED, Edje *ed, Edje_Item_Provider_Cb func, void *data)
{
{
[[Common class for part proxy objects for $Efl.Canvas.Layout.]]
implements {
- //Efl.Gfx.Size.geometry { get; }
+ Efl.Object.finalize;
+ Efl.Gfx.geometry { get; }
//Efl.Gfx.Size.size { get; }
}
}
]]
data: null;
implements {
- Efl.Object.finalize;
Efl.Container.content_iterate;
Efl.Container.content_count;
Efl.Container.content_remove;
]]
data: null;
implements {
- Efl.Object.finalize;
Efl.Container.content { get; set; }
Efl.Container.content_unset;
}
]]
data: null;
implements {
- Efl.Object.finalize;
Efl.Container.content_iterate;
Efl.Container.content_count;
Efl.Container.content_remove;