From 0088143ccbe78c51b5daabd6cf78eb763f546b25 Mon Sep 17 00:00:00 2001 From: Amitesh Singh Date: Mon, 16 Oct 2017 15:24:06 +0900 Subject: [PATCH] efl intf: Add format interface Ref T6204 --- src/Makefile_Efl.am | 1 + src/lib/efl/Efl.h | 1 + src/lib/efl/interfaces/efl_interfaces_main.c | 1 + src/lib/efl/interfaces/efl_ui_format.eo | 44 ++++++++++++++++++++++++++++ 4 files changed, 47 insertions(+) create mode 100644 src/lib/efl/interfaces/efl_ui_format.eo diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am index dff5d3c..c723304 100644 --- a/src/Makefile_Efl.am +++ b/src/Makefile_Efl.am @@ -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) diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h index 1b5a9bc..e4c7649 100644 --- a/src/lib/efl/Efl.h +++ b/src/lib/efl/Efl.h @@ -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" diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c index 778108e..eb85ef2 100644 --- a/src/lib/efl/interfaces/efl_interfaces_main.c +++ b/src/lib/efl/interfaces/efl_interfaces_main.c @@ -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 index 0000000..74d6249 --- /dev/null +++ b/src/lib/efl/interfaces/efl_ui_format.eo @@ -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 format + string 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.]] + } + } + } +} -- 2.7.4