summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_spin_button.c
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-08-05 08:44:51 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-08-05 08:47:00 -0400
commit94b05f15e6e0548517289092ebb16c4cabd3c9fa (patch)
tree685c064e4b1ef3ed57be17e872ecad367c411af3 /src/lib/elementary/efl_ui_spin_button.c
parent034ef0badc593656af968797ee494c23809f2ae1 (diff)
efl_ui_spin/button: move from elm_ to efl_ prefixed functions
Summary: this moves a bunch of api calls from elm_ to efl_. Those calls that are called on the entry object are still elm, as well as access APIs, they will have to be moved once efl_ui_text is usable. Depends on D9475 Reviewers: segfaultxavi, cedric, zmike Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9488
Diffstat (limited to 'src/lib/elementary/efl_ui_spin_button.c')
-rw-r--r--src/lib/elementary/efl_ui_spin_button.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/lib/elementary/efl_ui_spin_button.c b/src/lib/elementary/efl_ui_spin_button.c
index d71e101..131d84f 100644
--- a/src/lib/elementary/efl_ui_spin_button.c
+++ b/src/lib/elementary/efl_ui_spin_button.c
@@ -167,8 +167,8 @@ _entry_hide(Evas_Object *obj)
167{ 167{
168 Efl_Ui_Spin_Button_Data *sd = efl_data_scope_get(obj, MY_CLASS); 168 Efl_Ui_Spin_Button_Data *sd = efl_data_scope_get(obj, MY_CLASS);
169 169
170 elm_layout_signal_emit(obj, "efl,state,button,active", "efl"); 170 efl_layout_signal_emit(obj, "efl,state,button,active", "efl");
171 elm_layout_signal_emit(obj, "efl,state,entry,inactive", "efl"); 171 efl_layout_signal_emit(obj, "efl,state,entry,inactive", "efl");
172 172
173 if (sd->entry_visible && !evas_focus_state_get(evas_object_evas_get(obj))) 173 if (sd->entry_visible && !evas_focus_state_get(evas_object_evas_get(obj)))
174 sd->entry_reactivate = EINA_TRUE; 174 sd->entry_reactivate = EINA_TRUE;
@@ -343,7 +343,7 @@ _entry_show_cb(void *data,
343 elm_object_focus_set(obj, EINA_TRUE); 343 elm_object_focus_set(obj, EINA_TRUE);
344 elm_entry_select_all(obj); 344 elm_entry_select_all(obj);
345 sd->entry_visible = EINA_TRUE; 345 sd->entry_visible = EINA_TRUE;
346 elm_layout_signal_emit(data, "efl,state,button,inactive", "efl"); 346 efl_layout_signal_emit(data, "efl,state,button,inactive", "efl");
347} 347}
348 348
349static void 349static void
@@ -351,7 +351,7 @@ _toggle_entry(Evas_Object *obj)
351{ 351{
352 Efl_Ui_Spin_Button_Data *sd = efl_data_scope_get(obj, MY_CLASS); 352 Efl_Ui_Spin_Button_Data *sd = efl_data_scope_get(obj, MY_CLASS);
353 353
354 if (elm_widget_disabled_get(obj)) return; 354 if (efl_ui_widget_disabled_get(obj)) return;
355 if (!sd->editable) return; 355 if (!sd->editable) return;
356 if (sd->entry_visible) _entry_value_apply(obj); 356 if (sd->entry_visible) _entry_value_apply(obj);
357 else 357 else
@@ -378,7 +378,7 @@ _toggle_entry(Evas_Object *obj)
378 efl_event_callback_add(sd->ent, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, 378 efl_event_callback_add(sd->ent, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED,
379 _entry_focus_changed_cb, obj); 379 _entry_focus_changed_cb, obj);
380 sd->entry_visible = EINA_TRUE; 380 sd->entry_visible = EINA_TRUE;
381 elm_layout_signal_emit(obj, "efl,state,entry,active", "efl"); 381 efl_layout_signal_emit(obj, "efl,state,entry,active", "efl");
382 { 382 {
383 Eina_List *items = NULL; 383 Eina_List *items = NULL;
384 384
@@ -512,7 +512,7 @@ _access_info_cb(void *data, Evas_Object *obj EINA_UNUSED)
512static char * 512static char *
513_access_state_cb(void *data, Evas_Object *obj EINA_UNUSED) 513_access_state_cb(void *data, Evas_Object *obj EINA_UNUSED)
514{ 514{
515 if (elm_widget_disabled_get(data)) 515 if (efl_ui_widget_disabled_get(data))
516 return strdup(E_("State: Disabled")); 516 return strdup(E_("State: Disabled"));
517 517
518 return NULL; 518 return NULL;
@@ -525,7 +525,7 @@ _access_activate_spin_button_cb(void *data,
525{ 525{
526 Efl_Ui_Spin_Button_Data *sd = efl_data_scope_get(data, MY_CLASS); 526 Efl_Ui_Spin_Button_Data *sd = efl_data_scope_get(data, MY_CLASS);
527 527
528 if (elm_widget_disabled_get(data)) return; 528 if (efl_ui_widget_disabled_get(data)) return;
529 if (!sd->entry_visible) 529 if (!sd->entry_visible)
530 _toggle_entry(data); 530 _toggle_entry(data);
531} 531}
@@ -572,10 +572,10 @@ _access_spinner_register(Evas_Object *obj, Eina_Bool is_access)
572 /* unregister access */ 572 /* unregister access */
573 _elm_access_edje_object_part_object_unregister 573 _elm_access_edje_object_part_object_unregister
574 (obj, elm_layout_edje_get(obj), "access"); 574 (obj, elm_layout_edje_get(obj), "access");
575 elm_layout_signal_emit(obj, "efl,state,access,inactive", "efl"); 575 efl_layout_signal_emit(obj, "efl,state,access,inactive", "efl");
576 return; 576 return;
577 } 577 }
578 elm_layout_signal_emit(obj, "efl,state,access,active", "efl"); 578 efl_layout_signal_emit(obj, "efl,state,access,active", "efl");
579 ao = _elm_access_edje_object_part_object_register 579 ao = _elm_access_edje_object_part_object_register
580 (obj, elm_layout_edje_get(obj), "access"); 580 (obj, elm_layout_edje_get(obj), "access");
581 581
@@ -585,7 +585,7 @@ _access_spinner_register(Evas_Object *obj, Eina_Bool is_access)
585 _elm_access_activate_callback_set(ai, _access_activate_spin_button_cb, obj); 585 _elm_access_activate_callback_set(ai, _access_activate_spin_button_cb, obj);
586 586
587 /*Do not register spinner buttons if widget is disabled*/ 587 /*Do not register spinner buttons if widget is disabled*/
588 if (!elm_widget_disabled_get(obj)) 588 if (!efl_ui_widget_disabled_get(obj))
589 { 589 {
590 ai = _elm_access_info_get(sd->inc_button); 590 ai = _elm_access_info_get(sd->inc_button);
591 _elm_access_text_set(ai, ELM_ACCESS_TYPE, 591 _elm_access_text_set(ai, ELM_ACCESS_TYPE,
@@ -686,10 +686,11 @@ _efl_ui_spin_button_efl_object_constructor(Eo *obj, Efl_Ui_Spin_Button_Data *sd)
686 efl_ui_focus_composition_elements_set(obj, items); 686 efl_ui_focus_composition_elements_set(obj, items);
687 } 687 }
688 688
689 elm_layout_signal_callback_add
690 (obj, "efl,action,entry,toggle", "*", _entry_toggle_cb, NULL);
691 689
692 elm_widget_can_focus_set(obj, EINA_TRUE); 690 efl_layout_signal_callback_add
691 (obj, "efl,action,entry,toggle", "*", _entry_toggle_cb, NULL, NULL);
692
693 efl_ui_widget_focus_allow_set(obj, EINA_TRUE);
693 694
694 efl_access_object_role_set(obj, EFL_ACCESS_ROLE_SPIN_BUTTON); 695 efl_access_object_role_set(obj, EFL_ACCESS_ROLE_SPIN_BUTTON);
695 696