summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2017-10-16 15:24:06 +0900
committerAmitesh Singh <amitesh.sh@samsung.com>2017-10-16 21:26:25 +0900
commit0088143ccbe78c51b5daabd6cf78eb763f546b25 (patch)
tree0c5f2d243b2f03e2da13e72580f03c30f673729f /src/lib
parent45b4cdee1966c5638edbe4e35b143ee50ff50dbb (diff)
efl intf: Add format interface
Ref T6204
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/efl/Efl.h1
-rw-r--r--src/lib/efl/interfaces/efl_interfaces_main.c1
-rw-r--r--src/lib/efl/interfaces/efl_ui_format.eo44
3 files changed, 46 insertions, 0 deletions
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index 1b5a9bcfe7..e4c76495fe 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;
135#include "interfaces/efl_ui_model_connect.eo.h" 135#include "interfaces/efl_ui_model_connect.eo.h"
136#include "interfaces/efl_ui_factory.eo.h" 136#include "interfaces/efl_ui_factory.eo.h"
137#include "interfaces/efl_ui_model_factory_connect.eo.h" 137#include "interfaces/efl_ui_model_factory_connect.eo.h"
138#include "interfaces/efl_ui_format.eo.h"
138 139
139/* Observable interface */ 140/* Observable interface */
140#include "interfaces/efl_observer.eo.h" 141#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 778108e699..eb85ef2773 100644
--- a/src/lib/efl/interfaces/efl_interfaces_main.c
+++ b/src/lib/efl/interfaces/efl_interfaces_main.c
@@ -68,6 +68,7 @@
68#include "interfaces/efl_ui_scrollable.eo.c" 68#include "interfaces/efl_ui_scrollable.eo.c"
69#include "interfaces/efl_ui_selectable.eo.c" 69#include "interfaces/efl_ui_selectable.eo.c"
70#include "interfaces/efl_ui_zoom.eo.c" 70#include "interfaces/efl_ui_zoom.eo.c"
71#include "interfaces/efl_ui_format.eo.c"
71 72
72EAPI void 73EAPI void
73__efl_internal_init(void) 74__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 0000000000..74d6249127
--- /dev/null
+++ b/src/lib/efl/interfaces/efl_ui_format.eo
@@ -0,0 +1,44 @@
1import eina_types;
2
3function Efl.Ui.Format_Func_Cb {
4 [[Function pointer for format function hook]]
5 params {
6 @in str: ptr(Eina.Strbuf);
7 @in value: Eina.Value;
8 }
9};
10
11interface Efl.Ui.Format
12{
13 [[interface class for format_func]]
14 methods {
15 @property func_cb @protected {
16 set {
17 [[Set the format function pointer to format the indicator string.
18 ]]
19 }
20 values {
21 func: Efl.Ui.Format_Func_Cb @nullable; [[The format function callback]]
22 }
23 }
24 @property unit @protected {
25 [[Control the format string for a given units label
26
27 If $NULL is passed on $format, it will make $obj's units
28 area to be hidden completely. If not, it'll set the <b>format
29 string</b> for the units label's text. The units label is
30 provided a floating point value, so the units text is up display
31 at most one floating point value. Note that the units label is
32 optional. Use a format string such as "%1.2f meters" for example.
33
34 Note: The default format string is an integer percentage,
35 as in $"%.0f %%".
36 ]]
37 set {
38 }
39 values {
40 units: string @nullable; [[The format string for $obj's units label.]]
41 }
42 }
43 }
44}