Layout: Use file interface.
authorTom Hacohen <tom@stosb.com>
Tue, 22 Jul 2014 15:29:37 +0000 (16:29 +0100)
committerTom Hacohen <tom@stosb.com>
Thu, 21 Aug 2014 10:04:28 +0000 (11:04 +0100)
src/lib/elm_layout.c
src/lib/elm_layout.eo
src/lib/elm_layout_legacy.h

index b0f59ad..4e4c46a 100644 (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"
index b1a0f45..f606a55 100644 (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;
index 12f8aa3..3023fe5 100644 (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"
\ 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"