Layout: Use file interface.

This commit is contained in:
Tom Hacohen 2014-07-22 16:29:37 +01:00
parent eb5cdaf088
commit dd99ee34fd
3 changed files with 23 additions and 18 deletions

View File

@ -822,7 +822,7 @@ _parts_cursors_find(Elm_Layout_Smart_Data *sd,
* widget inheriting from elm_layout */
EOLIAN static Eina_Bool
_elm_layout_file_set(Eo *obj, Elm_Layout_Smart_Data *sd, const char *file, const char *group)
_elm_layout_efl_file_file_set(Eo *obj, Elm_Layout_Smart_Data *sd, const char *file, const char *group)
{
Eina_Bool int_ret = EINA_FALSE;
@ -1702,4 +1702,10 @@ EOLIAN static void _elm_layout_class_constructor(Eo_Class *klass)
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
}
EAPI Eina_Bool
elm_layout_file_set(Eo *obj, const char *file, const char *group)
{
return eo_do((Eo *) obj, efl_file_set(file, group));
}
#include "elm_layout.eo.c"

View File

@ -1,4 +1,4 @@
class Elm_Layout (Elm_Container)
class Elm_Layout (Elm_Container, Efl.File)
{
eo_prefix: elm_obj_layout;
data: Elm_Layout_Smart_Data;
@ -35,21 +35,6 @@ class Elm_Layout (Elm_Container)
to have accessibility. @c EINA_TRUE means textblock(text) parts can be accessible */
}
}
file {
set {
/*@
Set the file that will be used as layout
@return (1 = success, 0 = error)
@ingroup Layout */
return: bool;
}
values {
const(char)* file; /*@ The path to file (edj) that will be used as layout */
const(char)* group; /*@ The group that the layout belongs in edje file */
}
}
theme {
set {
/*@
@ -642,6 +627,7 @@ class Elm_Layout (Elm_Container)
class.constructor;
Eo.Base.constructor;
Eo.Base.dbg_info_get;
Efl.File.file.set;
Evas.Object_Smart.del;
Evas.Object_Smart.add;
Evas.Object_Smart.calculate;

View File

@ -76,4 +76,17 @@ EAPI Evas_Object *elm_layout_content_get(const Evas_Object *obj,
*/
EAPI Evas_Object *elm_layout_content_unset(Evas_Object *obj, const char *swallow);
#include "elm_layout.eo.legacy.h"
/**
*
* Set the file that will be used as layout
*
* @return (1 = success, 0 = error)
*
* @ingroup Layout
*
* @param[in] file The path to file (edj) that will be used as layout
* @param[in] group The group that the layout belongs in edje file
*/
EAPI Eina_Bool elm_layout_file_set(Eo *obj, const char *file, const char *group);
#include "elm_layout.eo.legacy.h"