efl intf: Add format interface
authorAmitesh Singh <amitesh.sh@samsung.com>
Mon, 16 Oct 2017 06:24:06 +0000 (15:24 +0900)
committerAmitesh Singh <amitesh.sh@samsung.com>
Mon, 16 Oct 2017 12:26:25 +0000 (21:26 +0900)
Ref T6204

src/Makefile_Efl.am
src/lib/efl/Efl.h
src/lib/efl/interfaces/efl_interfaces_main.c
src/lib/efl/interfaces/efl_ui_format.eo [new file with mode: 0644]

index dff5d3c..c723304 100644 (file)
@@ -75,6 +75,7 @@ efl_eolian_files = \
       lib/efl/interfaces/efl_ui_item.eo \
       lib/efl/interfaces/efl_ui_menu.eo \
       lib/efl/interfaces/efl_ui_autorepeat.eo \
+      lib/efl/interfaces/efl_ui_format.eo \
       $(efl_eolian_legacy_files) \
       $(NULL)
 
index 1b5a9bc..e4c7649 100644 (file)
@@ -135,6 +135,7 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
 #include "interfaces/efl_ui_model_connect.eo.h"
 #include "interfaces/efl_ui_factory.eo.h"
 #include "interfaces/efl_ui_model_factory_connect.eo.h"
+#include "interfaces/efl_ui_format.eo.h"
 
 /* Observable interface */
 #include "interfaces/efl_observer.eo.h"
index 778108e..eb85ef2 100644 (file)
@@ -68,6 +68,7 @@
 #include "interfaces/efl_ui_scrollable.eo.c"
 #include "interfaces/efl_ui_selectable.eo.c"
 #include "interfaces/efl_ui_zoom.eo.c"
+#include "interfaces/efl_ui_format.eo.c"
 
 EAPI void
 __efl_internal_init(void)
diff --git a/src/lib/efl/interfaces/efl_ui_format.eo b/src/lib/efl/interfaces/efl_ui_format.eo
new file mode 100644 (file)
index 0000000..74d6249
--- /dev/null
@@ -0,0 +1,44 @@
+import eina_types;
+
+function Efl.Ui.Format_Func_Cb {
+   [[Function pointer for format function hook]]
+   params {
+      @in str: ptr(Eina.Strbuf);
+      @in value: Eina.Value;
+   }
+};
+
+interface Efl.Ui.Format
+{
+   [[interface class for format_func]]
+   methods {
+      @property func_cb @protected {
+         set {
+            [[Set the format function pointer to format the indicator string.
+            ]]
+         }
+         values {
+            func: Efl.Ui.Format_Func_Cb @nullable; [[The format function callback]]
+         }
+      }
+      @property unit @protected {
+         [[Control the format string for a given units label
+
+           If $NULL is passed on $format, it will make $obj's units
+           area to be hidden completely. If not, it'll set the <b>format
+           string</b> for the units label's text. The units label is
+           provided a floating point value, so the units text is up display
+           at most one floating point value. Note that the units label is
+           optional. Use a format string such as "%1.2f meters" for example.
+
+           Note: The default format string is an integer percentage,
+           as in $"%.0f %%".
+         ]]
+         set {
+         }
+         values {
+            units: string @nullable; [[The format string for $obj's units label.]]
+         }
+      }
+   }
+}