forked from enlightenment/enlightenment
parent
1f8cc4cd6d
commit
11c893aa4d
|
@ -16914,11 +16914,25 @@ collections {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
programs {
|
programs {
|
||||||
|
program {
|
||||||
|
name: "focus_in";
|
||||||
|
signal: "e,focus,in";
|
||||||
|
source: "e";
|
||||||
|
action: STATE_SET "clicked" 0.0;
|
||||||
|
target: "button_image";
|
||||||
|
target: "over3";
|
||||||
|
}
|
||||||
program {
|
program {
|
||||||
name: "button_click";
|
name: "button_click";
|
||||||
signal: "mouse,down,1";
|
signal: "mouse,down,1";
|
||||||
source: "button_image";
|
source: "button_image";
|
||||||
action: STATE_SET "clicked" 0.0;
|
after: "focus_in";
|
||||||
|
}
|
||||||
|
program {
|
||||||
|
name: "focus_out";
|
||||||
|
signal: "e,focus,out";
|
||||||
|
source: "e";
|
||||||
|
action: STATE_SET "default" 0.0;
|
||||||
target: "button_image";
|
target: "button_image";
|
||||||
target: "over3";
|
target: "over3";
|
||||||
}
|
}
|
||||||
|
@ -16926,9 +16940,7 @@ collections {
|
||||||
name: "button_unclick";
|
name: "button_unclick";
|
||||||
signal: "mouse,up,1";
|
signal: "mouse,up,1";
|
||||||
source: "button_image";
|
source: "button_image";
|
||||||
action: STATE_SET "default" 0.0;
|
after: "focus_out";
|
||||||
target: "button_image";
|
|
||||||
target: "over3";
|
|
||||||
}
|
}
|
||||||
program {
|
program {
|
||||||
name: "button_unclick2";
|
name: "button_unclick2";
|
||||||
|
|
|
@ -22,6 +22,8 @@ static Evas_Object *o_bg = NULL;
|
||||||
static Evas_Object *o_flow_main = NULL;
|
static Evas_Object *o_flow_main = NULL;
|
||||||
static Evas_Object *o_flow_secondary = NULL;
|
static Evas_Object *o_flow_secondary = NULL;
|
||||||
static Evas_Object *o_flow_extra = NULL;
|
static Evas_Object *o_flow_extra = NULL;
|
||||||
|
static Evas_Object *o_selected_flow = NULL;
|
||||||
|
static Evas_Object *o_selected = NULL;
|
||||||
static int inevas = 0;
|
static int inevas = 0;
|
||||||
static Ecore_Timer *deftimer = NULL;
|
static Ecore_Timer *deftimer = NULL;
|
||||||
static double show_time = 0.0;
|
static double show_time = 0.0;
|
||||||
|
@ -328,6 +330,7 @@ e_syscon_hide(void)
|
||||||
e_grabinput_release(input_window, input_window);
|
e_grabinput_release(input_window, input_window);
|
||||||
ecore_x_window_free(input_window);
|
ecore_x_window_free(input_window);
|
||||||
input_window = 0;
|
input_window = 0;
|
||||||
|
o_selected_flow = o_selected = o_flow_extra = o_flow_main = o_flow_secondary = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* local subsystem functions */
|
/* local subsystem functions */
|
||||||
|
@ -340,29 +343,83 @@ _cb_key_down(__UNUSED__ void *data, __UNUSED__ int type, void *event)
|
||||||
if (ev->event_window != input_window) return ECORE_CALLBACK_PASS_ON;
|
if (ev->event_window != input_window) return ECORE_CALLBACK_PASS_ON;
|
||||||
if (!strcmp(ev->key, "Escape"))
|
if (!strcmp(ev->key, "Escape"))
|
||||||
e_syscon_hide();
|
e_syscon_hide();
|
||||||
else if (!strcmp(ev->key, "Up"))
|
else if ((!strcmp(ev->key, "Left")) || (!strcmp(ev->key, "Up")))
|
||||||
{
|
{
|
||||||
// FIXME: implement focus and key control... eventually
|
if (!o_selected)
|
||||||
|
{
|
||||||
|
if (e_flowlayout_pack_count_get(o_flow_extra))
|
||||||
|
o_selected_flow = o_flow_extra, o_selected = e_flowlayout_pack_object_last(o_flow_extra);
|
||||||
|
else if (e_flowlayout_pack_count_get(o_flow_secondary))
|
||||||
|
o_selected_flow = o_flow_secondary, o_selected = e_flowlayout_pack_object_last(o_flow_secondary);
|
||||||
|
else
|
||||||
|
o_selected_flow = o_flow_main, o_selected = e_flowlayout_pack_object_last(o_flow_main);
|
||||||
}
|
}
|
||||||
else if (!strcmp(ev->key, "Down"))
|
else
|
||||||
{
|
{
|
||||||
// FIXME: implement focus and key control... eventually
|
edje_object_signal_emit(o_selected, "e,focus,out", "e");
|
||||||
|
o_selected = e_flowlayout_pack_object_prev(o_selected_flow, o_selected);
|
||||||
|
if (!o_selected)
|
||||||
|
{
|
||||||
|
if (o_selected_flow == o_flow_extra)
|
||||||
|
{
|
||||||
|
if (e_flowlayout_pack_count_get(o_flow_secondary))
|
||||||
|
o_selected_flow = o_flow_secondary, o_selected = e_flowlayout_pack_object_last(o_flow_secondary);
|
||||||
|
else
|
||||||
|
o_selected_flow = o_flow_main, o_selected = e_flowlayout_pack_object_last(o_flow_main);
|
||||||
}
|
}
|
||||||
else if (!strcmp(ev->key, "Left"))
|
else if (o_selected_flow == o_flow_secondary)
|
||||||
|
o_selected_flow = o_flow_main, o_selected = e_flowlayout_pack_object_last(o_flow_main);
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// FIXME: implement focus and key control... eventually
|
if (e_flowlayout_pack_count_get(o_flow_extra))
|
||||||
|
o_selected_flow = o_flow_extra, o_selected = e_flowlayout_pack_object_last(o_flow_extra);
|
||||||
|
else if (e_flowlayout_pack_count_get(o_flow_secondary))
|
||||||
|
o_selected_flow = o_flow_secondary, o_selected = e_flowlayout_pack_object_last(o_flow_secondary);
|
||||||
|
else
|
||||||
|
o_selected_flow = o_flow_main, o_selected = e_flowlayout_pack_object_last(o_flow_main);
|
||||||
}
|
}
|
||||||
else if (!strcmp(ev->key, "Right"))
|
|
||||||
{
|
|
||||||
// FIXME: implement focus and key control... eventually
|
|
||||||
}
|
}
|
||||||
else if (!strcmp(ev->key, "Tab"))
|
|
||||||
{
|
|
||||||
// FIXME: implement focus and key control... eventually
|
|
||||||
}
|
}
|
||||||
else if (!strcmp(ev->key, "Enter"))
|
edje_object_signal_emit(o_selected, "e,focus,in", "e");
|
||||||
|
}
|
||||||
|
else if ((!strcmp(ev->key, "Right")) || (!strcmp(ev->key, "Down")) || (!strcmp(ev->key, "Tab")))
|
||||||
{
|
{
|
||||||
// FIXME: implement focus and key control... eventually
|
if (!o_selected)
|
||||||
|
o_selected_flow = o_flow_main, o_selected = e_flowlayout_pack_object_first(o_flow_main);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
edje_object_signal_emit(o_selected, "e,focus,out", "e");
|
||||||
|
o_selected = e_flowlayout_pack_object_next(o_selected_flow, o_selected);
|
||||||
|
if (!o_selected)
|
||||||
|
{
|
||||||
|
if (o_selected_flow == o_flow_extra)
|
||||||
|
o_selected_flow = o_flow_main, o_selected = e_flowlayout_pack_object_first(o_flow_main);
|
||||||
|
else if (o_selected_flow == o_flow_secondary)
|
||||||
|
{
|
||||||
|
if (e_flowlayout_pack_count_get(o_flow_extra))
|
||||||
|
o_selected_flow = o_flow_extra, o_selected = e_flowlayout_pack_object_first(o_flow_extra);
|
||||||
|
else
|
||||||
|
o_selected_flow = o_flow_main, o_selected = e_flowlayout_pack_object_first(o_flow_main);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (e_flowlayout_pack_count_get(o_flow_secondary))
|
||||||
|
o_selected_flow = o_flow_secondary, o_selected = e_flowlayout_pack_object_first(o_flow_secondary);
|
||||||
|
else if (e_flowlayout_pack_count_get(o_flow_extra))
|
||||||
|
o_selected_flow = o_flow_extra, o_selected = e_flowlayout_pack_object_first(o_flow_extra);
|
||||||
|
else
|
||||||
|
o_selected_flow = o_flow_main, o_selected = e_flowlayout_pack_object_first(o_flow_main);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
edje_object_signal_emit(o_selected, "e,focus,in", "e");
|
||||||
|
}
|
||||||
|
else if ((!strcmp(ev->keyname, "KP_Enter")) || (!strcmp(ev->keyname, "Return")))
|
||||||
|
{
|
||||||
|
if (!o_selected) return ECORE_CALLBACK_RENEW;
|
||||||
|
edje_object_signal_emit(o_selected, "e,focus,out", "e");
|
||||||
|
edje_object_signal_emit(o_selected, "e,action,click", "");
|
||||||
|
o_selected = o_selected_flow = NULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue