ibar drop gfx are nice now :)

SVN revision: 15253
This commit is contained in:
Carsten Haitzler 2005-06-11 11:19:10 +00:00
parent a1d95ce59a
commit e629126d7b
4 changed files with 804 additions and 8 deletions

8
TODO
View File

@ -63,7 +63,7 @@ These are in no particular order:
* re-implement all ipc to go via e_ipc_handlers.h and e_ipc_codec.[ch]
* on restart e always goes back to desktop 0,0 - it should go to the desktop
it was last on (per zone, per container, per manager).
* start module needs to have an way to alert users to "click here" and back
* start module needs to have a way to alert users to "click here" and back
off alerting users as they learn what it is (over time)
* sometimes windows that get shut down/closed get unparented but the whole
border stays around - something is keeping extra references maybe? it is
@ -108,7 +108,9 @@ These are in no particular order:
* non opaque move/resize
* ibar need to support label pop-ups
* ibar should support subdirs with pop-up icons...
* support dnd for ibar etc.
* ibar need to handle drop from other places (xdnd, drop from window etc.)
* ibar lamp needs short timer on mouse out for hide before hiding (and del
the time on mouse in)
* borders need to be able to change border theme on the fly
* add window glueing
* add window tabs (multiple clients in 1 border)
@ -137,8 +139,6 @@ These are in no particular order:
refuse to exit as long as the immortal flags is set until it is unset to
stop users from doing silly things like logging out while important stuff
is happening in that window -a menu option for this woudl be nice)
* ibar lamp needs short timer on mouse out for hide before hiding (and del
the time on mouse in)
* need to be able to remember client positons/etc.
* file icons on the desktop (people ask for it) - xdnd for these
* gui config tools for bg's, keybindings, etc. etc. etc.

View File

