forked from enlightenment/efl
layout: Move edje_get to legacy only
Here's the reasoning: 1. We will expose as many edje APIs as possible (and meaningful) through the elm layout class. 2. Access to internal objects is usually risky, as it allows apps to bypass EFL in some ways, leading to potentially undefined behaviours. 3. If the need arises we can still add a similar API back to EO, later. Back to #1, it seems that the need for edje_get() was mostly to call manual sizing functions, or the missing message_send(). I will make sure these are accessible from the layout itself. Ref T5315
This commit is contained in:
parent
aebd37cab8
commit
f0730f6f4c
|
@ -1641,9 +1641,10 @@ _elm_layout_table_clear(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part, Ei
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Evas_Object*
|
EAPI Evas_Object*
|
||||||
_elm_layout_edje_get(Eo *obj, Elm_Layout_Smart_Data *_pd EINA_UNUSED)
|
elm_layout_edje_get(const Eo *obj)
|
||||||
{
|
{
|
||||||
|
EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(obj, MY_CLASS), NULL);
|
||||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
|
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
|
||||||
|
|
||||||
return wd->resize_obj;
|
return wd->resize_obj;
|
||||||
|
|
|
@ -43,25 +43,6 @@ class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, Efl.File,
|
||||||
style: string; [[The style to used.]]
|
style: string; [[The style to used.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@property edje {
|
|
||||||
get {
|
|
||||||
[[Get the edje layout
|
|
||||||
|
|
||||||
This returns the edje object. It is not expected to be used
|
|
||||||
to then swallow objects via \@ref edje_object_part_swallow
|
|
||||||
for example. Use \@ref elm_layout_content_set instead so
|
|
||||||
child object handling and sizing is done properly.
|
|
||||||
|
|
||||||
Note: This function should only be used if you really need
|
|
||||||
to call some low level Edje function on this edje object.
|
|
||||||
All the common stuff (setting text, emitting signals,
|
|
||||||
hooking callbacks to signals, etc.) can be done with
|
|
||||||
proper elementary functions.
|
|
||||||
]]
|
|
||||||
return: Efl.Canvas.Object; [[An Evas_Object with the edje layout
|
|
||||||
settings loaded \@ref elm_layout_file_set.]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sizing_eval {
|
sizing_eval {
|
||||||
[[Eval sizing.
|
[[Eval sizing.
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,26 @@
|
||||||
*/
|
*/
|
||||||
EAPI Evas_Object *elm_layout_add(Evas_Object *parent);
|
EAPI Evas_Object *elm_layout_add(Evas_Object *parent);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get the edje layout
|
||||||
|
*
|
||||||
|
* This returns the edje object. It is not expected to be used to then swallow
|
||||||
|
* objects via @ref edje_object_part_swallow for example. Use @ref
|
||||||
|
* elm_layout_content_set instead so child object handling and sizing is done
|
||||||
|
* properly.
|
||||||
|
*
|
||||||
|
* @note This function should only be used if you really need to call some low
|
||||||
|
* level Edje function on this edje object. All the common stuff (setting text,
|
||||||
|
* emitting signals, hooking callbacks to signals, etc.) can be done with
|
||||||
|
* proper elementary functions.
|
||||||
|
*
|
||||||
|
* @return An Evas_Object with the edje layout settings loaded @ref
|
||||||
|
* elm_layout_file_set.
|
||||||
|
*
|
||||||
|
* @ingroup Elm_Layout
|
||||||
|
*/
|
||||||
|
EAPI Efl_Canvas_Object *elm_layout_edje_get(const Evas_Object *obj);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the list of swallow parts of a given container widget
|
* Get the list of swallow parts of a given container widget
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue