Enlightenment CVS committal

Author  : mej
Project : e_modules
Module  : tclock

Dir     : e_modules/tclock


Modified Files:
        e_mod_config.c e_mod_config.h e_mod_main.c e_mod_main.h 


Log Message:
Wed Apr  5 13:48:36 2006                        Michael Jennings (mej)

Indent!
----------------------------------------------------------------------

===================================================================
RCS file: /cvs/e/e_modules/tclock/e_mod_config.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- e_mod_config.c      5 Apr 2006 16:46:50 -0000       1.13
+++ e_mod_config.c      5 Apr 2006 17:48:50 -0000       1.14
@@ -4,22 +4,20 @@
 
 struct _E_Config_Dialog_Data
 {
-   unsigned int         resolution;
-   char         *format;
-   int          userformat;
+   unsigned int resolution;
+   char *format;
+   int userformat;
 };
 
 /* Protos */
 static void *_create_data(E_Config_Dialog *cfd);
 static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas,
-                                          E_Config_Dialog_Data *cfdata);
-static int _basic_apply_data(E_Config_Dialog *cfd,
-                             E_Config_Dialog_Data *cfdata);
+static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, 
E_Config_Dialog_Data *cfdata);
+static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data 
*cfdata);
 static void onCheckChange(void *data, Evas_Object *obj);
 
 void
-_config_tclock_module(E_Container *con, TClock_Face * f)
+_config_tclock_module(E_Container *con, TClock_Face *f)
 {
    E_Config_Dialog *cfd;
    E_Config_Dialog_View *v;
@@ -35,11 +33,11 @@
 }
 
 static void
-_fill_data(TClock_Face * f, E_Config_Dialog_Data *cfdata)
+_fill_data(TClock_Face *f, E_Config_Dialog_Data *cfdata)
 {
    cfdata->resolution = f->conf->resolution;
-   if(f->conf->format)
-     cfdata->format = strdup(f->conf->format);
+   if (f->conf->format)
+      cfdata->format = strdup(f->conf->format);
    cfdata->userformat = f->conf->userformat;
 }
 
@@ -51,6 +49,7 @@
 
    f = cfd->data;
    cfdata = E_NEW(E_Config_Dialog_Data, 1);
+
    _fill_data(f, cfdata);
    return cfdata;
 }
@@ -62,8 +61,7 @@
 }
 
 static Evas_Object *
