forked from enlightenment/efl
Revert "elm access - let's not use un-exported apis and break build."
This reverts commit bce55bd7695fef10278ad4038dc3a655d3859aba.
This commit is contained in:
parent
2caa98e296
commit
83b1ede078
|
@ -450,8 +450,7 @@ my_win_main(const char *autorun, Eina_Bool test_win_only)
|
||||||
evas_object_show(lb);
|
evas_object_show(lb);
|
||||||
|
|
||||||
/* This label will not be read out */
|
/* This label will not be read out */
|
||||||
// this is not an exported api! don't use! (no EAPI)
|
elm_access_object_unregister(lb);
|
||||||
// elm_access_object_unregister(lb);
|
|
||||||
|
|
||||||
tg = elm_check_add(win);
|
tg = elm_check_add(win);
|
||||||
elm_object_style_set(tg, "toggle");
|
elm_object_style_set(tg, "toggle");
|
||||||
|
|
|
@ -231,7 +231,7 @@ test_access2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
Evas_Object *win, *bx, *sc, *ly, *ly2, *ic;
|
Evas_Object *win, *bx, *sc, *ly, *ly2, *ic;
|
||||||
// Evas_Object *ao, *to;
|
Evas_Object *ao, *to;
|
||||||
|
|
||||||
win = elm_win_util_standard_add("access", "Access");
|
win = elm_win_util_standard_add("access", "Access");
|
||||||
elm_win_autodel_set(win, EINA_TRUE);
|
elm_win_autodel_set(win, EINA_TRUE);
|
||||||
|
@ -288,10 +288,9 @@ test_access2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
|
||||||
evas_object_show(ly2);
|
evas_object_show(ly2);
|
||||||
|
|
||||||
/* access */
|
/* access */
|
||||||
// to = (Evas_Object *)edje_object_part_object_get(elm_layout_edje_get(ly2), "access");
|
to = (Evas_Object *)edje_object_part_object_get(elm_layout_edje_get(ly2), "access");
|
||||||
// this is not an exported api don't use (no EAPI)
|
ao = elm_access_object_register(to, ly2);
|
||||||
// ao = elm_access_object_register(to, ly2);
|
elm_object_focus_custom_chain_append(ly2, ao, NULL);
|
||||||
// elm_object_focus_custom_chain_append(ly2, ao, NULL);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -303,7 +302,7 @@ test_access2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_key_down_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *ei)
|
_key_down_cb(void *data, int type EINA_UNUSED, void *ei)
|
||||||
{
|
{
|
||||||
Elm_Access_Action_Info *a;
|
Elm_Access_Action_Info *a;
|
||||||
Ecore_Event_Key *ev = ei;
|
Ecore_Event_Key *ev = ei;
|
||||||
|
@ -316,8 +315,7 @@ _key_down_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *ei)
|
||||||
if (!strcmp(ev->key, "F1"))
|
if (!strcmp(ev->key, "F1"))
|
||||||
{
|
{
|
||||||
a->highlight_cycle = EINA_TRUE;
|
a->highlight_cycle = EINA_TRUE;
|
||||||
// this is not an exported api don't use (no EAPI)
|
elm_access_action(data, ELM_ACCESS_ACTION_HIGHLIGHT_NEXT, a);
|
||||||
// elm_access_action(data, ELM_ACCESS_ACTION_HIGHLIGHT_NEXT, a);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
free(a);
|
free(a);
|
||||||
|
@ -325,21 +323,19 @@ _key_down_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *ei)
|
||||||
return ECORE_CALLBACK_PASS_ON;
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
static char *
|
static char *
|
||||||
_access_info_cb(void *data, Evas_Object *obj EINA_UNUSED)
|
_access_info_cb(void *data, Evas_Object *obj EINA_UNUSED)
|
||||||
{
|
{
|
||||||
if (data) return strdup(data);
|
if (data) return strdup(data);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
void
|
||||||
test_access3(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
test_access3(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
Evas_Object *win, *box, *lbl, *ly, *btn;
|
Evas_Object *win, *box, *lbl, *ly, *btn;
|
||||||
// Evas_Object *red_ao, *green_ao, *blue_ao, *black_ao, *to;
|
Evas_Object *red_ao, *green_ao, *blue_ao, *black_ao, *to;
|
||||||
|
|
||||||
win = elm_win_util_standard_add("access", "Access");
|
win = elm_win_util_standard_add("access", "Access");
|
||||||
elm_win_autodel_set(win, EINA_TRUE);
|
elm_win_autodel_set(win, EINA_TRUE);
|
||||||
|
@ -377,29 +373,25 @@ test_access3(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
|
||||||
|
|
||||||
elm_object_part_content_set(ly, "center", btn);
|
elm_object_part_content_set(ly, "center", btn);
|
||||||
|
|
||||||
// to = (Evas_Object *)edje_object_part_object_get(elm_layout_edje_get(ly), "red");
|
to = (Evas_Object *)edje_object_part_object_get(elm_layout_edje_get(ly), "red");
|
||||||
// this is not an exported api don't use (no EAPI)
|
red_ao = elm_access_object_register(to, ly);
|
||||||
// red_ao = elm_access_object_register(to, ly);
|
elm_access_info_cb_set(red_ao, ELM_ACCESS_INFO, _access_info_cb, "red");
|
||||||
// elm_access_info_cb_set(red_ao, ELM_ACCESS_INFO, _access_info_cb, "red");
|
elm_access_highlight_next_set(btn, ELM_HIGHLIGHT_DIR_NEXT, red_ao);
|
||||||
// elm_access_highlight_next_set(btn, ELM_HIGHLIGHT_DIR_NEXT, red_ao);
|
|
||||||
|
|
||||||
// to = (Evas_Object *)edje_object_part_object_get(elm_layout_edje_get(ly), "green");
|
to = (Evas_Object *)edje_object_part_object_get(elm_layout_edje_get(ly), "green");
|
||||||
// this is not an exported api don't use (no EAPI)
|
green_ao = elm_access_object_register(to, ly);
|
||||||
// green_ao = elm_access_object_register(to, ly);
|
elm_access_info_cb_set(green_ao, ELM_ACCESS_INFO, _access_info_cb, "green");
|
||||||
// elm_access_info_cb_set(green_ao, ELM_ACCESS_INFO, _access_info_cb, "green");
|
elm_access_highlight_next_set(red_ao, ELM_HIGHLIGHT_DIR_NEXT, green_ao);
|
||||||
// elm_access_highlight_next_set(red_ao, ELM_HIGHLIGHT_DIR_NEXT, green_ao);
|
|
||||||
|
|
||||||
// to = (Evas_Object *)edje_object_part_object_get(elm_layout_edje_get(ly), "blue");
|
to = (Evas_Object *)edje_object_part_object_get(elm_layout_edje_get(ly), "blue");
|
||||||
// this is not an exported api don't use (no EAPI)
|
blue_ao = elm_access_object_register(to, ly);
|
||||||
// blue_ao = elm_access_object_register(to, ly);
|
elm_access_info_cb_set(blue_ao, ELM_ACCESS_INFO, _access_info_cb, "blue");
|
||||||
// elm_access_info_cb_set(blue_ao, ELM_ACCESS_INFO, _access_info_cb, "blue");
|
elm_access_highlight_next_set(green_ao, ELM_HIGHLIGHT_DIR_NEXT, blue_ao);
|
||||||
// elm_access_highlight_next_set(green_ao, ELM_HIGHLIGHT_DIR_NEXT, blue_ao);
|
|
||||||
|
|
||||||
// to = (Evas_Object *)edje_object_part_object_get(elm_layout_edje_get(ly), "black");
|
to = (Evas_Object *)edje_object_part_object_get(elm_layout_edje_get(ly), "black");
|
||||||
// this is not an exported api don't use (no EAPI)
|
black_ao = elm_access_object_register(to, ly);
|
||||||
// black_ao = elm_access_object_register(to, ly);
|
elm_access_info_cb_set(black_ao, ELM_ACCESS_INFO, _access_info_cb, "black");
|
||||||
// elm_access_info_cb_set(black_ao, ELM_ACCESS_INFO, _access_info_cb, "black");
|
elm_access_highlight_next_set(blue_ao, ELM_HIGHLIGHT_DIR_NEXT, black_ao);
|
||||||
// elm_access_highlight_next_set(blue_ao, ELM_HIGHLIGHT_DIR_NEXT, black_ao);
|
|
||||||
|
|
||||||
ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _key_down_cb, win);
|
ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _key_down_cb, win);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue