Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/modules/clock


Modified Files:
        e_mod_main.c e_mod_main.h 


Log Message:


we support... xrandr... :) feelfree to change resolution on the fly in e17...
it all works. :)

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/modules/clock/e_mod_main.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- e_mod_main.c        23 Dec 2004 06:38:27 -0000      1.7
+++ e_mod_main.c        25 Dec 2004 15:33:48 -0000      1.8
@@ -18,6 +18,7 @@
 static void    _clock_cb_face_down(void *data, Evas *e, Evas_Object *obj, void 
*event_info);
 static void    _clock_cb_face_up(void *data, Evas *e, Evas_Object *obj, void 
*event_info);
 static void    _clock_cb_face_move(void *data, Evas *e, Evas_Object *obj, void 
*event_info);
+static int     _clock_cb_event_container_resize(void *data, int type, void 
*event);
 
 /* public module routines. all modules must have these */
 void *
@@ -191,6 +192,10 @@
    Evas_Coord ww, hh, bw, bh;
    Evas_Object *o;
    
+   ef->ev_handler_container_resize =
+     ecore_event_handler_add(E_EVENT_CONTAINER_RESIZE,
+                            _clock_cb_event_container_resize,
+                            ef);
    evas_output_viewport_get(ef->evas, NULL, NULL, &ww, &hh);
    ef->fx = ef->clock->conf->x * (ww - ef->clock->conf->width);
    ef->fy = ef->clock->conf->y * (hh - ef->clock->conf->width);
@@ -228,6 +233,7 @@
 static void
 _clock_face_free(Clock_Face *ef)
 {
+   ecore_event_handler_del(ef->ev_handler_container_resize);
    evas_object_del(ef->clock_object);
    evas_object_del(ef->event_object);
    free(ef);
@@ -321,7 +327,7 @@
        evas_object_move(ef->event_object, ef->fx, ef->fy);
      }
    else if (ef->resize)
-   {
+     {
        Evas_Coord d;
 
        d = cx - ef->xx;
@@ -337,3 +343,12 @@
    ef->yy = ev->cur.canvas.y;
 }  
 
+static int
+_clock_cb_event_container_resize(void *data, int type, void *event)
+{
+   Clock_Face *ef;
+   
+   ef = data;
+   _clock_face_reconfigure(ef);
+   return 1;
+}
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/modules/clock/e_mod_main.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_mod_main.h        5 Dec 2004 07:43:51 -0000       1.2
+++ e_mod_main.h        25 Dec 2004 15:33:48 -0000      1.3
@@ -35,6 +35,8 @@
    unsigned char   resize : 1;
    Evas_Coord      xx, yy;
    Evas_Coord      fx, fy, fw;
+
+   Ecore_Event_Handler *ev_handler_container_resize;
 };
 
 EAPI void *init     (E_Module *m);




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to