Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        E.h Makefile.am aclass.c backgrounds.h borders.c buttons.c 
        buttons.h config.c desktops.c desktops.h events.c ewins.c 
        ewins.h ipc.c slideout.c tclass.h text.c tooltips.c tooltips.h 
        ttfont.c windowmatch.c 
Added Files:
        aclass.h 


Log Message:
Split off aclass.h. Cleanups.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.516
retrieving revision 1.517
diff -u -3 -r1.516 -r1.517
--- E.h 19 Nov 2005 19:32:45 -0000      1.516
+++ E.h 27 Nov 2005 13:11:02 -0000      1.517
@@ -258,11 +258,7 @@
 struct _textstate;
 
 typedef struct _ewin EWin;
-typedef struct _background Background;
 typedef struct _ecursor ECursor;
-typedef struct _efont Efont;
-typedef struct _action Action;
-typedef struct _actionclass ActionClass;
 
 typedef struct _client Client;
 
@@ -327,7 +323,7 @@
 {
    Geometry            geom;
    struct _imageclass *iclass;
-   ActionClass        *aclass;
+   struct _actionclass *aclass;
    struct _textclass  *tclass;
    ECursor            *ec;
    signed char         ontop;
@@ -347,7 +343,7 @@
    char                shadedir;
    char                throwaway;
    unsigned int        ref_count;
-   ActionClass        *aclass;
+   struct _actionclass *aclass;
 }
 Border;
 
@@ -657,36 +653,6 @@
  * Function prototypes
  */
 
-/* aclass.c */
-int                 AclassConfigLoad(FILE * fs);
-ActionClass        *ActionclassCreate(const char *name, int global);
-void                ActionclassDestroy(ActionClass * ac);
-Action             *ActionCreate(char event, char anymod, int mod, int anybut,
-                                int but, char anykey, const char *key,
-                                const char *tooltipstring);
-void                ActionAddTo(Action * aa, const char *params);
-void                ActionclassAddAction(ActionClass * ac, Action * aa);
-void                ActionclassSetTooltipString(ActionClass * ac,
-                                               const char *tts);
-void                ActionclassIncRefcount(ActionClass * ac);
-void                ActionclassDecRefcount(ActionClass * ac);
-const char         *ActionclassGetName(ActionClass * ac);
-const char         *ActionclassGetTooltipString(ActionClass * ac);
-int                 ActionclassGetActionCount(ActionClass * ac);
-Action             *ActionclassGetAction(ActionClass * ac, int ix);
-int                 ActionclassEvent(ActionClass * ac, XEvent * ev,
-                                    EWin * ewin);
-int                 ActionclassesGlobalEvent(XEvent * ev);
-
-const char         *ActionGetTooltipString(Action * aa);
-int                 ActionGetAnybutton(Action * aa);
-int                 ActionGetEvent(Action * aa);
-int                 ActionGetButton(Action * aa);
-int                 ActionGetModifiers(Action * aa);
-
-void                GrabButtonGrabs(EWin * ewin);
-void                UnGrabButtonGrabs(EWin * ewin);
-
 /* actions.c */
 int                 ActionsSuspend(void);
 int                 ActionsResume(void);
@@ -1089,11 +1055,6 @@
 void                MapUnmap(int start);
 void                SetupX(const char *dstr);
 
-/* size.c */
-void                MaxSize(EWin * ewin, const char *resize_type);
-void                MaxWidth(EWin * ewin, const char *resize_type);
-void                MaxHeight(EWin * ewin, const char *resize_type);
-
 /* slideouts.c */
 int                 SlideoutsConfigLoad(FILE * fs);
 
@@ -1117,25 +1078,10 @@
 void                HandleTimerEvent(void);
 int                 RemoveTimerEvent(const char *name);
 
-/* ttfont.c */
-void                Efont_extents(Efont * f, const char *text,
-                                 int *font_ascent_return,
-                                 int *font_descent_return, int *width_return,
-                                 int *max_ascent_return,
-                                 int *max_descent_return, int *lbearing_return,
-                                 int *rbearing_return);
-Efont              *Efont_load(const char *file, int size);
-void                Efont_free(Efont * f);
-void                EFont_draw_string(Display * disp, Drawable win, GC gc,
-                                     int x, int y, const char *text, Efont * f,
-                                     Visual * vis, Colormap cm);
-
 /* warp.c */
 void                WarpFocus(int delta);
 
 /* windowmatch.c */
-typedef struct _windowmatch WindowMatch;
-
 int                 WindowMatchConfigLoad(FILE * fs);
 Border             *WindowMatchEwinBorder(const EWin * ewin);
 const char         *WindowMatchEwinIcon(const EWin * ewin);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Makefile.am,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -3 -r1.61 -r1.62