-_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas,
-                      E_Config_Dialog_Data *cfdata)
+_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data 
*cfdata)
 {
    Evas_Object *o, *of, *ob, *entry, *checked;
    E_Radio_Group *rg;
@@ -76,25 +74,23 @@
    ob = e_widget_radio_add(evas, D_("1 Second"), RESOLUTION_SECOND, rg);
    e_widget_framelist_object_append(of, ob);
    e_widget_list_object_append(o, of, 1, 1, 0.5);
-   
+
    of = e_widget_frametable_add(evas, D_("Time Format"), 0);
-   checked = e_widget_check_add(evas,D_("User format 
String"),&(cfdata->userformat));
+   checked = e_widget_check_add(evas, D_("User format String"), 
&(cfdata->userformat));
    if (cfdata->userformat)
-       e_widget_check_checked_set(checked,1);
-   e_widget_frametable_object_append(of, checked,0,0,1,1,1,0,1,0);
+      e_widget_check_checked_set(checked, 1);
+   e_widget_frametable_object_append(of, checked, 0, 0, 1, 1, 1, 0, 1, 0);
    ob = e_widget_label_add(evas, D_("Consult strftime(3) for format syntax"));
-   e_widget_frametable_object_append(of, ob,0,2,1,1,1,0,1,0);
-   entry = e_widget_entry_add(evas,&(cfdata->format));
-   e_widget_disabled_set(entry,!cfdata->userformat);
-   e_widget_min_size_set(entry,150,1);
-   e_widget_frametable_object_append(of, entry,0,1,1,1,1,0,1,0);
+   e_widget_frametable_object_append(of, ob, 0, 2, 1, 1, 1, 0, 1, 0);
+   entry = e_widget_entry_add(evas, &(cfdata->format));
+   e_widget_disabled_set(entry, !cfdata->userformat);
+   e_widget_min_size_set(entry, 150, 1);
+   e_widget_frametable_object_append(of, entry, 0, 1, 1, 1, 1, 0, 1, 0);
    ob = e_widget_label_add(evas, "");
-   e_widget_frametable_object_append(of, ob,0,1,1,1,1,0,1,0);
+   e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 1, 0, 1, 0);
    e_widget_list_object_append(o, of, 1, 1, 0.5);
-   e_widget_on_change_hook_set(checked,onCheckChange,entry);
-   
-   
-   
+   e_widget_on_change_hook_set(checked, onCheckChange, entry);
+
    return o;
 }
 
@@ -105,32 +101,35 @@
 
    f = cfd->data;
    e_border_button_bindings_ungrab_all();
-   if(cfdata->resolution != f->conf->resolution) {
-     if (cfdata->resolution == RESOLUTION_MINUTE)
-        f->tclock->conf->poll_time = 60.0;
-     else
-        f->tclock->conf->poll_time = 1.0;
-     ecore_timer_interval_set(f->tclock->tclock_check_timer,
-                              f->tclock->conf->poll_time);
-   }
+   if (cfdata->resolution != f->conf->resolution)
+     {
+        if (cfdata->resolution == RESOLUTION_MINUTE)
+           f->tclock->conf->poll_time = 60.0;
+        else
+           f->tclock->conf->poll_time = 1.0;
+        ecore_timer_interval_set(f->tclock->tclock_check_timer, 
f->tclock->conf->poll_time);
+     }
    f->conf->resolution = cfdata->resolution;
    f->conf->userformat = cfdata->userformat;
-   
+
    /* update the format string with the format string given by the user
-      when the userformat is true and the string(typed by the user) isn't 
empty */
-   if(strlen(cfdata->format)>0 && cfdata->userformat) {
-     if(f->conf->format)
-       evas_stringshare_del(f->conf->format);
-     f->conf->format = (char*)evas_stringshare_add(cfdata->format);
-   }
-   
+    * when the userformat is true and the string(typed by the user) isn't 
empty */
+   if (strlen(cfdata->format) > 0 && cfdata->userformat)
+     {
+        if (f->conf->format)
+           evas_stringshare_del(f->conf->format);
+        f->conf->format = (char *)evas_stringshare_add(cfdata->format);
+     }
+
    e_config_save_queue();
    e_border_button_bindings_grab_all();
    return 1;
 }
 
-static void onCheckChange(void *data, Evas_Object *obj)
+static void
+onCheckChange(void *data, Evas_Object *obj)
 {
-    int checked = e_widget_check_checked_get(obj);
-    e_widget_disabled_set(data,!checked);
+   int checked = e_widget_check_checked_get(obj);
+
+   e_widget_disabled_set(data, !checked);
 }
===================================================================
RCS file: /cvs/e/e_modules/tclock/e_mod_config.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- e_mod_config.h      30 Jan 2006 03:16:42 -0000      1.3
+++ e_mod_config.h      5 Apr 2006 17:48:50 -0000       1.4
@@ -3,6 +3,6 @@
 #ifndef E_MOD_CONFIG_H
 #define E_MOD_CONFIG_H
 #include "e_mod_main.h"
-void                _config_tclock_module(E_Container * con, TClock_Face * f);
+void _config_tclock_module(E_Container *con, TClock_Face *f);
 #endif
 #endif
===================================================================
RCS file: /cvs/e/e_modules/tclock/e_mod_main.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- e_mod_main.c        5 Apr 2006 16:46:50 -0000       1.14
+++ e_mod_main.c        5 Apr 2006 17:48:50 -0000       1.15
@@ -3,43 +3,37 @@
 #include "e_mod_main.h"
 #include "e_mod_config.h"
 
-static TClock      *_tclock_new();
-static void         _tclock_shutdown(TClock * tclock);
-static void         _tclock_config_menu_new(TClock * tclock);
-
-static TClock_Face *_tclock_face_new(E_Container * con);
-static void         _tclock_face_free(TClock_Face * face);
-static void         _tclock_face_menu_new(TClock_Face * face);
-
-static void         _tclock_face_cb_gmc_change(void *data,
-                                               E_Gadman_Client * gmc,
-                                               E_Gadman_Change change);
-
-static void         _tclock_face_cb_mouse_down(void *data, Evas * e,
-                                               Evas_Object * obj,
-                                               void *event_info);
-static void         _tclock_face_cb_menu_edit(void *data, E_Menu * m,
-                                              E_Menu_Item * mi);
-static void         _tclock_face_cb_menu_configure(void *data, E_Menu * m,
-                                                   E_Menu_Item * mi);
+static TClock *_tclock_new();
+static void _tclock_shutdown(TClock *tclock);
+static void _tclock_config_menu_new(TClock *tclock);
 
