2019-03-05 14:00:37 -08:00
|
|
|
|
|
|
|
Efl_Object *_elm_slider_efl_object_constructor(Eo *obj, Elm_Slider_Data *pd);
|
|
|
|
|
|
|
|
|
|
|
|
void _elm_slider_efl_object_destructor(Eo *obj, Elm_Slider_Data *pd);
|
|
|
|
|
|
|
|
|
|
|
|
void _elm_slider_efl_canvas_group_group_calculate(Eo *obj, Elm_Slider_Data *pd);
|
|
|
|
|
|
|
|
|
|
|
|
Eina_Error _elm_slider_efl_ui_widget_theme_apply(Eo *obj, Elm_Slider_Data *pd);
|
|
|
|
|
|
|
|
|
|
|
|
Eina_Bool _elm_slider_efl_ui_widget_widget_input_event_handler(Eo *obj, Elm_Slider_Data *pd, const Efl_Event *eo_event, Efl_Canvas_Object *source);
|
|
|
|
|
|
|
|
|
|
|
|
Eina_Bool _elm_slider_efl_ui_focus_object_on_focus_update(Eo *obj, Elm_Slider_Data *pd);
|
|
|
|
|
|
|
|
|
|
|
|
void _elm_slider_efl_text_text_set(Eo *obj, Elm_Slider_Data *pd, const char *text);
|
|
|
|
|
|
|
|
|
|
|
|
const char *_elm_slider_efl_text_text_get(const Eo *obj, Elm_Slider_Data *pd);
|
|
|
|
|
|
|
|
|
|
|
|
void _elm_slider_efl_text_markup_markup_set(Eo *obj, Elm_Slider_Data *pd, const char *markup);
|
|
|
|
|
|
|
|
|
|
|
|
const char *_elm_slider_efl_text_markup_markup_get(const Eo *obj, Elm_Slider_Data *pd);
|
|
|
|
|
|
|
|
|
Efl.Ui.Format revamp
This class helps widgets which contain a numerical value and must display it,
like Progressbar (units label), Spin, Spin_Button, Slider (both units and popup
labels, in legacy), Tags (when in shrunk mode) or Calendar (year_month label).
Previously this was a mix of interface and mixin: widgets had to support setting a
formatting func, and the mixin offered support for formatting strings, by setting
an internal formatting func. On top of that, the spinner widget supported "special
values", a list of values that should be shown as certain strings instead.
This has now been simplified and unified:
Widgets including this mixin can use the formatted_value_get() method which accepts
an Eina_Value and returns a string. Thats's it.
The mixin adds three properties to the widget (format_values, format_func and
format_string) which users can use to tailor formatting. The widget does not need
to know which method has been used, it just retrieves the resulting string.
This removes a lot of duplicated widget code, and adds functionality which was
missing before. For example, all widgets support passing a list of values now.
Widgets must implement the apply_formatted_value() method so they are notified
of changes in the format and they can redraw anything they need.
Tests have been added to the Elementary Spec suite for all cases.
Legacy widgets behavior has not been modified, although a few needed some code
changes.
2019-07-02 05:40:06 -07:00
|
|
|
void _elm_slider_efl_ui_format_format_cb_set(Eo *obj, Elm_Slider_Data *pd, void *func_data, Efl_Ui_Format_Func func, Eina_Free_Cb func_free_cb);
|
2019-03-05 14:00:37 -08:00
|
|
|
|
|
|
|
|
|
|
|
void _elm_slider_efl_ui_l10n_l10n_text_set(Eo *obj, Elm_Slider_Data *pd, const char *label, const char *domain);
|
|
|
|
|
|
|
|
|
|
|
|
const char *_elm_slider_efl_ui_l10n_l10n_text_get(const Eo *obj, Elm_Slider_Data *pd, const char **domain);
|
|
|
|
|
|
|
|
|
|
|
|
Efl_Object *_elm_slider_efl_part_part_get(const Eo *obj, Elm_Slider_Data *pd, const char *name);
|
|
|
|
|
Efl.Ui.Format revamp
This class helps widgets which contain a numerical value and must display it,
like Progressbar (units label), Spin, Spin_Button, Slider (both units and popup
labels, in legacy), Tags (when in shrunk mode) or Calendar (year_month label).
Previously this was a mix of interface and mixin: widgets had to support setting a
formatting func, and the mixin offered support for formatting strings, by setting
an internal formatting func. On top of that, the spinner widget supported "special
values", a list of values that should be shown as certain strings instead.
This has now been simplified and unified:
Widgets including this mixin can use the formatted_value_get() method which accepts
an Eina_Value and returns a string. Thats's it.
The mixin adds three properties to the widget (format_values, format_func and
format_string) which users can use to tailor formatting. The widget does not need
to know which method has been used, it just retrieves the resulting string.
This removes a lot of duplicated widget code, and adds functionality which was
missing before. For example, all widgets support passing a list of values now.
Widgets must implement the apply_formatted_value() method so they are notified
of changes in the format and they can redraw anything they need.
Tests have been added to the Elementary Spec suite for all cases.
Legacy widgets behavior has not been modified, although a few needed some code
changes.
2019-07-02 05:40:06 -07:00
|
|
|
void _elm_slider_efl_ui_format_apply_formatted_value(Eo *obj, Elm_Slider_Data *pd);
|
2019-03-05 14:00:37 -08:00
|
|
|
|
|
|
|
static Eina_Bool
|
|
|
|
_elm_slider_class_initializer(Efl_Class *klass)
|
|
|
|
{
|
|
|
|
const Efl_Object_Ops *opsp = NULL;
|
|
|
|
|
|
|
|
const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
|
|
|
|
|
|
|
|
#ifndef ELM_SLIDER_EXTRA_OPS
|
|
|
|
#define ELM_SLIDER_EXTRA_OPS
|
|
|
|
#endif
|
|
|
|
|
|
|
|
EFL_OPS_DEFINE(ops,
|
|
|
|
EFL_OBJECT_OP_FUNC(efl_constructor, _elm_slider_efl_object_constructor),
|
|
|
|
EFL_OBJECT_OP_FUNC(efl_destructor, _elm_slider_efl_object_destructor),
|
|
|
|
EFL_OBJECT_OP_FUNC(efl_canvas_group_calculate, _elm_slider_efl_canvas_group_group_calculate),
|
|
|
|
EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_slider_efl_ui_widget_theme_apply),
|
|
|
|
EFL_OBJECT_OP_FUNC(efl_ui_widget_input_event_handler, _elm_slider_efl_ui_widget_widget_input_event_handler),
|
|
|
|
EFL_OBJECT_OP_FUNC(efl_ui_focus_object_on_focus_update, _elm_slider_efl_ui_focus_object_on_focus_update),
|
|
|
|
EFL_OBJECT_OP_FUNC(efl_text_set, _elm_slider_efl_text_text_set),
|
|
|
|
EFL_OBJECT_OP_FUNC(efl_text_get, _elm_slider_efl_text_text_get),
|
|
|
|
EFL_OBJECT_OP_FUNC(efl_text_markup_set, _elm_slider_efl_text_markup_markup_set),
|
|
|
|
EFL_OBJECT_OP_FUNC(efl_text_markup_get, _elm_slider_efl_text_markup_markup_get),
|
Efl.Ui.Format revamp
This class helps widgets which contain a numerical value and must display it,
like Progressbar (units label), Spin, Spin_Button, Slider (both units and popup
labels, in legacy), Tags (when in shrunk mode) or Calendar (year_month label).
Previously this was a mix of interface and mixin: widgets had to support setting a
formatting func, and the mixin offered support for formatting strings, by setting
an internal formatting func. On top of that, the spinner widget supported "special
values", a list of values that should be shown as certain strings instead.
This has now been simplified and unified:
Widgets including this mixin can use the formatted_value_get() method which accepts
an Eina_Value and returns a string. Thats's it.
The mixin adds three properties to the widget (format_values, format_func and
format_string) which users can use to tailor formatting. The widget does not need
to know which method has been used, it just retrieves the resulting string.
This removes a lot of duplicated widget code, and adds functionality which was
missing before. For example, all widgets support passing a list of values now.
Widgets must implement the apply_formatted_value() method so they are notified
of changes in the format and they can redraw anything they need.
Tests have been added to the Elementary Spec suite for all cases.
Legacy widgets behavior has not been modified, although a few needed some code
changes.
2019-07-02 05:40:06 -07:00
|
|
|
EFL_OBJECT_OP_FUNC(efl_ui_format_func_set, _elm_slider_efl_ui_format_format_cb_set),
|
|
|
|
EFL_OBJECT_OP_FUNC(efl_ui_format_apply_formatted_value, _elm_slider_efl_ui_format_apply_formatted_value),
|
2019-03-05 14:00:37 -08:00
|
|
|
EFL_OBJECT_OP_FUNC(efl_ui_l10n_text_set, _elm_slider_efl_ui_l10n_l10n_text_set),
|
|
|
|
EFL_OBJECT_OP_FUNC(efl_ui_l10n_text_get, _elm_slider_efl_ui_l10n_l10n_text_get),
|
|
|
|
EFL_OBJECT_OP_FUNC(efl_part_get, _elm_slider_efl_part_part_get),
|
|
|
|
ELM_SLIDER_EXTRA_OPS
|
|
|
|
);
|
|
|
|
opsp = &ops;
|
|
|
|
|
|
|
|
return efl_class_functions_set(klass, opsp, ropsp);
|
|
|
|
}
|
|
|
|
|
|
|
|
static const Efl_Class_Description _elm_slider_class_desc = {
|
|
|
|
EO_VERSION,
|
|
|
|
"Elm.Slider",
|
|
|
|
EFL_CLASS_TYPE_REGULAR,
|
|
|
|
sizeof(Elm_Slider_Data),
|
|
|
|
_elm_slider_class_initializer,
|
|
|
|
_elm_slider_class_constructor,
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
2019-08-20 06:09:14 -07:00
|
|
|
EFL_DEFINE_CLASS(elm_slider_class_get, &_elm_slider_class_desc, EFL_UI_LAYOUT_BASE_CLASS, ELM_LAYOUT_MIXIN, EFL_UI_LEGACY_INTERFACE, EFL_TEXT_INTERFACE, EFL_TEXT_MARKUP_INTERFACE, EFL_UI_FORMAT_MIXIN, NULL);
|