Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        E.h aclass.c backgrounds.c borders.c cmclass.c comms.c 
        desktops.c dock.c ewin-ops.c ewins.c ewmh.c finders.c focus.c 
        gnome.c groups.c icccm.c iclass.c iconify.c ipc.c lists.c 
        menus-misc.c menus.c pager.c slideout.c snaps.c warp.c 


Log Message:
Trivial stuff (function renaming, avoid referencing ewin list, eliminate 
unnecessary casts).
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.459
retrieving revision 1.460
diff -u -3 -r1.459 -r1.460
--- E.h 30 Jun 2005 12:37:24 -0000      1.459
+++ E.h 30 Jun 2005 12:50:33 -0000      1.460
@@ -1721,9 +1721,12 @@
 int                 findLocalizedFile(char *fname);
 
 /* finders.c */
-EWin               *FindEwinByBase(Window win);
-EWin               *FindEwinByChildren(Window win);
-EWin               *FindEwinByPartial(const char *win, int type);
+EWin               *EwinFindByPtr(const EWin * ewin);
+EWin               *EwinFindByFrame(Window win);
+EWin               *EwinFindByClient(Window win);
+EWin               *EwinFindByChildren(Window win);
+EWin               *EwinFindByString(const char *win, int type);
+
 Button             *FindButton(Window win);
 ActionClass        *FindActionClass(Window win);
 Group             **ListWinGroups(EWin * ewin, char group_select, int *num);
@@ -1731,7 +1734,6 @@
                                               char nogroup, int *num);
 EWin              **EwinListTransients(EWin * ewin, int *num, int group);
 EWin              **EwinListTransientFor(EWin * ewin, int *num);
-EWin              **ListGroupMembers(Window win, int *num);
 
 /* focus.c */
 #define FOCUS_NOP         0
@@ -1917,13 +1919,13 @@
 
 /* lists.c */
 void                ListsInit(int num);
-void               *FindItem(const char *name, int id, int find_by, int type);
+void               *FindItem(const void *name, int id, int find_by, int type);
 void                AddItem(const void *item, const char *name, int id,
                            int type);
 void                AddItemEnd(const void *item, const char *name, int id,
                               int type);
-void               *RemoveItem(const char *name, int id, int find_by, int 
type);
-void               *RemoveItemByPtr(const void *ptritem, int type);
+void               *RemoveItem(const void *name, int id, int find_by, int 
type);
+void               *RemoveItemByPtr(const void *item, int type);
 void              **ListItemType(int *num, int type);
 char              **ListItems(int *num, int type);
 void              **ListItemTypeID(int *num, int type, int id);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/aclass.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- aclass.c    30 Jun 2005 12:37:25 -0000      1.15
+++ aclass.c    30 Jun 2005 12:50:34 -0000      1.16
@@ -720,8 +720,7 @@
    if (!Mode.keybinds_changed)
       return;
 
-   ac = (ActionClass *) FindItem("KEYBINDINGS", 0, LIST_FINDBY_NAME,
-                                LIST_TYPE_ACLASS_GLOBAL);
+   ac = FindItem("KEYBINDINGS", 0, LIST_FINDBY_NAME, LIST_TYPE_ACLASS_GLOBAL);
    if (!ac || ac->num <= 0)
       return;
 
@@ -1092,8 +1091,7 @@
    Action             *aa;
    int                 i, mod;
 
-   ac = (ActionClass *) FindItem("KEYBINDINGS", 0, LIST_FINDBY_NAME,
-                                LIST_TYPE_ACLASS_GLOBAL);
+   ac = FindItem("KEYBINDINGS", 0, LIST_FINDBY_NAME, LIST_TYPE_ACLASS_GLOBAL);
    if (!ac)
       return;
 
@@ -1295,9 +1293,7 @@
    Action             *aa;
    unsigned int        mod, button, mask;
 
-   ac = (ActionClass *) FindItem("BUTTONBINDINGS", 0, LIST_FINDBY_NAME,
-                                LIST_TYPE_ACLASS);
-
+   ac = FindItem("BUTTONBINDINGS", 0, LIST_FINDBY_NAME, LIST_TYPE_ACLASS);
    if (!ac)
       return;
 
@@ -1349,9 +1345,7 @@
    Action             *aa;
    unsigned int        mod, button;
 
-   ac = (ActionClass *) FindItem("BUTTONBINDINGS", 0, LIST_FINDBY_NAME,
-                                LIST_TYPE_ACLASS);
-
+   ac = FindItem("BUTTONBINDINGS", 0, LIST_FINDBY_NAME, LIST_TYPE_ACLASS);
    if (!ac)
       return;
 
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/backgrounds.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- backgrounds.c       11 Jun 2005 08:25:29 -0000      1.31
+++ backgrounds.c       30 Jun 2005 12:50:34 -0000      1.32
@@ -218,7 +218,7 @@
        return -1;
      }
 
-   RemoveItem((char *)bg, 0, LIST_FINDBY_POINTER, LIST_TYPE_BACKGROUND);
+   RemoveItemByPtr(bg, LIST_TYPE_BACKGROUND);
    BackgroundImagesRemove(bg);
 
    if (bg->name)
@@ -508,9 +508,8 @@
        if (cm)
           cm->ref_count--;
        else
