Enlightenment CVS committal

Author  : zuluone
Project : e17
Module  : apps/entice

Dir     : e17/apps/entice/src/bin


Modified Files:
        Makefile.am buttons.c entice.h event.c globals.h handler.c 
        image.c image.h main.c misc.c 
Added Files:
        entice_ipc.c entice_ipc.h 


Log Message:
Plugged in atmos' IPC code so running a second instance of entice adds the images to 
the first session's list. Also, added support to zoom in/out from the mousewheel - 
this needs a bit of work. Finally, fixed a bug whereby the user could cause an FPE by 
zooming out so that the image was less than one pixel wide or high.
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- Makefile.am 5 Feb 2003 05:45:45 -0000       1.2
+++ Makefile.am 25 Aug 2003 19:44:21 -0000      1.3
@@ -8,6 +8,7 @@
 
 entice_SOURCES = \
 buttons.c \
+entice_ipc.c \
 event.c \
 fade.c \
 file.c \
@@ -19,6 +20,7 @@
 panel.c \
 thumb.c \
 buttons.h \
+entice_ipc.h \
 entice.h \
 event.h \
 fade.h \
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/buttons.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- buttons.c   19 Aug 2003 23:11:23 -0000      1.8
+++ buttons.c   25 Aug 2003 19:44:21 -0000      1.9
@@ -51,7 +51,7 @@
 bt_close_up(void *data, Evas * e, Evas_Object * obj, void *event_info)
 {
    evas_object_image_file_set(obj, IM "bt_close_1.png", NULL);
-   exit(0);
+   ecore_main_loop_quit();
 }
 
 void
@@ -76,20 +76,8 @@
 void
 bt_expand_up(void *data, Evas * e, Evas_Object * obj, void *event_info)
 {
-   evas_object_image_file_set(obj, IM "bt_expand_1.png", NULL);
-   if (o_image)
-     {
-       double              sh, sv;
-       int                 w, h;
-
-       evas_object_image_size_get(o_image, &w, &h);
-       sh = (double)w / (double)win_w;
-       sv = (double)h / (double)win_h;
-       scale = sv;
-       if (sh > sv)
-          scale = sh;
-       e_handle_resize();
-     }
+  evas_object_image_file_set(obj, IM "bt_expand_1.png", NULL);
+  e_zoom_full();
 }
 
 void
@@ -141,10 +129,7 @@
 bt_zoom_in_up(void *data, Evas * e, Evas_Object * obj, void *event_info)
 {
    evas_object_image_file_set(obj, IM "bt_zoom_in_1.png", NULL);
-   scale /= 1.414;
-   if (scale > 0.03125)
-     scale = 0.03125;
-   e_handle_resize();
+   e_zoom_in(-1,-1);
 }
 
 void
@@ -157,8 +142,7 @@
 bt_zoom_normal_up(void *data, Evas * e, Evas_Object * obj, void *event_info)
 {
    evas_object_image_file_set(obj, IM "bt_zoom_normal_1.png", NULL);
-   scale = 1.0;
-   e_handle_resize();
+   e_zoom_normal();
 }
 
 void
@@ -171,8 +155,7 @@
 bt_zoom_out_up(void *data, Evas * e, Evas_Object * obj, void *event_info)
 {
    evas_object_image_file_set(obj, IM "bt_zoom_out_1.png", NULL);
-   scale *= 1.414;
-   e_handle_resize();
+   e_zoom_out(-1, -1);
 }
 
 int
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/entice.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- entice.h    11 Aug 2003 13:02:18 -0000      1.6
+++ entice.h    25 Aug 2003 19:44:21 -0000      1.7
@@ -12,8 +12,8 @@
 
 #include <Evas.h>
 #include <Ecore.h>
-#include <Ecore_X.h>
 #include <Ecore_Evas.h>
+#include <Ecore_X.h>
 #define X_DISPLAY_MISSING
 #include <Imlib2.h>
 #undef X_DISPLAY_MISSING
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/event.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- event.c     19 Aug 2003 23:11:23 -0000      1.18
+++ event.c     25 Aug 2003 19:44:21 -0000      1.19
@@ -89,40 +89,22 @@
 
    if (!strcmp(e->keyname, "n"))
      {
-       scale = 1.0;
-       e_handle_resize();
+       e_zoom_normal();
      }
    else if ((!strcmp(e->keyname, "minus")) ||
            (!strcmp(e->keyname, "o")))
      {
-       scale *= 1.414;
-       e_handle_resize();
+       e_zoom_out(-1, -1);
      }
    else if ((!strcmp(e->keyname, "plus")) ||
            (!strcmp(e->keyname, "equal")) ||
            (!strcmp(e->keyname, "i")))
      {
-       scale /= 1.414;
-       if (scale < 0.03125)
-         scale = 0.03125;
-       e_handle_resize();
+       e_zoom_in(-1, -1);
      }
    else if (!strcmp(e->keyname, "w"))
      {
-       int                 w, h;
-
-       if (o_image)
-         {
-            double              sh, sv;
-
-            evas_object_image_size_get(o_image, &w, &h);
-            sh = (double)w / (double)win_w;
-            sv = (double)h / (double)win_h;
-            scale = sv;
-            if (sh > sv)
-               scale = sh;
-            e_handle_resize();
-         }
+       e_zoom_full();
      }
    else if (!strcmp(e->keyname, "f"))
      {
@@ -138,7 +120,7 @@
      }
    else if (!strcmp(e->keyname, "q"))
      {
-       exit(0);
+        ecore_main_loop_quit();
      }
    else if (!strcmp(e->keyname, "r"))
      {
@@ -238,89 +220,3 @@
      }
    return;
 }
-/*
-int
-e_property(void* data, int ev_type, Ecore_Event * ev)
-{
-   Ecore_X_Event_Window_Property *e;
-   Ecore_X_Atom        a_entice_newfiles = 0, xa_string;
-   char               *files;
-   int                 size;
-
-   e = (Ecore_X_Event_Window_Property *) ev;
-   if (e->win != main_win)
-      return 1;
-   a_entice_newfiles = ecore_atom_get("_ENTICE_NEWFILES");
-   if (e->atom != a_entice_newfiles)
-      return 1;
-   xa_string = ecore_x_atom_get("XA_STRING");
-   files = ecore_x_window_prop_property_get(e->win, e->atom, xa_string, &size);
-   if (files)
-     {
-       char                file[4096], *p, *pp;
-
-       pp = files;
-       while ((p = strchr(pp, '\n')))
-         {
-            Image              *im;
-
-            *p = 0;
-            strcpy(file, pp);
-            im = e_image_new(file);
-            images = evas_list_append(images, im);
-            pp = p + 1;
-            if (pp >= files + size)
-               break;
-         }
-       free(files);
-       {
-          Evas_List          *l;
-          int                 i;
-
-          i = 1;
-          for (l = images; l; l = l->next, i++)
-            {
-               Image              *im;
-               int                 first;
-
-               im = l->data;
-               first = 1;
-               if (!im->o_thumb)
-                 {
-                    if (first)
-                      {
-                         current_image = l;
-                         first = 0;
-                      }
-                    im->modified = 0;
-                    im->o_thumb = evas_object_rectangle_add(evas);
-                    evas_object_image_file_set(im->o_thumb, IM "thumb.png", NULL);
-                    evas_object_event_callback_add(im->o_thumb,
-                                                   EVAS_CALLBACK_MOUSE_DOWN,
-                                                   e_list_item_click, l);
-                    evas_object_event_callback_add(im->o_thumb,
-                                                   EVAS_CALLBACK_MOUSE_UP,
-                                                   e_list_item_select, l);
-                    evas_object_event_callback_add(im->o_thumb,
-                                                   EVAS_CALLBACK_MOUSE_IN,
-                                                   e_list_item_in, l);
-                    evas_object_event_callback_add(im->o_thumb,
-                                                   EVAS_CALLBACK_MOUSE_OUT,
-                                                   e_list_item_out, l);
-                    im->subst = 1;
-                    evas_object_image_border_set(im->o_thumb, 4, 4, 4, 4);
-                    evas_object_move(im->o_thumb, 2, 2 + ((48 + 2) * (i - 1)));
-                    evas_object_resize(im->o_thumb, 48, 48);
-                    evas_object_image_fill_set(im->o_thumb, 0, 0, 48, 48);
-                    evas_object_layer_set(im->o_thumb, 210);
-                    evas_object_show(im->o_thumb);
-                 }
-            }
-       }
-       need_thumbs = 1;
-       e_fix_icons();
-       e_display_current_image();
-     }
-   return 1;
-}
-*/
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/globals.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- globals.h   19 Aug 2003 23:11:23 -0000      1.9
+++ globals.h   25 Aug 2003 19:44:21 -0000      1.10
@@ -6,7 +6,6 @@
 extern Evas_Object *o_logo;
 extern Evas_Object *o_panel;
 extern Evas_Object *o_showpanel;
