forked from enlightenment/enlightenment
parent
bdbf2f2079
commit
9f9fb168c2
|
@ -21,15 +21,46 @@ e_bindings_shutdown(void)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
e_bindings_mouse_add(E_Binding_Context ctxt, int button, E_Binding_Modifier mod, int any_mod, char *action, char *param)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
e_bindings_mouse_grab(Ecore_X_Window win)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
e_bindings_mouse_ungrab(Ecore_X_Window win)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
e_bindings_mouse_down_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_X_Event_Mouse_Button_Down *ev)
|
e_bindings_mouse_down_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_X_Event_Mouse_Button_Down *ev)
|
||||||
{
|
{
|
||||||
|
E_Binding_Modifier mod = 0;
|
||||||
|
Evas_List *l;
|
||||||
|
|
||||||
|
if (ev->modifiers & ECORE_X_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT;
|
||||||
|
if (ev->modifiers & ECORE_X_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL;
|
||||||
|
if (ev->modifiers & ECORE_X_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT;
|
||||||
|
if (ev->modifiers & ECORE_X_MODIFIER_WIN) mod |= E_BINDING_MODIFIER_WIN;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
e_bindings_key_down_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_X_Event_Key_Down *ev)
|
e_bindings_key_down_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_X_Event_Key_Down *ev)
|
||||||
{
|
{
|
||||||
|
E_Binding_Modifier mod = 0;
|
||||||
|
Evas_List *l;
|
||||||
|
|
||||||
|
if (ev->modifiers & ECORE_X_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT;
|
||||||
|
if (ev->modifiers & ECORE_X_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL;
|
||||||
|
if (ev->modifiers & ECORE_X_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT;
|
||||||
|
if (ev->modifiers & ECORE_X_MODIFIER_WIN) mod |= E_BINDING_MODIFIER_WIN;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,18 @@ typedef enum _E_Binding_Context
|
||||||
E_BINDING_CONTEXT_ZONE
|
E_BINDING_CONTEXT_ZONE
|
||||||
} E_Binding_Context;
|
} E_Binding_Context;
|
||||||
|
|
||||||
|
/* why do we do this? config stored bindings must be fixed. x's modifier masks
|
||||||
|
* may change from time to time, xserver to xserver - so we cant do a
|
||||||
|
* simple match without translating to fixed values
|
||||||
|
*/
|
||||||
|
typedef enum _E_Binding_Modifier
|
||||||
|
{
|
||||||
|
E_BINDING_MODIFIER_SHIFT = (1 << 0),
|
||||||
|
E_BINDING_MODIFIER_CTRL = (1 << 1),
|
||||||
|
E_BINDING_MODIFIER_ALT = (1 << 2),
|
||||||
|
E_BINDING_MODIFIER_WIN = (1 << 3)
|
||||||
|
} E_Binding_Modifier;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#ifndef E_BINDINGS_H
|
#ifndef E_BINDINGS_H
|
||||||
#define E_BINDINGS_H
|
#define E_BINDINGS_H
|
||||||
|
|
|
@ -80,6 +80,7 @@ e_box_freeze(Evas_Object *obj)
|
||||||
E_Smart_Data *sd;
|
E_Smart_Data *sd;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
|
if (!sd) return 0;
|
||||||
sd->frozen++;
|
sd->frozen++;
|
||||||
return sd->frozen;
|
return sd->frozen;
|
||||||
}
|
}
|
||||||
|
@ -90,6 +91,7 @@ e_box_thaw(Evas_Object *obj)
|
||||||
E_Smart_Data *sd;
|
E_Smart_Data *sd;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
|
if (!sd) return 0;
|
||||||
sd->frozen--;
|
sd->frozen--;
|
||||||
if (sd->frozen <= 0) _e_box_smart_reconfigure(sd);
|
if (sd->frozen <= 0) _e_box_smart_reconfigure(sd);
|
||||||
return sd->frozen;
|
return sd->frozen;
|
||||||
|
@ -101,6 +103,7 @@ e_box_orientation_set(Evas_Object *obj, int horizontal)
|
||||||
E_Smart_Data *sd;
|
E_Smart_Data *sd;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
|
if (!sd) return;
|
||||||
if (((sd->horizontal) && (horizontal)) ||
|
if (((sd->horizontal) && (horizontal)) ||
|
||||||
((!sd->horizontal) && (!horizontal))) return;
|
((!sd->horizontal) && (!horizontal))) return;
|
||||||
sd->horizontal = horizontal;
|
sd->horizontal = horizontal;
|
||||||
|
@ -114,6 +117,7 @@ e_box_orientation_get(Evas_Object *obj)
|
||||||
E_Smart_Data *sd;
|
E_Smart_Data *sd;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
|
if (!sd) return 0;
|
||||||
return sd->horizontal;
|
return sd->horizontal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,6 +127,7 @@ e_box_homogenous_set(Evas_Object *obj, int homogenous)
|
||||||
E_Smart_Data *sd;
|
E_Smart_Data *sd;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
|
if (!sd) return;
|
||||||
if (sd->homogenous == homogenous) return;
|
if (sd->homogenous == homogenous) return;
|
||||||
sd->homogenous = homogenous;
|
sd->homogenous = homogenous;
|
||||||
sd->changed = 1;
|
sd->changed = 1;
|
||||||
|
@ -135,6 +140,7 @@ e_box_pack_start(Evas_Object *obj, Evas_Object *child)
|
||||||
E_Smart_Data *sd;
|
E_Smart_Data *sd;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
|
if (!sd) return 0;
|
||||||
_e_box_smart_adopt(sd, child);
|
_e_box_smart_adopt(sd, child);
|
||||||
sd->items = evas_list_prepend(sd->items, child);
|
sd->items = evas_list_prepend(sd->items, child);
|
||||||
sd->changed = 1;
|
sd->changed = 1;
|
||||||
|
@ -148,6 +154,7 @@ e_box_pack_end(Evas_Object *obj, Evas_Object *child)
|
||||||
E_Smart_Data *sd;
|
E_Smart_Data *sd;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
|
if (!sd) return 0;
|
||||||
_e_box_smart_adopt(sd, child);
|
_e_box_smart_adopt(sd, child);
|
||||||
sd->items = evas_list_append(sd->items, child);
|
sd->items = evas_list_append(sd->items, child);
|
||||||
sd->changed = 1;
|
sd->changed = 1;
|
||||||
|
@ -163,6 +170,7 @@ e_box_pack_before(Evas_Object *obj, Evas_Object *child, Evas_Object *before)
|
||||||
Evas_List *l;
|
Evas_List *l;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
|
if (!sd) return 0;
|
||||||
_e_box_smart_adopt(sd, child);
|
_e_box_smart_adopt(sd, child);
|
||||||
sd->items = evas_list_prepend_relative(sd->items, child, before);
|
sd->items = evas_list_prepend_relative(sd->items, child, before);
|
||||||
for (i = 0, l = sd->items; l; l = l->next, i++)
|
for (i = 0, l = sd->items; l; l = l->next, i++)
|
||||||
|
@ -182,6 +190,7 @@ e_box_pack_after(Evas_Object *obj, Evas_Object *child, Evas_Object *after)
|
||||||
Evas_List *l;
|
Evas_List *l;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
|
if (!sd) return 0;
|
||||||
_e_box_smart_adopt(sd, child);
|
_e_box_smart_adopt(sd, child);
|
||||||
sd->items = evas_list_append_relative(sd->items, child, after);
|
sd->items = evas_list_append_relative(sd->items, child, after);
|
||||||
for (i = 0, l = sd->items; l; l = l->next, i++)
|
for (i = 0, l = sd->items; l; l = l->next, i++)
|
||||||
|
@ -199,6 +208,7 @@ e_box_pack_count_get(Evas_Object *obj)
|
||||||
E_Smart_Data *sd;
|
E_Smart_Data *sd;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
|
if (!sd) return 0;
|
||||||
return evas_list_count(sd->items);
|
return evas_list_count(sd->items);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,6 +218,7 @@ e_box_pack_object_nth(Evas_Object *obj, int n)
|
||||||
E_Smart_Data *sd;
|
E_Smart_Data *sd;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
|
if (!sd) return NULL;
|
||||||
return evas_list_nth(sd->items, n);
|
return evas_list_nth(sd->items, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,6 +228,7 @@ e_box_pack_object_first(Evas_Object *obj)
|
||||||
E_Smart_Data *sd;
|
E_Smart_Data *sd;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
|
if (!sd) return NULL;
|
||||||
return evas_list_data(sd->items);
|
return evas_list_data(sd->items);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,6 +238,7 @@ e_box_pack_object_last(Evas_Object *obj)
|
||||||
E_Smart_Data *sd;
|
E_Smart_Data *sd;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
|
if (!sd) return NULL;
|
||||||
return evas_list_data(evas_list_last(sd->items));
|
return evas_list_data(evas_list_last(sd->items));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -259,6 +272,7 @@ e_box_unpack(Evas_Object *obj)
|
||||||
bi = evas_object_data_get(obj, "e_box_data");
|
bi = evas_object_data_get(obj, "e_box_data");
|
||||||
if (!bi) return;
|
if (!bi) return;
|
||||||
sd = bi->sd;
|
sd = bi->sd;
|
||||||
|
if (!sd) return;
|
||||||
sd->items = evas_list_remove(sd->items, obj);
|
sd->items = evas_list_remove(sd->items, obj);
|
||||||
_e_box_smart_disown(obj);
|
_e_box_smart_disown(obj);
|
||||||
sd->changed = 1;
|
sd->changed = 1;
|
||||||
|
@ -271,6 +285,7 @@ e_box_min_size_get(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh)
|
||||||
E_Smart_Data *sd;
|
E_Smart_Data *sd;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
|
if (!sd) return;
|
||||||
if (sd->changed) _e_box_smart_extents_calcuate(sd);
|
if (sd->changed) _e_box_smart_extents_calcuate(sd);
|
||||||
if (minw) *minw = sd->min.w;
|
if (minw) *minw = sd->min.w;
|
||||||
if (minh) *minh = sd->min.h;
|
if (minh) *minh = sd->min.h;
|
||||||
|
@ -282,6 +297,7 @@ e_box_max_size_get(Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh)
|
||||||
E_Smart_Data *sd;
|
E_Smart_Data *sd;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
|
if (!sd) return;
|
||||||
if (sd->changed) _e_box_smart_extents_calcuate(sd);
|
if (sd->changed) _e_box_smart_extents_calcuate(sd);
|
||||||
if (maxw) *maxw = sd->max.w;
|
if (maxw) *maxw = sd->max.w;
|
||||||
if (maxh) *maxh = sd->max.h;
|
if (maxh) *maxh = sd->max.h;
|
||||||
|
@ -293,6 +309,7 @@ e_box_align_get(Evas_Object *obj, double *ax, double *ay)
|
||||||
E_Smart_Data *sd;
|
E_Smart_Data *sd;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
|
if (!sd) return;
|
||||||
if (ax) *ax = sd->align.x;
|
if (ax) *ax = sd->align.x;
|
||||||
if (ay) *ay = sd->align.y;
|
if (ay) *ay = sd->align.y;
|
||||||
}
|
}
|
||||||
|
@ -303,6 +320,7 @@ e_box_align_set(Evas_Object *obj, double ax, double ay)
|
||||||
E_Smart_Data *sd;
|
E_Smart_Data *sd;
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
|
if (!sd) return;
|
||||||
if ((sd->align.x == ax) && (sd->align.y == ay)) return;
|
if ((sd->align.x == ax) && (sd->align.y == ay)) return;
|
||||||
sd->align.x = ax;
|
sd->align.x = ax;
|
||||||
sd->align.y = ay;
|
sd->align.y = ay;
|
||||||
|
|
|
@ -99,12 +99,19 @@ e_container_new(E_Manager *man)
|
||||||
con->name = strdup(name);
|
con->name = strdup(name);
|
||||||
|
|
||||||
screens = (Evas_List *)e_xinerama_screens_get();
|
screens = (Evas_List *)e_xinerama_screens_get();
|
||||||
for (l = screens; l; l = l->next)
|
if (screens)
|
||||||
{
|
{
|
||||||
E_Screen *scr;
|
for (l = screens; l; l = l->next)
|
||||||
|
{
|
||||||
scr = l->data;
|
E_Screen *scr;
|
||||||
zone = e_zone_new(con, scr->screen, scr->x, scr->y, scr->w, scr->h);
|
|
||||||
|
scr = l->data;
|
||||||
|
zone = e_zone_new(con, scr->screen, scr->x, scr->y, scr->w, scr->h);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
zone = e_zone_new(con, 0, 0, 0, con->w, con->h);
|
||||||
}
|
}
|
||||||
con->gadman = e_gadman_new(con);
|
con->gadman = e_gadman_new(con);
|
||||||
|
|
||||||
|
@ -525,25 +532,36 @@ _e_container_resize_handle(E_Container *con)
|
||||||
e_xinerama_update();
|
e_xinerama_update();
|
||||||
|
|
||||||
screens = (Evas_List *)e_xinerama_screens_get();
|
screens = (Evas_List *)e_xinerama_screens_get();
|
||||||
for (l = screens; l; l = l->next)
|
if (screens)
|
||||||
|
{
|
||||||
|
for (l = screens; l; l = l->next)
|
||||||
|
{
|
||||||
|
E_Screen *scr;
|
||||||
|
E_Zone *zone;
|
||||||
|
|
||||||
|
scr = l->data;
|
||||||
|
zone = e_container_zone_number_get(con, scr->screen);
|
||||||
|
if (zone)
|
||||||
|
{
|
||||||
|
e_zone_move(zone, scr->x, scr->y);
|
||||||
|
e_zone_resize(zone, scr->w, scr->h);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
zone = e_zone_new(con, scr->screen, scr->x, scr->y, scr->w, scr->h);
|
||||||
|
}
|
||||||
|
/* FIXME: what if a zone exists for a screen that doesn't exist?
|
||||||
|
* not sure this will ever happen...
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
E_Screen *scr;
|
|
||||||
E_Zone *zone;
|
E_Zone *zone;
|
||||||
|
|
||||||
scr = l->data;
|
zone = e_container_zone_number_get(con, 0);
|
||||||
zone = e_container_zone_number_get(con, scr->screen);
|
e_zone_move(zone, 0, 0);
|
||||||
if (zone)
|
e_zone_resize(zone, con->w, con->h);
|
||||||
{
|
|
||||||
e_zone_move(zone, scr->x, scr->y);
|
|
||||||
e_zone_resize(zone, scr->w, scr->h);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
zone = e_zone_new(con, scr->screen, scr->x, scr->y, scr->w, scr->h);
|
|
||||||
}
|
|
||||||
/* FIXME: what if a zone exists for a screen that doesn't exist?
|
|
||||||
* not sure this will ever happen...
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
e_gadman_container_resize(con->gadman);
|
e_gadman_container_resize(con->gadman);
|
||||||
|
|
|
@ -51,29 +51,44 @@ e_init_init(void)
|
||||||
ecore_evas_show(_e_init_ecore_evas);
|
ecore_evas_show(_e_init_ecore_evas);
|
||||||
|
|
||||||
screens = (Evas_List *)e_xinerama_screens_get();
|
screens = (Evas_List *)e_xinerama_screens_get();
|
||||||
for (l = screens; l; l = l->next)
|
if (screens)
|
||||||
{
|
{
|
||||||
E_Screen *scr;
|
for (l = screens; l; l = l->next)
|
||||||
|
|
||||||
scr = l->data;
|
|
||||||
o = edje_object_add(_e_init_evas);
|
|
||||||
/* first screen */
|
|
||||||
if (l == screens)
|
|
||||||
{
|
{
|
||||||
edje_object_file_set(o,
|
E_Screen *scr;
|
||||||
/* FIXME: "init.edj" needs to come from config */
|
|
||||||
e_path_find(path_init, "init.edj"),
|
scr = l->data;
|
||||||
"init/splash");
|
o = edje_object_add(_e_init_evas);
|
||||||
_e_init_object = o;
|
/* first screen */
|
||||||
|
if (l == screens)
|
||||||
|
{
|
||||||
|
edje_object_file_set(o,
|
||||||
|
/* FIXME: "init.edj" needs to come from config */
|
||||||
|
e_path_find(path_init, "init.edj"),
|
||||||
|
"init/splash");
|
||||||
|
_e_init_object = o;
|
||||||
|
}
|
||||||
|
/* other screens */
|
||||||
|
else
|
||||||
|
edje_object_file_set(o,
|
||||||
|
/* FIXME: "init.edj" needs to come from config */
|
||||||
|
e_path_find(path_init, "init.edj"),
|
||||||
|
"init/extra_screen");
|
||||||
|
evas_object_move(o, scr->x, scr->y);
|
||||||
|
evas_object_resize(o, scr->w, scr->h);
|
||||||
|
evas_object_show(o);
|
||||||
}
|
}
|
||||||
/* other screens */
|
}
|
||||||
else
|
else
|
||||||
edje_object_file_set(o,
|
{
|
||||||
/* FIXME: "init.edj" needs to come from config */
|
o = edje_object_add(_e_init_evas);
|
||||||
e_path_find(path_init, "init.edj"),
|
edje_object_file_set(o,
|
||||||
"init/extra_screen");
|
/* FIXME: "init.edj" needs to come from config */
|
||||||
evas_object_move(o, scr->x, scr->y);
|
e_path_find(path_init, "init.edj"),
|
||||||
evas_object_resize(o, scr->w, scr->h);
|
"init/splash");
|
||||||
|
_e_init_object = o;
|
||||||
|
evas_object_move(o, 0, 0);
|
||||||
|
evas_object_resize(o, w, h);
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue