diff --git a/data/elementary/themes/edc/efl/spin_button.edc b/data/elementary/themes/edc/efl/spin_button.edc index 5b257f2a46..674ff69818 100644 --- a/data/elementary/themes/edc/efl/spin_button.edc +++ b/data/elementary/themes/edc/efl/spin_button.edc @@ -279,10 +279,6 @@ group { "efl/spin_button/horizontal/inc_button"; images.image: "sym_right_light_normal.png" COMP; images.image: "sym_right_glow_normal.png" COMP; images.image: "sym_right_dark_normal.png" COMP; - script { - public mouse_down = 0; - public multi_down = 0; - } parts { part { name: "arrow.image"; scale: 1; @@ -321,64 +317,31 @@ group { "efl/spin_button/horizontal/inc_button"; } } programs { + EFL_UI_CLICKABLE_PART_BIND(over) program { name: "button_press"; signal: "mouse,down,1"; source: "over"; - script { - if ((get_int(multi_down) == 0) && - (get_int(mouse_down) == 0)) { - set_int(mouse_down, 1); - run_program(PROGRAM:"button_press2"); - } - } - } - program { name: "button_press2"; - action: SIGNAL_EMIT "efl,action,press" ""; - after: "button_press_anim"; - } - program { name: "button_press_anim"; action: STATE_SET "pressed" 0.0; target: "arrow.image"; } program { name: "button_unpress"; signal: "mouse,up,1"; source: "over"; - script { - if (get_int(mouse_down) == 1) { - set_int(mouse_down, 0); - run_program(PROGRAM:"button_unpress2"); - run_program(PROGRAM:"button_unpress_anim"); - } - } - } - program { name: "button_unpress2"; - action: SIGNAL_EMIT "efl,action,unpress" ""; - } - program { name: "button_unpress_anim"; action: STATE_SET "default" 0.0; target: "arrow.image"; } - program { name: "button_click"; - signal: "mouse,clicked,1"; - source: "over"; - script { - if (get_int(multi_down) == 0) { - run_program(PROGRAM:"button_click2"); - } - } - } program { name: "action_unpressed"; signal: "efl,action,unpressed"; source: "efl"; - after: "button_unpress_anim"; + action: STATE_SET "default" 0.0; + target: "arrow.image"; + } program { name: "action_pressed"; signal: "efl,action,pressed"; source: "efl"; - after: "button_press_anim"; - } - program { name: "button_click2"; - action: SIGNAL_EMIT "efl,action,click" ""; + action: STATE_SET "pressed" 0.0; + target: "arrow.image"; } program { name: "access_pressed"; signal: "efl,state,animation,activated"; @@ -406,22 +369,6 @@ group { "efl/spin_button/horizontal/inc_button"; target: "arrow.image"; target: "disabler"; } - program { - name: "multi_down"; - signal: "efl,action,multi,down"; - source: "efl"; - script { - set_int(multi_down, 1); - } - } - program { - name: "multi_up"; - signal: "efl,action,multi,up"; - source: "efl"; - script { - set_int(multi_down, 0); - } - } } } diff --git a/src/bin/elementary/test_ui_timepicker.c b/src/bin/elementary/test_ui_timepicker.c index 3249699bc8..f7b5d7d676 100644 --- a/src/bin/elementary/test_ui_timepicker.c +++ b/src/bin/elementary/test_ui_timepicker.c @@ -32,5 +32,11 @@ test_ui_timepicker(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e efl_event_callback_add(efl_added, EFL_UI_TIMEPICKER_EVENT_TIME_CHANGED,_time_changed_cb, NULL), efl_pack(bx, efl_added)); + efl_add(EFL_UI_TIMEPICKER_CLASS, bx, + efl_ui_timepicker_time_set(efl_added, 11, 35), + efl_ui_timepicker_is_24hour_set(efl_added, EINA_TRUE), + efl_event_callback_add(efl_added, EFL_UI_TIMEPICKER_EVENT_TIME_CHANGED,_time_changed_cb, NULL), + efl_pack(bx, efl_added)); + efl_gfx_entity_size_set(win, EINA_SIZE2D(150, 170)); } diff --git a/src/bin/eolian_mono/eolian/mono/events.hh b/src/bin/eolian_mono/eolian/mono/events.hh index 2b85c7e1a0..2acfcbb4b5 100644 --- a/src/bin/eolian_mono/eolian/mono/events.hh +++ b/src/bin/eolian_mono/eolian/mono/events.hh @@ -229,7 +229,7 @@ struct pack_event_info_and_call_visitor return as_generator( indent.inc() << "Contract.Requires(e != null, nameof(e));\n" << indent.inc() << "IntPtr info = e.arg.NativeHandle;\n" - << "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", IntPtr.Zero, null);\n" + << indent.inc() << "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", IntPtr.Zero, null);\n" ).generate(sink, attributes::unused, *context); } bool operator()(attributes::complex_type_def const& type) const @@ -241,7 +241,7 @@ struct pack_event_info_and_call_visitor return as_generator( indent.inc() << "Contract.Requires(e != null, nameof(e));\n" << indent.inc() << "IntPtr info = e.arg.Handle;\n" - << "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", IntPtr.Zero, null);\n" + << indent.inc() << "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", IntPtr.Zero, null);\n" ).generate(sink, attributes::unused, *context); } }; diff --git a/src/lib/efl/interfaces/efl_input_text.eo b/src/lib/efl/interfaces/efl_input_text.eo index 37d3acb978..f563b6dc4f 100644 --- a/src/lib/efl/interfaces/efl_input_text.eo +++ b/src/lib/efl/interfaces/efl_input_text.eo @@ -15,15 +15,9 @@ enum @beta Efl.Input_Text.Panel_Layout_Type hex, [[Hexadecimal layout.]] terminal, [[Command-line terminal layout including esc, alt, ctrl key, so on (no auto-correct, no auto-capitalization).]] password, [[Like normal, but no auto-correct, no auto-capitalization etc.]] - datetime, [[Date and time layout - - @since 1.8]] - emoticon, [[Emoticon layout - - @since 1.10]] - voice [[Voice layout, but if the IME does not support voice layout, then normal layout will be shown. - - @since 1.19]] + datetime, [[Date and time layout.]] + emoticon, [[Emoticon layout.]] + voice [[Voice layout, but if the IME does not support voice layout, then normal layout will be shown.]] } enum @beta Efl.Input_Text.Panel_Language_Type @@ -57,9 +51,7 @@ enum @beta Efl.Input_Text.Panel_Return_Key_Type next, [[Next.]] search, [[Search string or magnifier icon.]] send, [[Send.]] - signin [[Sign-in - - @since 1.8]] + signin [[Sign-in.]] } enum @beta Efl.Input_Text.Panel_Return_Key_State @@ -75,54 +67,49 @@ enum @beta Efl.Input_Text.Panel_Return_Key_State enum @beta Efl.Input_Text.Hints_Type { - [[Enumeration that defines the types of Input Hints. - - @since 1.12 - ]] - none = 0, [[No active hints - - @since 1.12]] - auto_complete = 1 << 0, [[Suggest word auto completion - - @since 1.12]] - sensitive_data = 1 << 1, [[Typed text should not be stored. - - @since 1.12]] - autofill_credit_card_expiration_date = 0x100, [[ Autofill hint for a credit card expiration date - - @since 1.21]] - autofill_credit_card_expiration_day = 0x200, [[Autofill hint for a credit card expiration day - - @since 1.21]] - autofill_credit_card_expiration_month = 0x300, [[ Autofill hint for a credit card expiration month - - @since 1.21]] - autofill_credit_card_expiration_year = 0x400, [[ Autofill hint for a credit card expiration year - - @since 1.21]] - autofill_credit_card_number = 0x500, [[ Autofill hint for a credit card number - - @since 1.21]] - autofill_email_address = 0x600, [[ Autofill hint for an email address - - @since 1.21]] - autofill_name = 0x700, [[ Autofill hint for a user's real name - - @since 1.21]] - autofill_phone = 0x800, [[ Autofill hint for a phone number - - @since 1.21]] - autofill_postal_address = 0x900, [[ Autofill hint for a postal address - - @since 1.21]] - autofill_postal_code = 0xA00, [[ Autofill hint for a postal code - - @since 1.21]] - autofill_id = 0xB00 [[ Autofill hint for a user's ID - - @since 1.21]] + [[Enumeration that defines the types of Input Hints.]] + none = 0, [[No active hints.]] + auto_complete = 1 << 0, [[Suggest word auto completion.]] + sensitive_data = 1 << 1, [[Typed text should not be stored.]] + autofill_credit_card_expiration_date = 0x100, [[ Autofill hint for a credit card expiration date.]] + autofill_credit_card_expiration_day = 0x200, [[Autofill hint for a credit card expiration day.]] + autofill_credit_card_expiration_month = 0x300, [[ Autofill hint for a credit card expiration month.]] + autofill_credit_card_expiration_year = 0x400, [[ Autofill hint for a credit card expiration year.]] + autofill_credit_card_number = 0x500, [[ Autofill hint for a credit card number.]] + autofill_email_address = 0x600, [[ Autofill hint for an email address.]] + autofill_name = 0x700, [[ Autofill hint for a user's real name.]] + autofill_phone = 0x800, [[ Autofill hint for a phone number.]] + autofill_postal_address = 0x900, [[ Autofill hint for a postal address.]] + autofill_postal_code = 0xA00, [[ Autofill hint for a postal code.]] + autofill_id = 0xB00 [[ Autofill hint for a user's ID.]] } +enum @beta Efl.Input_Text.Panel_Layout_Normal_Variation_Type +{ + [[Enumeration for defining the types of @Efl.Input_Text.Panel_Layout_Type for normal variation.]] + normal , [[The plain normal layout.]] + filename , [[Filename layout. Symbols such as '/' should be disabled.]] + person_name , [[The name of a person, @Efl.Input_Text.autocapitalization will be set to @Efl.Input_Text.Capitalize_Type.word.]] +} + +enum @beta Efl.Input_Text.Panel_Layout_Numberonly_Variation_Type +{ + [[Enumeration for defining the types of @Efl.Input_Text.Panel_Layout_Type for normal variation.]] + normal , [[The plain normal number layout.]] + signed , [[The number layout to allow a positive or negative sign at the start.]] + decimal , [[The number layout to allow decimal point to provide fractional value.]] + signed_and_decimal , [[The number layout to allow decimal point and negative sign.]] +} + +enum @beta Efl.Input_Text.Panel_Layout_Password_Variation_Type +{ + [[Enumeration for defining the types of @Efl.Input_Text.Panel_Layout_Type for normal variation.]] + normal , [[The normal password layout.]] + numberonly , [[The password layout to allow only number.]] +} + + + interface @beta Efl.Input_Text { [[All the functionality relating to input hints ]] @@ -154,9 +141,10 @@ interface @beta Efl.Input_Text { } } - // FIXME: What is this? @property input_panel_layout_variation { - [[The input panel layout variation of the entry.]] + [[The input panel layout variation of the entry, this can be + @Efl.Input_Text.Panel_Layout_Normal_Variation_Type , @Efl.Input_Text.Panel_Layout_Numberonly_Variation_Type + or @Efl.Input_Text.Panel_Layout_Password_Variation_Type.]] set { } get { diff --git a/src/lib/elementary/efl_ui_internal_text_interactive.c b/src/lib/elementary/efl_ui_internal_text_interactive.c index 35c6ad2eef..3851aa82a1 100644 --- a/src/lib/elementary/efl_ui_internal_text_interactive.c +++ b/src/lib/elementary/efl_ui_internal_text_interactive.c @@ -927,7 +927,7 @@ _delete_emit(Eo *obj, Efl_Text_Cursor *c, Efl_Ui_Internal_Text_Interactive_Data } efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_CHAR_PREV); } - efl_unref(cur); + efl_del(cur); cur = NULL; Efl_Text_Change_Info info = { NULL, 0, 0, 0, 0 }; @@ -2067,6 +2067,10 @@ _efl_ui_internal_text_interactive_efl_input_text_input_panel_layout_variation_se #else (void)variation; #endif + + if (sd->input_panel_layout == EFL_INPUT_TEXT_PANEL_LAYOUT_TYPE_NORMAL && + variation == EFL_INPUT_TEXT_PANEL_LAYOUT_NORMAL_VARIATION_TYPE_PERSON_NAME) + efl_input_text_autocapitalization_set(obj, EFL_INPUT_TEXT_CAPITALIZE_TYPE_WORD); } EOLIAN static int diff --git a/src/lib/elementary/efl_ui_spin_button.c b/src/lib/elementary/efl_ui_spin_button.c index 514272fae4..6dc0dbe897 100644 --- a/src/lib/elementary/efl_ui_spin_button.c +++ b/src/lib/elementary/efl_ui_spin_button.c @@ -405,10 +405,11 @@ static void _spin_value(Efl_Ui_Spin *obj, Eina_Bool inc) { Efl_Ui_Spin_Button_Data *pd = efl_data_scope_get(obj, EFL_UI_SPIN_BUTTON_CLASS); + double val = efl_ui_range_value_get(obj); + double step = inc ? pd->step : -pd->step; - double absolut_value = efl_ui_range_value_get(obj) + (inc ? pd->step : -pd->step); - - _value_set(obj, absolut_value); + /* clamp to step before setting new value */ + _value_set(obj, round((val + step) / step) * step); } static void diff --git a/src/lib/elementary/efl_ui_textbox.c b/src/lib/elementary/efl_ui_textbox.c index 728c060adb..d88f6a432c 100644 --- a/src/lib/elementary/efl_ui_textbox.c +++ b/src/lib/elementary/efl_ui_textbox.c @@ -635,7 +635,7 @@ _efl_ui_textbox_efl_ui_widget_disabled_set(Eo *obj, Efl_Ui_Textbox_Data *sd, Ein efl_layout_signal_emit(sd->entry_edje, emission, "efl"); if (sd->scroll) { - elm_interface_scrollable_freeze_set(obj, efl_ui_widget_disabled_get(obj)); + efl_ui_scrollable_scroll_freeze_set(obj, efl_ui_widget_disabled_get(obj)); } if (!efl_ui_widget_disabled_get(obj)) @@ -681,7 +681,7 @@ _efl_ui_textbox_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Textbox_Data *sd) // elm_entry_cursor_pos_set -> cursor,changed -> widget_show_region_set // -> smart_objects_calculate will call all smart calculate functions, // and one of them can delete elm_entry. - evas_object_ref(obj); + efl_ref(obj); if (efl_ui_focus_object_focus_get(obj)) { @@ -705,7 +705,7 @@ _efl_ui_textbox_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Textbox_Data *sd) efl_event_callback_call(obj, EFL_UI_LAYOUT_EVENT_THEME_CHANGED, NULL); - evas_object_unref(obj); + efl_unref(obj); return theme_apply; } @@ -1669,9 +1669,6 @@ _create_selection_handlers(Evas_Object *obj, Efl_Ui_Textbox_Data *sd) EOLIAN static void _efl_ui_textbox_efl_gfx_entity_position_set(Eo *obj, Efl_Ui_Textbox_Data *sd, Eina_Position2D pos) { - if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y)) - return; - efl_gfx_entity_position_set(efl_super(obj, MY_CLASS), pos); efl_gfx_entity_position_set(sd->hit_rect, pos); @@ -1681,9 +1678,6 @@ _efl_ui_textbox_efl_gfx_entity_position_set(Eo *obj, Efl_Ui_Textbox_Data *sd, Ei EOLIAN static void _efl_ui_textbox_efl_gfx_entity_size_set(Eo *obj, Efl_Ui_Textbox_Data *sd, Eina_Size2D sz) { - if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h)) - return; - efl_gfx_entity_size_set(sd->hit_rect, sz); _update_selection_handler(obj); @@ -1693,9 +1687,6 @@ _efl_ui_textbox_efl_gfx_entity_size_set(Eo *obj, Efl_Ui_Textbox_Data *sd, Eina_S EOLIAN static void _efl_ui_textbox_efl_gfx_entity_visible_set(Eo *obj, Efl_Ui_Textbox_Data *sd EINA_UNUSED, Eina_Bool vis) { - if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_VISIBLE, 0, vis)) - return; - efl_gfx_entity_visible_set(efl_super(obj, MY_CLASS), vis); if (vis) _update_selection_handler(obj); } diff --git a/src/lib/elementary/efl_ui_timepicker.c b/src/lib/elementary/efl_ui_timepicker.c index 335e26230e..d66ed0e853 100644 --- a/src/lib/elementary/efl_ui_timepicker.c +++ b/src/lib/elementary/efl_ui_timepicker.c @@ -71,6 +71,10 @@ _field_value_update(Eo *obj) efl_ui_range_value_set(pd->hour, pd->cur_time[TIMEPICKER_HOUR]); } } + else + { + efl_ui_range_value_set(pd->hour, pd->cur_time[TIMEPICKER_HOUR]); + } efl_ui_range_value_set(pd->min, pd->cur_time[TIMEPICKER_MIN]); @@ -112,12 +116,6 @@ _field_changed_cb(void *data, const Efl_Event *ev) static void _fields_init(Eo *obj) { - const char *fmt; - char ch; - int i; - int field = 0; - char buf[FMT_LEN_MAX]; - Efl_Ui_Timepicker_Data *pd = efl_data_scope_get(obj, MY_CLASS); //Field create. @@ -147,6 +145,25 @@ _fields_init(Eo *obj) _field_value_update(obj); +} + + +EOLIAN static Eina_Error +_efl_ui_timepicker_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Timepicker_Data *pd) +{ + const char *fmt; + char ch; + int i; + char buf[FMT_LEN_MAX]; + int field = 0; + Eina_Error ret = EFL_UI_THEME_APPLY_ERROR_NONE; + + ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS)); + + if (ret != EFL_UI_THEME_APPLY_ERROR_NONE) + goto end; + + fmt = efl_datetime_manager_format_get(pd->dt_manager); if (!fmt) { @@ -171,7 +188,8 @@ _fields_init(Eo *obj) else { //TODO: monitoring locale change and update field location. - if (field == 0) + //FIXME: disabled this code, as it caused issues, see T8546 + /*if (field == 0) { elm_object_signal_emit(obj, "efl,colon_field1,visible,on", "efl"); elm_object_signal_emit(obj, "efl,colon_field0,visible,off", "efl"); @@ -182,8 +200,11 @@ _fields_init(Eo *obj) elm_object_signal_emit(obj, "efl,colon_field1,visible,off", "efl"); } - elm_layout_signal_emit(obj, "efl,ampm,visible,on", "efl"); - edje_object_message_signal_process(elm_layout_edje_get(obj)); + if (pd->is_24hour) + elm_layout_signal_emit(obj, "efl,ampm,visible,off", "efl"); + else + elm_layout_signal_emit(obj, "efl,ampm,visible,on", "efl"); + edje_object_message_signal_process(elm_layout_edje_get(obj));*/ efl_content_set(efl_part(obj, buf), pd->ampm); } @@ -193,8 +214,12 @@ _fields_init(Eo *obj) } fmt++; } +end: + return ret; } + + EOLIAN static Eo * _efl_ui_timepicker_efl_object_constructor(Eo *obj, Efl_Ui_Timepicker_Data *pd EINA_UNUSED) { @@ -204,12 +229,6 @@ _efl_ui_timepicker_efl_object_constructor(Eo *obj, Efl_Ui_Timepicker_Data *pd EI elm_widget_theme_klass_set(obj, "timepicker"); obj = efl_constructor(efl_super(obj, MY_CLASS)); - if (elm_widget_theme_object_set(obj, wd->resize_obj, - elm_widget_theme_klass_get(obj), - elm_widget_theme_element_get(obj), - elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC) - CRI("Failed to set layout!"); - _fields_init(obj); elm_widget_can_focus_set(obj, EINA_TRUE); @@ -250,10 +269,17 @@ _efl_ui_timepicker_is_24hour_set(Eo *obj, Efl_Ui_Timepicker_Data *pd, Eina_Bool if (pd->is_24hour == is_24hour) return; pd->is_24hour = is_24hour; - if (pd->is_24hour == EINA_TRUE) - elm_layout_signal_emit(obj, "efl,ampm,visible,off", "efl"); + if (!pd->is_24hour) + { + efl_ui_widget_disabled_set(pd->ampm, EINA_FALSE); + efl_ui_range_limits_set(pd->hour, 1, 12); + } else - elm_layout_signal_emit(obj, "efl,ampm,visible,on", "efl"); + { + efl_ui_widget_disabled_set(pd->ampm, EINA_TRUE); + efl_ui_range_limits_set(pd->hour, 0, 23); + } + _field_value_update(obj); } diff --git a/src/lib/elementary/efl_ui_timepicker.eo b/src/lib/elementary/efl_ui_timepicker.eo index d7aa8fcc23..9ced109efb 100644 --- a/src/lib/elementary/efl_ui_timepicker.eo +++ b/src/lib/elementary/efl_ui_timepicker.eo @@ -40,6 +40,7 @@ class Efl.Ui.Timepicker extends Efl.Ui.Layout_Base implements { Efl.Object.constructor; Efl.Object.destructor; + Efl.Ui.Widget.theme_apply; } events { time,changed: void; [[Called when time is changed]] diff --git a/src/lib/eo/eina_types.eot b/src/lib/eo/eina_types.eot index 5c31e5b219..4cb8e9347d 100644 --- a/src/lib/eo/eina_types.eot +++ b/src/lib/eo/eina_types.eot @@ -60,7 +60,7 @@ struct @extern Eina.Matrix3 { zz: double; [[ZZ matrix value]] } -type @extern @beta Eina.Unicode: uint32; [[Eina unicode type]] +type @extern Eina.Unicode: uint32; [[Eina unicode type. @since 1.24]] struct @extern @beta Eina.File_Direct_Info; [[Eina file direct information data structure]] /*{ diff --git a/src/lib/evas/Efl_Canvas.h b/src/lib/evas/Efl_Canvas.h index 1963aa2a55..dc3f61a43b 100644 --- a/src/lib/evas/Efl_Canvas.h +++ b/src/lib/evas/Efl_Canvas.h @@ -121,7 +121,7 @@ extern "C" { #include #include #include -#include +#include #ifdef __cplusplus diff --git a/src/lib/evas/Evas_Eo.h b/src/lib/evas/Evas_Eo.h index 1137426a30..d9cc99932c 100644 --- a/src/lib/evas/Evas_Eo.h +++ b/src/lib/evas/Evas_Eo.h @@ -214,7 +214,7 @@ struct _Efl_Canvas_Object_Animation_Event #include "gesture/efl_canvas_gesture_recognizer_flick.eo.h" #include "gesture/efl_canvas_gesture_recognizer_zoom.eo.h" #include "gesture/efl_canvas_gesture_manager.eo.h" -#include "gesture/efl_gesture_events.eo.h" +#include "gesture/efl_canvas_gesture_events.eo.h" #include "canvas/efl_canvas_object.eo.h" #include "canvas/efl_canvas_object_animation.eo.h" diff --git a/src/lib/evas/canvas/efl_canvas_object.eo b/src/lib/evas/canvas/efl_canvas_object.eo index dbee3db658..bc02e56197 100644 --- a/src/lib/evas/canvas/efl_canvas_object.eo +++ b/src/lib/evas/canvas/efl_canvas_object.eo @@ -11,7 +11,7 @@ struct Efl.Event_Animator_Tick { abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity, Efl.Gfx.Color, Efl.Gfx.Stack, Efl.Input.Interface, Efl.Gfx.Hint, - Efl.Gfx.Mapping, Efl.Canvas.Pointer, Efl.Gesture.Events, Efl.Canvas.Object_Animation + Efl.Gfx.Mapping, Efl.Canvas.Pointer, Efl.Canvas.Gesture_Events, Efl.Canvas.Object_Animation { [[Efl canvas object abstract class diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index f4d6cfb88f..9010558887 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -8503,6 +8503,15 @@ _evas_object_textblock_text_markup_set(Eo *eo_obj, Efl_Canvas_Textblock_Data *o, evas_textblock_cursor_paragraph_first(o->cursor); evas_object_textblock_text_markup_prepend(o->cursor, text); + + /*If there was no text markup_prepend will not call change function + So we will call it inside markup_set*/ + if (!text || !*text) + { + efl_event_callback_call(eo_obj, EFL_CANVAS_TEXTBLOCK_EVENT_CHANGED, NULL); + _evas_textblock_changed(o, eo_obj); + } + efl_event_freeze(eo_obj); /* Point all the cursors to the starrt */ { diff --git a/src/lib/evas/gesture/efl_canvas_gesture.c b/src/lib/evas/gesture/efl_canvas_gesture.c index 0cc7f8d423..26f279f557 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture.c +++ b/src/lib/evas/gesture/efl_canvas_gesture.c @@ -49,4 +49,4 @@ _efl_canvas_gesture_timestamp_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_ } #include "efl_canvas_gesture.eo.c" -#include "efl_gesture_events.eo.c" +#include "efl_canvas_gesture_events.eo.c" diff --git a/src/lib/evas/gesture/efl_canvas_gesture.eo b/src/lib/evas/gesture/efl_canvas_gesture.eo index eaced25ad8..22334e245e 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture.eo @@ -1,5 +1,5 @@ import efl_canvas_gesture_types; -parse efl_gesture_events; +parse efl_canvas_gesture_events; abstract @beta Efl.Canvas.Gesture extends Efl.Object { @@ -11,7 +11,7 @@ abstract @beta Efl.Canvas.Gesture extends Efl.Object Typically this class is not used directly, instead, some sub-class of it (like @Efl.Canvas.Gesture_Tap or @Efl.Canvas.Gesture_Zoom) is retrieved from gesture events - (like @[Efl.Gesture.Events.gesture,tap] or @[Efl.Gesture.Events.gesture,zoom]). + (like @[Efl.Canvas.Gesture_Events.gesture,tap] or @[Efl.Canvas.Gesture_Events.gesture,zoom]). ]] c_prefix: efl_gesture; methods { diff --git a/src/lib/evas/gesture/efl_canvas_gesture_double_tap.eo b/src/lib/evas/gesture/efl_canvas_gesture_double_tap.eo index c154500244..ee52aedbc5 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_double_tap.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_double_tap.eo @@ -2,7 +2,7 @@ class @beta Efl.Canvas.Gesture_Double_Tap extends Efl.Canvas.Gesture { [[Double-tap gesture class holding state information. See @Efl.Canvas.Gesture to see what this state is and - @[Efl.Gesture.Events.gesture,double_tap] for a description of the Double-tap gesture. + @[Efl.Canvas.Gesture_Events.gesture,double_tap] for a description of the Double-tap gesture. Application developers receive these objects inside a gesture event and do not typically need to create their own. ]] diff --git a/src/lib/evas/gesture/efl_gesture_events.eo b/src/lib/evas/gesture/efl_canvas_gesture_events.eo similarity index 85% rename from src/lib/evas/gesture/efl_gesture_events.eo rename to src/lib/evas/gesture/efl_canvas_gesture_events.eo index df0a473d0b..9344d71edb 100644 --- a/src/lib/evas/gesture/efl_gesture_events.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_events.eo @@ -1,4 +1,4 @@ -interface @beta Efl.Gesture.Events +interface @beta Efl.Canvas.Gesture_Events { [[Interface for objects capable of emitting gesture events, like @Efl.Canvas.Object. ]] @@ -6,25 +6,25 @@ interface @beta Efl.Gesture.Events events { gesture,tap: Efl.Canvas.Gesture_Tap; [[Emitted when a Tap gesture has been detected. A Tap gesture consists of a touch of the screen (or click of the mouse) quickly followed by - a release. If the release happens too late a @[Efl.Gesture.Events.gesture,long_tap] event will be + a release. If the release happens too late a @[Efl.Canvas.Gesture_Events.gesture,long_tap] event will be emitted instead. ]] gesture,double_tap: Efl.Canvas.Gesture_Double_Tap; [[Emitted when a Double-tap gesture has been detected. A Double-tap gesture consists of two taps on the screen (or clicks of the mouse) in quick succession. If the second one is delayed for too long they will be detected as two independent - @[Efl.Gesture.Events.gesture,tap] events. + @[Efl.Canvas.Gesture_Events.gesture,tap] events. ]] gesture,triple_tap: Efl.Canvas.Gesture_Triple_Tap; [[Emitted when a Triple-tap gesture has been detected. A Triple-tap gesture consists of three taps on the screen (or clicks of the mouse) in quick succession. If any of them is delayed for too long they will be detected as independent - @[Efl.Gesture.Events.gesture,tap] or @[Efl.Gesture.Events.gesture,double_tap] events. + @[Efl.Canvas.Gesture_Events.gesture,tap] or @[Efl.Canvas.Gesture_Events.gesture,double_tap] events. ]] gesture,long_tap: Efl.Canvas.Gesture_Long_Tap; [[Emitted when a Long-tap gesture has been detected. A Long-tap gesture consists of a touch of the screen (or click of the mouse) followed by a release - after some time. If the release happens too quickly a @[Efl.Gesture.Events.gesture,tap] event will be + after some time. If the release happens too quickly a @[Efl.Canvas.Gesture_Events.gesture,tap] event will be emitted instead. ]] diff --git a/src/lib/evas/gesture/efl_canvas_gesture_flick.eo b/src/lib/evas/gesture/efl_canvas_gesture_flick.eo index 125a538cc9..bec2f127c8 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_flick.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_flick.eo @@ -4,7 +4,7 @@ class @beta Efl.Canvas.Gesture_Flick extends Efl.Canvas.Gesture { [[Flick gesture class holding state information. See @Efl.Canvas.Gesture to see what this state is and - @[Efl.Gesture.Events.gesture,flick] for a description of the Flick gesture. + @[Efl.Canvas.Gesture_Events.gesture,flick] for a description of the Flick gesture. Application developers receive these objects inside a gesture event and do not typically need to create their own. ]] diff --git a/src/lib/evas/gesture/efl_canvas_gesture_long_tap.eo b/src/lib/evas/gesture/efl_canvas_gesture_long_tap.eo index c182697a58..022e3bd4ae 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_long_tap.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_long_tap.eo @@ -2,7 +2,7 @@ class @beta Efl.Canvas.Gesture_Long_Tap extends Efl.Canvas.Gesture { [[Long-tap gesture class holding state information. See @Efl.Canvas.Gesture to see what this state is and - @[Efl.Gesture.Events.gesture,long_tap] for a description of the Long-tap gesture. + @[Efl.Canvas.Gesture_Events.gesture,long_tap] for a description of the Long-tap gesture. Application developers receive these objects inside a gesture event and do not typically need to create their own. ]] diff --git a/src/lib/evas/gesture/efl_canvas_gesture_momentum.eo b/src/lib/evas/gesture/efl_canvas_gesture_momentum.eo index df0e0720db..d3bd578e1c 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_momentum.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_momentum.eo @@ -4,7 +4,7 @@ class @beta Efl.Canvas.Gesture_Momentum extends Efl.Canvas.Gesture { [[Momentum gesture class holding state information. See @Efl.Canvas.Gesture to see what this state is and - @[Efl.Gesture.Events.gesture,momentum] for a description of the Momentum gesture. + @[Efl.Canvas.Gesture_Events.gesture,momentum] for a description of the Momentum gesture. Application developers receive these objects inside a gesture event and do not typically need to create their own. ]] diff --git a/src/lib/evas/gesture/efl_canvas_gesture_private.h b/src/lib/evas/gesture/efl_canvas_gesture_private.h index a835c3093d..fb24d0f549 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_private.h +++ b/src/lib/evas/gesture/efl_canvas_gesture_private.h @@ -4,7 +4,7 @@ #include "evas_common_private.h" #include "evas_private.h" -#include "efl_gesture_events.eo.h" +#include "efl_canvas_gesture_events.eo.h" #include diff --git a/src/lib/evas/gesture/efl_canvas_gesture_tap.eo b/src/lib/evas/gesture/efl_canvas_gesture_tap.eo index 238c487e61..b3cda6d447 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_tap.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_tap.eo @@ -2,7 +2,7 @@ class @beta Efl.Canvas.Gesture_Tap extends Efl.Canvas.Gesture { [[Tap gesture class holding state information. See @Efl.Canvas.Gesture to see what this state is and - @[Efl.Gesture.Events.gesture,tap] for a description of the Tap gesture. + @[Efl.Canvas.Gesture_Events.gesture,tap] for a description of the Tap gesture. Application developers receive these objects inside a gesture event and do not typically need to create their own. ]] diff --git a/src/lib/evas/gesture/efl_canvas_gesture_triple_tap.eo b/src/lib/evas/gesture/efl_canvas_gesture_triple_tap.eo index a85bf6b671..f58a9912ae 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_triple_tap.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_triple_tap.eo @@ -2,7 +2,7 @@ class @beta Efl.Canvas.Gesture_Triple_Tap extends Efl.Canvas.Gesture { [[Triple-tap gesture class holding state information. See @Efl.Canvas.Gesture to see what this state is and - @[Efl.Gesture.Events.gesture,triple_tap] for a description of the Triple-tap gesture. + @[Efl.Canvas.Gesture_Events.gesture,triple_tap] for a description of the Triple-tap gesture. Application developers receive these objects inside a gesture event and do not typically need to create their own. ]] diff --git a/src/lib/evas/gesture/efl_canvas_gesture_zoom.eo b/src/lib/evas/gesture/efl_canvas_gesture_zoom.eo index 4620225db0..1471a9401c 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_zoom.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_zoom.eo @@ -2,7 +2,7 @@ class @beta Efl.Canvas.Gesture_Zoom extends Efl.Canvas.Gesture { [[Zoom gesture class holding state information. See @Efl.Canvas.Gesture to see what this state is and - @[Efl.Gesture.Events.gesture,zoom] for a description of the Zoom gesture. + @[Efl.Canvas.Gesture_Events.gesture,zoom] for a description of the Zoom gesture. Application developers receive these objects inside a gesture event and do not typically need to create their own. ]] diff --git a/src/lib/evas/gesture/meson.build b/src/lib/evas/gesture/meson.build index 9854e6f94d..7838efdc9d 100644 --- a/src/lib/evas/gesture/meson.build +++ b/src/lib/evas/gesture/meson.build @@ -17,7 +17,7 @@ pub_eo_files = [ 'efl_canvas_gesture_recognizer_flick.eo', 'efl_canvas_gesture_recognizer_zoom.eo', 'efl_canvas_gesture_manager.eo', - 'efl_gesture_events.eo' + 'efl_canvas_gesture_events.eo' ] evas_gesture_eo_files = pub_eo_files diff --git a/src/tests/elementary/efl_ui_test_spin_button.c b/src/tests/elementary/efl_ui_test_spin_button.c index a60314ff21..f723e348af 100644 --- a/src/tests/elementary/efl_ui_test_spin_button.c +++ b/src/tests/elementary/efl_ui_test_spin_button.c @@ -156,6 +156,59 @@ EFL_START_TEST (spin_value_dec_min) } EFL_END_TEST +EFL_START_TEST (spin_wraparound) +{ + efl_ui_spin_button_wraparound_set(spin, EINA_TRUE); + efl_ui_range_limits_set(spin, 10, 30); + efl_ui_range_step_set(spin, 20); + + efl_ui_range_value_set(spin, 20); + click_spin_part(spin, "efl.inc_button"); + ck_assert_int_eq(efl_ui_range_value_get(spin), 10); + + efl_ui_range_value_set(spin, 20); + click_spin_part(spin, "efl.dec_button"); + ck_assert_int_eq(efl_ui_range_value_get(spin), 30); + +} +EFL_END_TEST + +EFL_START_TEST (spin_double_values) +{ + double step = 0.1; + efl_ui_range_limits_set(spin, 10, 30); + efl_ui_range_value_set(spin, 20); + efl_ui_range_step_set(spin, step); + ck_assert(EINA_DBL_EQ(efl_ui_range_step_get(spin), step)); + get_me_to_those_events(spin); + ck_assert(EINA_DBL_EQ(efl_ui_range_value_get(spin), 20.0)); + + for (int i = 0; i < 5; ++i) + { + click_part(spin, "efl.inc_button"); + get_me_to_those_events(spin); + } + ck_assert_int_eq(EINA_DBL_EQ(efl_ui_range_value_get(spin), 20.5), 1); +} +EFL_END_TEST + +EFL_START_TEST (spin_double_values_hitting_max_with_step) +{ + //idea is to check that spin button can hit max with inc, even if value is not multiple is 2.7 + efl_ui_range_limits_set(spin, 10, 30); + efl_ui_range_value_set(spin, 27); + efl_ui_range_step_set(spin, 2.7); + get_me_to_those_events(spin); + + for (int i = 0; i < 2; ++i) + { + click_part(spin, "efl.inc_button"); + get_me_to_those_events(spin); + } + ck_assert_int_eq(EINA_DBL_EQ(efl_ui_range_value_get(spin), 30), 1); +} +EFL_END_TEST + void efl_ui_test_spin_button(TCase *tc) { tcase_add_checked_fixture(tc, fail_on_errors_setup, fail_on_errors_teardown); @@ -164,4 +217,7 @@ void efl_ui_test_spin_button(TCase *tc) tcase_add_test(tc, spin_value_inc); tcase_add_test(tc, spin_value_inc_max); tcase_add_test(tc, spin_value_dec_min); + tcase_add_test(tc, spin_wraparound); + tcase_add_test(tc, spin_double_values); + tcase_add_test(tc, spin_double_values_hitting_max_with_step); } diff --git a/src/tests/elementary/efl_ui_test_timepicker.c b/src/tests/elementary/efl_ui_test_timepicker.c new file mode 100644 index 0000000000..1aca88cc23 --- /dev/null +++ b/src/tests/elementary/efl_ui_test_timepicker.c @@ -0,0 +1,45 @@ +#define EFL_NOLEGACY_API_SUPPORT +#ifdef HAVE_CONFIG_H +# include "elementary_config.h" +#endif +#define EFL_LAYOUT_CALC_PROTECTED +#include +#include "efl_ui_suite.h" + +EFL_START_TEST(check_all_times) +{ + Eo *win = win_add(); + Eo *timepicker = efl_add(EFL_UI_TIMEPICKER_CLASS, win); + + for (int min = 0; min < 60; ++min) + { + for (int hour = 0; hour < 24; ++hour) + { + efl_ui_timepicker_time_set(timepicker, hour, min); + } + } +} +EFL_END_TEST + +EFL_START_TEST(check_all_times_24_mode) +{ + Eo *win = win_add(); + Eo *timepicker = efl_add(EFL_UI_TIMEPICKER_CLASS, win, + efl_ui_timepicker_is_24hour_set(efl_added, EINA_TRUE)); + + for (int min = 0; min < 60; ++min) + { + for (int hour = 0; hour < 24; ++hour) + { + efl_ui_timepicker_time_set(timepicker, hour, min); + } + } +} +EFL_END_TEST + +void efl_ui_test_timepicker(TCase *tc) +{ + tcase_add_checked_fixture(tc, fail_on_errors_setup, fail_on_errors_teardown); + tcase_add_test(tc, check_all_times); + tcase_add_test(tc, check_all_times_24_mode); +} diff --git a/src/tests/evas/evas_test_textblock.c b/src/tests/evas/evas_test_textblock.c index b51f149174..8560e36e7c 100644 --- a/src/tests/evas/evas_test_textblock.c +++ b/src/tests/evas/evas_test_textblock.c @@ -4942,6 +4942,31 @@ EFL_START_TEST(efl_text_style) { START_EFL_CANVAS_TEXTBLOCK_TEST(); + int changed_emit = 0; + efl_event_callback_add(txt, EFL_CANVAS_TEXTBLOCK_EVENT_CHANGED, _increment_int_changed, &changed_emit); + efl_text_set(txt, "Hello"); + ck_assert_int_eq(changed_emit, 1); + efl_text_set(txt, ""); + ck_assert_int_eq(changed_emit, 2); + efl_text_set(txt, ""); + ck_assert_int_eq(changed_emit, 2); + + changed_emit = 0; + efl_text_markup_set(txt, ""Hello""); + ck_assert_int_eq(changed_emit, 1); + efl_text_markup_set(txt, ""); + ck_assert_int_eq(changed_emit, 2); + efl_text_markup_set(txt, ""); + ck_assert_int_eq(changed_emit, 2); + + END_EFL_CANVAS_TEXTBLOCK_TEST(); +} +EFL_END_TEST + +EFL_START_TEST(efl_text_markup) +{ + START_EFL_CANVAS_TEXTBLOCK_TEST(); + efl_text_underline_type_set(txt, EFL_TEXT_STYLE_UNDERLINE_TYPE_NONE); ck_assert_int_eq(efl_text_underline_type_get(txt), EFL_TEXT_STYLE_UNDERLINE_TYPE_NONE); efl_text_underline_type_set(txt, EFL_TEXT_STYLE_UNDERLINE_TYPE_SINGLE); @@ -4992,5 +5017,6 @@ void evas_test_textblock(TCase *tc) tcase_add_test(tc, efl_text_font); tcase_add_test(tc, efl_canvas_textblock_style); tcase_add_test(tc, efl_text_style); + tcase_add_test(tc, efl_text_markup); }