Enlightenment CVS committal

Author  : atmosphere
Project : misc
Module  : engage

Dir     : misc/engage/src


Modified Files:
        icon.c window.c 


Log Message:
don't nuke the handle_mouse_down function until we get the same functionality back, 
signals now come from your icon edjes ...
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/icon.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- icon.c      15 Apr 2004 18:45:46 -0000      1.9
+++ icon.c      15 Apr 2004 21:01:53 -0000      1.10
@@ -20,6 +20,8 @@
 static OD_Icon *od_icon_new(const char *name, const char *icon_path);
 static void     od_icon_mapping_get(const char *winclass, char **name, char 
**icon_name);       // DON'T free returned
 static char    *od_icon_path_get(const char *icon_name);
+static void od_icon_edje_cb(void *data, Evas_Object *obj, 
+                           const char *emission, const char *source);
 
 OD_Icon        *
 od_icon_new_applnk(const char *command, const char *winclass)
@@ -187,6 +189,7 @@
     else
     {
        evas_object_del(pic);
+       ret->pic = NULL;
     }
     if(edje_object_part_exists(icon, "EngageName"))
     {
@@ -210,12 +213,15 @@
                         (options.tt_shd_color >> 0) & 0xff, 127);
        evas_object_layer_set(tt_shd, 199);
     }
+    edje_object_signal_callback_add(icon, "engage,app,*", "*",
+                                   od_icon_edje_cb, ret);
     evas_object_layer_set(icon, 100);
     evas_object_show(icon);
   } 
   else
   {
       evas_object_del(icon);
+      ret->icon = NULL;
   }
 
   return ret;
@@ -404,3 +410,50 @@
     size++;
   }
 }
+static void
+od_icon_edje_cb(void *data, Evas_Object *obj, const char *emission, const
+char *source)
+{
+  OD_Icon        *icon = NULL;
+  
+  if((icon = (OD_Icon *) data))
+  {
+    if(!strcmp(emission, "engage,app,raise"))
+    {
+       switch(icon->type)
+       {
+           case application_link:
+               break;
+           case docked_icon:
+               break;
+           case minimised_window:
+               od_wm_activate_window(icon->data.minwin.window);
+               break;
+       }
+    }
+    else if (!strcmp(emission, "engage,app,open"))
+    {
+#if 0
+      if(icon->data.applnk.command)
+      {
+       switch(fork())
+       {
+         case 0:
+           execl("/bin/sh", "sh", "-c", icon->data.applnk.command, NULL);
+           break;
+         case -1:
+           fprintf(stderr, "Unable to fork properly\n");
+           break;
+         default:
+           break;
+       }
+      }
+#endif
+    }
+    else if (!strcmp(emission, "engage,app,close"))
+    {
+       /* FIXME Useful ? */
+    }
+    fprintf(stderr, "got %s from %s\n", emission, icon->name);
+  }
+}
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/window.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- window.c    14 Apr 2004 22:59:15 -0000      1.6
+++ window.c    15 Apr 2004 21:01:53 -0000      1.7
@@ -92,9 +92,12 @@
   evas_object_resize(eventer, options.width, options.height);
   evas_object_move(eventer, 0.0, 0.0);
   evas_object_layer_set(eventer, 9999);
+  evas_object_repeat_events_set(eventer, 1);
   evas_object_show(eventer);
+#if 0
   evas_object_event_callback_add(eventer, EVAS_CALLBACK_MOUSE_DOWN,
                                  handle_mouse_down, NULL);
+#endif
   evas_object_event_callback_add(eventer, EVAS_CALLBACK_MOUSE_MOVE,
                                  handle_mouse_move, NULL);
 




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to