From dd99ee34fd10f22df1ad3cb51031638f70ba5fd7 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 22 Jul 2014 16:29:37 +0100 Subject: [PATCH] Layout: Use file interface. --- legacy/elementary/src/lib/elm_layout.c | 8 +++++++- legacy/elementary/src/lib/elm_layout.eo | 18 ++---------------- legacy/elementary/src/lib/elm_layout_legacy.h | 15 ++++++++++++++- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/legacy/elementary/src/lib/elm_layout.c b/legacy/elementary/src/lib/elm_layout.c index b0f59ad126..4e4c46a0da 100644 --- a/legacy/elementary/src/lib/elm_layout.c +++ b/legacy/elementary/src/lib/elm_layout.c @@ -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" diff --git a/legacy/elementary/src/lib/elm_layout.eo b/legacy/elementary/src/lib/elm_layout.eo index b1a0f45c8c..f606a5552f 100644 --- a/legacy/elementary/src/lib/elm_layout.eo +++ b/legacy/elementary/src/lib/elm_layout.eo @@ -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; diff --git a/legacy/elementary/src/lib/elm_layout_legacy.h b/legacy/elementary/src/lib/elm_layout_legacy.h index 12f8aa38bd..3023fe5bda 100644 --- a/legacy/elementary/src/lib/elm_layout_legacy.h +++ b/legacy/elementary/src/lib/elm_layout_legacy.h @@ -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" \ No newline at end of file +/** + * + * 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"