--- Makefile.am 19 Nov 2005 19:32:45 -0000      1.61
+++ Makefile.am 27 Nov 2005 13:11:03 -0000      1.62
@@ -16,6 +16,7 @@
 e16_SOURCES = \
        E.h                     \
        aclass.c                \
+       aclass.h                \
        actions.c               \
        alert.c                 \
        arrange.c               \
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/aclass.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- aclass.c    30 Oct 2005 19:40:49 -0000      1.22
+++ aclass.c    27 Nov 2005 13:11:03 -0000      1.23
@@ -22,6 +22,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 #include "E.h"
+#include "aclass.h"
 #include "conf.h"
 #include "emodule.h"
 #include "ewins.h"
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/backgrounds.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- backgrounds.h       27 Nov 2005 11:02:05 -0000      1.4
+++ backgrounds.h       27 Nov 2005 13:11:03 -0000      1.5
@@ -25,6 +25,8 @@
 #ifndef _BACKGROUNDS_H_
 #define _BACKGROUNDS_H_
 
+typedef struct _background Background;
+
 /* backgrounds.c */
 char               *BackgroundGetUniqueString(const Background * bg);
 void                BackgroundPixmapSet(Background * bg, Pixmap pmap);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v
retrieving revision 1.278
retrieving revision 1.279
diff -u -3 -r1.278 -r1.279
--- borders.c   30 Oct 2005 19:40:49 -0000      1.278
+++ borders.c   27 Nov 2005 13:11:04 -0000      1.279
@@ -22,6 +22,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 #include "E.h"
+#include "aclass.h"
 #include "ewins.h"
 #include "hints.h"
 #include "iclass.h"
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/buttons.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -3 -r1.79 -r1.80
--- buttons.c   30 Oct 2005 19:40:49 -0000      1.79
+++ buttons.c   27 Nov 2005 13:11:04 -0000      1.80
@@ -22,9 +22,12 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 #include "E.h"
+#include "aclass.h"
 #include "buttons.h"
 #include "desktops.h"
 #include "emodule.h"
+#include "iclass.h"
+#include "tclass.h"
 #include "tooltips.h"
 #include "xwin.h"
 
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/buttons.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- buttons.h   26 Sep 2005 17:32:09 -0000      1.5
+++ buttons.h   27 Nov 2005 13:11:04 -0000      1.6
@@ -26,17 +26,21 @@
 #define _BUTTONS_H_
 
 #include "eobj.h"
-#include "iclass.h"
-#include "tclass.h"
 
-typedef struct _button Button;
+struct _actionclass;
 struct _desk;
+struct _imageclass;
+struct _textclass;
+
+typedef struct _button Button;
 
-typedef void        (ButtonCbFunc) (EObj * eo, XEvent * ev, ActionClass * ac);
+typedef void        (ButtonCbFunc) (EObj * eo, XEvent * ev,
+                                   struct _actionclass * ac);
 
 /* buttons.c */
