Enlightenment CVS committal
Author : englebass
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_dnd.c e_gadcon.c e_gadcon.h e_shelf.c
Log Message:
Show shelves on dnd enter.
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_dnd.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -3 -r1.59 -r1.60
--- e_dnd.c 7 May 2007 18:01:43 -0000 1.59
+++ e_dnd.c 7 May 2007 19:54:12 -0000 1.60
@@ -20,6 +20,8 @@
static void _e_drag_move(E_Drag *drag, int x, int y);
static void _e_drag_coords_update(E_Drop_Handler *h, int *dx, int *dy, int
*dw, int *dh);
static int _e_drag_win_matches(E_Drop_Handler *h, Ecore_X_Window win);
+static void _e_drag_win_show(E_Drop_Handler *h);
+static void _e_drag_win_hide(E_Drop_Handler *h);
static void _e_drag_update(int x, int y);
static void _e_drag_end(int x, int y);
static void _e_drag_xdnd_end(int x, int y);
@@ -586,6 +588,46 @@
}
static void
+_e_drag_win_show(E_Drop_Handler *h)
+{
+ if (h->obj)
+ {
+ switch (h->obj->type)
+ {
+ case E_GADCON_TYPE:
+ e_shelf_toggle(e_gadcon_shelf_get((E_Gadcon *)(h->obj)), 1);
+ break;
+ case E_GADCON_CLIENT_TYPE:
+ e_shelf_toggle(e_gadcon_shelf_get(((E_Gadcon_Client
*)(h->obj))->gadcon), 1);
+ break;
+ /* FIXME: add more types as needed */
+ default:
+ break;
+ }
+ }
+}
+
+static void
+_e_drag_win_hide(E_Drop_Handler *h)
+{
+ if (h->obj)
+ {
+ switch (h->obj->type)
+ {
+ case E_GADCON_TYPE:
+ e_shelf_toggle(e_gadcon_shelf_get((E_Gadcon *)(h->obj)), 0);
+ break;
+ case E_GADCON_CLIENT_TYPE:
+ e_shelf_toggle(e_gadcon_shelf_get(((E_Gadcon_Client
*)(h->obj))->gadcon), 0);
+ break;
+ /* FIXME: add more types as needed */
+ default:
+ break;
+ }
+ }
+}
+
+static void
_e_drag_update(int x, int y)
{
Evas_List *l;
@@ -632,6 +674,7 @@
{
if (!h->entered)
{
+ _e_drag_win_show(h);
if (h->cb.enter)
{
if (_drag_current->cb.convert)
@@ -654,6 +697,7 @@
{
if (h->cb.leave)
h->cb.leave(h->cb.data, h->active_type, &leave_ev);
+ _e_drag_win_hide(h);
h->entered = 0;
}
}
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_gadcon.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -3 -r1.77 -r1.78
--- e_gadcon.c 25 Mar 2007 22:44:59 -0000 1.77
+++ e_gadcon.c 7 May 2007 19:54:12 -0000 1.78
@@ -632,7 +632,7 @@
gc->menu_attach.func = func;
gc->menu_attach.data = data;
}
-
+
EAPI void
e_gadcon_dnd_window_set(E_Gadcon *gc, Ecore_X_Window win)
{
@@ -647,6 +647,22 @@
E_OBJECT_CHECK_RETURN(gc, 0);
E_OBJECT_TYPE_CHECK_RETURN(gc, E_GADCON_TYPE, 0);
return gc->dnd_win;
+}
+
+EAPI void
+e_gadcon_shelf_set(E_Gadcon *gc, E_Shelf *shelf)
+{
+ E_OBJECT_CHECK(gc);
+ E_OBJECT_TYPE_CHECK(gc, E_GADCON_TYPE);
+ gc->shelf = shelf;
+}
+
+EAPI E_Shelf *
+e_gadcon_shelf_get(E_Gadcon *gc)
+{
+ E_OBJECT_CHECK_RETURN(gc, NULL);
+ E_OBJECT_TYPE_CHECK_RETURN(gc, E_GADCON_TYPE, NULL);
+ return gc->shelf;
}
EAPI E_Config_Gadcon_Client *
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_gadcon.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -3 -r1.38 -r1.39
--- e_gadcon.h 25 Mar 2007 22:44:59 -0000 1.38
+++ e_gadcon.h 7 May 2007 19:54:12 -0000 1.39
@@ -81,6 +81,7 @@
E_Config_Dialog *config_dialog;
unsigned char editing : 1;
Ecore_X_Window dnd_win;
+ E_Shelf *shelf;
E_Drop_Handler *drop_handler;
};
@@ -181,6 +182,8 @@
EAPI void e_gadcon_util_menu_attach_func_set(E_Gadcon *gc, void
(*func) (void *data, E_Menu *menu), void *data);
EAPI void e_gadcon_dnd_window_set(E_Gadcon *gc, Ecore_X_Window
win);
EAPI Ecore_X_Window e_gadcon_dnd_window_get(E_Gadcon *gc);
+EAPI void e_gadcon_shelf_set(E_Gadcon *gc, E_Shelf *shelf);
+EAPI E_Shelf *e_gadcon_shelf_get(E_Gadcon *gc);
EAPI E_Config_Gadcon_Client *e_gadcon_client_config_new(E_Gadcon *gc, const
char *name);
EAPI E_Config_Gadcon_Client *e_gadcon_client_config_get(E_Gadcon *gc, const
char *id);
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_shelf.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -3 -r1.65 -r1.66
--- e_shelf.c 7 May 2007 19:16:51 -0000 1.65
+++ e_shelf.c 7 May 2007 19:54:12 -0000 1.66
@@ -194,6 +194,7 @@
edje_object_message_signal_process(es->o_base);
e_gadcon_zone_set(es->gadcon, zone);
e_gadcon_ecore_evas_set(es->gadcon, es->ee);
+ e_gadcon_shelf_set(es->gadcon, es);
if (popup)
{
e_gadcon_dnd_window_set(es->gadcon, es->popup->evas_win);
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs