Enlightenment CVS committal

Author  : xcomputerman
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_zone.c e_zone.h 


Log Message:
Would be nice to inform the pager when desks are getting added and removed, 
too.:)

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_zone.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- e_zone.c    13 Jan 2005 14:24:24 -0000      1.17
+++ e_zone.c    15 Jan 2005 08:31:38 -0000      1.18
@@ -12,13 +12,18 @@
 static void _e_zone_cb_bg_mouse_down(void *data, Evas *evas, Evas_Object *obj, 
void *event_info);
 static void _e_zone_cb_bg_mouse_up(void *data, Evas *evas, Evas_Object *obj, 
void *event_info);
 static void _e_zone_cb_bg_mouse_move(void *data, Evas *evas, Evas_Object *obj, 
void *event_info);
+static void _e_zone_event_zone_desk_count_set_free(void *data, void *ev);
 
 static int zone_count;
 
+int E_EVENT_ZONE_DESK_COUNT_SET = 0;
+
 int
 e_zone_init(void)
 {
    zone_count = 0;
+   E_EVENT_ZONE_DESK_COUNT_SET = ecore_event_type_new();
+   
    return 1;
 }
 
@@ -284,6 +289,7 @@
    int        x, y, xx, yy, moved;
    Evas_List *client;
    E_Border  *bd;
+   E_Event_Zone_Desk_Count_Set *ev;
    
    xx = x_count;
    if (xx < 1)
@@ -378,6 +384,12 @@
    e_config->zone_desks_x_count = xx;
    e_config->zone_desks_y_count = yy;
    e_config_save_queue();
+
+   ev = E_NEW(E_Event_Zone_Desk_Count_Set, 1);
+   if (!ev) return;
+   ev->zone = zone;
+   e_object_ref(E_OBJECT(zone));
+   ecore_event_add(E_EVENT_ZONE_DESK_COUNT_SET, ev, 
_e_zone_event_zone_desk_count_set_free, NULL);
 }
 
 void
@@ -386,3 +398,14 @@
    *x_count = zone->desk_x_count;
    *y_count = zone->desk_y_count;
 }
+
+static void
+_e_zone_event_zone_desk_count_set_free(void *data, void *ev)
+{
+   E_Event_Zone_Desk_Count_Set *e;
+
+   e = ev;
+   e_object_unref(E_OBJECT(e->zone));
+   free(e);
+}
+
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_zone.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- e_zone.h    12 Jan 2005 16:03:08 -0000      1.8
+++ e_zone.h    15 Jan 2005 08:31:38 -0000      1.9
@@ -2,6 +2,8 @@
 
 typedef struct _E_Zone     E_Zone;
 
+typedef struct _E_Event_Zone_Desk_Count_Set     E_Event_Zone_Desk_Count_Set;
+
 #else
 #ifndef E_ZONE_H
 #define E_ZONE_H
@@ -25,6 +27,11 @@
 
 };
 
+struct _E_Event_Zone_Desk_Count_Set
+{
+   E_Zone *zone;
+};
+
 EAPI int        e_zone_init(void);
 EAPI int        e_zone_shutdown(void);
 EAPI E_Zone    *e_zone_new(E_Container *con, int x, int y, int w, int h);
@@ -37,5 +44,7 @@
 EAPI void       e_zone_desk_count_set(E_Zone *zone, int x_count, int y_count);
 EAPI void       e_zone_desk_count_get(E_Zone *zone, int *x_count, int 
*y_count);
 
+extern EAPI int E_EVENT_ZONE_DESK_COUNT_SET;
+
 #endif
 #endif




-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to