-Button             *ButtonCreate(const char *name, int id, ImageClass * ic,
-                                ActionClass * ac, TextClass * tc,
+Button             *ButtonCreate(const char *name, int id,
+                                struct _imageclass *ic,
+                                struct _actionclass *ac, struct _textclass *tc,
                                 const char *label, char ontop, int flags,
                                 int minw, int maxw, int minh, int maxh, int xo,
                                 int yo, int xa, int xr, int ya, int yr,
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/config.c,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -3 -r1.141 -r1.142
--- config.c    30 Oct 2005 19:40:49 -0000      1.141
+++ config.c    27 Nov 2005 13:11:04 -0000      1.142
@@ -22,10 +22,13 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 #include "E.h"
+#include "aclass.h"
 #include "backgrounds.h"
 #include "buttons.h"
 #include "conf.h"
+#include "iclass.h"
 #include "menus.h"
+#include "tclass.h"
 #include "tooltips.h"
 
 #define SKIP_If_EXISTS(name, type) \
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/desktops.c,v
retrieving revision 1.201
retrieving revision 1.202
diff -u -3 -r1.201 -r1.202
--- desktops.c  27 Nov 2005 11:02:05 -0000      1.201
+++ desktops.c  27 Nov 2005 13:11:05 -0000      1.202
@@ -22,6 +22,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 #include "E.h"
+#include "aclass.h"
 #include "backgrounds.h"
 #include "buttons.h"
 #include "desktops.h"
@@ -30,6 +31,7 @@
 #include "eobj.h"
 #include "ewins.h"
 #include "hints.h"
+#include "iclass.h"
 #include "tooltips.h"
 #include "xwin.h"
 #include <time.h>
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/desktops.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- desktops.h  27 Nov 2005 11:02:05 -0000      1.14
+++ desktops.h  27 Nov 2005 13:11:05 -0000      1.15
@@ -28,6 +28,8 @@
 #include "eobj.h"
 
 typedef struct _desk Desk;
+
+struct _background;
 struct _button;
 
 struct _desk
@@ -36,7 +38,7 @@
    unsigned int        num;
    char                viewable;
    char                bg_isset;
-   Background         *bg;
+   struct _background *bg;
    struct _button     *tag;
    int                 current_area_x;
    int                 current_area_y;
@@ -61,11 +63,12 @@
 void                DeskGotoNum(unsigned int desk);
 void                DeskRestack(Desk * dsk);
 
-void                DeskBackgroundAssign(unsigned int desk, Background * bg);
-Background         *DeskBackgroundGet(const Desk * dsk);
-void                DeskBackgroundSet(Desk * dsk, Background * bg);
-void                DesksBackgroundFree(Background * bg, int force);
-void                DesksBackgroundRefresh(Background * bg);
+void                DeskBackgroundAssign(unsigned int desk,
+                                        struct _background *bg);
+struct _background *DeskBackgroundGet(const Desk * dsk);
+void                DeskBackgroundSet(Desk * dsk, struct _background *bg);
+void                DesksBackgroundFree(struct _background *bg, int force);
+void                DesksBackgroundRefresh(struct _background *bg);
 
 void                DeskCurrentGetArea(int *ax, int *ay);
 void                DeskCurrentGotoArea(int ax, int ay);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/events.c,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -3 -r1.108 -r1.109
--- events.c    13 Nov 2005 01:22:28 -0000      1.108
+++ events.c    27 Nov 2005 13:11:05 -0000      1.109
@@ -22,6 +22,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 #include "E.h"
+#include "aclass.h"
 #include "dialog.h"            /* FIXME - Should not be here */
 #include "emodule.h"
 #include "xwin.h"
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewins.c,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -3 -r1.132 -r1.133
--- ewins.c     19 Nov 2005 15:47:10 -0000      1.132
+++ ewins.c     27 Nov 2005 13:11:05 -0000      1.133
@@ -22,6 +22,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 #include "E.h"
+#include "aclass.h"
 #include "desktops.h"
 #include "ecompmgr.h"
 #include "emodule.h"
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewins.h,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- ewins.h     19 Nov 2005 19:32:45 -0000      1.34
+++ ewins.h     27 Nov 2005 13:11:05 -0000      1.35
@@ -365,6 +365,11 @@
 EWin              **EwinListTransients(const EWin * ewin, int *num, int group);
 EWin              **EwinListTransientFor(const EWin * ewin, int *num);
 
+/* size.c */
+void                MaxSize(EWin * ewin, const char *resize_type);
+void                MaxWidth(EWin * ewin, const char *resize_type);
+void                MaxHeight(EWin * ewin, const char *resize_type);
+
 /* stacking.c */
 EWin               *const *EwinListStackGet(int *num);
 EWin               *const *EwinListFocusGet(int *num);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ipc.c,v
retrieving revision 1.247
retrieving revision 1.248
diff -u -3 -r1.247 -r1.248
--- ipc.c       15 Nov 2005 23:11:17 -0000      1.247
+++ ipc.c       27 Nov 2005 13:11:05 -0000      1.248
@@ -22,6 +22,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 #include "E.h"
+#include "aclass.h"
 #include "desktops.h"
 #include "emodule.h"
 #include "eobj.h"
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/slideout.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -3 -r1.47 -r1.48
--- slideout.c  30 Oct 2005 19:40:49 -0000      1.47
+++ slideout.c  27 Nov 2005 13:11:06 -0000      1.48
@@ -22,6 +22,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 #include "E.h"
+#include "aclass.h"
 #include "buttons.h"
 #include "desktops.h"
 #include "emodule.h"
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/tclass.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- tclass.h    15 Oct 2005 12:14:00 -0000      1.2
+++ tclass.h    27 Nov 2005 13:11:06 -0000      1.3
@@ -41,6 +41,8 @@
 #define FONT_TO_UP    2
 #define FONT_TO_LEFT  3
 
+typedef struct _efont Efont;
+
 struct _textstate
 {
    char               *fontname;
@@ -99,4 +101,17 @@
                             int sticky, int state, const char *text, int x,
                             int y, int w, int h, int fsize, int justification);
 
+/* ttfont.c */
+void                Efont_extents(Efont * f, const char *text,
+                                 int *font_ascent_return,
+                                 int *font_descent_return, int *width_return,
+                                 int *max_ascent_return,
+                                 int *max_descent_return, int *lbearing_return,
+                                 int *rbearing_return);
+Efont              *Efont_load(const char *file, int size);
+void                Efont_free(Efont * f);
+void                EFont_draw_string(Drawable win, GC gc, int x, int y,
+                                     const char *text, Efont * f,
+                                     Visual * vis, Colormap cm);
+
 #endif /* _TCLASS_H */
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/text.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -3 -r1.60 -r1.61
--- text.c      30 Oct 2005 19:40:49 -0000      1.60
+++ text.c      27 Nov 2005 13:11:06 -0000      1.61
@@ -401,26 +401,25 @@
               {
                  EAllocColor(&ts->bg_col);
                  XSetForeground(disp, gc, ts->bg_col.pixel);
-                 EFont_draw_string(disp, drawable, gc, offset_x + 1,
-                                   offset_y + 1, lines[i], ts->efont,
-                                   VRoot.vis, VRoot.cmap);
+                 EFont_draw_string(drawable, gc, offset_x + 1, offset_y + 1,
+                                   lines[i], ts->efont, VRoot.vis, VRoot.cmap);
               }
             else if (ts->effect == 2)
               {
                  EAllocColor(&ts->bg_col);
                  XSetForeground(disp, gc, ts->bg_col.pixel);
-                 EFont_draw_string(disp, drawable, gc, offset_x - 1, offset_y,
+                 EFont_draw_string(drawable, gc, offset_x - 1, offset_y,
                                    lines[i], ts->efont, VRoot.vis, VRoot.cmap);
-                 EFont_draw_string(disp, drawable, gc, offset_x + 1, offset_y,
+                 EFont_draw_string(drawable, gc, offset_x + 1, offset_y,
                                    lines[i], ts->efont, VRoot.vis, VRoot.cmap);
-                 EFont_draw_string(disp, drawable, gc, offset_x, offset_y - 1,
+                 EFont_draw_string(drawable, gc, offset_x, offset_y - 1,
                                    lines[i], ts->efont, VRoot.vis, VRoot.cmap);
-                 EFont_draw_string(disp, drawable, gc, offset_x, offset_y + 1,
+                 EFont_draw_string(drawable, gc, offset_x, offset_y + 1,
                                    lines[i], ts->efont, VRoot.vis, VRoot.cmap);
               }
             EAllocColor(&ts->fg_col);
             XSetForeground(disp, gc, ts->fg_col.pixel);
-            EFont_draw_string(disp, drawable, gc, offset_x, offset_y, lines[i],
+            EFont_draw_string(drawable, gc, offset_x, offset_y, lines[i],
                               ts->efont, VRoot.vis, VRoot.cmap);
 
             TextDrawRotBack(win, drawable, xx - 1, yy - 1 - ascent, wid + 2,
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/tooltips.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -3 -r1.90 -r1.91
--- tooltips.c  30 Oct 2005 19:40:49 -0000      1.90
+++ tooltips.c  27 Nov 2005 13:11:06 -0000      1.91
@@ -22,6 +22,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 #include "E.h"
+#include "aclass.h"
 #include "conf.h"
 #include "dialog.h"
 #include "emodule.h"
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/tooltips.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- tooltips.h  20 Aug 2005 13:55:51 -0000      1.1
+++ tooltips.h  27 Nov 2005 13:11:06 -0000      1.2
@@ -25,13 +25,15 @@
 #ifndef _TOOLTIPS_H_
 #define _TOOLTIPS_H_
 
+struct _actionclass;
+
 typedef struct _tooltip ToolTip;
 
-typedef ActionClass *(CB_GetAclass) (void *data);
+typedef struct _actionclass *(CB_GetAclass) (void *data);
 
 int                 TooltipConfigLoad(FILE * fs);
 void                TooltipShow(ToolTip * tt, const char *text,
-                               ActionClass * ac, int x, int y);
+                               struct _actionclass *ac, int x, int y);
 void                TooltipHide(ToolTip * tt);
 
 void                TooltipsSetPending(int type, CB_GetAclass * func,
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ttfont.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -3 -r1.45 -r1.46
--- ttfont.c    16 Jul 2005 16:57:44 -0000      1.45
+++ ttfont.c    27 Nov 2005 13:11:06 -0000      1.46
@@ -22,6 +22,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 #include "E.h"
+#include "tclass.h"
 #include "xwin.h"
 
 struct _efont
@@ -30,15 +31,15 @@
 };
 
 static void
-ImlibSetFgColorFromGC(Display * dpy, GC gc, Colormap cm)
+ImlibSetFgColorFromGC(GC gc, Colormap cm)
 {
    XGCValues           xgcv;
    XColor              xclr;
    int                 r, g, b;
 
-   XGetGCValues(dpy, gc, GCForeground, &xgcv);
+   XGetGCValues(disp, gc, GCForeground, &xgcv);
    xclr.pixel = xgcv.foreground;
-   XQueryColor(dpy, cm, &xclr);
+   XQueryColor(disp, cm, &xclr);
    EGetColor(&xclr, &r, &g, &b);
    imlib_context_set_color(r, g, b, 255);
 }
@@ -46,6 +47,7 @@
 static void
 EFonts_Init(void)
 {
+#if !TEST_TTFONT
    char                s[4096];
    char              **lst;
    int                 i, num;
@@ -56,12 +58,12 @@
    for (i = 0; i < num; i++)
       imlib_add_path_to_font_path(lst[i]);
    StrlistFree(lst, num);
+#endif
 }
 
 void
-EFont_draw_string(Display * dpy, Drawable win, GC gc, int x, int y,
-                 const char *text, Efont * f, Visual * vis __UNUSED__,
-                 Colormap cm)
+EFont_draw_string(Drawable win, GC gc, int x, int y, const char *text,
+                 Efont * f, Visual * vis __UNUSED__, Colormap cm)
 {
    Imlib_Image         im;
    int                 w, h, ascent, descent;
@@ -74,7 +76,7 @@
    imlib_context_set_image(im);
 
    imlib_context_set_font(f->face);
-   ImlibSetFgColorFromGC(dpy, gc, cm);
+   ImlibSetFgColorFromGC(gc, cm);
    imlib_text_draw(0, 0, text);
    imlib_render_image_on_drawable(x, y - ascent);
    imlib_free_image();
@@ -143,6 +145,7 @@
 }
 
 #if TEST_TTFONT
+#include <time.h>
 
 Display            *disp;
 
@@ -165,19 +168,19 @@
    win = XCreateSimpleWindow(disp, DefaultRootWindow(disp), 0, 0, 640, 480, 0,
                             0, 0);
    XMapWindow(disp, win);
-   ESync();
+   XSync(disp, False);
 
    gcv.subwindow_mode = IncludeInferiors;
-   gc = ECreateGC(disp, win, GCSubwindowMode, &gcv);
+   gc = XCreateGC(disp, win, GCSubwindowMode, &gcv);
    for (;; j++)
      {
        for (i = 3; i < argc; i++)
          {
-            XSetForeground(disp, gc, rand() << 16 | rand());
+            XSetForeground(disp, gc, (rand() << 16 | rand()) & 0xffffff);
             f = Efont_load(argv[i], atoi(argv[1]));
             if (f)
-               EFont_draw_string(disp, win, gc, 20,
-                                 atoi(argv[1]) * (i - 2), argv[2], f,
+               EFont_draw_string(win, gc, 20, atoi(argv[1]) * (i - 2),
+                                 argv[2], f,
                                  DefaultVisual(disp, DefaultScreen(disp)),
                                  DefaultColormap(disp, DefaultScreen(disp)));
             Efont_free(f);
@@ -187,18 +190,12 @@
    return 0;
 }
 
-#ifndef USE_ECORE_X
 void
-EGrabServer(void)
+EGetColor(const XColor * pxc, int *pr, int *pg, int *pb)
 {
-   XGrabServer(disp);
+   *pr = pxc->red >> 8;
+   *pg = pxc->green >> 8;
+   *pb = pxc->blue >> 8;
 }
 
-void
-EUngrabServer(void)
-{
-   XUngrabServer(disp);
-   XFlush(disp);
-}
-#endif
 #endif
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/windowmatch.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -3 -r1.42 -r1.43
--- windowmatch.c       15 Nov 2005 23:11:17 -0000      1.42
+++ windowmatch.c       27 Nov 2005 13:11:06 -0000      1.43
@@ -28,7 +28,7 @@
 #include "ewins.h"
 #include "ewin-ops.h"
 
-static int          WindowMatchEwinOpsParse(EWin * ewin, const char *ops);
+typedef struct _windowmatch WindowMatch;
 
 struct _windowmatch
 {
@@ -64,6 +64,8 @@
 #define MATCH_OP_ICON           2
 #define MATCH_OP_WINOP          3
 
+static int          WindowMatchEwinOpsParse(EWin * ewin, const char *ops);
+
 static const char  *MatchType[] = {
    NULL, "Title", "Name", "Class", "Size", "Width", "Height", "Prop", NULL
 };




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to