-extern Evas_Object *o_hidepanel;
 extern Evas_Object *o_showbuttons;
 extern Evas_Object *o_arrow_l;
 extern Evas_Object *o_arrow_r;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/handler.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- handler.c   19 Aug 2003 23:11:23 -0000      1.9
+++ handler.c   25 Aug 2003 19:44:21 -0000      1.10
@@ -61,11 +61,8 @@
    evas_object_resize(o_showpanel, 64, win_h);
    evas_object_layer_set(o_showpanel, 300);
    evas_object_repeat_events_set(o_showpanel, 1);
-   evas_object_move(o_hidepanel, 128, 0);
-   evas_object_resize(o_hidepanel, win_w - 128, win_h);
-   evas_object_layer_set(o_hidepanel, 400);
    // make sure buttons aren't left hanging mid-window
-   if (buttons_active == active_out || buttons_active == active_force_out) {
+   //if (buttons_active == active_out || buttons_active == active_force_out) {
       evas_object_move(o_bt_prev, win_w + 0, 0);
       evas_object_move(o_bt_next, win_w + 32, 0);
       evas_object_move(o_bt_zoom_normal, win_w + 64, 0);
@@ -75,7 +72,7 @@
       evas_object_move(o_bt_full, win_w + 192, 0);
       evas_object_move(o_bt_delete, win_w + 224, 0);
       evas_object_move(o_bt_close, win_w + 256, 0);
-   }
+   //}
    evas_object_move(o_showbuttons, win_w - 288, 0);
    evas_object_layer_set(o_showbuttons, 1500);
    evas_object_repeat_events_set(o_showbuttons, 1);
@@ -96,6 +93,10 @@
        evas_object_image_size_get(o_image, &w, &h);
        pw = w;
        ph = h;
+       if (scale > w || scale > h) {
+         printf("You can't zoom out that much.\n");
+         scale = (w<h?w:h);
+       }
        w = (int)((double)w / scale);
        h = (int)((double)h / scale);
        if (w > win_w)
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/image.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- image.c     23 Aug 2003 05:13:51 -0000      1.20
+++ image.c     25 Aug 2003 19:44:21 -0000      1.21
@@ -4,15 +4,17 @@
 
 int turntable_rotation = 0;
 
