Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h Makefile.am aclass.c alert.c borders.c buttons.c comms.c
desktops.c dialog.c eimage.c eimage.h events.c events.h
extinitwin.c fx.c gnome.c grabs.c grabs.h hints.c icccm.c
iclass.c ipc.c lang.c main.c mwm.c pager.c piximg.h session.c
setup.c systray.c x.c xwin.h
Added Files:
xtypes.h
Log Message:
Rewrap more X stuff.
===================================================================
RCS file: /cvs/e/e16/e/src/E.h,v
retrieving revision 1.614
retrieving revision 1.615
diff -u -3 -r1.614 -r1.615
--- E.h 29 Mar 2008 17:18:57 -0000 1.614
+++ E.h 30 Mar 2008 12:13:14 -0000 1.615
@@ -65,7 +65,7 @@
#define USE_GLX 1
#endif
-#include "xwin.h"
+#include "xtypes.h"
#define ENABLE_COLOR_MODIFIERS 0 /* Not functional */
#define ENABLE_DESKRAY 0 /* Not functional */
===================================================================
RCS file: /cvs/e/e16/e/src/Makefile.am,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -3 -r1.101 -r1.102
--- Makefile.am 1 Mar 2008 15:22:32 -0000 1.101
+++ Makefile.am 30 Mar 2008 12:13:14 -0000 1.102
@@ -106,6 +106,7 @@
warp.c \
windowmatch.c windowmatch.h \
x.c xwin.h \
+ xtypes.h \
zoom.c \
$(MODULE_SRCS) \
$(SRCS_GNOME) \
===================================================================
RCS file: /cvs/e/e16/e/src/aclass.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -3 -r1.49 -r1.50
--- aclass.c 24 Mar 2008 11:12:39 -0000 1.49
+++ aclass.c 30 Mar 2008 12:13:14 -0000 1.50
@@ -99,7 +99,7 @@
if (!key || !key[0] || (event != EVENT_KEY_DOWN && event != EVENT_KEY_UP))
aa->key = 0;
else
- aa->key = XKeysymToKeycode(disp, XStringToKeysym(key));
+ aa->key = EKeynameToKeycode(key);
aa->key_str = (aa->key) ? Estrdup(key) : NULL;
aa->tooltipstring =
(tooltipstring) ? Estrdup((tooltipstring[0]) ? tooltipstring : "?!?") :
@@ -1242,9 +1242,9 @@
aa = ac->list[i];
if ((aa) && (aa->action) && (aa->event == EVENT_KEY_DOWN))
{
- char *key;
+ const char *key;
- key = XKeysymToString(XKeycodeToKeysym(disp, aa->key, 0));
+ key = EKeycodeToString(aa->key, 0);
if (!key)
continue;
===================================================================
RCS file: /cvs/e/e16/e/src/alert.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -3 -r1.56 -r1.57
--- alert.c 22 Mar 2008 14:46:37 -0000 1.56
+++ alert.c 30 Mar 2008 12:13:14 -0000 1.57
@@ -27,6 +27,7 @@
#include <string.h>
#include <unistd.h>
#include <X11/Xlib.h>
+#include <X11/keysym.h>
#include "alert.h"
#include "lang.h"
#include "session.h"
@@ -382,7 +383,7 @@
switch (ev.type)
{
case KeyPress:
- key = XKeysymToKeycode(dd, XStringToKeysym("F1"));
+ key = XKeysymToKeycode(dd, XK_F1);
if (key == ev.xkey.keycode)
{
DRAW_BOX_IN(dd, gc, b1, 0, 0, mh + 10, fh + 10);
@@ -392,7 +393,7 @@
button = 1;
break;
}
- key = XKeysymToKeycode(dd, XStringToKeysym("F2"));
+ key = XKeysymToKeycode(dd, XK_F2);
if (key == ev.xkey.keycode)
{
DRAW_BOX_IN(dd, gc, b2, 0, 0, mh + 10, fh + 10);
@@ -402,7 +403,7 @@
button = 2;
break;
}
- key = XKeysymToKeycode(dd, XStringToKeysym("F3"));
+ key = XKeysymToKeycode(dd, XK_F3);
if (key == ev.xkey.keycode)
{
DRAW_BOX_IN(dd, gc, b3, 0, 0, mh + 10, fh + 10);
===================================================================
RCS file: /cvs/e/e16/e/src/borders.c,v
retrieving revision 1.306
retrieving revision 1.307
diff -u -3 -r1.306 -r1.307
--- borders.c 23 Feb 2008 12:09:35 -0000 1.306
+++ borders.c 30 Mar 2008 12:13:15 -0000 1.307
@@ -558,7 +558,7 @@
if (!b->part[i].ontop)
wl[j++] = WinGetXwin(ewin->bits[i].win);
}
- XRestackWindows(disp, wl, j);
+ EXRestackWindows(wl, j);
Efree(wl);
}
===================================================================
RCS file: /cvs/e/e16/e/src/buttons.c,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -3 -r1.114 -r1.115
--- buttons.c 24 Mar 2008 11:12:39 -0000 1.114
+++ buttons.c 30 Mar 2008 12:13:15 -0000 1.115
@@ -494,7 +494,7 @@
Window win = ev->xbutton.window;
ev->xbutton.window = b->inside_win;
- XSendEvent(disp, b->inside_win, False, ButtonPressMask, ev);
+ EXSendEvent(b->inside_win, ButtonPressMask, ev);
ev->xbutton.window = win;
}
@@ -522,7 +522,7 @@
Window win = ev->xbutton.window;
ev->xbutton.window = b->inside_win;
- XSendEvent(disp, b->inside_win, False, ButtonReleaseMask, ev);
+ EXSendEvent(b->inside_win, ButtonReleaseMask, ev);
ev->xbutton.window = win;
}
===================================================================
RCS file: /cvs/e/e16/e/src/comms.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -3 -r1.92 -r1.93
--- comms.c 24 Mar 2008 11:12:39 -0000 1.92
+++ comms.c 30 Mar 2008 12:13:15 -0000 1.93
@@ -327,7 +327,7 @@
ss[20] = 0;
for (k = 0; k < 20; k++)
ev.xclient.data.b[k] = ss[k];
- XSendEvent(disp, win, False, 0, (XEvent *) & ev);
+ EXSendEvent(win, 0, (XEvent *) & ev);
}
}
===================================================================
RCS file: /cvs/e/e16/e/src/desktops.c,v
retrieving revision 1.283
retrieving revision 1.284
diff -u -3 -r1.283 -r1.284
--- desktops.c 24 Mar 2008 11:12:39 -0000 1.283
+++ desktops.c 30 Mar 2008 12:13:15 -0000 1.284
@@ -1439,7 +1439,7 @@
EXWindowGetParent(wl[i]));
}
- XRestackWindows(disp, wl, tot);
+ EXRestackWindows(wl, tot);
Efree(wl);
@@ -1737,8 +1737,7 @@
ButtonProxySendEvent(XEvent * ev)
{
if (Mode.button_proxy_win)
- XSendEvent(disp, Mode.button_proxy_win, False, SubstructureNotifyMask,
- ev);
+ EXSendEvent(Mode.button_proxy_win, SubstructureNotifyMask, ev);
}
static void
===================================================================
RCS file: /cvs/e/e16/e/src/dialog.c,v
retrieving revision 1.199
retrieving revision 1.200
diff -u -3 -r1.199 -r1.200
--- dialog.c 29 Mar 2008 17:18:58 -0000 1.199
+++ dialog.c 30 Mar 2008 12:13:15 -0000 1.200
@@ -213,8 +213,7 @@
d->keybindings[d->num_bindings - 1].val = val;
d->keybindings[d->num_bindings - 1].func = func;
d->keybindings[d->num_bindings - 1].data = data;
- d->keybindings[d->num_bindings - 1].key =
- XKeysymToKeycode(disp, XStringToKeysym(key));
+ d->keybindings[d->num_bindings - 1].key = EKeynameToKeycode(key);
}
void
@@ -1734,8 +1733,7 @@
if (d->item)
DialogDrawItem(d, d->item);
if (d->xu1 < d->xu2 && d->yu1 < d->yu2)
- EClearArea(d->win, d->xu1, d->yu1, d->xu2 - d->xu1, d->yu2 - d->yu1,
- False);
+ EClearArea(d->win, d->xu1, d->yu1, d->xu2 - d->xu1, d->yu2 - d->yu1);
d->update = 0;
d->xu1 = d->yu1 = 99999;
d->xu2 = d->yu2 = 0;
===================================================================
RCS file: /cvs/e/e16/e/src/eimage.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- eimage.c 24 Mar 2008 08:57:50 -0000 1.25
+++ eimage.c 30 Mar 2008 12:13:15 -0000 1.26
@@ -28,27 +28,17 @@
#include <X11/extensions/Xrender.h>
#endif
-static Window _default_draw;
-static Visual *_default_vis;
-static Colormap _default_cmap;
-
void
EImageInit(void)
{
- Display *dpy = disp;
-
imlib_set_cache_size(2048 * 1024);
imlib_set_font_cache_size(512 * 1024);
imlib_set_color_usage(128);
- _default_draw = DefaultRootWindow(dpy);
- _default_vis = DefaultVisual(dpy, DefaultScreen(dpy));
- _default_cmap = DefaultColormap(dpy, DefaultScreen(dpy));
-
- imlib_context_set_display(dpy);
- imlib_context_set_visual(_default_vis);
- imlib_context_set_colormap(_default_cmap);
+ imlib_context_set_display(disp);
+ imlib_context_set_visual(WinGetVisual(VROOT));
+ imlib_context_set_colormap(WinGetCmap(VROOT));
#ifdef HAVE_IMLIB_CONTEXT_SET_MASK_ALPHA_THRESHOLD
imlib_context_set_mask_alpha_threshold(Conf.testing.mask_alpha_threshold);
@@ -402,7 +392,7 @@
get_mask_from_shape);
if (vis)
- imlib_context_set_visual(_default_vis);
+ imlib_context_set_visual(WinGetVisual(VROOT));
return im;
}
@@ -426,7 +416,7 @@
_EImageFlagsReset();
if (vis)
- imlib_context_set_visual(_default_vis);
+ imlib_context_set_visual(WinGetVisual(VROOT));
}
void
@@ -437,7 +427,7 @@
Pixmap m;
imlib_context_set_image(im);
- imlib_context_set_drawable((win) ? WinGetXwin(win) : _default_draw);
+ imlib_context_set_drawable((win) ? WinGetXwin(win) : WinGetXwin(VROOT));
vis = (win) ? WinGetVisual(win) : NULL;
if (vis)
imlib_context_set_visual(vis);
@@ -458,7 +448,7 @@
_EImageFlagsReset();
if (vis)
- imlib_context_set_visual(_default_vis);
+ imlib_context_set_visual(WinGetVisual(VROOT));
}
void
===================================================================
RCS file: /cvs/e/e16/e/src/eimage.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- eimage.h 24 Mar 2008 08:57:50 -0000 1.18
+++ eimage.h 30 Mar 2008 12:13:15 -0000 1.19
@@ -24,7 +24,7 @@
#define _EIMAGE_H_
#include <X11/X.h>
-#include "xwin.h"
+#include "xtypes.h"
typedef void EImage;
typedef void EImageColorModifier;
===================================================================
RCS file: /cvs/e/e16/e/src/events.c,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -3 -r1.148 -r1.149
--- events.c 24 Mar 2008 11:12:40 -0000 1.148
+++ events.c 30 Mar 2008 12:13:15 -0000 1.149
@@ -313,7 +313,7 @@
CurrentTime);
ESync();
ev->xkey.time = CurrentTime;
- XSendEvent(disp, ev->xkey.root, False, 0, ev);
+ EXSendEvent(ev->xkey.root, 0, ev);
return;
}
#endif
===================================================================
RCS file: /cvs/e/e16/e/src/events.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- events.h 24 Dec 2007 00:04:55 -0000 1.5
+++ events.h 30 Mar 2008 12:13:15 -0000 1.6
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006-2007 Kim Woelders
+ * Copyright (C) 2006-2008 Kim Woelders
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@@ -22,6 +22,8 @@
*/
#ifndef _EVENTS_H_
#define _EVENTS_H_
+
+#include <X11/Xlib.h>
/* Re-mapped X-events */
#define EX_EVENT_CREATE_GONE 64
===================================================================
RCS file: /cvs/e/e16/e/src/extinitwin.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- extinitwin.c 29 Mar 2008 10:48:45 -0000 1.28
+++ extinitwin.c 30 Mar 2008 12:13:15 -0000 1.29
@@ -72,7 +72,7 @@
XFreePixmap(disp, pmap);
XFreeGC(disp, gc);
- a = XInternAtom(disp, "ENLIGHTENMENT_RESTART_SCREEN", False);
+ a = EInternAtom("ENLIGHTENMENT_RESTART_SCREEN");
ecore_x_window_prop_window_set(WinGetXwin(VROOT), a, &win, 1);
XSelectInput(disp, win, StructureNotifyMask);
@@ -160,7 +160,7 @@
if (EDebug(EDBUG_TYPE_SESSION))
Eprintf("ExtInitWinCreate\n");
- a = XInternAtom(disp, "ENLIGHTENMENT_RESTART_SCREEN", False);
+ a = EInternAtom("ENLIGHTENMENT_RESTART_SCREEN");
ESync(0);
if (fork())
===================================================================
RCS file: /cvs/e/e16/e/src/fx.c,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -3 -r1.84 -r1.85
--- fx.c 24 Mar 2008 11:12:40 -0000 1.84
+++ fx.c 30 Mar 2008 12:13:15 -0000 1.85
@@ -139,7 +139,7 @@
{
RemoveTimerEvent("FX_RIPPLE_TIMEOUT");
EClearArea(fx_ripple_win, 0, WinGetH(VROOT) - fx_ripple_waterh,
- WinGetW(VROOT), fx_ripple_waterh, False);
+ WinGetW(VROOT), fx_ripple_waterh);
}
static void
@@ -579,7 +579,7 @@
{
RemoveTimerEvent("FX_WAVE_TIMEOUT");
EClearArea(fx_wave_win, 0, WinGetH(VROOT) - FX_WAVE_WATERH,
- WinGetW(VROOT), FX_WAVE_WATERH, False);
+ WinGetW(VROOT), FX_WAVE_WATERH);
}
static void
===================================================================
RCS file: /cvs/e/e16/e/src/gnome.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -3 -r1.75 -r1.76
--- gnome.c 24 Mar 2008 11:12:40 -0000 1.75
+++ gnome.c 30 Mar 2008 12:13:15 -0000 1.76
@@ -249,7 +249,7 @@
*
* xev.type = ClientMessage;
* xev.window = client_window;
- * xev.message_type = XInternAtom(disp, XA_WIN_LAYER, False);
+ * xev.message_type = EInternAtom(XA_WIN_LAYER);
* xev.format = 32;
* xev.data.l[0] = new_layer;
* xev.data.l[1] = CurrentTime;
@@ -263,7 +263,7 @@
*
* xev.type = ClientMessage;
* xev.window = client_window;
- * xev.message_type = XInternAtom(disp, XA_WIN_STATE, False);
+ * xev.message_type = EInternAtom(XA_WIN_STATE);
* xev.format = 32;
* xev.data.l[0] = mask_of_members_to_change;
* xev.data.l[1] = new_members;
@@ -278,7 +278,7 @@
*
* xev.type = ClientMessage;
* xev.window = client_window;
- * xev.message_type = XInternAtom(disp, XA_WIN_WORKSPACE, False);
+ * xev.message_type = EInternAtom(XA_WIN_WORKSPACE);
* xev.format = 32;
* xev.data.l[0] = new_desktop_number;
* xev.data.l[2] = CurrentTimep;
@@ -299,7 +299,7 @@
return;
if (!atom_get)
- atom_get = XInternAtom(disp, XA_WIN_ICONS, False);
+ atom_get = EInternAtom(XA_WIN_ICONS);
if ((atom_change) && (atom_change != atom_get))
return;
@@ -328,7 +328,7 @@
return;
if (!atom_get)
- atom_get = XInternAtom(disp, XA_WIN_LAYER, False);
+ atom_get = EInternAtom(XA_WIN_LAYER);
if ((atom_change) && (atom_change != atom_get))
return;
@@ -352,7 +352,7 @@
return;
if (!atom_get)
- atom_get = XInternAtom(disp, XA_WIN_STATE, False);
+ atom_get = EInternAtom(XA_WIN_STATE);
if ((atom_change) && (atom_change != atom_get))
return;
@@ -385,7 +385,7 @@
return;
if (!atom_get)
- atom_get = XInternAtom(disp, XA_WIN_APP_STATE, False);
+ atom_get = EInternAtom(XA_WIN_APP_STATE);
if ((atom_change) && (atom_change != atom_get))
return;
@@ -407,7 +407,7 @@
return;
if (!atom_get)
- atom_get = XInternAtom(disp, XA_WIN_WORKSPACE, False);
+ atom_get = EInternAtom(XA_WIN_WORKSPACE);
if ((atom_change) && (atom_change != atom_get))
return;
@@ -431,7 +431,7 @@
return;
if (!atom_get)
- atom_get = XInternAtom(disp, XA_WIN_HINTS, False);
+ atom_get = EInternAtom(XA_WIN_HINTS);
if ((atom_change) && (atom_change != atom_get))
return;
@@ -461,7 +461,7 @@
if ((ewin->type == EWIN_TYPE_MENU) || (ewin->type == EWIN_TYPE_PAGER))
return;
if (!atom_set)
- atom_set = XInternAtom(disp, XA_WIN_STATE, False);
+ atom_set = EInternAtom(XA_WIN_STATE);
val = 0;
if (EoIsSticky(ewin))
val |= WIN_STATE_STICKY;
@@ -481,7 +481,7 @@
if ((ewin->type == EWIN_TYPE_MENU) || (ewin->type == EWIN_TYPE_PAGER))
return;
if (!atom_set)
- atom_set = XInternAtom(disp, XA_WIN_AREA, False);
+ atom_set = EInternAtom(XA_WIN_AREA);
val[0] = ewin->area_x;
val[1] = ewin->area_y;
ecore_x_window_prop_card32_set(EwinGetClientXwin(ewin), atom_set, val, 2);
@@ -496,7 +496,7 @@
if ((ewin->type == EWIN_TYPE_MENU) || (ewin->type == EWIN_TYPE_PAGER))
return;
if (!atom_set)
- atom_set = XInternAtom(disp, XA_WIN_WORKSPACE, False);
+ atom_set = EInternAtom(XA_WIN_WORKSPACE);
val = EoGetDeskNum(ewin);
ecore_x_window_prop_card32_set(EwinGetClientXwin(ewin), atom_set, &val, 1);
}
@@ -513,7 +513,7 @@
return;
if (!atom_get)
- atom_get = XInternAtom(disp, XA_WIN_EXPANDED_SIZE, False);
+ atom_get = EInternAtom(XA_WIN_EXPANDED_SIZE);
if ((atom_change) && (atom_change != atom_get))
return;
@@ -538,17 +538,17 @@
Ecore_X_Atom list[10];
if (!atom_set)
- atom_set = XInternAtom(disp, XA_WIN_PROTOCOLS, False);
- list[0] = XInternAtom(disp, XA_WIN_LAYER, False);
- list[1] = XInternAtom(disp, XA_WIN_STATE, False);
- list[2] = XInternAtom(disp, XA_WIN_HINTS, False);
- list[3] = XInternAtom(disp, XA_WIN_APP_STATE, False);
- list[4] = XInternAtom(disp, XA_WIN_EXPANDED_SIZE, False);
- list[5] = XInternAtom(disp, XA_WIN_ICONS, False);
- list[6] = XInternAtom(disp, XA_WIN_WORKSPACE, False);
- list[7] = XInternAtom(disp, XA_WIN_WORKSPACE_COUNT, False);
- list[8] = XInternAtom(disp, XA_WIN_WORKSPACE_NAMES, False);
- list[9] = XInternAtom(disp, XA_WIN_CLIENT_LIST, False);
+ atom_set = EInternAtom(XA_WIN_PROTOCOLS);
+ list[0] = EInternAtom(XA_WIN_LAYER);
+ list[1] = EInternAtom(XA_WIN_STATE);
+ list[2] = EInternAtom(XA_WIN_HINTS);
+ list[3] = EInternAtom(XA_WIN_APP_STATE);
+ list[4] = EInternAtom(XA_WIN_EXPANDED_SIZE);
+ list[5] = EInternAtom(XA_WIN_ICONS);
+ list[6] = EInternAtom(XA_WIN_WORKSPACE);
+ list[7] = EInternAtom(XA_WIN_WORKSPACE_COUNT);
+ list[8] = EInternAtom(XA_WIN_WORKSPACE_NAMES);
+ list[9] = EInternAtom(XA_WIN_CLIENT_LIST);
ecore_x_window_prop_atom_set(WinGetXwin(VROOT), atom_set, list, 10);
}
@@ -560,7 +560,7 @@
int ax, ay;
if (!atom_set)
- atom_set = XInternAtom(disp, XA_WIN_AREA, False);
+ atom_set = EInternAtom(XA_WIN_AREA);
DeskCurrentGetArea(&ax, &ay);
val[0] = ax;
val[1] = ay;
@@ -574,7 +574,7 @@
unsigned int val;
if (!atom_set)
- atom_set = XInternAtom(disp, XA_WIN_WORKSPACE, False);
+ atom_set = EInternAtom(XA_WIN_WORKSPACE);
val = DesksGetCurrentNum();
ecore_x_window_prop_card32_set(WinGetXwin(VROOT), atom_set, &val, 1);
}
@@ -586,7 +586,7 @@
unsigned int val;
if (!atom_set)
- atom_set = XInternAtom(disp, XA_WIN_SUPPORTING_WM_CHECK, False);
+ atom_set = EInternAtom(XA_WIN_SUPPORTING_WM_CHECK);
val = win_wm_check;
ecore_x_window_prop_card32_set(WinGetXwin(VROOT), atom_set, &val, 1);
ecore_x_window_prop_card32_set(win_wm_check, atom_set, &val, 1);
@@ -599,7 +599,7 @@
unsigned int val;
if (!atom_set)
- atom_set = XInternAtom(disp, XA_WIN_WORKSPACE_COUNT, False);
+ atom_set = EInternAtom(XA_WIN_WORKSPACE_COUNT);
val = DesksGetNumber();
ecore_x_window_prop_card32_set(WinGetXwin(VROOT), atom_set, &val, 1);
}
@@ -612,7 +612,7 @@
unsigned int val[2];
if (!atom_set)
- atom_set = XInternAtom(disp, XA_WIN_AREA_COUNT, False);
+ atom_set = EInternAtom(XA_WIN_AREA_COUNT);
DesksGetAreaSize(&ax, &ay);
val[0] = ax;
val[1] = ay;
@@ -627,7 +627,7 @@
int i, n_desks;
if (!atom_set)
- atom_set = XInternAtom(disp, XA_WIN_WORKSPACE_NAMES, False);
+ atom_set = EInternAtom(XA_WIN_WORKSPACE_NAMES);
n_desks = DesksGetNumber();
names = EMALLOC(char *, n_desks);
@@ -658,7 +658,7 @@
EWin *const *lst;
if (!atom_set)
- atom_set = XInternAtom(disp, XA_WIN_CLIENT_LIST, False);
+ atom_set = EInternAtom(XA_WIN_CLIENT_LIST);
lst = EwinListOrderGet(&num);
wl = NULL;
@@ -683,11 +683,11 @@
static Atom atom_set = 0, atom_set2 = 0;
if (!atom_set)
- atom_set = XInternAtom(disp, XA_WIN_WM_NAME, False);
+ atom_set = EInternAtom(XA_WIN_WM_NAME);
ecore_x_window_prop_string_set(WinGetXwin(VROOT), atom_set, e_wm_name);
if (!atom_set2)
- atom_set2 = XInternAtom(disp, XA_WIN_WM_VERSION, False);
+ atom_set2 = EInternAtom(XA_WIN_WM_VERSION);
ecore_x_window_prop_string_set(WinGetXwin(VROOT), atom_set2, e_wm_version);
}
@@ -699,12 +699,12 @@
if (!atom_get[0])
{
- atom_get[0] = XInternAtom(disp, XA_WIN_WORKSPACE, False);
- atom_get[1] = XInternAtom(disp, XA_WIN_LAYER, False);
- atom_get[2] = XInternAtom(disp, XA_WIN_STATE, False);
- atom_get[3] = XInternAtom(disp, XA_WIN_HINTS, False);
- atom_get[4] = XInternAtom(disp, XA_WIN_APP_STATE, False);
- atom_get[5] = XInternAtom(disp, XA_WIN_AREA, False);
+ atom_get[0] = EInternAtom(XA_WIN_WORKSPACE);
+ atom_get[1] = EInternAtom(XA_WIN_LAYER);
+ atom_get[2] = EInternAtom(XA_WIN_STATE);
+ atom_get[3] = EInternAtom(XA_WIN_HINTS);
+ atom_get[4] = EInternAtom(XA_WIN_APP_STATE);
+ atom_get[5] = EInternAtom(XA_WIN_AREA);
}
win = EwinGetClientXwin(ewin);
@@ -740,7 +740,7 @@
Atom atom_set;
unsigned int val;
- atom_set = XInternAtom(disp, "_WIN_DESKTOP_BUTTON_PROXY", False);
+ atom_set = EInternAtom("_WIN_DESKTOP_BUTTON_PROXY");
Mode.button_proxy_win =
XCreateSimpleWindow(disp, WinGetXwin(VROOT), -80, -80, 24, 24, 0,
0, 0);
@@ -756,9 +756,9 @@
static Atom a4 = 0, a5 = 0;
if (!a4)
- a4 = XInternAtom(disp, "_WIN_LAYER", False);
+ a4 = EInternAtom("_WIN_LAYER");
if (!a5)
- a5 = XInternAtom(disp, "_WIN_STATE", False);
+ a5 = EInternAtom("_WIN_STATE");
if (event->message_type == a4)
{
@@ -810,9 +810,9 @@
static Atom a2 = 0, a3 = 0;
if (!a2)
- a2 = XInternAtom(disp, "_WIN_AREA", False);
+ a2 = EInternAtom("_WIN_AREA");
if (!a3)
- a3 = XInternAtom(disp, "_WIN_WORKSPACE", False);
+ a3 = EInternAtom("_WIN_WORKSPACE");
if (event->message_type == a2)
{
===================================================================
RCS file: /cvs/e/e16/e/src/grabs.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- grabs.c 24 Mar 2008 11:12:40 -0000 1.32
+++ grabs.c 30 Mar 2008 12:13:15 -0000 1.33
@@ -24,6 +24,7 @@
#include "E.h"
#include "cursors.h"
#include "grabs.h"
+#include "xwin.h"
int
GrabKeyboardSet(Win win)
===================================================================
RCS file: /cvs/e/e16/e/src/grabs.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- grabs.h 1 Feb 2007 01:23:40 -0000 1.3
+++ grabs.h 30 Mar 2008 12:13:15 -0000 1.4
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various
contributors
- * Copyright (C) 2006-2007 Kim Woelders
+ * Copyright (C) 2006-2008 Kim Woelders
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@@ -24,7 +24,7 @@
#ifndef _GRABS_H_
#define _GRABS_H_
-#include "xwin.h"
+#include "xtypes.h"
int GrabKeyboardSet(Win win);
int GrabKeyboardRelease(void);
===================================================================
RCS file: /cvs/e/e16/e/src/hints.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -3 -r1.89 -r1.90
--- hints.c 29 Mar 2008 17:18:58 -0000 1.89
+++ hints.c 30 Mar 2008 12:13:15 -0000 1.90
@@ -588,7 +588,7 @@
Esnprintf(buf, sizeof(buf), "%s%d", name, Dpy.screen);
- sel->atom = XInternAtom(disp, buf, False);
+ sel->atom = EInternAtom(buf);
sel->time = EGetTimestamp();
sel->win = ECreateEventWindow(VROOT, -100, -100, 1, 1);
===================================================================
RCS file: /cvs/e/e16/e/src/icccm.c,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -3 -r1.145 -r1.146
--- icccm.c 29 Mar 2008 17:18:58 -0000 1.145
+++ icccm.c 30 Mar 2008 12:13:16 -0000 1.146
@@ -291,7 +291,7 @@
ev.xconfigure.border_width = 0;
ev.xconfigure.above = EoGetXwin(ewin);
ev.xconfigure.override_redirect = False;
- XSendEvent(disp, EwinGetClientXwin(ewin), False, StructureNotifyMask, &ev);
+ EXSendEvent(EwinGetClientXwin(ewin), StructureNotifyMask, &ev);
}
void
===================================================================
RCS file: /cvs/e/e16/e/src/iclass.c,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -3 -r1.134 -r1.135
--- iclass.c 24 Mar 2008 11:12:40 -0000 1.134
+++ iclass.c 30 Mar 2008 12:13:16 -0000 1.135
@@ -840,24 +840,24 @@
}
static EImage *
-pt_get_bg_image(Window win, int w, int h, int use_root)
+pt_get_bg_image(Win win, int w, int h, int use_root)
{
EImage *ii = NULL;
- Window cr, dummy;
+ Win cr;
Drawable bg;
int xx, yy;
bg = DeskGetBackgroundPixmap(DesksGetCurrent());
if (use_root || bg == None)
{
- cr = WinGetXwin(VROOT);
+ cr = VROOT;
bg = WinGetXwin(VROOT);
}
else
{
- cr = EoGetXwin(DesksGetCurrent());
+ cr = EoGetWin(DesksGetCurrent());
}
- XTranslateCoordinates(disp, win, cr, 0, 0, &xx, &yy, &dummy);
+ ETranslateCoordinates(win, cr, 0, 0, &xx, &yy, NULL);
#if 0
Eprintf("pt_get_bg_image %#lx %d %d %d %d\n", win, xx, yy, w, h);
#endif
@@ -890,7 +890,7 @@
flags = pt_type_to_flags(image_type);
if (flags != ICLASS_ATTR_OPAQUE)
{
- bg = pt_get_bg_image(WinGetXwin(win), w, h, flags & ICLASS_ATTR_GLASS);
+ bg = pt_get_bg_image(win, w, h, flags & ICLASS_ATTR_GLASS);
if (bg)
{
EImageBlendCM(bg, im, (flags & ICLASS_ATTR_USE_CM) ? icm : NULL);
@@ -932,7 +932,7 @@
if (flags != ICLASS_ATTR_OPAQUE)
{
- ii = pt_get_bg_image(WinGetXwin(win), w, h, flags & ICLASS_ATTR_GLASS);
+ ii = pt_get_bg_image(win, w, h, flags & ICLASS_ATTR_GLASS);
}
else
{
===================================================================
RCS file: /cvs/e/e16/e/src/ipc.c,v
retrieving revision 1.311
retrieving revision 1.312
diff -u -3 -r1.311 -r1.312
--- ipc.c 29 Mar 2008 17:18:58 -0000 1.311
+++ ipc.c 30 Mar 2008 12:13:16 -0000 1.312
@@ -1375,12 +1375,12 @@
continue;
i += strlen(ks[j].ch) - 1;
- ev.keycode = XKeysymToKeycode(disp, XStringToKeysym(ks[j].sym));
+ ev.keycode = EKeynameToKeycode(ks[j].sym);
ev.state = ks[j].state;
ev.type = KeyPress;
- XSendEvent(disp, win, False, 0, (XEvent *) & ev);
+ EXSendEvent(win, 0, (XEvent *) & ev);
ev.type = KeyRelease;
- XSendEvent(disp, win, False, 0, (XEvent *) & ev);
+ EXSendEvent(win, 0, (XEvent *) & ev);
break;
}
}
===================================================================
RCS file: /cvs/e/e16/e/src/lang.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- lang.c 23 Mar 2008 11:54:23 -0000 1.23
+++ lang.c 30 Mar 2008 12:13:16 -0000 1.24
@@ -24,6 +24,7 @@
#include "E.h"
#include "emodule.h"
#include "lang.h"
+#include <X11/Xlib.h>
#ifdef HAVE_LOCALE_H
#include <locale.h>
===================================================================
RCS file: /cvs/e/e16/e/src/main.c,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -3 -r1.171 -r1.172
--- main.c 29 Mar 2008 17:18:58 -0000 1.171
+++ main.c 30 Mar 2008 12:13:16 -0000 1.172
@@ -322,7 +322,7 @@
/* XSetInputFocus(disp, None, RevertToParent, CurrentTime); */
/* I think this is a better way to release the grabs: (felix) */
XSetInputFocus(disp, PointerRoot, RevertToPointerRoot, CurrentTime);
- XSelectInput(disp, WinGetXwin(VROOT), 0);
+ ESelectInput(VROOT, 0);
EDisplayClose();
}
===================================================================
RCS file: /cvs/e/e16/e/src/mwm.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -3 -r1.39 -r1.40
--- mwm.c 24 Mar 2008 11:12:40 -0000 1.39
+++ mwm.c 30 Mar 2008 12:13:16 -0000 1.40
@@ -80,7 +80,7 @@
return;
if (!_MOTIF_WM_HINTS)
- _MOTIF_WM_HINTS = XInternAtom(disp, "_MOTIF_WM_HINTS", False);
+ _MOTIF_WM_HINTS = EInternAtom("_MOTIF_WM_HINTS");
if (atom_change && atom_change != _MOTIF_WM_HINTS)
return;
@@ -183,7 +183,7 @@
Window win;
} mwminfo;
- a1 = XInternAtom(disp, "_MOTIF_WM_INFO", False);
+ a1 = EInternAtom("_MOTIF_WM_INFO");
mwminfo.flags = 2;
mwminfo.win = WinGetXwin(VROOT);
XChangeProperty(disp, WinGetXwin(VROOT), a1, a1, 32, PropModeReplace,
===================================================================
RCS file: /cvs/e/e16/e/src/pager.c,v
retrieving revision 1.265
retrieving revision 1.266
diff -u -3 -r1.265 -r1.266
--- pager.c 29 Mar 2008 17:18:58 -0000 1.265
+++ pager.c 30 Mar 2008 12:13:16 -0000 1.266
@@ -238,7 +238,7 @@
ScaleRect(VROOT, WinGetXwin(VROOT), p->win, WinGetPmap(p->win), 0,
y2, WinGetW(VROOT), WinGetH(VROOT) / hh, xx, yy + y, ww, 1, HIQ);
- EClearArea(p->win, xx, yy + y, ww, 1, False);
+ EClearArea(p->win, xx, yy + y, ww, 1);
y2 = p->h;
#else
y = ((phase & 0xfffffff8) + offsets[phase % 8]) % ww;
@@ -246,7 +246,7 @@
ScaleRect(VROOT, WinGetXwin(VROOT), p->win, WinGetPmap(p->win), y2,
0, WinGetW(VROOT) / ww, WinGetH(VROOT), xx + y, yy, 1, hh, HIQ);
- EClearArea(p->win, xx + y, yy, 1, hh, False);
+ EClearArea(p->win, xx + y, yy, 1, hh);
y2 = p->w;
#endif
p->update_phase++;
===================================================================
RCS file: /cvs/e/e16/e/src/piximg.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- piximg.h 23 Mar 2008 11:54:24 -0000 1.2
+++ piximg.h 30 Mar 2008 12:13:16 -0000 1.3
@@ -23,6 +23,7 @@
#ifndef _PIXIMG_H_
#define _PIXIMG_H_
+#include <X11/Xlib.h>
#include <X11/extensions/XShm.h>
typedef struct _PixImg {
===================================================================
RCS file: /cvs/e/e16/e/src/session.c,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -3 -r1.153 -r1.154
--- session.c 29 Mar 2008 17:18:58 -0000 1.153
+++ session.c 30 Mar 2008 12:13:16 -0000 1.154
@@ -424,7 +424,7 @@
return;
#if 0 /* Unused */
- atom_sm_client_id = XInternAtom(disp, "SM_CLIENT_ID", False);
+ atom_sm_client_id = EInternAtom("SM_CLIENT_ID");
#endif
#if USE_SM
@@ -514,7 +514,7 @@
{
/* We may get here from HandleXIOError */
EwinsSetFree();
- XSelectInput(disp, WinGetXwin(VROOT), 0);
+ ESelectInput(VROOT, 0);
ExtInitWinKill();
ESync(0);
===================================================================
RCS file: /cvs/e/e16/e/src/setup.c,v
retrieving revision 1.193
retrieving revision 1.194
diff -u -3 -r1.193 -r1.194
--- setup.c 29 Mar 2008 17:18:58 -0000 1.193
+++ setup.c 30 Mar 2008 12:13:16 -0000 1.194
@@ -191,8 +191,8 @@
numlock = scrollock = 0;
mod = XGetModifierMapping(disp);
- nl = XKeysymToKeycode(disp, XK_Num_Lock);
- sl = XKeysymToKeycode(disp, XK_Scroll_Lock);
+ nl = EKeysymToKeycode(XK_Num_Lock);
+ sl = EKeysymToKeycode(XK_Scroll_Lock);
if ((mod) && (mod->max_keypermod > 0))
{
for (i = 0; i < (8 * mod->max_keypermod); i++)
===================================================================
RCS file: /cvs/e/e16/e/src/systray.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- systray.c 29 Mar 2008 17:18:58 -0000 1.11
+++ systray.c 30 Mar 2008 12:13:16 -0000 1.12
@@ -423,12 +423,10 @@
Esnprintf(buf, sizeof(buf), "_NET_SYSTEM_TRAY_S%d", Dpy.screen);
- E_XA__XEMBED = XInternAtom(disp, "_XEMBED", False);
- E_XA__XEMBED_INFO = XInternAtom(disp, "_XEMBED_INFO", False);
- _NET_SYSTEM_TRAY_OPCODE =
- XInternAtom(disp, "_NET_SYSTEM_TRAY_OPCODE", False);
- _NET_SYSTEM_TRAY_MESSAGE_DATA =
- XInternAtom(disp, "_NET_SYSTEM_TRAY_MESSAGE_DATA", False);
+ E_XA__XEMBED = EInternAtom("_XEMBED");
+ E_XA__XEMBED_INFO = EInternAtom("_XEMBED_INFO");
+ _NET_SYSTEM_TRAY_OPCODE = EInternAtom("_NET_SYSTEM_TRAY_OPCODE");
+ _NET_SYSTEM_TRAY_MESSAGE_DATA =
EInternAtom("_NET_SYSTEM_TRAY_MESSAGE_DATA");
/* Acquire selection */
if (systray_sel)
===================================================================
RCS file: /cvs/e/e16/e/src/x.c,v
retrieving revision 1.173
retrieving revision 1.174
diff -u -3 -r1.173 -r1.174
--- x.c 29 Mar 2008 17:18:58 -0000 1.173
+++ x.c 30 Mar 2008 12:13:16 -0000 1.174
@@ -1071,11 +1071,58 @@
XSetWindowBackground(disp, win->xwin, col);
}
+void
+ESelectInput(Win win, unsigned int event_mask)
+{
+ XSelectInput(disp, win->xwin, event_mask);
+}
+
+void
+EChangeWindowAttributes(Win win, unsigned int mask, XSetWindowAttributes *
attr)
+{
+ XChangeWindowAttributes(disp, win->xwin, mask, attr);
+}
+
+void
+ESetWindowBorderWidth(Win win, unsigned int bw)
+{
+ XSetWindowBorderWidth(disp, win->xwin, bw);
+}
+
+void
+ERaiseWindow(Win win)
+{
+ XRaiseWindow(disp, win->xwin);
+}
+
+void
+ELowerWindow(Win win)
+{
+ XLowerWindow(disp, win->xwin);
+}
+
+void
+EXRestackWindows(Window * windows, int nwindows)
+{
+ XRestackWindows(disp, windows, nwindows);
+}
+
+void
+EClearWindow(Win win)
+{
+ XClearWindow(disp, win->xwin);
+}
+
+void
+EClearArea(Win win, int x, int y, unsigned int w, unsigned int h)
+{
+ XClearArea(disp, win->xwin, x, y, w, h, False);
+}
+
int
-ETranslateCoordinates(Win src_w, Win dst_w,
- int src_x, int src_y,
- int *dest_x_return,
- int *dest_y_return, Window * child_return)
+ETranslateCoordinates(Win src_w, Win dst_w, int src_x, int src_y,
+ int *dest_x_return, int *dest_y_return,
+ Window * child_return)
{
Window child;
@@ -1156,6 +1203,30 @@
return ok;
}
+KeyCode
+EKeysymToKeycode(KeySym keysym)
+{
+ return XKeysymToKeycode(disp, keysym);
+}
+
+KeyCode
+EKeynameToKeycode(const char *name)
+{
+ return XKeysymToKeycode(disp, XStringToKeysym(name));
+}
+
+const char *
+EKeycodeToString(KeyCode keycode, int ix)
+{
+ return XKeysymToString(XKeycodeToKeysym(disp, keycode, ix));
+}
+
+Atom
+EInternAtom(const char *name)
+{
+ return XInternAtom(disp, name, False);
+}
+
#define DEBUG_SHAPE_OPS 0
#define DEBUG_SHAPE_PROPAGATE 0
@@ -1627,6 +1698,12 @@
EXFreeGC(GC gc)
{
return XFreeGC(disp, gc);
+}
+
+void
+EXSendEvent(Window xwin, long event_mask, XEvent * ev)
+{
+ XSendEvent(disp, xwin, False, event_mask, ev);
}
void
===================================================================
RCS file: /cvs/e/e16/e/src/xwin.h,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -3 -r1.42 -r1.43
--- xwin.h 29 Mar 2008 17:18:58 -0000 1.42
+++ xwin.h 30 Mar 2008 12:13:16 -0000 1.43
@@ -27,8 +27,7 @@
#include <X11/Xlib.h>
#include <X11/extensions/shape.h>
#include "util.h"
-
-typedef struct _xwin *Win;
+#include "xtypes.h"
typedef struct {
Display *disp;
@@ -206,23 +205,15 @@
Window * child_return);
int EDrawableCheck(Drawable draw, int grab);
-#define ESelectInput(win, event_mask) \
- XSelectInput(disp, WinGetXwin(win), event_mask)
-
-#define EChangeWindowAttributes(win, mask, attr) \
- XChangeWindowAttributes(disp, WinGetXwin(win), mask, attr)
-#define ESetWindowBorderWidth(win, bw) \
- XSetWindowBorderWidth(disp, WinGetXwin(win), bw)
-
-#define ERaiseWindow(win) \
- XRaiseWindow(disp, WinGetXwin(win))
-#define ELowerWindow(win) \
- XLowerWindow(disp, WinGetXwin(win))
-
-#define EClearWindow(win) \
- XClearWindow(disp, WinGetXwin(win))
-#define EClearArea(win, x, y, w, h, exp) \
- XClearArea(disp, WinGetXwin(win), x, y, w, h, exp)
+void ESelectInput(Win win, unsigned int event_mask);
+void EChangeWindowAttributes(Win win, unsigned int mask,
+ XSetWindowAttributes * attr);
+void ESetWindowBorderWidth(Win win, unsigned int bw);
+void ERaiseWindow(Win win);
+void ELowerWindow(Win win);
+void EClearWindow(Win win);
+void EClearArea(Win win, int x, int y,
+ unsigned int w, unsigned int h);
Pixmap ECreatePixmap(Win win, unsigned int width,
unsigned int height, unsigned int depth);
@@ -264,8 +255,8 @@
int EXGetGeometry(Window xwin, Window * root_return,
int *x, int *y, int *w, int *h, int *bw,
int *depth);
-#define EXGetWindowAttributes(win, xwa) \
- XGetWindowAttributes(disp, WinGetXwin(win), xwa)
+
+void EXRestackWindows(Window * windows, int nwindows);
void EXCopyArea(Drawable src, Drawable dst, int sx, int sy,
unsigned int w, unsigned int h, int dx, int dy);
@@ -282,6 +273,14 @@
GC EXCreateGC(Drawable draw, unsigned long mask,
XGCValues * val);
int EXFreeGC(GC gc);
+
+void EXSendEvent(Window xwin, long event_mask, XEvent * ev);
+
+KeyCode EKeysymToKeycode(KeySym keysym);
+KeyCode EKeynameToKeycode(const char *name);
+const char *EKeycodeToString(KeyCode keycode, int index);
+
+Atom EInternAtom(const char *name);
typedef struct {
char type;
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs