|
|
|
@ -1296,6 +1296,19 @@ test_list_focus_focus_animate_check_changed(void *data, Evas_Object *obj, |
|
|
|
|
elm_check_state_get(obj)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
test_list_focus_focus_move_policy_changed(void *data EINA_UNUSED, |
|
|
|
|
Evas_Object *obj, |
|
|
|
|
void *event_info EINA_UNUSED) |
|
|
|
|
{ |
|
|
|
|
int val = elm_radio_value_get(obj); |
|
|
|
|
|
|
|
|
|
if (val == 0) |
|
|
|
|
elm_config_focus_move_policy_set(ELM_FOCUS_MOVE_POLICY_CLICK); |
|
|
|
|
else if (val == 1) |
|
|
|
|
elm_config_focus_move_policy_set(ELM_FOCUS_MOVE_POLICY_IN); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
_item_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info) |
|
|
|
|
{ |
|
|
|
@ -1365,7 +1378,7 @@ static void |
|
|
|
|
_test_list_focus(const char *name, const char *title, Eina_Bool horiz) |
|
|
|
|
{ |
|
|
|
|
Evas_Object *win, *li, *btn, *bx, *bx2, *fr, *bx_opt, *chk, *bx_btn; |
|
|
|
|
Evas_Object *btn_focus, *btn_sel; |
|
|
|
|
Evas_Object *btn_focus, *btn_sel, *bx_mv, *rd, *rdg; |
|
|
|
|
unsigned int lhand, rhand, idx; |
|
|
|
|
char buf[256]; |
|
|
|
|
Elm_Object_Item *it = NULL, *it_3 = NULL; |
|
|
|
@ -1477,6 +1490,40 @@ _test_list_focus(const char *name, const char *title, Eina_Bool horiz) |
|
|
|
|
|
|
|
|
|
test_list_focus_focus_on_selection_set(li, chk, EINA_FALSE); |
|
|
|
|
|
|
|
|
|
// Focus Movement Policy
|
|
|
|
|
fr = elm_frame_add(bx); |
|
|
|
|
elm_object_text_set(fr, "Focus Movement Policy"); |
|
|
|
|
evas_object_size_hint_weight_set(fr, EVAS_HINT_EXPAND, 0.0); |
|
|
|
|
evas_object_size_hint_align_set(fr, EVAS_HINT_FILL, EVAS_HINT_FILL); |
|
|
|
|
elm_box_pack_end(bx, fr); |
|
|
|
|
evas_object_show(fr); |
|
|
|
|
|
|
|
|
|
bx_mv = elm_box_add(fr); |
|
|
|
|
elm_box_horizontal_set(bx_mv, EINA_TRUE); |
|
|
|
|
elm_object_content_set(fr, bx_mv); |
|
|
|
|
evas_object_show(bx_mv); |
|
|
|
|
|
|
|
|
|
rdg = rd = elm_radio_add(bx_mv); |
|
|
|
|
elm_object_text_set(rd, "Focus Move by Click"); |
|
|
|
|
elm_radio_state_value_set(rd, 0); |
|
|
|
|
evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, 0.0); |
|
|
|
|
evas_object_smart_callback_add(rd, "changed", |
|
|
|
|
test_list_focus_focus_move_policy_changed, |
|
|
|
|
NULL); |
|
|
|
|
elm_box_pack_end(bx_mv, rd); |
|
|
|
|
evas_object_show(rd); |
|
|
|
|
|
|
|
|
|
rd = elm_radio_add(bx_mv); |
|
|
|
|
elm_object_text_set(rd, "Focus Move by Mouse-In"); |
|
|
|
|
elm_radio_group_add(rd, rdg); |
|
|
|
|
elm_radio_state_value_set(rd, 1); |
|
|
|
|
evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, 0.0); |
|
|
|
|
evas_object_smart_callback_add(rd, "changed", |
|
|
|
|
test_list_focus_focus_move_policy_changed, |
|
|
|
|
NULL); |
|
|
|
|
elm_box_pack_end(bx_mv, rd); |
|
|
|
|
evas_object_show(rd); |
|
|
|
|
|
|
|
|
|
// Focus/Selection
|
|
|
|
|
fr = elm_frame_add(bx); |
|
|
|
|
elm_object_text_set(fr, "Focus/Selection"); |
|
|
|
|