-/* XXX
 void
-image_add_from_dnd(char *item)
+image_add_from_ipc(char *item)
 {
    DIR                *d;
    struct dirent      *dent;
    Image              *im;
    char                buf[4096];
 
+   if (item==NULL)
+     return;
+   printf("adding new image: %s\n", item);
    if (e_file_is_dir(item))
      {
        d = opendir(item);
@@ -23,17 +25,9 @@
                continue;
 
             sprintf(buf, "%s/%s", item, dent->d_name);
-            if (e_file_is_dir(buf))
-               image_add_from_dnd(buf);
-            else
-              {
-                 im = e_image_new(buf);
-                 im->subst = 1;
-                 images =
-                    evas_list_prepend_relative(images, im,
-                                               current_image->data);
-                 current_image = current_image->prev;
-              }
+            im = e_image_new(buf);
+            im->subst = 1;
+            images = evas_list_append(images, im);
          }
        closedir(d);
      }
@@ -41,14 +35,13 @@
      {
        im = e_image_new(item);
        im->subst = 1;
-       images = evas_list_prepend_relative(images, im, current_image->data);
-       current_image = current_image->prev;
+       images = evas_list_append(images, im);
      }
    need_thumbs = 1;
-   e_display_current_image();
+   // e_display_current_image();
    return;
 }
-*/
+
 void
 image_create_list(int argc, char **argv)
 {
@@ -97,25 +90,10 @@
        snprintf(buf, 4096, "%s/%s", dir, dent->d_name);
        im = e_image_new(buf);
        images = evas_list_append(images, im);
-       /* CS */
-       /* printf("%p\n",images); */
      }
    closedir(d);
 
    current_image = images;
-   /* CS */
-   /* printf("%p\n",current_image); */
-
-   /* CS */
-   /*
-    * for(l=images ; l ; l=l->next)
-    * {
-    * im=(Image*)l->data;
-    * printf("%s\n",im->file);
-    * printf("%p\n",l);
-    * printf("%p\n\n",im);
-    * }
-    */
 }
 
 void
@@ -131,9 +109,6 @@
 
        im = l->data;
 
-       /* CS */
-       /* printf("%s\n",im->file); */
-
        if (im->o_thumb) return;
        im->o_thumb = evas_object_image_add(evas);
        evas_object_image_file_set(im->o_thumb, IM "thumb.png", NULL);
@@ -530,6 +505,75 @@
 }
 
 void
+e_zoom_in(int x, int y)
+{
+  if (!o_image) return;
+  scale /= 1.414;
+  if (scale < 0.03125)
+    scale = 0.03125;
+  /*
+  scroll_x = ((double)(scroll_x + win_w/2 - x))*1.414;
+  scroll_y = ((double)(scroll_y + win_h/2 - y))*1.414;
+  */
+  if (x == -1)
+    scroll_x *= 1.414;
+  else
+    scroll_x = scroll_x*1.414 + (win_w/2 - x)*(0.414);
+  if (y == -1)
+    scroll_y *= 1.414;
+  else
+    scroll_y = scroll_y*1.414 + (win_w/2 - x)*(0.414);
+  //printf("scroll_x: %i, scroll_y: %i\n", scroll_x, scroll_y);
+  e_handle_resize();
+}
+
+void
+e_zoom_out(int x, int y)
+{
+  if (!o_image) return;
+  scale *= 1.414;
+  /*
+  scroll_x = ((double)(scroll_x + win_w/2 - x))/1.414;
+  scroll_y = ((double)(scroll_y + win_h/2 - y))/1.414;
+  */
+  if (x == -1)
+    scroll_x /= 1.414;
+  else
+    scroll_x = scroll_x/1.414 - (win_w/2 - x)*(0.293);
+  if (y == -1)
+    scroll_y /= 1.414;
+  else
+    scroll_y = scroll_y/1.414 - (win_w/2 - x)*(0.293);
+  //printf("scroll_x: %i, scroll_y: %i\n", scroll_x, scroll_y);
+  e_handle_resize();
+}
+
+void
+e_zoom_normal(void)
+{
+  if (!o_image) return;
+  scale = 1.0;
+  e_handle_resize();
+}
+  
+void
+e_zoom_full(void)
+{
+  double              sh, sv;
+  int                 w, h;
+
+  if (!o_image) return;
+  evas_object_image_size_get(o_image, &w, &h);
+  sh = (double)w / (double)win_w;
+  sv = (double)h / (double)win_h;
+  if (sh > sv)
+    scale = sh;
+  else
+    scale = sv;
+  e_handle_resize();
+}
+
+void
 e_delete_current_image(void)
 {
    Evas_List          *l = NULL;
@@ -669,8 +713,6 @@
 void
 e_display_current_image(void)
 {
-   int scroll_x = 0;
-   int scroll_y = 0;
    Imlib_Image im;
    DATA32 *data;
    int mustUseImlib = 0;
@@ -700,6 +742,8 @@
                                       next_image_up, NULL);
        evas_object_event_callback_add(o_image, EVAS_CALLBACK_MOUSE_MOVE,
                                       next_image_move, NULL);
+       evas_object_event_callback_add(o_image, EVAS_CALLBACK_MOUSE_WHEEL,
+                                      next_image_wheel, NULL);
        evas_object_show(o_image);
        // if evas can't load the thing...
        if (evas_object_image_load_error_get(o_image) != EVAS_LOAD_ERROR_NONE)
@@ -866,7 +910,22 @@
        else if (scroll_y < -h / 2)
          scroll_y = -h / 2;
        */
+       //printf("sx: %i, sy: %i\n", scroll_x, scroll_y);
 
        e_handle_resize();
      }
+}
+
+void
+next_image_wheel(void *data, Evas * e, Evas_Object * obj, void *event_info)
+{
+  Evas_Event_Mouse_Wheel *ev;
+
+  ev = event_info;
+  // printf("x: %i, y: %i\n", ev->output.x, ev->output.y);
+  if (ev->z > 0) {
+    e_zoom_out(ev->output.x, ev->output.y);
+  } else {
+    e_zoom_in(ev->output.x, ev->output.y);
+  }
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/image.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- image.h     9 Aug 2003 00:50:38 -0000       1.11
+++ image.h     25 Aug 2003 19:44:21 -0000      1.12
@@ -1,7 +1,7 @@
 #ifndef __IMAGE_H__
 #define __IMAGE_H__
 
-// void                image_add_from_dnd(char *item);
+void                image_add_from_ipc(char *item);
 
 void                image_create_list(int argc, char **argv);
 void                image_create_list_dir(char *dir);
@@ -20,6 +20,10 @@
 void                e_turntable_r_current_image(void);
 void               e_turntable_reset(void);
 
+void               e_zoom_in(int x, int y);
+void               e_zoom_out(int x, int y);
+void               e_zoom_normal(void);
+void               e_zoom_full(void);
 void                e_flip_h_current_image(void);
 void                e_flip_v_current_image(void);
 
@@ -35,6 +39,8 @@
 void                next_image_up(void *data, Evas * e, Evas_Object * obj,
                                  void *event_info);
 void                next_image_move(void *data, Evas * e, Evas_Object * obj,
+                                   void *event_info);
+void                next_image_wheel(void *data, Evas * e, Evas_Object * obj,
                                    void *event_info);
 
 #endif /* __IMAGE_H__ */
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/main.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- main.c      19 Aug 2003 23:11:23 -0000      1.10
+++ main.c      25 Aug 2003 19:44:21 -0000      1.11
@@ -1,11 +1,11 @@
 #include "entice.h"
+#include "entice_ipc.h"
 
 /* globals */
 Evas_Object        *o_bg;
 Evas_Object        *o_logo;
 Evas_Object        *o_panel;
 Evas_Object        *o_showpanel;
-Evas_Object        *o_hidepanel;
 Evas_Object        *o_showbuttons;
 Evas_Object        *o_arrow_l;
 Evas_Object        *o_arrow_r;
@@ -64,93 +64,6 @@
 char              **dnd_files = NULL;
 
 /*****************************************************************************/
-/*
-Ecore_X_Window
-find_current_rep(Ecore_X_Window win, Ecore_X_Atom atom)
-{
-   Ecore_X_Window             *wlist;
-   int                 i, n;
-   Ecore_X_Atom               string;
-
-   wlist = ecore_window_get_children(win, &n);
-   if (wlist)
-     {
-       string = ecore_x_atom_get("XA_STRING");
-       for (i = 0; i < n; i++)
-         {
-            void               *data;
-            int                 size;
-            Ecore_X_Window      w;
-
-            w = wlist[i];
-            data = ecore_x_window_prop_property_get(w, atom, string, &size);
-            if (data)
-              {
-                 free(data);
-                 free(wlist);
-                 return w;
-              }
-            else
-              {
-                 Ecore_X_Window ww;
-
-                 ww = find_current_rep(w, atom);
-                 if (ww)
-                   {
-                      free(wlist);
-                      return ww;
-                   }
-              }
-         }
-       free(wlist);
-     }
-   return 0;
-}
-
-void
-find_current(void)
-{
-   Ecore_X_Atom        a_entice;
-   Ecore_X_Atom        a_entice_newfiles;
-   Ecore_X_Atom               string;
-   Ecore_X_Window      win;
-   Evas_List          *l;
-   int                 size;
-   char               *files;
-
-   if (!images)
-      return;
-   a_entice = ecore_x_atom_get("_ENTICE_APP_WINDOW");
-   win = find_current_rep(0, a_entice);
-   if (!win)
-      return;
-   a_entice_newfiles = ecore_x_atom_get("_ENTICE_NEWFILES");
-   size = 0;
-   for (l = images; l; l = l->next)
-     {
-       Image              *im;
-
-       im = l->data;
-       size += strlen(im->file) + 2;
-     }
-   files = malloc(size);
-   files[0] = 0;
-   for (l = images; l; l = l->next)
-     {
-       Image              *im;
-
-       im = l->data;
-       strcat(files, im->file);
-       strcat(files, "\n");
-     }
-   string = ecore_x_atom_get("XA_STRING");
-   ecore_x_window_prop_property_set(win, a_entice_newfiles, string, 8, files, size);
-   ecore_sync();
-   ecore_sync();
-   exit(0);
-}
-*/
-/*****************************************************************************/
 
 static int main_signal_exit(void *data, int ev_type, void *ev)
 {
@@ -230,9 +143,9 @@
    }
    ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, main_signal_exit, NULL);
    
-   /* init X */
-   if (!ecore_evas_init())
-     {
+   if (!entice_ipc_init(argc, (const char **) argv)) {
+     /* init X */
+     if (!ecore_evas_init()) {
        if (getenv("DISPLAY"))
          {
             printf("Cannot initialize default display:\n");
@@ -246,28 +159,22 @@
        exit(-1);
      }
 
-   /* initialise Ecore */
-   if (!ecore_init()) {
-     printf("Maximal evil: unable to init Ecore!\n");
-     return -1;
-   }
-   /* find if another entice is running... if it is .. message it. */
-   //find_current(); // XXX
-
-   /* program does its data setup here */
-   setup();
+    /* program does its data setup here */
+    setup();
 
-   /* setup thumbnails */
-   image_create_thumbnails();
-   icon_x = -100;
-   e_fix_icons();
-   /* call the animator once to start it up */
-   command = active_in;
-   e_fade_logo(&command);
-   e_fade_scroller_in((void *)1);
-   /* and now loop forever handling events */
-   ecore_main_loop_begin();
-   ecore_evas_shutdown();
+    /* setup thumbnails */
+    image_create_thumbnails();
+    icon_x = -100;
+    e_fix_icons();
+    /* call the animator once to start it up */
+    command = active_in;
+    e_fade_logo(&command);
+    e_fade_scroller_in((void *)1);
+    /* and now loop forever handling events */
+    ecore_main_loop_begin();
+    ecore_evas_shutdown();
+    entice_ipc_shutdown();
+   }
    ecore_shutdown();
    return(0);
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/misc.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- misc.c      15 Aug 2003 18:01:43 -0000      1.13
+++ misc.c      25 Aug 2003 19:44:21 -0000      1.14
@@ -29,7 +29,6 @@
 setup(void)
 {
    int                 i, j;
-   Ecore_X_Atom        a_entice;
    char                string[] = "entice";
 
    /* handler for when the event queue goes idle */
@@ -42,7 +41,6 @@
    ecore_evas_name_class_set(ecore_evas, "Entice", "Main");
    ecore_evas_size_min_set(ecore_evas, 288, 128);
    ecore_evas_size_max_set(ecore_evas, 8000, 8000);
-   a_entice = ecore_x_atom_get("_ENTICE_APP_WINDOW");
    ecore_evas_title_set(ecore_evas, string);
    evas = ecore_evas_get(ecore_evas);
    evas_output_method_set(evas, render_method);
@@ -52,35 +50,12 @@
    evas_font_cache_set(evas, MAX_FONT_CACHE);
    evas_image_cache_set(evas, MAX_IMAGE_CACHE);
    ecore_evas_show(ecore_evas);
-   /*
-   {
-      Evas_Engine_Info_Software_X11 *einfo;
-
-      einfo = (Evas_Engine_Info_Software_X11 *) evas_engine_info_get(evas);
-
-      {
-        Display            *disp;
-
-        * the following is specific to the engine *
-        disp = ecore_x_display_get();
-        einfo->info.display = disp;
-        einfo->info.visual = DefaultVisual(disp, DefaultScreen(disp));
-        einfo->info.colormap = DefaultColormap(disp, DefaultScreen(disp));
-        einfo->info.drawable = win;
-        einfo->info.depth = DefaultDepth(disp, DefaultScreen(disp));
-        einfo->info.rotation = 0;
-        einfo->info.debug = 0;
-      }
-      evas_engine_info_set(evas, (Evas_Engine_Info *) einfo);
-   }
-   */
    /* now... create objects in the evas */
 
    o_bg = e_newim(evas, IM "bg.png");
    o_logo = e_newim(evas, IM "logo.png");
    o_panel = e_newim(evas, IM "panel.png");
    o_showpanel = evas_object_rectangle_add(evas);
-   o_hidepanel = evas_object_rectangle_add(evas);
    o_showbuttons = evas_object_rectangle_add(evas);
    o_arrow_l = e_newim(evas, IM "arrow_l.png");
    o_arrow_r = e_newim(evas, IM "arrow_r.png");
@@ -107,7 +82,6 @@
 
    evas_object_color_set(o_logo, 255, 255, 255, 0);
    evas_object_color_set(o_showpanel, 0, 0, 255, 0);
-   evas_object_color_set(o_hidepanel, 0, 255, 0, 0);
    evas_object_color_set(o_showbuttons, 255, 0, 0, 0);
    // evas_object_pass_events_set(o_panel, 1);
    for (j = 0; j < 2; j++)
@@ -132,7 +106,6 @@
    evas_object_show(o_logo);
    evas_object_show(o_panel);
    evas_object_show(o_showpanel);
-   evas_object_show(o_hidepanel);
    evas_object_resize(o_showbuttons, 288, 32);
    evas_object_show(o_showbuttons);
 
@@ -178,12 +151,6 @@
    evas_object_event_callback_add(o_bg, EVAS_CALLBACK_KEY_DOWN, e_key_down, NULL);
    evas_object_event_callback_add(o_bg, EVAS_CALLBACK_KEY_UP, e_key_up, NULL);
    evas_object_focus_set(o_bg, 1);
-   evas_object_event_callback_add(o_hidepanel, EVAS_CALLBACK_MOUSE_DOWN,
-                                 next_image, NULL);
-   evas_object_event_callback_add(o_hidepanel, EVAS_CALLBACK_MOUSE_UP,
-                                 next_image_up, NULL);
-   evas_object_event_callback_add(o_hidepanel, EVAS_CALLBACK_MOUSE_MOVE,
-                                 next_image_move, NULL);
    evas_object_event_callback_add(o_showpanel, EVAS_CALLBACK_MOUSE_DOWN,
                                  next_image, NULL);
    evas_object_event_callback_add(o_showpanel, EVAS_CALLBACK_MOUSE_UP,
@@ -328,8 +295,7 @@
 void
 e_toggle_fullscreen(void)
 {
-   static Ecore_X_Window       win = 0;
-   static int          pw = W, ph = H, px = 0, py = 0;
+   static int pw = W, ph = H, px = 0, py = 0;
    enum active_state command;
 
    if (!full)




-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to