-          cm = (ColorModifierClass *) FindItem("BACKGROUND", 0,
-                                               LIST_FINDBY_NAME,
-                                               LIST_TYPE_COLORMODIFIER);
+          cm = FindItem("BACKGROUND", 0, LIST_FINDBY_NAME,
+                        LIST_TYPE_COLORMODIFIER);
 
        if (cm)
          {
@@ -1893,8 +1892,7 @@
 
    /* remove them all from the list */
    for (i = 0; i < num; i++)
-      RemoveItem((char *)(bglist[i]), 0, LIST_FINDBY_POINTER,
-                LIST_TYPE_BACKGROUND);
+      RemoveItemByPtr(bglist[i], LIST_TYPE_BACKGROUND);
    Quicksort((void **)bglist, 0, num - 1,
             (int (*)(void *d1, void *d2))BG_SortFileCompare);
    for (i = 0; i < num; i++)
@@ -1924,8 +1922,7 @@
 
    /* remove them all from the list */
    for (i = 0; i < num; i++)
-      RemoveItem((char *)(bglist[i]), 0, LIST_FINDBY_POINTER,
-                LIST_TYPE_BACKGROUND);
+      RemoveItemByPtr(bglist[i], LIST_TYPE_BACKGROUND);
    for (i = 0; i < num; i++)
      {
        Background         *bg;
@@ -1967,8 +1964,7 @@
      {
        /* remove them all from the list */
        for (i = 0; i < num; i++)
-          RemoveItem((char *)(bglist[i]), 0, LIST_FINDBY_POINTER,
-                     LIST_TYPE_BACKGROUND);
+          RemoveItemByPtr(bglist[i], LIST_TYPE_BACKGROUND);
        for (i = 0; i < num; i++)
          {
             Background         *bg;
@@ -2729,8 +2725,7 @@
       return;
 
    sscanf(params, "%1000s", param1);
-   bg = (Background *) FindItem(param1, 0, LIST_FINDBY_NAME,
-                               LIST_TYPE_BACKGROUND);
+   bg = FindItem(param1, 0, LIST_FINDBY_NAME, LIST_TYPE_BACKGROUND);
    Esnprintf(buf, sizeof(buf), "(null)");
    if ((bg) && (bg->cmclass))
       Esnprintf(buf, sizeof(buf), "%s", bg->cmclass->name);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v
retrieving revision 1.265
retrieving revision 1.266
diff -u -3 -r1.265 -r1.266
--- borders.c   30 Jun 2005 12:37:25 -0000      1.265
+++ borders.c   30 Jun 2005 12:50:34 -0000      1.266
@@ -600,7 +600,7 @@
 {
    Border             *b;
 
-   b = (Border *) FindItem(name, 0, LIST_FINDBY_NAME, LIST_TYPE_BORDER);
+   b = FindItem(name, 0, LIST_FINDBY_NAME, LIST_TYPE_BORDER);
 
    EwinSetBorder(ewin, b, 0);
 }
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/cmclass.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- cmclass.c   15 Apr 2005 23:59:59 -0000      1.18
+++ cmclass.c   30 Jun 2005 12:50:35 -0000      1.19
@@ -212,8 +212,7 @@
        switch (i1)
          {
          case CONFIG_CLOSE:
-            cm = (ColorModifierClass *) FindItem(name, 0, LIST_FINDBY_NAME,
-                                                 LIST_TYPE_COLORMODIFIER);
+            cm = FindItem(name, 0, LIST_FINDBY_NAME, LIST_TYPE_COLORMODIFIER);
             if (cm)
               {
                  ModifyCMClass(name, rnum, rx, ry, gnum, gx, gy, bnum, bx, by);
@@ -363,8 +362,7 @@
 {
    ColorModifierClass *cm;
 
-   cm = (ColorModifierClass *) FindItem(name, 0, LIST_FINDBY_NAME,
-                                       LIST_TYPE_COLORMODIFIER);
+   cm = FindItem(name, 0, LIST_FINDBY_NAME, LIST_TYPE_COLORMODIFIER);
    if (!cm)
       return;
 
@@ -462,9 +460,8 @@
               {
                  ColorModifierClass *cm;
 
-                 cm = (ColorModifierClass *) FindItem(param1, 0,
-                                                      LIST_FINDBY_NAME,
-                                                      LIST_TYPE_COLORMODIFIER);
+                 cm = FindItem(param1, 0, LIST_FINDBY_NAME,
+                               LIST_TYPE_COLORMODIFIER);
                  if (cm)
                     FreeCMClass(cm);
               }
@@ -475,9 +472,8 @@
               {
                  ColorModifierClass *cm;
 
-                 cm = (ColorModifierClass *) FindItem(param1, 0,
-                                                      LIST_FINDBY_NAME,
-                                                      LIST_TYPE_COLORMODIFIER);
+                 cm = FindItem(param1, 0, LIST_FINDBY_NAME,
+                               LIST_TYPE_COLORMODIFIER);
                  if (cm)
                     Esnprintf(buf, sizeof(buf), "%u references remain.",
                               cm->ref_count);
@@ -512,8 +508,7 @@
       return;
 
    sscanf(params, "%1000s", param1);
-   cm = (ColorModifierClass *) FindItem(param1, 0, LIST_FINDBY_NAME,
-                                       LIST_TYPE_COLORMODIFIER);
+   cm = FindItem(param1, 0, LIST_FINDBY_NAME, LIST_TYPE_COLORMODIFIER);
    Esnprintf(buf, sizeof(buf), "(null)");
    if (cm)
       FreeCMClass(cm);
@@ -531,8 +526,7 @@
       return;
 
    sscanf(params, "%1000s", param1);
-   cm = (ColorModifierClass *) FindItem(param1, 0, LIST_FINDBY_NAME,
-                                       LIST_TYPE_COLORMODIFIER);
+   cm = FindItem(param1, 0, LIST_FINDBY_NAME, LIST_TYPE_COLORMODIFIER);
    Esnprintf(buf, sizeof(buf), "(null)");
    if (cm)
      {
@@ -582,8 +576,7 @@
       return;
 
    sscanf(params, "%1000s", w);
-   cm = (ColorModifierClass *) FindItem(w, 0, LIST_FINDBY_NAME,
-                                       LIST_TYPE_COLORMODIFIER);
+   cm = FindItem(w, 0, LIST_FINDBY_NAME, LIST_TYPE_COLORMODIFIER);
    name = Estrdup(w);
    i = 2;
    word(params, i++, w);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/comms.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -3 -r1.69 -r1.70
--- comms.c     7 May 2005 11:19:55 -0000       1.69
+++ comms.c     30 Jun 2005 12:50:35 -0000      1.70
@@ -161,7 +161,7 @@
    for (i = 0; i < 12; i++)
       s[i] = ev->data.b[i + 8];
    sscanf(s2, "%lx", &win);
-   cl = (Client *) FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_CLIENT);
+   cl = FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_CLIENT);
    if (!cl)
      {
        cl = ClientCreate(win);
@@ -364,7 +364,7 @@
       return;
    for (i = 0; i < num; i++)
      {
-       c = (Client *) FindItem(l[i], 0, LIST_FINDBY_NAME, LIST_TYPE_CLIENT);
+       c = FindItem(l[i], 0, LIST_FINDBY_NAME, LIST_TYPE_CLIENT);
        if (c)
           CommsSend(c, s);
      }
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/desktops.c,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -3 -r1.153 -r1.154
--- desktops.c  30 Jun 2005 12:37:25 -0000      1.153
+++ desktops.c  30 Jun 2005 12:50:41 -0000      1.154
@@ -372,7 +372,7 @@
 
    bg = desks.bg[d->num];
    if (bg)
-      bg = FindItem((char *)bg, 0, LIST_FINDBY_POINTER, LIST_TYPE_BACKGROUND);
+      bg = FindItem(bg, 0, LIST_FINDBY_POINTER, LIST_TYPE_BACKGROUND);
    if (!bg)
      {
        lst = (Background **) ListItemType(&num, LIST_TYPE_BACKGROUND);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/dock.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- dock.c      7 May 2005 11:19:56 -0000       1.25
+++ dock.c      30 Jun 2005 12:50:42 -0000      1.26
@@ -26,7 +26,7 @@
 static void
 DockappFindEmptySpotFor(EWin * eapp)
 {
-   EWin              **lst, *ewin;
+   EWin               *const *lst, *ewin;
    int                 num, i, j, x, y, w, h, done;
    int                 step_right, step_down;
 
@@ -52,7 +52,7 @@
    step_right = Conf.dock.startx < VRoot.w;
    step_down = Conf.dock.starty < VRoot.h;
 
-   lst = (EWin **) ListItemType(&num, LIST_TYPE_EWIN);
+   lst = EwinListGetAll(&num);
    for (j = 0; j < num; j++)
       for (i = 0; i < num; i++)
        {
@@ -109,8 +109,6 @@
                  }
             }
        }
-   if (lst)
-      Efree(lst);
 
    if (x < 0 || y < 0 || x + w >= VRoot.w || y + h >= VRoot.h)
      {
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewin-ops.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -3 -r1.49 -r1.50
--- ewin-ops.c  12 Jun 2005 07:02:01 -0000      1.49
+++ ewin-ops.c  30 Jun 2005 12:50:42 -0000      1.50
@@ -1713,7 +1713,7 @@
    Border             *b;
    char                shadechange = 0;
 
-   b = (Border *) FindItem(name, 0, LIST_FINDBY_NAME, LIST_TYPE_BORDER);
+   b = FindItem(name, 0, LIST_FINDBY_NAME, LIST_TYPE_BORDER);
    if (!b)
       return;
 
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewins.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -3 -r1.79 -r1.80
--- ewins.c     30 Jun 2005 12:37:27 -0000      1.79
+++ ewins.c     30 Jun 2005 12:50:42 -0000      1.80
@@ -197,7 +197,7 @@
       Eprintf("EwinDestroy %#lx st=%d: %s\n", ewin->client.win, ewin->state,
              EwinGetName(ewin));
 
-   RemoveItem(NULL, ewin->client.win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
+   RemoveItemByPtr(ewin, LIST_TYPE_EWIN);
    EventCallbackUnregister(EoGetWin(ewin), 0, EwinHandleEventsToplevel, ewin);
    EventCallbackUnregister(ewin->win_container, 0, EwinHandleEventsContainer,
                           ewin);
@@ -317,7 +317,7 @@
    XQueryPointer(disp, DeskGetWin(DesksGetCurrent()), &rt, &ch, &x, &y, &dum,
                 &dum, &mr);
 
-   return FindEwinByBase(ch);
+   return EwinFindByFrame(ch);
 }
 
 EWin               *
@@ -656,8 +656,7 @@
        EWin               *const *lst2;
 
        if (!ewin2)
-          ewin2 = FindItem(NULL, ewin->client.group, LIST_FINDBY_ID,
-                           LIST_TYPE_EWIN);
+          ewin2 = EwinFindByClient(ewin->client.group);
 
        if (!ewin2)
          {
@@ -955,7 +954,7 @@
    else
      {
        /* Check if we are already managing it */
-       ewin = FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
+       ewin = EwinFindByClient(win);
 
        /* Some clients MapRequest more than once ?!? */
        if (ewin)
@@ -1083,7 +1082,7 @@
           winrel = ev->xconfigurerequest.above;
        if (ev->xconfigurerequest.value_mask & CWStackMode)
          {
-            ewin2 = FindItem(NULL, winrel, LIST_FINDBY_ID, LIST_TYPE_EWIN);
+            ewin2 = EwinFindByClient(winrel);
             if (ewin2)
                winrel = EoGetWin(ewin2);
             xwc.sibling = winrel;
@@ -1536,7 +1535,7 @@
    EWin               *ewin = data;
 
    /* May be gone */
-   if (!FindItem((char *)ewin, 0, LIST_FINDBY_POINTER, LIST_TYPE_EWIN))
+   if (!EwinFindByPtr(ewin))
       goto done;
 
    SlideEwinTo(ewin, EoGetX(ewin), EoGetY(ewin), ewin->req_x, ewin->req_y,
@@ -1836,8 +1835,7 @@
        Eprintf("EwinHandleEventsRoot ConfigureRequest %#lx\n",
                ev->xconfigurerequest.window);
 #endif
-       ewin = FindItem(NULL, ev->xconfigurerequest.window, LIST_FINDBY_ID,
-                       LIST_TYPE_EWIN);
+       ewin = EwinFindByClient(ev->xconfigurerequest.window);
        EwinEventConfigureRequest(ewin, ev);
        break;
      case ResizeRequest:
@@ -1845,8 +1843,7 @@
        Eprintf("EwinHandleEventsRoot ResizeRequest %#lx\n",
                ev->xresizerequest.window);
 #endif
-       ewin = FindItem(NULL, ev->xresizerequest.window, LIST_FINDBY_ID,
-                       LIST_TYPE_EWIN);
+       ewin = EwinFindByClient(ev->xresizerequest.window);
        EwinEventResizeRequest(ewin, ev);
        break;
      case CirculateRequest:
@@ -1859,27 +1856,24 @@
 
      case UnmapNotify:
        /* Catch clients unmapped after MapRequest but before being reparented 
*/
-       ewin = FindItem(NULL, ev->xunmap.window, LIST_FINDBY_ID,
-                       LIST_TYPE_EWIN);
+       ewin = EwinFindByClient(ev->xunmap.window);
        if (ewin)
           EwinEventUnmap(ewin);
        break;
 
      case DestroyNotify:
        /* Catch clients destroyed after MapRequest but before being reparented 
*/
-       ewin = FindItem(NULL, ev->xdestroywindow.window, LIST_FINDBY_ID,
-                       LIST_TYPE_EWIN);
+       ewin = EwinFindByClient(ev->xdestroywindow.window);
 #if 0                          /* FIXME - Should not be here - Remove? */
        if (!ewin)
-          ewin = FindEwinByBase(ev->xdestroywindow.window);
+          ewin = EwinFindByFrame(ev->xdestroywindow.window);
 #endif
        if (ewin)
           EwinEventDestroy(ewin);
        break;
 
      case ReparentNotify:
-       ewin = FindItem(NULL, ev->xreparent.window, LIST_FINDBY_ID,
-                       LIST_TYPE_EWIN);
+       ewin = EwinFindByClient(ev->xreparent.window);
        if (ewin)
           EwinEventReparent(ewin);
        break;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewmh.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -3 -r1.75 -r1.76
--- ewmh.c      30 Jun 2005 12:09:34 -0000      1.75
+++ ewmh.c      30 Jun 2005 12:50:42 -0000      1.76
@@ -813,7 +813,7 @@
    /*
     * The ones that do target an application window
     */
-   ewin = FindItem(NULL, ev->window, LIST_FINDBY_ID, LIST_TYPE_EWIN);
+   ewin = EwinFindByClient(ev->window);
    if (ewin == NULL)
      {
        /* Some misbehaving clients go here */
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/finders.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -3 -r1.35 -r1.36
--- finders.c   29 May 2005 17:52:03 -0000      1.35
+++ finders.c   30 Jun 2005 12:50:42 -0000      1.36
@@ -23,7 +23,22 @@
 #include "E.h"
 
 EWin               *
-FindEwinByBase(Window win)
+EwinFindByPtr(const EWin * ewin)
+{
+   EWin               *const *ewins;
+   int                 i, num;
+
+   ewins = EwinListGetAll(&num);
+   for (i = 0; i < num; i++)
+     {
+       if (ewin == ewins[i])
+          return ewins[i];
+     }
+   return NULL;
+}
+
+EWin               *
+EwinFindByFrame(Window win)
 {
    EWin               *const *ewins;
    int                 i, num;
@@ -38,7 +53,22 @@
 }
 
 EWin               *
-FindEwinByChildren(Window win)
+EwinFindByClient(Window win)
+{
+   EWin               *const *ewins;
+   int                 i, num;
+
+   ewins = EwinListGetAll(&num);
+   for (i = 0; i < num; i++)
+     {
+       if (win == ewins[i]->client.win)
+          return ewins[i];
+     }
+   return NULL;
+}
+
+EWin               *
+EwinFindByChildren(Window win)
 {
    EWin               *const *ewins;
    int                 i, j, num;
@@ -63,7 +93,7 @@
 }
 
 EWin               *
-FindEwinByPartial(const char *match, int type)
+EwinFindByString(const char *match, int type)
 {
    EWin               *ewin = NULL;
    EWin               *const *ewins;
@@ -408,26 +438,3 @@
    *num = j;
    return lst;
 }
-
-#if 0                          /* Not used */
-EWin              **
-ListGroupMembers(Window win, int *num)
-{
-   EWin               *const *ewins, **lst = NULL;
-   int                 i, j, n;
-
-   ewins = EwinListGetAll(&n);
-   j = 0;
-   for (i = 0; i < n; i++)
-     {
-       if (win == ewins[i]->client.group)
-         {
-            j++;
-            lst = Erealloc(lst, sizeof(EWin *) * j);
-            lst[j - 1] = ewins[i];
-         }
-     }
-   *num = j;
-   return lst;
-}
-#endif
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/focus.c,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -3 -r1.104 -r1.105
--- focus.c     30 Jun 2005 12:03:38 -0000      1.104
+++ focus.c     30 Jun 2005 12:50:42 -0000      1.105
@@ -131,7 +131,7 @@
    if (Conf.focus.mode == MODE_FOCUS_CLICK)
       return;
 
-   ewin = FindItem("", val, LIST_FINDBY_ID, LIST_TYPE_EWIN);
+   ewin = EwinFindByClient(val);
    if (ewin)
       RaiseEwin(ewin);
 }
@@ -141,7 +141,7 @@
 {
    EWin               *ewin;
 
-   ewin = FindItem("", val, LIST_FINDBY_ID, LIST_TYPE_EWIN);
+   ewin = EwinFindByClient(val);
    if (ewin)
       EwinListFocusRaise(ewin);
 }
@@ -325,8 +325,7 @@
               {
                  EWin               *ewin2;
 
-                 ewin2 = FindItem(NULL, ewin->client.transient_for,
-                                  LIST_FINDBY_ID, LIST_TYPE_EWIN);
+                 ewin2 = EwinFindByClient(ewin->client.transient_for);
                  if ((ewin2) && (Mode.focuswin == ewin2))
                     do_focus = 2;
               }
@@ -570,9 +569,9 @@
 #if 0
    EWin               *ewin;
 
-   ewin = FindEwinByChildren(win);
+   ewin = EwinFindByChildren(win);
    if (!ewin)
-      ewin = FindEwinByBase(win);
+      ewin = EwinFindByFrame(win);
    if (!ewin)
       return;
 #endif
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/gnome.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -3 -r1.49 -r1.50
--- gnome.c     30 Jun 2005 12:09:34 -0000      1.49
+++ gnome.c     30 Jun 2005 12:50:42 -0000      1.50
@@ -766,7 +766,7 @@
      }
    if (event->message_type == a4)
      {
-       ewin = FindItem(NULL, event->window, LIST_FINDBY_ID, LIST_TYPE_EWIN);
+       ewin = EwinFindByClient(event->window);
        if (ewin)
          {
             unsigned int        val;
@@ -780,7 +780,7 @@
      }
    if (event->message_type == a5)
      {
-       ewin = FindItem(NULL, event->window, LIST_FINDBY_ID, LIST_TYPE_EWIN);
+       ewin = EwinFindByClient(event->window);
        if (!ewin)
           return;
        if (event->data.l[0] & WIN_STATE_FIXED_POSITION)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/groups.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -3 -r1.66 -r1.67
--- groups.c    28 Mar 2005 12:51:16 -0000      1.66
+++ groups.c    30 Jun 2005 12:50:43 -0000      1.67
@@ -221,8 +221,7 @@
                   Erealloc(g->members, sizeof(EWin *) * g->num_members);
             else
               {
-                 RemoveItem((char *)g, 0,
-                            LIST_FINDBY_POINTER, LIST_TYPE_GROUP);
+                 RemoveItemByPtr(g, LIST_TYPE_GROUP);
                  GroupDestroy(g);
               }
 
@@ -309,9 +308,8 @@
                  if (!gwins[i]->border->group_border_name)
                     continue;
 
-                 b = (Border *) FindItem(gwins[i]->border->group_border_name,
-                                         0, LIST_FINDBY_NAME,
-                                         LIST_TYPE_BORDER);
+                 b = FindItem(gwins[i]->border->group_border_name,
+                              0, LIST_FINDBY_NAME, LIST_TYPE_BORDER);
                  if (b)
                     gwins[i]->previous_border = gwins[i]->border;
               }
@@ -327,9 +325,8 @@
                  if (!gwins[i]->border->group_border_name)
                     continue;
 
-                 b = (Border *) FindItem(gwins[i]->border->group_border_name,
-                                         0, LIST_FINDBY_NAME,
-                                         LIST_TYPE_BORDER);
+                 b = FindItem(gwins[i]->border->group_border_name,
+                              0, LIST_FINDBY_NAME, LIST_TYPE_BORDER);
                  if (b)
                     gwins[i]->previous_border = gwins[i]->border;
               }
@@ -1000,9 +997,8 @@
    Dialog             *d;
    DItem              *table, *di;
 
-   if ((d =
-       FindItem("CONFIGURE_DEFAULT_GROUP_CONTROL", 0, LIST_FINDBY_NAME,
-                LIST_TYPE_DIALOG)))
+   if ((d = FindItem("CONFIGURE_DEFAULT_GROUP_CONTROL", 0, LIST_FINDBY_NAME,
+                    LIST_TYPE_DIALOG)))
      {
        SoundPlay("SOUND_SETTINGS_ACTIVE");
        ShowDialog(d);
@@ -1359,7 +1355,7 @@
    if (!strcmp(windowid, "*"))
       ewin = GetContextEwin();
    else
-      ewin = FindEwinByChildren(win);
+      ewin = EwinFindByChildren(win);
    if (!ewin)
      {
        IpcPrintf("Error: no such window: %8x", win);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/icccm.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -3 -r1.98 -r1.99
--- icccm.c     4 Jun 2005 08:33:52 -0000       1.98
+++ icccm.c     30 Jun 2005 12:50:43 -0000      1.99
@@ -48,7 +48,7 @@
 
    if (event->message_type == ECORE_X_ATOM_WM_CHANGE_STATE)
      {
-       ewin = FindItem(NULL, event->window, LIST_FINDBY_ID, LIST_TYPE_EWIN);
+       ewin = EwinFindByClient(event->window);
        if (ewin == NULL)
           return;
 
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/iclass.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -3 -r1.68 -r1.69
--- iclass.c    12 Jun 2005 13:09:11 -0000      1.68
+++ iclass.c    30 Jun 2005 12:50:43 -0000      1.69
@@ -334,16 +334,14 @@
 #if ENABLE_COLOR_MODIFIERS
    if (!ic->colmod)
      {
-       cm = (ColorModifierClass *) FindItem("ICLASS", 0, LIST_FINDBY_NAME,
-                                            LIST_TYPE_COLORMODIFIER);
+       cm = FindItem("ICLASS", 0, LIST_FINDBY_NAME, LIST_TYPE_COLORMODIFIER);
        if (!cm)
-          cm = (ColorModifierClass *) FindItem("DEFAULT", 0, LIST_FINDBY_NAME,
-                                               LIST_TYPE_COLORMODIFIER);
+          cm =
+             FindItem("DEFAULT", 0, LIST_FINDBY_NAME, LIST_TYPE_COLORMODIFIER);
        ic->colmod = cm;
      }
 
-   cm = (ColorModifierClass *) FindItem("NORMAL", 0, LIST_FINDBY_NAME,
-                                       LIST_TYPE_COLORMODIFIER);
+   cm = FindItem("NORMAL", 0, LIST_FINDBY_NAME, LIST_TYPE_COLORMODIFIER);
    if (!cm)
       cm = ic->colmod;
 
@@ -352,8 +350,7 @@
    ISTATE_SET_CM(norm.clicked, cm);
    ISTATE_SET_CM(norm.disabled, cm);
 
-   cm = (ColorModifierClass *) FindItem("ACTIVE", 0, LIST_FINDBY_NAME,
-                                       LIST_TYPE_COLORMODIFIER);
+   cm = FindItem("ACTIVE", 0, LIST_FINDBY_NAME, LIST_TYPE_COLORMODIFIER);
    if (!cm)
       cm = ic->colmod;
 
@@ -362,8 +359,7 @@
    ISTATE_SET_CM(active.clicked, cm);
    ISTATE_SET_CM(active.disabled, cm);
 
-   cm = (ColorModifierClass *) FindItem("STICKY", 0, LIST_FINDBY_NAME,
-                                       LIST_TYPE_COLORMODIFIER);
+   cm = FindItem("STICKY", 0, LIST_FINDBY_NAME, LIST_TYPE_COLORMODIFIER);
    if (!cm)
       cm = ic->colmod;
 
@@ -372,8 +368,7 @@
    ISTATE_SET_CM(sticky.clicked, cm);
    ISTATE_SET_CM(sticky.disabled, cm);
 
-   cm = (ColorModifierClass *) FindItem("STICKY_ACTIVE", 0, LIST_FINDBY_NAME,
-                                       LIST_TYPE_COLORMODIFIER);
+   cm = FindItem("STICKY_ACTIVE", 0, LIST_FINDBY_NAME, 
LIST_TYPE_COLORMODIFIER);
    if (!cm)
       cm = ic->colmod;
 
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/iconify.c,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -3 -r1.159 -r1.160
--- iconify.c   30 Jun 2005 11:52:02 -0000      1.159
+++ iconify.c   30 Jun 2005 12:50:43 -0000      1.160
@@ -397,7 +397,7 @@
 {
    int                 i;
 
-   RemoveItem((char *)ib, 0, LIST_FINDBY_POINTER, LIST_TYPE_ICONBOX);
+   RemoveItemByPtr(ib, LIST_TYPE_ICONBOX);
 
    if (ib->name)
       Efree(ib->name);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ipc.c,v
retrieving revision 1.218
retrieving revision 1.219
diff -u -3 -r1.218 -r1.219
--- ipc.c       9 Jun 2005 18:28:11 -0000       1.218
+++ ipc.c       30 Jun 2005 12:50:44 -0000      1.219
@@ -79,16 +79,16 @@
    if (isdigit(windowid[0]))
      {
        sscanf(windowid, "%x", &win);
-       return FindEwinByChildren(win);
+       return EwinFindByChildren(win);
      }
 
    if (windowid[0] == '+')
-      return FindEwinByPartial(windowid + 1, '+');
+      return EwinFindByString(windowid + 1, '+');
 
    if (windowid[0] == '=')
-      return FindEwinByPartial(windowid + 1, '=');
+      return EwinFindByString(windowid + 1, '=');
 
-   return FindEwinByPartial(windowid, '=');
+   return EwinFindByString(windowid, '=');
 }
 
 static int
@@ -736,7 +736,7 @@
 
    window = 0;
    sscanf(params, "%x", &window);
-   ewin = FindItem(NULL, window, LIST_FINDBY_ID, LIST_TYPE_EWIN);
+   ewin = EwinFindByClient(window);
    if (!ewin)
      {
        IpcPrintf("Error: Window not found: %#x\n", window);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/lists.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- lists.c     19 Mar 2005 16:40:06 -0000      1.17
+++ lists.c     30 Jun 2005 12:50:45 -0000      1.18
@@ -40,7 +40,7 @@
 }
 
 void               *
-FindItem(const char *name, int id, int find_by, int type)
+FindItem(const void *name, int id, int find_by, int type)
 {
    List               *ptr;
 
@@ -76,7 +76,7 @@
      {
        while (ptr)
          {
-            if (ptr->item == (void *)name)
+            if (ptr->item == name)
                return ptr->item;
             ptr = ptr->next;
          }
@@ -203,7 +203,7 @@
 }
 
 void               *
-RemoveItem(const char *name, int id, int find_by, int type)
+RemoveItem(const void *name, int id, int find_by, int type)
 {
    List               *ptr, *pptr;
    void               *p;
@@ -274,7 +274,7 @@
      {
        while (ptr)
          {
-            if (ptr->item == (void *)name)
+            if (ptr->item == name)
               {
                  if (pptr)
                     pptr->next = ptr->next;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/menus-misc.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- menus-misc.c        12 May 2005 16:50:52 -0000      1.10
+++ menus-misc.c        30 Jun 2005 12:50:45 -0000      1.11
@@ -336,7 +336,7 @@
    if (!m)
       return;
 
-   if (!FindItem((char *)m, 0, LIST_FINDBY_POINTER, LIST_TYPE_MENU))
+   if (!FindItem(m, 0, LIST_FINDBY_POINTER, LIST_TYPE_MENU))
       return;
 
    /* if the menu is up dont update */
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/menus.c,v
retrieving revision 1.201
retrieving revision 1.202
diff -u -3 -r1.201 -r1.202
--- menus.c     30 Jun 2005 12:37:27 -0000      1.201
+++ menus.c     30 Jun 2005 12:50:46 -0000      1.202
@@ -236,8 +236,7 @@
      {
 #if 0                          /* FIXME - Why? */
        if ((Mode.button) &&
-           FindItem((char *)Mode.button, 0, LIST_FINDBY_POINTER,
-                    LIST_TYPE_BUTTON))
+           FindItem(Mode.button, 0, LIST_FINDBY_POINTER, LIST_TYPE_BUTTON))
          {
             ButtonDrawWithState(Mode.button, STATE_NORMAL);
          }
@@ -261,8 +260,8 @@
      {
        Border             *b;
 
-       b = (Border *) FindItem(m->style->border_name, 0, LIST_FINDBY_NAME,
-                               LIST_TYPE_BORDER);
+       b = FindItem(m->style->border_name, 0, LIST_FINDBY_NAME,
+                    LIST_TYPE_BORDER);
        if (b)
          {
             int                 width;
@@ -501,7 +500,7 @@
 
    Esnprintf(s, sizeof(s), "__.%s", m->name);
    RemoveTimerEvent(s);
-   RemoveItem((char *)m, 0, LIST_FINDBY_POINTER, LIST_TYPE_MENU);
+   RemoveItemByPtr(m, LIST_TYPE_MENU);
    if (m->name)
       Efree(m->name);
    if (m->title)
@@ -513,9 +512,8 @@
          {
             if (m->items[i]->child)
               {
-                 if (FindItem
-                     ((char *)m->items[i]->child, 0, LIST_FINDBY_POINTER,
-                      LIST_TYPE_MENU))
+                 if (FindItem(m->items[i]->child, 0, LIST_FINDBY_POINTER,
+                              LIST_TYPE_MENU))
                     MenuDestroy(m->items[i]->child);
               }
             if (m->items[i]->text)
@@ -1536,7 +1534,7 @@
       return;
 
    m = data->m;
-   ewin = FindItem(NULL, m->win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
+   ewin = EwinFindByClient(m->win);
    if (!ewin)
       return;
    if (!EoIsShown(ewin))
@@ -1544,7 +1542,7 @@
 
    mi = data->mi;
    MenuShow(mi->child, 1);
-   ewin2 = FindItem(NULL, mi->child->win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
+   ewin2 = EwinFindByClient(mi->child->win);
    if (!ewin2)
       return;
 
@@ -1868,8 +1866,8 @@
 
                ms->border_name = Estrdup(s2);
 
-               b = (Border *) FindItem(ms->border_name, 0, LIST_FINDBY_NAME,
-                                       LIST_TYPE_BORDER);
+               b = FindItem(ms->border_name, 0, LIST_FINDBY_NAME,
+                            LIST_TYPE_BORDER);
                if (b)
                   b->ref_count++;
             }
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/pager.c,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -3 -r1.153 -r1.154
--- pager.c     17 Jun 2005 18:57:42 -0000      1.153
+++ pager.c     30 Jun 2005 12:50:47 -0000      1.154
@@ -1279,8 +1279,7 @@
    if (!check || !phi->ewin)
       return phi->ewin;
 
-   ewin = FindItem((char *)phi->ewin, 0, LIST_FINDBY_POINTER, LIST_TYPE_EWIN);
-
+   ewin = EwinFindByPtr(phi->ewin);
    if (!ewin)
       phi->ewin = NULL;
 
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/slideout.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- slideout.c  12 Jun 2005 07:56:31 -0000      1.34
+++ slideout.c  30 Jun 2005 12:50:47 -0000      1.35
@@ -432,8 +432,7 @@
             {
                Button             *b;
 
-               b = (Button *) FindItem(s2, 0, LIST_FINDBY_NAME,
-                                       LIST_TYPE_BUTTON);
+               b = FindItem(s2, 0, LIST_FINDBY_NAME, LIST_TYPE_BUTTON);
                if (b)
                   SlideoutAddButton(slideout, b);
             }
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/snaps.c,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -3 -r1.91 -r1.92
--- snaps.c     12 Jun 2005 13:09:11 -0000      1.91
+++ snaps.c     30 Jun 2005 12:50:47 -0000      1.92
@@ -71,7 +71,7 @@
 SnapshotDestroy(Snapshot * sn)
 {
    /* Just making sure */
-   sn = RemoveItem((char *)sn, 0, LIST_FINDBY_POINTER, LIST_TYPE_SNAPSHOT);
+   sn = RemoveItemByPtr(sn, LIST_TYPE_SNAPSHOT);
    if (!sn)
       return;
 
@@ -483,7 +483,7 @@
    if (val >= 2 || !sd)
       goto done;
 
-   ewin = FindItem("", sd->client, LIST_FINDBY_ID, LIST_TYPE_EWIN);
+   ewin = EwinFindByClient(sd->client);
    if (!ewin)
       goto done;
 
@@ -929,7 +929,7 @@
    rd = (RememberWinList *) data;
 
    /* Make sure its still there */
-   sn = FindItem((char *)rd->snap, 0, LIST_FINDBY_POINTER, LIST_TYPE_SNAPSHOT);
+   sn = FindItem(rd->snap, 0, LIST_FINDBY_POINTER, LIST_TYPE_SNAPSHOT);
 
    if (!sn || !sn->used)
       return;
@@ -1444,8 +1444,7 @@
          {
             Group              *g;
 
-            g = (Group *) FindItem(NULL, sn->groups[i], LIST_FINDBY_ID,
-                                   LIST_TYPE_GROUP);
+            g = FindItem(NULL, sn->groups[i], LIST_FINDBY_ID, LIST_TYPE_GROUP);
             if (!g)
               {
                  BuildWindowGroup(&ewin, 1);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/warp.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -3 -r1.68 -r1.69
--- warp.c      30 Jun 2005 12:37:43 -0000      1.68
+++ warp.c      30 Jun 2005 12:50:47 -0000      1.69
@@ -151,7 +151,7 @@
      {
        wl = warplist + i;
 
-       if (!FindItem((char *)wl->ewin, 0, LIST_FINDBY_POINTER, LIST_TYPE_EWIN))
+       if (!EwinFindByPtr(wl->ewin))
           wl->ewin = NULL;
        if (wl->ewin)
          {
@@ -278,7 +278,7 @@
 
    warpFocusIndex = (warpFocusIndex + warplist_num + delta) % warplist_num;
    ewin = warplist[warpFocusIndex].ewin;
-   if (!FindItem((char *)ewin, 0, LIST_FINDBY_POINTER, LIST_TYPE_EWIN))
+   if (!EwinFindByPtr(ewin))
       ewin = NULL;
    if (!ewin)
       return;
@@ -303,7 +303,7 @@
       return;
 
    ewin = warplist[ix].ewin;
-   if (!FindItem((char *)ewin, 0, LIST_FINDBY_POINTER, LIST_TYPE_EWIN))
+   if (!EwinFindByPtr(ewin))
       return;
 
    RaiseEwin(ewin);




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to