@ -7,6 +7,11 @@ images {
image: "e17_ibar_lamp_u.png" COMP;
image: "e17_ibar_over_h.png" COMP;
image: "e17_ibar_over_v.png" COMP;
image: "e17_ibar_arrow_d.png" COMP;
image: "e17_ibar_arrow_l.png" COMP;
image: "e17_ibar_arrow_r.png" COMP;
image: "e17_ibar_arrow_u.png" COMP;
image: "e17_pager_desk.png" COMP;
}
group {
name: "modules/ibar/main";
@ -415,3 +420,750 @@ group {
}
}
group {
name: "modules/ibar/drop";
parts {
part {
name: "bg";
mouse_events: 0;
description {
state: "default" 0.0;
image {
normal: "e17_pager_desk.png";
border: 2 2 2 2;
middle: 0;
}
}
}
}
}
group {
name: "modules/ibar/drop_overlay";
parts {
part {
name: "l1";
mouse_events: 0;
description {
state: "default" 0.0;
align: 1.0 0.5;
min: 21 20;
max: 21 20;
visible: 0;
color: 255 255 255 0;
rel1 {
relative: 0.0 0.0;
offset: -1 0;
}
rel2 {
relative: 0.0 1.0;
offset: -1 -1;
}
image {
normal: "e17_ibar_arrow_r.png";
}
}
description {
state: "default2" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
part {
name: "l2";
mouse_events: 0;
description {
state: "default" 0.0;
align: 1.0 0.5;
min: 21 20;
max: 21 20;
visible: 0;
color: 255 255 255 0;
rel1 {
relative: 0.0 0.0;
offset: -1 0;
to: "l1";
}
rel2 {
relative: 0.0 1.0;
offset: -1 -1;
to: "l1";
}
image {
normal: "e17_ibar_arrow_r.png";
}
}
description {
state: "default2" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
part {
name: "l3";
mouse_events: 0;
description {
state: "default" 0.0;
align: 1.0 0.5;
min: 21 20;
max: 21 20;
visible: 0;
color: 255 255 255 0;
rel1 {
relative: 0.0 0.0;
offset: -1 0;
to: "l2";
}
rel2 {
relative: 0.0 1.0;
offset: -1 -1;
to: "l2";
}
image {
normal: "e17_ibar_arrow_r.png";
}
}
description {
state: "default2" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
part {
name: "l4";
mouse_events: 0;
description {
state: "default" 0.0;
align: 1.0 0.5;
min: 21 20;
max: 21 20;
visible: 0;
color: 255 255 255 0;
rel1 {
relative: 0.0 0.0;
offset: -1 0;
to: "l3";
}
rel2 {
relative: 0.0 1.0;
offset: -1 -1;
to: "l3";
}
image {
normal: "e17_ibar_arrow_r.png";
}
}
description {
state: "default2" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
part {
name: "r1";
mouse_events: 0;
description {
state: "default" 0.0;
align: 0.0 0.5;
min: 21 20;
max: 21 20;
visible: 0;
color: 255 255 255 0;
rel1 {
relative: 1.0 0.0;
offset: 0 0;
}
rel2 {
relative: 1.0 1.0;
offset: 0 -1;
}
image {
normal: "e17_ibar_arrow_l.png";
}
}
description {
state: "default2" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
part {
name: "r2";
mouse_events: 0;
description {
state: "default" 0.0;
align: 0.0 0.5;
min: 21 20;
max: 21 20;
visible: 0;
color: 255 255 255 0;
rel1 {
relative: 1.0 0.0;
offset: 0 0;
to: "r1";
}
rel2 {
relative: 1.0 1.0;
offset: 0 -1;
to: "r1";
}
image {
normal: "e17_ibar_arrow_l.png";
}
}
description {
state: "default2" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
part {
name: "r3";
mouse_events: 0;
description {
state: "default" 0.0;
align: 0.0 0.5;
min: 21 20;
max: 21 20;
visible: 0;
color: 255 255 255 0;
rel1 {
relative: 1.0 0.0;
offset: 0 0;
to: "r2";
}
rel2 {
relative: 1.0 1.0;
offset: 0 -1;
to: "r2";
}
image {
normal: "e17_ibar_arrow_l.png";
}
}
description {
state: "default2" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
part {
name: "r4";
mouse_events: 0;
description {
state: "default" 0.0;
align: 0.0 0.5;
min: 21 20;
max: 21 20;
visible: 0;
color: 255 255 255 0;
rel1 {
relative: 1.0 0.0;
offset: 0 0;
to: "r3";
}
rel2 {
relative: 1.0 1.0;
offset: 0 -1;
to: "r3";
}
image {
normal: "e17_ibar_arrow_l.png";
}
}
description {
state: "default2" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
part {
name: "t1";
mouse_events: 0;
description {
state: "default" 0.0;
align: 0.5 1.0;
min: 29 21;
max: 29 21;
visible: 0;
color: 255 255 255 0;
rel1 {
relative: 0.0 0.0;
offset: 0 -1;
}
rel2 {
relative: 1.0 0.0;
offset: -1 -1;
}
image {
normal: "e17_ibar_arrow_d.png";
}
}
description {
state: "default2" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
part {
name: "t2";
mouse_events: 0;
description {
state: "default" 0.0;
align: 0.5 1.0;
min: 29 21;
max: 29 21;
visible: 0;
color: 255 255 255 0;
rel1 {
relative: 0.0 0.0;
offset: 0 -1;
to: "t1";
}
rel2 {
relative: 1.0 0.0;
offset: -1 -1;
to: "t1";
}
image {
normal: "e17_ibar_arrow_d.png";
}
}
description {
state: "default2" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
part {
name: "t3";
mouse_events: 0;
description {
state: "default" 0.0;
align: 0.5 1.0;
min: 29 21;
max: 29 21;
visible: 0;
color: 255 255 255 0;
rel1 {
relative: 0.0 0.0;
offset: 0 -1;
to: "t2";
}
rel2 {
relative: 1.0 0.0;
offset: -1 -1;
to: "t2";
}
image {
normal: "e17_ibar_arrow_d.png";
}
}
description {
state: "default2" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
part {
name: "t4";
mouse_events: 0;
description {
state: "default" 0.0;
align: 0.5 1.0;
min: 29 21;
max: 29 21;
visible: 0;
color: 255 255 255 0;
rel1 {
relative: 0.0 0.0;
offset: 0 -1;
to: "t3";
}
rel2 {
relative: 1.0 0.0;
offset: -1 -1;
to: "t3";
}
image {
normal: "e17_ibar_arrow_d.png";
}
}
description {
state: "default2" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
part {
name: "b1";
mouse_events: 0;
description {
state: "default" 0.0;
align: 0.5 0.0;
min: 29 21;
max: 29 21;
visible: 0;
color: 255 255 255 0;
rel1 {
relative: 0.0 1.0;
offset: 0 0;
}
rel2 {
relative: 1.0 1.0;
offset: -1 0;
}
image {
normal: "e17_ibar_arrow_u.png";
}
}
description {
state: "default2" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
part {
name: "b2";
mouse_events: 0;
description {
state: "default" 0.0;
align: 0.5 0.0;
min: 29 21;
max: 29 21;
visible: 0;
color: 255 255 255 0;
rel1 {
relative: 0.0 1.0;
offset: 0 0;
to: "b1";
}
rel2 {
relative: 1.0 1.0;
offset: -1 0;
to: "b1";
}
image {
normal: "e17_ibar_arrow_u.png";
}
}
description {
state: "default2" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
part {
name: "b3";
mouse_events: 0;
description {
state: "default" 0.0;
align: 0.5 0.0;
min: 29 21;
max: 29 21;
visible: 0;
color: 255 255 255 0;
rel1 {
relative: 0.0 1.0;
offset: 0 0;
to: "b2";
}
rel2 {
relative: 1.0 1.0;
offset: -1 0;
to: "b2";
}
image {
normal: "e17_ibar_arrow_u.png";
}
}
description {
state: "default2" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
part {
name: "b4";
mouse_events: 0;
description {
state: "default" 0.0;
align: 0.5 0.0;
min: 29 21;
max: 29 21;
visible: 0;
color: 255 255 255 0;
rel1 {
relative: 0.0 1.0;
offset: 0 0;
to: "b3";
}
rel2 {
relative: 1.0 1.0;
offset: -1 0;
to: "b3";
}
image {
normal: "e17_ibar_arrow_u.png";
}
}
description {
state: "default2" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
}
programs {
program {
name: "go";
signal: "show";
source: "";
after: "l1a";
after: "r1a";
after: "t1a";
after: "b1a";
}
program {
name: "l1a";
action: STATE_SET "default2" 0.0;
transition: SINUSOIDAL 0.25;
target: "l4";
after: "l1b";
after: "l2a";
}
program {
name: "l1b";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.75;
target: "l4";
}
program {
name: "l2a";
action: STATE_SET "default2" 0.0;
transition: SINUSOIDAL 0.25;
target: "l3";
after: "l2b";
after: "l3a";
}
program {
name: "l2b";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.75;
target: "l3";
}
program {
name: "l3a";
action: STATE_SET "default2" 0.0;
transition: SINUSOIDAL 0.25;
target: "l2";
after: "l3b";
after: "l4a";
}
program {
name: "l3b";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.75;
target: "l2";
}
program {
name: "l4a";
action: STATE_SET "default2" 0.0;
transition: SINUSOIDAL 0.25;
target: "l1";
after: "l4b";
after: "l1a";
}
program {
name: "l4b";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.75;
target: "l1";
}
program {
name: "r1a";
action: STATE_SET "default2" 0.0;
transition: SINUSOIDAL 0.25;
target: "r4";
after: "r1b";
after: "r2a";
}
program {
name: "r1b";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.75;
target: "r4";
}
program {
name: "r2a";
action: STATE_SET "default2" 0.0;
transition: SINUSOIDAL 0.25;
target: "r3";
after: "r2b";
after: "r3a";
}
program {
name: "r2b";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.75;
target: "r3";
}
program {
name: "r3a";
action: STATE_SET "default2" 0.0;
transition: SINUSOIDAL 0.25;
target: "r2";
after: "r3b";
after: "r4a";
}
program {
name: "r3b";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.75;
target: "r2";
}
program {
name: "r4a";
action: STATE_SET "default2" 0.0;
transition: SINUSOIDAL 0.25;
target: "r1";
after: "r4b";
after: "r1a";
}
program {
name: "r4b";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.75;
target: "r1";
}
program {
name: "t1a";
action: STATE_SET "default2" 0.0;
transition: SINUSOIDAL 0.25;
target: "t4";
after: "t1b";
after: "t2a";
}
program {
name: "t1b";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.75;
target: "t4";
}
program {
name: "t2a";
action: STATE_SET "default2" 0.0;
transition: SINUSOIDAL 0.25;
target: "t3";
after: "t2b";
after: "t3a";
}
program {
name: "t2b";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.75;
target: "t3";
}
program {
name: "t3a";
action: STATE_SET "default2" 0.0;
transition: SINUSOIDAL 0.25;
target: "t2";
after: "t3b";
after: "t4a";
}
program {
name: "t3b";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.75;
target: "t2";
}
program {
name: "t4a";
action: STATE_SET "default2" 0.0;
transition: SINUSOIDAL 0.25;
target: "t1";
after: "t4b";
after: "t1a";
}
program {
name: "t4b";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.75;
target: "t1";
}
program {
name: "b1a";
action: STATE_SET "default2" 0.0;
transition: SINUSOIDAL 0.25;
target: "b4";
after: "b1b";
after: "b2a";
}
program {
name: "b1b";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.75;
target: "b4";
}
program {
name: "b2a";
action: STATE_SET "default2" 0.0;
transition: SINUSOIDAL 0.25;
target: "b3";
after: "b2b";
after: "b3a";
}
program {
name: "b2b";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.75;
target: "b3";
}
program {
name: "b3a";
action: STATE_SET "default2" 0.0;
transition: SINUSOIDAL 0.25;
target: "b2";
after: "b3b";
after: "b4a";
}
program {
name: "b3b";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.75;
target: "b2";
}
program {
name: "b4a";
action: STATE_SET "default2" 0.0;
transition: SINUSOIDAL 0.25;
target: "b1";
after: "b4b";
after: "b1a";
}
program {
name: "b4b";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.75;
target: "b1";
}
}
}

View File

@ -103,6 +103,9 @@ static void _ibar_bar_cb_iconsize_gigantic(void *data, E_Menu *m, E_Menu_Item
static void _ibar_bar_cb_menu_enabled(void *data, E_Menu *m, E_Menu_Item *mi);
static void _ibar_bar_cb_menu_edit(void *data, E_Menu *m, E_Menu_Item *mi);
static void _ibar_drag_cb_intercept_move(void *data, Evas_Object *o, Evas_Coord x, Evas_Coord y);
static void _ibar_drag_cb_intercept_resize(void *data, Evas_Object *o, Evas_Coord w, Evas_Coord h);
/* public module routines. all modules must have these */
void *
e_modapi_init(E_Module *m)
@ -563,7 +566,11 @@ _ibar_bar_free(IBar_Bar *ibb)
evas_object_del(ibb->overlay_object);
evas_object_del(ibb->box_object);
evas_object_del(ibb->event_object);
if (ibb->drag_object) evas_object_del(ibb->drag_object);
ibb->drag_object = NULL;
if (ibb->drag_object_overlay) evas_object_del(ibb->drag_object_overlay);
ibb->drag_object_overlay = NULL;
e_gadman_client_save(ibb->gmc);
e_object_del(E_OBJECT(ibb->gmc));
@ -1453,7 +1460,7 @@ static void
_ibar_bar_cb_enter(void *data, const char *type, void *event)
{
E_Event_Dnd_Enter *ev;
Evas_Object *o;
Evas_Object *o, *o2;
IBar_Bar *ibb;
IBar_Icon *ic;
int w, h;
@ -1461,15 +1468,27 @@ _ibar_bar_cb_enter(void *data, const char *type, void *event)
ev = event;
ibb = data;
o = evas_object_rectangle_add(ibb->evas);
o = edje_object_add(ibb->evas);
ibb->drag_object = o;
evas_object_color_set(o, 255, 0, 0, 255);
o2 = edje_object_add(ibb->evas);
ibb->drag_object_overlay = o2;
evas_object_intercept_move_callback_add(o, _ibar_drag_cb_intercept_move, o2);
evas_object_intercept_resize_callback_add(o, _ibar_drag_cb_intercept_resize, o2);
e_theme_edje_object_set(o, "base/theme/modules/ibar",
"modules/ibar/drop");
e_theme_edje_object_set(o2, "base/theme/modules/ibar",
"modules/ibar/drop_overlay");
edje_object_signal_emit(o, "set_orientation",
_ibar_main_orientation[e_gadman_client_edge_get(ibb->gmc)]);
edje_object_signal_emit(o2, "set_orientation",
_ibar_main_orientation[e_gadman_client_edge_get(ibb->gmc)]);
evas_object_resize(o, ibb->ibar->conf->iconsize, ibb->ibar->conf->iconsize);
ic = _ibar_icon_pos_find(ibb, ev->x, ev->y);
e_box_freeze(ibb->box_object);
evas_object_show(ibb->drag_object);
evas_object_show(ibb->drag_object_overlay);
if (ic)
{
/* Add new eapp before this icon */
@ -1546,6 +1565,9 @@ _ibar_bar_cb_leave(void *data, const char *type, void *event)
e_box_freeze(ibb->box_object);
e_box_unpack(ibb->drag_object);
evas_object_del(ibb->drag_object);
ibb->drag_object = NULL;
evas_object_del(ibb->drag_object_overlay);
ibb->drag_object_overlay = NULL;
e_box_thaw(ibb->box_object);
_ibar_bar_frame_resize(ibb);
@ -1570,6 +1592,9 @@ _ibar_bar_cb_drop_eapp(void *data, const char *type, void *event)
e_box_freeze(ibb->box_object);
e_box_unpack(ibb->drag_object);
evas_object_del(ibb->drag_object);
ibb->drag_object = NULL;
evas_object_del(ibb->drag_object_overlay);
ibb->drag_object_overlay = NULL;
e_box_thaw(ibb->box_object);
_ibar_bar_frame_resize(ibb);
@ -1605,6 +1630,9 @@ _ibar_bar_cb_drop_file(void *data, const char *type, void *event)
e_box_freeze(ibb->box_object);
e_box_unpack(ibb->drag_object);
evas_object_del(ibb->drag_object);
ibb->drag_object = NULL;
evas_object_del(ibb->drag_object_overlay);
ibb->drag_object_overlay = NULL;
e_box_thaw(ibb->box_object);
_ibar_bar_frame_resize(ibb);
@ -1961,3 +1989,18 @@ _ibar_bar_cb_menu_edit(void *data, E_Menu *m, E_Menu_Item *mi)
ibb = data;
e_gadman_mode_set(ibb->gmc->gadman, E_GADMAN_MODE_EDIT);
}
static void
_ibar_drag_cb_intercept_move(void *data, Evas_Object *o, Evas_Coord x, Evas_Coord y)
{
evas_object_move(o, x, y);
evas_object_move(data, x, y);
}
static void
_ibar_drag_cb_intercept_resize(void *data, Evas_Object *o, Evas_Coord w, Evas_Coord h)
{
evas_object_resize(o, w, h);
evas_object_resize(data, w, h);
}

View File

@ -51,6 +51,7 @@ struct _IBar_Bar
Evas_Object *box_object;
Evas_Object *event_object;
Evas_Object *drag_object;
Evas_Object *drag_object_overlay;
Evas_List *icons;