-static int          _tclock_cb_check(void *data);
+static TClock_Face *_tclock_face_new(E_Container *con);
+static void _tclock_face_free(TClock_Face *face);
+static void _tclock_face_menu_new(TClock_Face *face);
+
+static void _tclock_face_cb_gmc_change(void *data, E_Gadman_Client *gmc, 
E_Gadman_Change change);
+
+static void _tclock_face_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, 
void *event_info);
+static void _tclock_face_cb_menu_edit(void *data, E_Menu *m, E_Menu_Item *mi);
+static void _tclock_face_cb_menu_configure(void *data, E_Menu *m, E_Menu_Item 
*mi);
+
+static int _tclock_cb_check(void *data);
 
 static E_Config_DD *conf_edd;
 static E_Config_DD *conf_face_edd;
 
-static int          _tclock_count;
+static int _tclock_count;
 
 /*public code******************************/
-EAPI E_Module_Api   e_modapi = {
+EAPI E_Module_Api e_modapi = {
    E_MODULE_API_VERSION,
    "TClock"
 };
 
-EAPI void          *
-e_modapi_init(E_Module * module)
+EAPI void *
+e_modapi_init(E_Module *module)
 {
-   TClock             *tclock;
+   TClock *tclock;
 
    /* Set up module's message catalogue */
    bindtextdomain(PACKAGE, LOCALEDIR);
@@ -51,9 +45,9 @@
 }
 
 EAPI int
-e_modapi_shutdown(E_Module * module)
+e_modapi_shutdown(E_Module *module)
 {
-   TClock             *tclock;
+   TClock *tclock;
 
    if (module->config_menu)
       module->config_menu = NULL;
@@ -67,16 +61,16 @@
 }
 
 EAPI int
-e_modapi_info(E_Module * module)
+e_modapi_info(E_Module *module)
 {
    module->icon_file = strdup(PACKAGE_DATA_DIR "/module_icon.png");
    return 1;
 }
 
 EAPI int
-e_modapi_save(E_Module * module)
+e_modapi_save(E_Module *module)
 {
-   TClock             *tclock;
+   TClock *tclock;
 
    tclock = module->data;
    e_config_domain_save("module.tclock", conf_edd, tclock->conf);
@@ -84,18 +78,17 @@
 }
 
 EAPI int
-e_modapi_about(E_Module * module)
+e_modapi_about(E_Module *module)
 {
-   e_module_dialog_show(D_("Simple Digital Clock"),
-                        D_("Displays a digital clock on the desktop"));
+   e_module_dialog_show(D_("Simple Digital Clock"), D_("Displays a digital 
clock on the desktop"));
    return 1;
 }
 
 EAPI int
-e_modapi_config(E_Module * module)
+e_modapi_config(E_Module *module)
 {
-   Evas_List          *l;
-   TClock             *t;
+   Evas_List *l;
+   TClock *t;
 
    t = module->data;
    if (!t)
@@ -104,7 +97,7 @@
       return 0;
    for (l = t->faces; l; l = l->next)
      {
-        TClock_Face        *tf;
+        TClock_Face *tf;
 
         tf = l->data;
         if (!tf)
@@ -122,16 +115,17 @@
 /******************************************************************
  * private functions
  ****************************************************************/
-static TClock      *
+static TClock *
 _tclock_new()
 {
-   TClock             *tclock;
-   Evas_List          *managers, *l, *l2, *cl;
-   E_Menu_Item        *mi;
+   TClock *tclock;
+   Evas_List *managers, *l, *l2, *cl;
+   E_Menu_Item *mi;
 
    _tclock_count = 0;
 
    tclock = E_NEW(TClock, 1);
+
    if (!tclock)
       return NULL;
 
@@ -146,6 +140,7 @@
    E_CONFIG_VAL(D, T, userformat, UINT);
 
    conf_edd = E_CONFIG_DD_NEW("TClock_Config", Config);
+
 #undef T
 #undef D
 #define T Config
@@ -158,6 +153,7 @@
    if (!tclock->conf)
      {
         tclock->conf = E_NEW(Config, 1);
+
         tclock->conf->poll_time = 60.0;
      }
 
@@ -167,13 +163,13 @@
    cl = tclock->conf->faces;
    for (l = managers; l; l = l->next)
      {
-        E_Manager          *man;
+        E_Manager *man;
 
         man = l->data;
         for (l2 = man->containers; l2; l2 = l2->next)
           {
-             E_Container        *con;
-             TClock_Face        *face;
+             E_Container *con;
+             TClock_Face *face;
 
              con = l2->data;
              face = _tclock_face_new(con);
@@ -186,19 +182,18 @@
                   if (!cl)
                     {
                        face->conf = E_NEW(Config_Face, 1);
+
                        /* set instance config values */
                        face->conf->enabled = 1;
                        face->conf->resolution = RESOLUTION_MINUTE;
-                      face->conf->userformat = 0;
+                       face->conf->userformat = 0;
+
+                       const char *format;
 
-                      const char         *format;
-                      format =
-                           edje_object_part_state_get(face->tclock_object, 
"tclock_format",
-                                                     NULL);
-                      face->conf->format = (char*)evas_stringshare_add(format);
-                      
-                       tclock->conf->faces =
-                           evas_list_append(tclock->conf->faces, face->conf);
+                       format = 
edje_object_part_state_get(face->tclock_object, "tclock_format", NULL);
+                       face->conf->format = (char 
*)evas_stringshare_add(format);
+
+                       tclock->conf->faces = 
evas_list_append(tclock->conf->faces, face->conf);
                     }
                   else
                     {
@@ -209,20 +204,16 @@
                   if (face->conf->resolution == RESOLUTION_SECOND)
                     {
                        E_CONFIG_LIMIT(tclock->conf->poll_time, 0.1, 1.0);
-                       tclock->tclock_check_timer =
-                           ecore_timer_add(tclock->conf->poll_time,
-                                           _tclock_cb_check, tclock);
+                       tclock->tclock_check_timer = 
ecore_timer_add(tclock->conf->poll_time, _tclock_cb_check, tclock);
                        TCLOCK_DEBUG("RES_SEC");
                     }
                   else
                     {
                        E_CONFIG_LIMIT(tclock->conf->poll_time, 60.0, 60.0);
-                       tclock->tclock_check_timer =
-                           ecore_timer_add(tclock->conf->poll_time,
-                                           _tclock_cb_check, tclock);
+                       tclock->tclock_check_timer = 
ecore_timer_add(tclock->conf->poll_time, _tclock_cb_check, tclock);
                        TCLOCK_DEBUG("RES_MIN");
-                      /* to avoid the long display of "Starting the clock..." 
*/
-                      _tclock_cb_check(tclock);
+                       /* to avoid the long display of "Starting the clock..." 
*/
+                       _tclock_cb_check(tclock);
                     }
 
                   /* Menu */
@@ -231,8 +222,7 @@
 
                   mi = e_menu_item_new(tclock->config_menu);
                   e_menu_item_label_set(mi, _("Configuration"));
-                  e_menu_item_callback_set(mi, _tclock_face_cb_menu_configure,
-                                           face);
+                  e_menu_item_callback_set(mi, _tclock_face_cb_menu_configure, 
face);
 
                   mi = e_menu_item_new(tclock->config_menu);
                   e_menu_item_label_set(mi, con->name);
@@ -240,14 +230,14 @@
                }
           }
      }
-   
+
    return tclock;
 }
 
 static void
-_tclock_shutdown(TClock * tclock)
+_tclock_shutdown(TClock *tclock)
 {
-   Evas_List          *list;
+   Evas_List *list;
 
    E_CONFIG_DD_FREE(conf_edd);
    E_CONFIG_DD_FREE(conf_face_edd);
@@ -266,20 +256,21 @@
 }
 
 static void
-_tclock_config_menu_new(TClock * tclock)
+_tclock_config_menu_new(TClock *tclock)
 {
    tclock->config_menu = e_menu_new();
 }
 
 static TClock_Face *
-_tclock_face_new(E_Container * con)
+_tclock_face_new(E_Container *con)
 {
-   TClock_Face        *face;
-   Evas_Object        *o;
-   Evas_Coord          x, y, w, h;
-   char                buff[4096];
+   TClock_Face *face;
+   Evas_Object *o;
+   Evas_Coord x, y, w, h;
+   char buff[4096];
 
    face = E_NEW(TClock_Face, 1);
+
    if (!face)
       return NULL;
 
@@ -291,8 +282,7 @@
    face->tclock_object = o;
 
    snprintf(buff, sizeof(buff), PACKAGE_DATA_DIR "/tclock.edj");
-   if (!e_theme_edje_object_set
-       (o, "base/theme/modules/tclock", "modules/tclock/main"))
+   if (!e_theme_edje_object_set(o, "base/theme/modules/tclock", 
"modules/tclock/main"))
       edje_object_file_set(o, buff, "modules/tclock/main");
    evas_object_show(o);
 
@@ -301,8 +291,7 @@
    evas_object_layer_set(o, 2);
    evas_object_repeat_events_set(o, 1);
    evas_object_color_set(o, 0, 0, 0, 0);
-   evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
-                                  _tclock_face_cb_mouse_down, face);
+   evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, 
_tclock_face_cb_mouse_down, face);
    evas_object_show(o);
 
    evas_object_resize(face->tclock_object, 200, 200);
@@ -317,24 +306,16 @@
    e_gadman_client_domain_set(face->gmc, "module.tclock", _tclock_count++);
    e_gadman_client_policy_set(face->gmc,
                               E_GADMAN_POLICY_ANYWHERE |
-                              E_GADMAN_POLICY_HMOVE |
-                              E_GADMAN_POLICY_VMOVE |
-                              E_GADMAN_POLICY_HSIZE | E_GADMAN_POLICY_VSIZE);
+                              E_GADMAN_POLICY_HMOVE | E_GADMAN_POLICY_VMOVE | 
E_GADMAN_POLICY_HSIZE | E_GADMAN_POLICY_VSIZE);
    e_gadman_client_min_size_set(face->gmc, 4, 4);
    e_gadman_client_max_size_set(face->gmc, 512, 512);
-   e_gadman_client_auto_size_set(face->gmc,
-                                 40 + (face->inset.l + face->inset.r),
-                                 40 + (face->inset.t + face->inset.b));
+   e_gadman_client_auto_size_set(face->gmc, 40 + (face->inset.l + 
face->inset.r), 40 + (face->inset.t + face->inset.b));
 
    e_gadman_client_align_set(face->gmc, 1.0, 1.0);
    //e_gadman_client_aspect_set(face->gmc, 1.0, 1.0);
-   e_gadman_client_padding_set(face->gmc,
-                               face->inset.l, face->inset.r,
-                               face->inset.t, face->inset.b);
-
-   e_gadman_client_resize(face->gmc,
-                          40 + (face->inset.l + face->inset.r),
-                          40 + (face->inset.t + face->inset.b));
+   e_gadman_client_padding_set(face->gmc, face->inset.l, face->inset.r, 
face->inset.t, face->inset.b);
+
+   e_gadman_client_resize(face->gmc, 40 + (face->inset.l + face->inset.r), 40 
+ (face->inset.t + face->inset.b));
 
    e_gadman_client_change_func_set(face->gmc, _tclock_face_cb_gmc_change, 
face);
    e_gadman_client_load(face->gmc);
@@ -345,7 +326,7 @@
 }
 
 static void
-_tclock_face_free(TClock_Face * face)
+_tclock_face_free(TClock_Face *face)
 {
    e_object_unref(E_OBJECT(face->con));
    e_object_del(E_OBJECT(face->gmc));
@@ -353,8 +334,8 @@
    evas_object_del(face->event_object);
    e_object_del(E_OBJECT(face->menu));
 
-   if(face->conf->format)
-    evas_stringshare_del(face->conf->format);
+   if (face->conf->format)
+      evas_stringshare_del(face->conf->format);
    free(face->conf);
    free(face);
    _tclock_count--;
@@ -363,11 +344,11 @@
 static int
 _tclock_cb_check(void *data)
 {
-   TClock             *tclock;
-   Evas_List          *l;
-   time_t              current_time;
-   struct tm          *local_time;
-   char                buf[TIME_BUF];
+   TClock *tclock;
+   Evas_List *l;
+   time_t current_time;
+   struct tm *local_time;
+   char buf[TIME_BUF];
 
    memset(buf, 0, sizeof(buf));
    current_time = time(NULL);
@@ -376,19 +357,21 @@
    tclock = data;
    for (l = tclock->faces; l; l = l->next)
      {
-        TClock_Face        *face;
+        TClock_Face *face;
 
         face = l->data;
-       
-       const char *format;
-       /* Load the default format string from the module.edj-file
-          when the user defineable format string shouldn't be used 
-          otherwise use the user defined format string*/
-       if(!face->conf->userformat) {
-         format = edje_object_part_state_get(face->tclock_object, 
"tclock_format",
-                                             NULL);
-        } else 
-         format = face->conf->format;
+
+        const char *format;
+
+        /* Load the default format string from the module.edj-file
+         * when the user defineable format string shouldn't be used 
+         * otherwise use the user defined format string */
+        if (!face->conf->userformat)
+          {
+             format = edje_object_part_state_get(face->tclock_object, 
"tclock_format", NULL);
+          }
+        else
+           format = face->conf->format;
 
         strftime(buf, TIME_BUF, format, local_time);
 
@@ -400,61 +383,59 @@
 }
 
 static void
-_tclock_face_menu_new(TClock_Face * face)
+_tclock_face_menu_new(TClock_Face *face)
 {
-   E_Menu             *mn;
-   E_Menu_Item        *mi;
+   E_Menu *mn;
+   E_Menu_Item *mi;
 
    mn = e_menu_new();
    face->menu = mn;
 
    mi = e_menu_item_new(mn);
    e_menu_item_label_set(mi, _("Configuration"));
-   e_util_menu_item_edje_icon_set(mi, "enlightenment/configuration");         
+   e_util_menu_item_edje_icon_set(mi, "enlightenment/configuration");
    e_menu_item_callback_set(mi, _tclock_face_cb_menu_configure, face);
 
    /* Edit */
    mi = e_menu_item_new(mn);
    e_menu_item_label_set(mi, _("Edit Mode"));
-   e_util_menu_item_edje_icon_set(mi, "enlightenment/gadgets");         
+   e_util_menu_item_edje_icon_set(mi, "enlightenment/gadgets");
    e_menu_item_callback_set(mi, _tclock_face_cb_menu_edit, face);
 }
 
 static void
-_tclock_face_cb_gmc_change(void *data, E_Gadman_Client * gmc,
-                           E_Gadman_Change change)
+_tclock_face_cb_gmc_change(void *data, E_Gadman_Client *gmc, E_Gadman_Change 
change)
 {
-   TClock_Face        *face;
-   Evas_Coord          x, y, w, h;
+   TClock_Face *face;
+   Evas_Coord x, y, w, h;
 
    face = data;
    switch (change)
      {
-       case E_GADMAN_CHANGE_MOVE_RESIZE:
-          e_gadman_client_geometry_get(face->gmc, &x, &y, &w, &h);
-          evas_object_move(face->tclock_object, x, y);
-          evas_object_move(face->event_object, x, y);
-          evas_object_resize(face->tclock_object, w, h);
-          evas_object_resize(face->event_object, w, h);
-          break;
-       case E_GADMAN_CHANGE_RAISE:
-          evas_object_raise(face->tclock_object);
-          evas_object_raise(face->event_object);
-          break;
-       case E_GADMAN_CHANGE_EDGE:
-       case E_GADMAN_CHANGE_ZONE:
-          /* FIXME
-           * Must we do something here?
-           */
-          break;
+     case E_GADMAN_CHANGE_MOVE_RESIZE:
+        e_gadman_client_geometry_get(face->gmc, &x, &y, &w, &h);
+        evas_object_move(face->tclock_object, x, y);
+        evas_object_move(face->event_object, x, y);
+        evas_object_resize(face->tclock_object, w, h);
+        evas_object_resize(face->event_object, w, h);
+        break;
+     case E_GADMAN_CHANGE_RAISE:
+        evas_object_raise(face->tclock_object);
+        evas_object_raise(face->event_object);
+        break;
+     case E_GADMAN_CHANGE_EDGE:
+     case E_GADMAN_CHANGE_ZONE:
+        /* FIXME
+         * Must we do something here?
+         */
+        break;
      }
 }
 
 static void
-_tclock_face_cb_mouse_down(void *data, Evas * e, Evas_Object * obj,
-                           void *event_info)
+_tclock_face_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void 
*event_info)
 {
-   TClock_Face        *face;
+   TClock_Face *face;
    Evas_Event_Mouse_Down *ev;
 
    face = data;
@@ -463,25 +444,24 @@
    if (ev->button == 3)
      {
         e_menu_activate_mouse(face->menu, e_zone_current_get(face->con),
-                              ev->output.x, ev->output.y, 1, 1,
-                              E_MENU_POP_DIRECTION_DOWN, ev->timestamp);
+                              ev->output.x, ev->output.y, 1, 1, 
E_MENU_POP_DIRECTION_DOWN, ev->timestamp);
         e_util_container_fake_mouse_up_all_later(face->con);
      }
 }
 
 static void
-_tclock_face_cb_menu_edit(void *data, E_Menu * m, E_Menu_Item * mi)
+_tclock_face_cb_menu_edit(void *data, E_Menu *m, E_Menu_Item *mi)
 {
-   TClock_Face        *face;
+   TClock_Face *face;
 
    face = data;
    e_gadman_mode_set(face->gmc->gadman, E_GADMAN_MODE_EDIT);
 }
 
 static void
-_tclock_face_cb_menu_configure(void *data, E_Menu * m, E_Menu_Item * mi)
+_tclock_face_cb_menu_configure(void *data, E_Menu *m, E_Menu_Item *mi)
 {
-   TClock_Face        *f;
+   TClock_Face *f;
 
    f = data;
    if (!f)
===================================================================
RCS file: /cvs/e/e_modules/tclock/e_mod_main.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- e_mod_main.h        5 Apr 2006 16:46:50 -0000       1.7
+++ e_mod_main.h        5 Apr 2006 17:48:50 -0000       1.8
@@ -12,52 +12,57 @@
 #undef TCLOCK_DEBUG
 #define TCLOCK_DEBUG(X)
 
-typedef struct _Config {
-   Evas_List          *faces;
-   double              poll_time;
+typedef struct _Config
+{
+   Evas_List *faces;
+   double poll_time;
 
 } Config;
 
-typedef struct _Config_Face {
-   unsigned char       enabled;
-   unsigned int        resolution;
-   char                       *format;
-   unsigned int        userformat;
+typedef struct _Config_Face
+{
+   unsigned char enabled;
+   unsigned int resolution;
+   char *format;
+   unsigned int userformat;
 } Config_Face;
 
-typedef struct _TClock {
-   Evas_List          *faces;
-   E_Menu             *config_menu;
-   Config             *conf;
+typedef struct _TClock
+{
+   Evas_List *faces;
+   E_Menu *config_menu;
+   Config *conf;
 
-   Ecore_Timer        *tclock_check_timer;
+   Ecore_Timer *tclock_check_timer;
 } TClock;
 
-typedef struct _TClock_Face {
-   E_Container        *con;
-   E_Menu             *menu;
-   E_Menu             *resolution_menu;
-   Config_Face        *conf;
-   TClock             *tclock;
-
-   struct {
-      Evas_Coord          l, r, t, b;
+typedef struct _TClock_Face
+{
+   E_Container *con;
+   E_Menu *menu;
+   E_Menu *resolution_menu;
+   Config_Face *conf;
+   TClock *tclock;
+
+   struct
+   {
+      Evas_Coord l, r, t, b;
    } inset;
 
-   Evas_Object        *tclock_object;
-   Evas_Object        *event_object;
-   E_Gadman_Client    *gmc;
+   Evas_Object *tclock_object;
+   Evas_Object *event_object;
+   E_Gadman_Client *gmc;
 } TClock_Face;
 
 EAPI extern E_Module_Api e_modapi;
 
-EAPI void          *e_modapi_init(E_Module * m);
-EAPI int            e_modapi_shutdown(E_Module * m);
-EAPI int            e_modapi_save(E_Module * m);
-EAPI int            e_modapi_info(E_Module * m);
-EAPI int            e_modapi_about(E_Module * m);
-EAPI int            e_modapi_config(E_Module * m);
+EAPI void *e_modapi_init(E_Module *m);
+EAPI int e_modapi_shutdown(E_Module *m);
+EAPI int e_modapi_save(E_Module *m);
+EAPI int e_modapi_info(E_Module *m);
+EAPI int e_modapi_about(E_Module *m);
+EAPI int e_modapi_config(E_Module *m);
 
-void                _tclock_cb_config_updated(void *data);
+void _tclock_cb_config_updated(void *data);
 
 #endif




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to