First draft of interfaces
authorDaniel Zaoui <daniel.zaoui@samsung.com>
Wed, 21 May 2014 11:49:47 +0000 (14:49 +0300)
committerTom Hacohen <tom@stosb.com>
Thu, 21 Aug 2014 10:02:10 +0000 (11:02 +0100)
src/lib/efl/interfaces/efl_interface_color.eo [new file with mode: 0644]
src/lib/efl/interfaces/efl_interface_file.eo [new file with mode: 0644]
src/lib/efl/interfaces/efl_interface_gui_object.eo [new file with mode: 0644]
src/lib/efl/interfaces/efl_interface_image.eo [new file with mode: 0644]
src/lib/efl/interfaces/efl_interface_text.eo [new file with mode: 0644]
src/lib/efl/interfaces/efl_interface_text_properties.eo [new file with mode: 0644]

diff --git a/src/lib/efl/interfaces/efl_interface_color.eo b/src/lib/efl/interfaces/efl_interface_color.eo
new file mode 100644 (file)
index 0000000..d3cc615
--- /dev/null
@@ -0,0 +1,40 @@
+interface Efl_Interface_Color_Enum_Part (Efl_Interface_Part)
+{
+}
+
+interface Efl_Interface_Color_Text_Part (Efl_Interface_Part)
+{
+}
+
+interface Efl_Interface_Color {
+   properties {
+      color {
+         set {
+         }
+         get {
+         }
+         values {
+            int r; /*@ The red component of the given color. */
+            int g; /*@ The green component of the given color. */
+            int b; /*@ The blue component of the given color. */
+            int a; /*@ The alpha component of the given color. */
+         }
+      }
+      color_part {
+         set {
+         }
+         get {
+         }
+         keys {
+            const Efl_Interface_Part *part;
+         }
+         values {
+            int r; /*@ The red component of the given color. */
+            int g; /*@ The green component of the given color. */
+            int b; /*@ The blue component of the given color. */
+            int a; /*@ The alpha component of the given color. */
+         }
+      }
+   }
+}
+
diff --git a/src/lib/efl/interfaces/efl_interface_file.eo b/src/lib/efl/interfaces/efl_interface_file.eo
new file mode 100644 (file)
index 0000000..cf60986
--- /dev/null
@@ -0,0 +1,29 @@
+interface Efl_Interface_File {
+   properties {
+      file {
+         set {
+            return Eina_Bool;
+         }
+         get {
+         }
+         values {
+            const char *file; /*@ The path to the file to load @p from */
+            const char *group; /*@ The name of the group, in @p file */
+         }
+      }
+   }
+   methods {
+      save {
+         const;
+         return Eina_Bool;
+         params {
+            @in const char *file @nonull; /*@ The filename to be used to save the data (extension
+            obligatory). */
+            @in const char *key; /*@ The image key in the file (if an Eet one), or @c NULL,
+            otherwise. */
+            @in const char *flags; /*@ String containing the flags to be used (@c NULL for
+            none). */
+         }
+      }
+   }
+}
diff --git a/src/lib/efl/interfaces/efl_interface_gui_object.eo b/src/lib/efl/interfaces/efl_interface_gui_object.eo
new file mode 100644 (file)
index 0000000..c572df7
--- /dev/null
@@ -0,0 +1,144 @@
+interface Efl_Interface_Gui_Object {
+   properties {
+      size {
+         set {
+            /*@ Changes the size of the given Evas object. */
+         }
+         get {
+            /*@ Retrieves the (rectangular) size of the given Evas object. */
+         }
+         values {
+            Evas_Coord w; /*@ in */
+            Evas_Coord h; /*@ in */
+         }
+      }
+      above {
+         get {
+            /*@
+            Get the Evas object stacked right above @p obj
+
+            @return the #Evas_Object directly above @p obj, if any, or @c NULL,
+            if none
+
+            This function will traverse layers in its search, if there are
+            objects on layers above the one @p obj is placed at.
+
+            @see evas_object_layer_get()
+            @see evas_object_layer_set()
+            @see evas_object_below_get() */
+            return Evas_Object * @warn_unused;
+         }
+      }
+      below {
+         get {
+            /*@
+            Get the Evas object stacked right below @p obj
+
+            @return the #Evas_Object directly below @p obj, if any, or @c NULL,
+            if none
+
+            This function will traverse layers in its search, if there are
+            objects on layers below the one @p obj is placed at.
+
+            @see evas_object_layer_get()
+            @see evas_object_layer_set()
+            @see evas_object_below_get() */
+            return Evas_Object * @warn_unused;
+         }
+      }
+      stack_above {
+         /*@
+         Stack @p obj immediately above @p above
+
+         Objects, in a given canvas, are stacked in the order they get added
+         to it.  This means that, if they overlap, the highest ones will
+         cover the lowest ones, in that order. This function is a way to
+         change the stacking order for the objects.
+
+         This function is intended to be used with <b>objects belonging to
+         the same layer</b> in a given canvas, otherwise it will fail (and
+         accomplish nothing).
+
+         If you have smart objects on your canvas and @p obj is a member of
+         one of them, then @p above must also be a member of the same
+         smart object.
+
+         Similarly, if @p obj is not a member of a smart object, @p above
+         must not be either.
+
+         @see evas_object_layer_get()
+         @see evas_object_layer_set()
+         @see evas_object_stack_below() */
+
+         params {
+            @in Evas_Object *above @nonull; /*@ the object above which to stack */
+         }
+      }
+      stack_below {
+         /*@
+         Stack @p obj immediately below @p below
+
+         Objects, in a given canvas, are stacked in the order they get added
+         to it.  This means that, if they overlap, the highest ones will
+         cover the lowest ones, in that order. This function is a way to
+         change the stacking order for the objects.
+
+         This function is intended to be used with <b>objects belonging to
+         the same layer</b> in a given canvas, otherwise it will fail (and
+         accomplish nothing).
+
+         If you have smart objects on your canvas and @p obj is a member of
+         one of them, then @p below must also be a member of the same
+         smart object.
+
+         Similarly, if @p obj is not a member of a smart object, @p below
+         must not be either.
+
+         @see evas_object_layer_get()
+         @see evas_object_layer_set()
+         @see evas_object_stack_below() */
+
+         params {
+            @in Evas_Object *below @nonull; /*@ the object below which to stack */
+         }
+      }
+      raise {
+         /*@
+         Raise @p obj to the top of its layer.
+
+         @p obj will, then, be the highest one in the layer it belongs
+         to. Object on other layers won't get touched.
+
+         @see evas_object_stack_above()
+         @see evas_object_stack_below()
+         @see evas_object_lower() */
+
+      }
+      lower {
+         /*@
+         Lower @p obj to the bottom of its layer.
+
+         @p obj will, then, be the lowest one in the layer it belongs
+         to. Objects on other layers won't get touched.
+
+         @see evas_object_stack_above()
+         @see evas_object_stack_below()
+         @see evas_object_raise() */
+
+      }
+      visibility {
+         set {
+            /*@ Makes the given Evas object visible or invisible. */
+            legacy null;
+         }
+         get {
+            /*@ Retrieves whether or not the given Evas object is visible. */
+            legacy evas_object_visible_get;
+         }
+         values {
+            Eina_Bool v; /*@ @c EINA_TRUE if to make the object visible, @c EINA_FALSE otherwise */
+         }
+      }
+   }
+}
+
diff --git a/src/lib/efl/interfaces/efl_interface_image.eo b/src/lib/efl/interfaces/efl_interface_image.eo
new file mode 100644 (file)
index 0000000..f6a2e37
--- /dev/null
@@ -0,0 +1,27 @@
+interface Efl_Interface_File {
+   properties {
+      data_copy {
+         set {
+         }
+         values {
+            void *data; /*@ The raw data to replace. */
+         }
+      }
+   }
+   methods {
+      data_set {
+         params {
+            @in void *data; /*@ The raw data, or @c NULL. */
+         }
+      }
+      data_get {
+         const;
+         return void * @warn_unused;
+         params {
+            @in Eina_Bool for_writing; /*@ Whether the data being retrieved will be
+            modified (@c EINA_TRUE) or not (@c EINA_FALSE). */
+         }
+      }
+   }
+}
+
diff --git a/src/lib/efl/interfaces/efl_interface_text.eo b/src/lib/efl/interfaces/efl_interface_text.eo
new file mode 100644 (file)
index 0000000..8f4ef84
--- /dev/null
@@ -0,0 +1,36 @@
+interface Efl_Interface_Text {
+   properties {
+      text_markup {
+         set {
+            /*@
+            Sets the tetxblock's text to the markup text.
+
+            @note assumes text does not include the unicode object replacement char (0xFFFC)
+
+            @return Return no value. */
+         }
+         get {
+            /*@
+            Return the markup of the object.
+
+            @return the markup text of the object. */
+         }
+         values {
+            const char *text; /*@ the markup text to use. */
+         }
+      }
+      cursor {
+         get {
+            /*@
+            Return the object's main cursor.
+
+            @return The @p obj's main cursor. */
+            return Evas_Textblock_Cursor *;
+         }
+      }
+   }
+   implements {
+      virtual::text_markup;
+      virtual::cursor::get;
+   }
+}
diff --git a/src/lib/efl/interfaces/efl_interface_text_properties.eo b/src/lib/efl/interfaces/efl_interface_text_properties.eo
new file mode 100644 (file)
index 0000000..4d0bac0
--- /dev/null
@@ -0,0 +1,36 @@
+interface Efl_Interface_Text_Properties {
+   properties {
+      font {
+         set {
+            /*@
+            Set the font family or filename, and size on a given text object.
+
+            This function allows the font name and size of a text object to be
+            set. The @p font string has to follow fontconfig's convention on
+            naming fonts, as it's the underlying library used to query system
+            fonts by Evas (see the @c fc-list command's output, on your system,
+            to get an idea). Alternatively, one can use a full path to a font file.
+
+            @see evas_object_text_font_get()
+            @see evas_object_text_font_source_set() */
+         }
+         get {
+            /*@
+            Retrieve the font family and size in use on a given text object.
+
+            This function allows the font name and size of a text object to be
+            queried. Be aware that the font name string is still owned by Evas
+            and should @b not have free() called on it by the caller of the
+            function.
+
+            @see evas_object_text_font_set() */
+         }
+         values {
+            const char* font; /*@ The font family name or filename. */
+            Evas_Font_Size size; /*@ The font size, in points. */
+         }
+      }
+   }
+   implements {
+      virtual::font;
+}