efl intf: Add format interface

Ref T6204
This commit is contained in:
Amitesh Singh 2017-10-16 15:24:06 +09:00
parent 45b4cdee19
commit 0088143ccb
4 changed files with 47 additions and 0 deletions

View 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)

View 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"

View 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)

View File

@ -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.]]
}
}
}
}