Wrap XID and some other X types.

Mostly to change longs to ints to reduce memory footprint a bit on 64
bit systems.
This commit is contained in:
Kim Woelders 2009-12-03 20:29:30 +01:00
parent c74b331998
commit 4d1bde02ae
66 changed files with 813 additions and 765 deletions

28
src/E.h
View File

@ -3,7 +3,7 @@
/*****************************************************************************/
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -210,7 +210,7 @@ typedef struct {
char show_icons;
int icon_size;
struct {
KeySym left, right, up, down, escape, ret;
EX_KeySym left, right, up, down, escape, ret;
} key;
} menus;
struct {
@ -345,18 +345,18 @@ typedef struct {
char xinerama_active;
#endif
#if USE_XSYNC
XID server_time;
EX_ID server_time;
#endif
} display;
struct {
unsigned int time_ms; /* Local ms time */
Time time; /* Latest X event time */
EX_Time time; /* Latest X event time */
int cx, cy; /* Any detected pointer movement */
int mx, my; /* Motion event */
int px, py; /* Previous motion event */
Time last_btime;
Window last_bpress;
Window last_bpress2;
EX_Time last_btime;
EX_Window last_bpress;
EX_Window last_bpress2;
unsigned int last_button;
unsigned int last_keycode;
unsigned int last_keystate;
@ -373,7 +373,7 @@ typedef struct {
} events;
struct {
char pointer_grab_active;
Window pointer_grab_window;
EX_Window pointer_grab_window;
} grabs;
struct {
const char *lang;
@ -403,7 +403,7 @@ typedef struct {
unsigned int extensions;
} server;
struct {
Pixmap ext_pmap;
EX_Pixmap ext_pmap;
char ext_pmap_valid;
} root;
struct {
@ -438,12 +438,12 @@ typedef struct {
EWin *focuswin;
EWin *mouse_over_ewin;
EWin *context_ewin;
Colormap current_cmap;
EX_Colormap current_cmap;
Win context_win;
char constrained;
char nogroup;
char showing_desktop;
Window button_proxy_win;
EX_Window button_proxy_win;
char firsttime;
char debug_exit;
} EMode;
@ -520,9 +520,9 @@ void EdgeWindowsShow(void);
void EdgeWindowsHide(void);
/* extinitwin.c */
Window ExtInitWinCreate(void);
void ExtInitWinSet(Window win);
Window ExtInitWinGet(void);
EX_Window ExtInitWinCreate(void);
void ExtInitWinSet(EX_Window win);
EX_Window ExtInitWinGet(void);
void ExtInitWinKill(void);
/* fonts.c */

View File

@ -45,7 +45,7 @@ struct _action {
char anybutton;
int button;
char anykey;
KeyCode keycode;
EX_KeyCode keycode;
char *key_str;
char *tooltipstring;
ActionType *action;
@ -989,7 +989,7 @@ handleAction(EWin * ewin, ActionType * action)
int
ActionclassEvent(ActionClass * ac, XEvent * ev, EWin * ewin)
{
KeyCode keycode;
EX_KeyCode keycode;
int i, type, button, modifiers, ok, mouse, mask, val = 0;
Action *aa;

View File

@ -151,7 +151,7 @@ AnimatorAdd(EObj * eo, animation_category category, AnimCbFunc * func,
if (!an)
return NULL;
Dprintf("%s: %u/%u: %#lx %p C%d\n", __func__,
Dprintf("%s: %u/%u: %#x %p C%d\n", __func__,
current_frame_num, skip_to_frame_num, EOW(eo), an, category);
if (!Mode_anim.timer)
@ -203,7 +203,7 @@ AnimatorSetDoneFunc(Animator * an, AnimDoneFunc * done)
static void
_AnimatorDel(Animator * an)
{
Dprintf("%s: %u/%u: %#lx %p C%d\n", __func__,
Dprintf("%s: %u/%u: %#x %p C%d\n", __func__,
current_frame_num, skip_to_frame_num, EOW(an->eo), an, an->category);
Efree(an);
}
@ -242,7 +242,7 @@ _AnimatorsRun(Animator ** head, unsigned int frame_num, unsigned int next_frame)
for (first = 1, pprev = head, an = *head; an; an = next)
{
D3printf("%s: %#lx %p\n", __func__, EOW(an->eo), an);
D3printf("%s: %#x %p\n", __func__, EOW(an->eo), an);
next = an->next;
if (an->cancelled)
@ -255,7 +255,7 @@ _AnimatorsRun(Animator ** head, unsigned int frame_num, unsigned int next_frame)
/* Start when other non-forever animations have run */
if (!first)
goto do_next;
Dprintf("%s: %#lx %p C%d: De-serialize\n", __func__, EOW(an->eo),
Dprintf("%s: %#x %p C%d: De-serialize\n", __func__, EOW(an->eo),
an, an->category);
an->next_frame = frame_num;
an->start_frame = an->next_frame;
@ -312,14 +312,14 @@ _AnimatorsRun(Animator ** head, unsigned int frame_num, unsigned int next_frame)
{
if (an->duration > 0 && remaining <= 0)
{
Dprintf("%s: %#lx %p C%d: autocancelling\n", __func__,
Dprintf("%s: %#x %p C%d: autocancelling\n", __func__,
EOW(an->eo), an, an->category);
res = ANIM_RET_CANCEL_ANIM;
}
}
else
{
Dprintf("%s: %#lx %p C%d: self cancelling\n", __func__,
Dprintf("%s: %#x %p C%d: self cancelling\n", __func__,
EOW(an->eo), an, an->category);
}
@ -390,7 +390,7 @@ AnimatorDel(EObj * eo, Animator * anx)
{
if (an != anx)
continue;
Dprintf("%s: %u/%u: %#lx %p C%d\n", __func__,
Dprintf("%s: %u/%u: %#x %p C%d\n", __func__,
current_frame_num, skip_to_frame_num, EOW(an->eo), an,
an->category);
an->cancelled = 1;

View File

@ -47,7 +47,7 @@ typedef struct {
struct _background {
dlist_t list;
char *name;
Pixmap pmap;
EX_Pixmap pmap;
time_t last_viewed;
unsigned int bg_solid;
char bg_tile;
@ -180,10 +180,10 @@ BackgroundGetUniqueString(Background * bg)
}
void
BackgroundPixmapSet(Background * bg, Pixmap pmap)
BackgroundPixmapSet(Background * bg, EX_Pixmap pmap)
{
if (bg->pmap != NoXID && bg->pmap != pmap)
Eprintf("*** BackgroundPixmapSet %s: pmap was set %#lx/%#lx\n",
Eprintf("*** BackgroundPixmapSet %s: pmap was set %#x/%#x\n",
bg->name, bg->pmap, pmap);
bg->pmap = pmap;
}
@ -529,10 +529,10 @@ BgFindImageSize(BgPart * bgp, unsigned int rw, unsigned int rh,
*ph = (unsigned int)h;
}
static Pixmap
static EX_Pixmap
BackgroundCreatePixmap(Win win, unsigned int w, unsigned int h)
{
Pixmap pmap;
EX_Pixmap pmap;
/*
* Stupid hack to avoid that a new root pixmap has the same ID as the now
@ -550,11 +550,11 @@ BackgroundCreatePixmap(Win win, unsigned int w, unsigned int h)
}
void
BackgroundRealize(Background * bg, Win win, Drawable draw, unsigned int rw,
unsigned int rh, int is_win, Pixmap * ppmap,
unsigned int *ppixel)
BackgroundRealize(Background * bg, Win win, EX_Drawable draw,
unsigned int rw, unsigned int rh, int is_win,
EX_Pixmap * ppmap, unsigned int *ppixel)
{
Pixmap pmap;
EX_Pixmap pmap;
int x, y, ww, hh;
unsigned int w, h;
char *file, hasbg, hasfg;
@ -680,7 +680,7 @@ BackgroundRealize(Background * bg, Win win, Drawable draw, unsigned int rw,
}
void
BackgroundApplyPmap(Background * bg, Win win, Drawable draw,
BackgroundApplyPmap(Background * bg, Win win, EX_Drawable draw,
unsigned int w, unsigned int h)
{
BackgroundRealize(bg, win, draw, w, h, 0, NULL, NULL);
@ -690,7 +690,7 @@ static void
BackgroundApplyWin(Background * bg, Win win)
{
int w, h;
Pixmap pmap;
EX_Pixmap pmap;
unsigned int pixel;
if (!EGetGeometry(win, NULL, NULL, NULL, &w, &h, NULL, NULL))
@ -716,7 +716,7 @@ BackgroundApplyWin(Background * bg, Win win)
void
BackgroundSet(Background * bg, Win win, unsigned int w, unsigned int h)
{
Pixmap pmap = NoXID;
EX_Pixmap pmap = NoXID;
unsigned int pixel = 0;
if (bg->pmap)
@ -893,7 +893,7 @@ BackgroundGetFgFile(const Background * bg)
}
#endif /* ENABLE_DIALOGS */
Pixmap
EX_Pixmap
BackgroundGetPixmap(const Background * bg)
{
return (bg) ? bg->pmap : NoXID;
@ -917,7 +917,7 @@ BackgroundCacheMini(Background * bg, int keep, int nuke)
{
char s[4096];
EImage *im;
Pixmap pmap;
EX_Pixmap pmap;
int mini_w = Mode.backgrounds.mini_w;
int mini_h = Mode.backgrounds.mini_h;
@ -1452,7 +1452,7 @@ CB_DesktopMiniDisplayRedraw(Dialog * d __UNUSED__, int val __UNUSED__,
void *data)
{
Background *bg;
Pixmap pmap;
EX_Pixmap pmap;
int w, h;
DItem *di = (DItem *) data;
Win win;
@ -1621,7 +1621,7 @@ BG_RedrawView(void)
Background *bg;
int x, w, h, num;
Win win;
Pixmap pmap;
EX_Pixmap pmap;
ImageClass *ic;
int mini_w = Mode.backgrounds.mini_w;
int mini_h = Mode.backgrounds.mini_h;
@ -2395,7 +2395,7 @@ BackgroundsIpc(const char *params)
}
else if (!strncmp(cmd, "apply", 2))
{
Window xwin;
EX_Window xwin;
Win win;
bg = BackgroundFind(prm);
@ -2403,7 +2403,7 @@ BackgroundsIpc(const char *params)
return;
xwin = NoXID;
sscanf(p, "%lx", &xwin);
sscanf(p, "%x", &xwin);
win = ECreateWinFromXwin(xwin);
if (!win)

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2012 Kim Woelders
* Copyright (C) 2004-2014 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
@ -28,14 +28,15 @@
Background *BackgroundFind(const char *name);
char *BackgroundGetUniqueString(Background * bg);
void BackgroundPixmapSet(Background * bg, Pixmap pmap);
void BackgroundPixmapSet(Background * bg, EX_Pixmap pmap);
void BackgroundDestroyByName(const char *name);
void BackgroundRealize(Background * bg, Win win, Drawable draw,
unsigned int rw, unsigned int rh,
int is_win, Pixmap * ppmap,
unsigned int *ppixel);
void BackgroundApplyPmap(Background * bg, Win win, Drawable draw,
unsigned int rw, unsigned int rh);
void BackgroundRealize(Background * bg, Win win,
EX_Drawable draw, unsigned int rw,
unsigned int rh, int is_win,
EX_Pixmap * ppmap, unsigned int *ppixel);
void BackgroundApplyPmap(Background * bg, Win win,
EX_Drawable draw, unsigned int rw,
unsigned int rh);
void BackgroundSet(Background * bg, Win win, unsigned int rw,
unsigned int rh);
void BackgroundIncRefcount(Background * bg);
@ -43,7 +44,7 @@ void BackgroundDecRefcount(Background * bg);
void BackgroundTouch(Background * bg);
const char *BackgroundGetName(const Background * bg);
Pixmap BackgroundGetPixmap(const Background * bg);
EX_Pixmap BackgroundGetPixmap(const Background * bg);
unsigned int BackgroundGetSeqNo(const Background * bg);
int BackgroundIsNone(const Background * bg);
Background *BrackgroundCreateFromImage(const char *bgid,

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -128,7 +128,7 @@ BorderWinpartITclassApply(EWin * ewin, int i, int force)
im = EwinIconImageGet(ewin, 16, Conf.warplist.icon_mode);
if (im)
{
Pixmap pmap;
EX_Pixmap pmap;
EImageBorder *pad;
int x, y, w, h;
@ -597,10 +597,10 @@ EwinBorderSetTo(EWin * ewin, const Border * b)
}
{
Window *wl;
EX_Window *wl;
int j = 0;
wl = EMALLOC(Window, b->num_winparts + 1);
wl = EMALLOC(EX_Window, b->num_winparts + 1);
if (!wl)
return;
for (i = b->num_winparts - 1; i >= 0; i--)

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -70,8 +70,8 @@ struct _button {
void *cb_prm;
#if 0 /* Unused */
Window inside_win;
Window event_win;
EX_Window inside_win;
EX_Window event_win;
#endif
unsigned int ref_count;
};
@ -387,7 +387,7 @@ ButtonDoShowDefault(const Button * b)
#if 0 /* Unused */
int
ButtonEmbedWindow(Button * b, Window WindowToEmbed)
ButtonEmbedWindow(Button * b, EX_Window WindowToEmbed)
{
int w, h;
@ -495,7 +495,7 @@ ButtonEventMouseDown(Button * b, XEvent * ev)
#if 0 /* Unused */
if (b->inside_win)
{
Window win = ev->xbutton.window;
EX_Window win = ev->xbutton.window;
ev->xbutton.window = b->inside_win;
EXSendEvent(b->inside_win, ButtonPressMask, ev);
@ -525,7 +525,7 @@ ButtonEventMouseUp(Button * b, XEvent * ev)
#if 0 /* Unused */
if (b->inside_win && !Mode_buttons.action_inhibit)
{
Window win = ev->xbutton.window;
EX_Window win = ev->xbutton.window;
ev->xbutton.window = b->inside_win;
EXSendEvent(b->inside_win, ButtonReleaseMask, ev);
@ -1044,7 +1044,7 @@ ButtonsIpc(const char *params)
{
IpcPrintf("Win d s l x y w h name\n");
LIST_FOR_EACH(Button, &button_list, b)
IpcPrintf("%#lx %2d %2d %2d %5d+%5d %5dx%5d %s\n",
IpcPrintf("%#x %2d %2d %2d %5d+%5d %5dx%5d %s\n",
EoGetXwin(b), EoGetDeskNum(b), EoIsSticky(b),
EoGetLayer(b), EoGetX(b), EoGetY(b), EoGetW(b), EoGetH(b),
EoGetName(b));

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -49,7 +49,7 @@ void ButtonSetCallback(Button * b,
ButtonCbFunc * func, void *prm);
int ButtonDoShowDefault(const Button * b);
int ButtonEmbedWindow(Button * ButtonToUse,
Window WindowToEmbed);
EX_Window WindowToEmbed);
void ButtonsForeach(int id, Desk * dsk,
void (*func) (Button * b));

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -32,7 +32,7 @@
typedef struct {
dlist_t list;
char *name;
Window xwin;
EX_Window xwin;
char *msg;
char *clientname;
char *version;
@ -47,7 +47,7 @@ static LIST_HEAD(client_list);
static Win comms_win = NULL;
static Client *
ClientCreate(Window xwin)
ClientCreate(EX_Window xwin)
{
Client *c;
char st[32];
@ -134,13 +134,14 @@ ClientConfigure(Client * c, const char *str)
static int
ClientMatchWindow(const void *data, const void *match)
{
return ((const Client *)data)->xwin != (Window) match;
return ((const Client *)data)->xwin != (EX_Window) (long)match;
}
static Client *
ClientFind(Window xwin)
ClientFind(EX_Window xwin)
{
return LIST_FIND(Client, &client_list, ClientMatchWindow, (void *)xwin);
return LIST_FIND(Client, &client_list, ClientMatchWindow,
(void *)(long)xwin);
}
static char *
@ -148,7 +149,7 @@ ClientCommsGet(Client ** c, XClientMessageEvent * ev)
{
char s[13], s2[9], *msg;
unsigned int i;
Window xwin;
EX_Window xwin;
Client *cl;
if ((!ev) || (!c))
@ -163,7 +164,7 @@ ClientCommsGet(Client ** c, XClientMessageEvent * ev)
for (i = 0; i < 12; i++)
s[i] = ev->data.b[i + 8];
xwin = NoXID;
sscanf(s2, "%lx", &xwin);
sscanf(s2, "%x", &xwin);
if (xwin == NoXID)
return NULL;
cl = ClientFind(xwin);
@ -296,13 +297,13 @@ CommsInit(void)
EventCallbackRegister(comms_win, ClientHandleCommsEvents, NULL);
EventCallbackRegister(VROOT, ClientHandleRootEvents, NULL);
Esnprintf(s, sizeof(s), "WINID %8lx", WinGetXwin(comms_win));
Esnprintf(s, sizeof(s), "WINID %8x", WinGetXwin(comms_win));
ex_window_prop_string_set(WinGetXwin(comms_win), E16_ATOM_COMMS_WIN, s);
ex_window_prop_string_set(WinGetXwin(VROOT), E16_ATOM_COMMS_WIN, s);
}
static void
CommsDoSend(Window win, const char *s)
CommsDoSend(EX_Window win, const char *s)
{
char ss[21];
int i, j, k, len;
@ -320,7 +321,7 @@ CommsDoSend(Window win, const char *s)
ev.xclient.format = 8;
for (i = 0; i < len + 1; i += 12)
{
Esnprintf(ss, sizeof(ss), "%8lx", WinGetXwin(comms_win));
Esnprintf(ss, sizeof(ss), "%8x", WinGetXwin(comms_win));
for (j = 0; j < 12; j++)
{
ss[8 + j] = s[i + j];

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -1183,7 +1183,7 @@ ContainerShowMenu(Container * ct)
mi = MenuItemCreate(_("Settings..."), NULL, s, NULL);
MenuAddItem(m, mi);
Esnprintf(s, sizeof(s), "wop %#lx cl", WinGetXwin(ct->win));
Esnprintf(s, sizeof(s), "wop %#x cl", WinGetXwin(ct->win));
mi = MenuItemCreate(_("Close"), NULL, s, NULL);
MenuAddItem(m, mi);

View File

@ -35,7 +35,7 @@
struct _ecursor {
dlist_t list;
char *name;
Cursor cursor;
EX_Cursor cursor;
unsigned int ref_count;
char *file;
unsigned int bg;
@ -47,13 +47,14 @@ static LIST_HEAD(cursor_list);
#if USE_XRENDER
/* Assuming we have XRenderCreateCursor (render >= 0.5) */
static Cursor
ECreatePixmapCursor(Pixmap cpmap, Pixmap cmask, unsigned int w, unsigned int h,
int xh, int yh, unsigned int fg, unsigned int bg)
static EX_Cursor
ECreatePixmapCursor(EX_Pixmap cpmap, EX_Pixmap cmask, unsigned int w,
unsigned int h, int xh, int yh, unsigned int fg,
unsigned int bg)
{
Cursor curs;
Pixmap pmap;
Picture pict;
EX_Cursor curs;
EX_Pixmap pmap;
EX_Picture pict;
XRenderPictFormat *pictfmt;
XRenderPictureAttributes pa;
XRenderColor c;
@ -87,12 +88,12 @@ ECreatePixmapCursor(Pixmap cpmap, Pixmap cmask, unsigned int w, unsigned int h,
return curs;
}
#else
static Cursor
ECreatePixmapCursor(Pixmap cpmap, Pixmap cmask,
static EX_Cursor
ECreatePixmapCursor(EX_Pixmap cpmap, EX_Pixmap cmask,
unsigned int w __UNUSED__, unsigned int h __UNUSED__,
int xh, int yh, unsigned int fg, unsigned int bg)
{
Cursor curs;
EX_Cursor curs;
XColor fgxc, bgxc;
COLOR32_TO_RGB16(fg, fgxc.red, fgxc.green, fgxc.blue);
@ -337,7 +338,7 @@ ECursorApply(ECursor * ec, Win win)
XDefineCursor(disp, WinGetXwin(win), ec->cursor);
}
static Cursor
static EX_Cursor
ECursorGetByName(const char *name, const char *name2, unsigned int fallback)
{
ECursor *ec;
@ -371,11 +372,11 @@ static const ECDataRec ECData[ECSR_COUNT] = {
{"RESIZE_BR", "RESIZE_TL", XC_bottom_right_corner},
};
static Cursor ECsrs[ECSR_COUNT] = {
static EX_Cursor ECsrs[ECSR_COUNT] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
};
Cursor
EX_Cursor
ECsrGet(int which)
{
if (which < 0 || which >= ECSR_COUNT)
@ -388,7 +389,7 @@ ECsrGet(int which)
}
void
ECsrApply(int which, Window win)
ECsrApply(int which, EX_Window win)
{
XDefineCursor(disp, win, ECsrGet(which));
}

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2006-2009 Kim Woelders
* Copyright (C) 2006-2014 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
@ -43,8 +43,8 @@
ECursor *ECursorAlloc(const char *name);
void ECursorFree(ECursor * ec);
void ECursorApply(ECursor * ec, Win win);
Cursor ECsrGet(int which);
void ECsrApply(int which, Window win);
EX_Cursor ECsrGet(int which);
void ECsrApply(int which, EX_Window win);
int ECursorConfigLoad(FILE * fs);

View File

@ -487,7 +487,7 @@ DeskGetBackgroundObj(const Desk * dsk)
return (dsk) ? dsk->bg.o : NULL;
}
Pixmap
EX_Pixmap
DeskGetBackgroundPixmap(const Desk * dsk)
{
if (!dsk)
@ -505,12 +505,12 @@ static void
DeskBackgroundConfigure(Desk * dsk)
{
Win win;
Pixmap pmap = dsk->bg.pmap;
EX_Pixmap pmap = dsk->bg.pmap;
unsigned int pixel = dsk->bg.pixel;
if (EDebug(EDBUG_TYPE_DESKS))
Eprintf
("DeskBackgroundConfigure %d v=%d %#lx/%#lx: ext=%d pmap=%#lx/%#lx pixel=%#x/%#x\n",
("DeskBackgroundConfigure %d v=%d %#x/%#x: ext=%d pmap=%#x/%#x pixel=%#x/%#x\n",
dsk->num, dsk->viewable, EoGetXwin(dsk), EobjGetXwin(dsk->bg.o),
BackgroundIsNone(dsk->bg.bg), pmap, dsk->bg.pmap_set, pixel,
dsk->bg.pixel);
@ -576,13 +576,13 @@ static void
DeskBackgroundRefresh(Desk * dsk, int why)
{
Background *bg = dsk->bg.bg;
Pixmap pmap = dsk->bg.pmap;
EX_Pixmap pmap = dsk->bg.pmap;
unsigned int pixel = dsk->bg.pixel;
int changed = 0;
int reconfigure = 0;
if (EDebug(EDBUG_TYPE_DESKS))
Eprintf("DeskBackgroundRefresh %d v=%d why=%d pmap=%#lx pixel=%#x\n",
Eprintf("DeskBackgroundRefresh %d v=%d why=%d pmap=%#x pixel=%#x\n",
dsk->num, dsk->viewable, why, pmap, pixel);
switch (why)
@ -1422,7 +1422,7 @@ DeskRestackSimple(Desk * dsk)
eo->stacked = 1;
if (EDebug(EDBUG_TYPE_STACKING))
Eprintf("DeskRestackSimple %#lx %s\n", EobjGetXwin(eo), EobjGetName(eo));
Eprintf("DeskRestackSimple %#x %s\n", EobjGetXwin(eo), EobjGetName(eo));
if (i < num - 1)
{
@ -1436,20 +1436,20 @@ DeskRestackSimple(Desk * dsk)
}
value_mask = CWSibling | CWStackMode;
if (EDebug(EDBUG_TYPE_STACKING))
Eprintf("DeskRestackSimple %#10lx %s %#10lx\n", EobjGetXwin(eo),
Eprintf("DeskRestackSimple %#10x %s %#10lx\n", EobjGetXwin(eo),
(xwc.stack_mode == Above) ? "Above" : "Below", xwc.sibling);
XConfigureWindow(disp, EobjGetXwin(eo), value_mask, &xwc);
}
#define _APPEND_TO_WIN_LIST(win) \
{ \
wl = EREALLOC(Window, wl, ++tot); \
wl = EREALLOC(EX_Window, wl, ++tot); \
wl[tot - 1] = win; \
}
void
DeskRestack(Desk * dsk)
{
Window *wl;
EX_Window *wl;
int i, num, tot;
EObj *const *lst, *eo;
@ -1480,7 +1480,7 @@ DeskRestack(Desk * dsk)
{
Eprintf("DeskRestack %d (%d):\n", dsk->num, dsk->stack.dirty);
for (i = 0; i < tot; i++)
Eprintf(" win=%#10lx parent=%#10lx\n", wl[i],
Eprintf(" win=%#10x parent=%#10x\n", wl[i],
EXWindowGetParent(wl[i]));
}
@ -2054,14 +2054,14 @@ DeskGetAclass(void *data __UNUSED__)
static void
DeskPropertyChange(Desk * dsk, XEvent * ev)
{
Pixmap pmap;
EX_Pixmap pmap;
if (ev->xproperty.atom == E_XROOTPMAP_ID)
{
/* Possible race here? */
pmap = HintsGetRootPixmap(EoGetWin(dsk));
if (EDebug(EDBUG_TYPE_DESKS))
Eprintf("DeskPropertyChange win=%#lx _XROOTPMAP_ID=%#lx\n",
Eprintf("DeskPropertyChange win=%#lx _XROOTPMAP_ID=%#x\n",
ev->xany.window, pmap);
if (ev->xany.window != WinGetXwin(VROOT))
return;
@ -2415,7 +2415,7 @@ CB_DesktopDisplayRedraw(Dialog * d, int val, void *data)
bg = DeskBackgroundGet(DeskGet(i));
if (bg)
{
Pixmap pmap;
EX_Pixmap pmap;
pmap = EGetWindowBackgroundPixmap(dd->wins[i]);
BackgroundApplyPmap(bg, dd->wins[i], pmap,
@ -2636,7 +2636,7 @@ CB_AreaDisplayRedraw(Dialog * d, int val, void *data)
if (val == 1)
{
ImageClass *ic;
Pixmap pmap;
EX_Pixmap pmap;
ic = ImageclassFind("SETTINGS_AREA_AREA", 1);
ImageclassApply(ic, win, 0, 0, STATE_NORMAL, ST_SOLID);
@ -2841,7 +2841,7 @@ DesksIpcDesk(const char *params)
{
dsk = _DeskGet(desk);
IpcPrintf
("Desk %d: viewable=%d order=%d x,y=%4d,%4d wxh=%4dx%4d area x,y=%d,%d pmap=%#lx\n",
("Desk %d: viewable=%d order=%d x,y=%4d,%4d wxh=%4dx%4d area x,y=%d,%d pmap=%#x\n",
desk, dsk->viewable, desks.order[desk],
EoGetX(dsk), EoGetY(dsk), EoGetW(dsk), EoGetH(dsk),
dsk->current_area_x, dsk->current_area_y, dsk->bg.pmap);

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2012 Kim Woelders
* Copyright (C) 2004-2014 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
@ -48,8 +48,8 @@ struct _desk {
#if USE_COMPOSITE
EObj *o_bg;
#endif
Pixmap pmap;
Pixmap pmap_set;
EX_Pixmap pmap;
EX_Pixmap pmap_set;
unsigned int pixel;
unsigned int seq_no;
} bg;
@ -71,7 +71,7 @@ void DeskGoto(Desk * dsk);
void DeskGotoNum(unsigned int desk);
void DeskRestack(Desk * dsk);
EObj *DeskGetBackgroundObj(const Desk * dsk);
Pixmap DeskGetBackgroundPixmap(const Desk * dsk);
EX_Pixmap DeskGetBackgroundPixmap(const Desk * dsk);
Background *DeskBackgroundGet(const Desk * dsk);
void DeskBackgroundSet(Desk * dsk, Background * bg);

View File

@ -144,7 +144,7 @@ struct _ditem {
};
typedef struct {
KeyCode keycode;
EX_KeyCode keycode;
DialogCallbackFunc *func;
int val;
void *data;

View File

@ -34,7 +34,7 @@
static Font font = NoXID; /* Used in mode 1 (technical) */
static void
draw_h_arrow(Drawable dr, GC gc, int x1, int x2, int y1)
draw_h_arrow(EX_Drawable dr, GC gc, int x1, int x2, int y1)
{
char str[32];
@ -54,7 +54,7 @@ draw_h_arrow(Drawable dr, GC gc, int x1, int x2, int y1)
}
static void
draw_v_arrow(Drawable dr, GC gc, int y1, int y2, int x1)
draw_v_arrow(EX_Drawable dr, GC gc, int y1, int y2, int x1)
{
char str[32];
@ -74,7 +74,7 @@ draw_v_arrow(Drawable dr, GC gc, int y1, int y2, int x1)
}
void
do_draw_technical(Drawable dr, GC gc,
do_draw_technical(EX_Drawable dr, GC gc,
int a, int b, int c, int d, int bl, int br, int bt, int bb)
{
if (!font)
@ -104,7 +104,7 @@ do_draw_technical(Drawable dr, GC gc,
}
static void
do_draw_boxy(Drawable dr, GC gc,
do_draw_boxy(EX_Drawable dr, GC gc,
int a, int b, int c, int d, int bl, int br, int bt, int bb)
{
if (c < 3)
@ -116,7 +116,7 @@ do_draw_boxy(Drawable dr, GC gc,
}
typedef struct {
Window root;
EX_Window root;
GC gc;
int xo, yo, wo, ho;
int bl, br, bt, bb;
@ -147,7 +147,8 @@ _ShapeDrawNograb_tech_box(EWin * ewin, int md, int firstlast,
}
}
typedef void (DrawFunc) (Drawable dr, GC gc, int a, int b, int c, int d,
typedef void (DrawFunc) (EX_Drawable dr, GC gc,
int a, int b, int c, int d,
int bl, int br, int bt, int bb);
static DrawFunc *const draw_functions[] = {

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -99,7 +99,7 @@ typedef struct _cmhook ECmWinInfo;
struct _cmhook {
EObj *next; /* Paint order */
EObj *prev; /* Paint order */
Pixmap pixmap;
EX_Pixmap pixmap;
int rcx, rcy, rcw, rch;
int mode;
unsigned damaged:1;
@ -109,15 +109,15 @@ struct _cmhook {
unsigned have_extents:1; /* Region validity - extents */
unsigned have_clip:1; /* Region validity - clip */
Damage damage;
Picture picture;
Picture pict_alpha; /* Solid, current opacity */
XserverRegion shape;
XserverRegion extents;
XserverRegion clip;
EX_Picture picture;
EX_Picture pict_alpha; /* Solid, current opacity */
EX_SrvRegion shape;
EX_SrvRegion extents;
EX_SrvRegion clip;
int shape_x, shape_y;
#if ENABLE_SHADOWS
Picture shadow_alpha; /* Solid, sharp * current opacity */
Picture shadow_pict; /* Blurred shaped shadow */
EX_Picture shadow_alpha; /* Solid, sharp * current opacity */
EX_Picture shadow_pict; /* Blurred shaped shadow */
int shadow_dx;
int shadow_dy;
int shadow_width;
@ -184,21 +184,21 @@ static struct {
static struct {
int mode;
Window root;
EX_Window root;
#if USE_COMPOSITE_OVERLAY_WINDOW
Window cow;
EX_Window cow;
#endif
Pixmap pmap; /* Compositing buffer */
EX_Pixmap pmap; /* Compositing buffer */
char active;
char use_pixmap;
char reorder;
char ghosts;
EObj *eo_first;
EObj *eo_last;
XserverRegion damage;
EX_SrvRegion damage;
char got_damage;
XserverRegion rgn_screen;
XserverRegion rgn_clip;
EX_SrvRegion rgn_screen;
EX_SrvRegion rgn_clip;
int shadow_mode;
float opac_blur; /* 0. -> 1. */
float opac_sharp; /* 0. -> 1. */
@ -209,11 +209,11 @@ static struct {
#define _ECM_SET_STACK_CHANGED() Mode_compmgr.reorder = 1
#define _ECM_SET_SHADOW_CHANGED() Mode_compmgr.reorder = 1
static Picture rootPicture;
static Picture rootBuffer;
static EX_Picture rootPicture;
static EX_Picture rootBuffer;
static XserverRegion rgn_tmp; /* Region for temporary use */
static XserverRegion rgn_tmp2; /* Region for temporary use */
static EX_SrvRegion rgn_tmp; /* Region for temporary use */
static EX_SrvRegion rgn_tmp2; /* Region for temporary use */
static ESelection *wm_cm_sel = NULL;
@ -233,7 +233,7 @@ static void ECompMgrWinSetPicts(EObj * eo);
static void ECompMgrWinFadeEnd(EObj * eo, int done);
static int ECompMgrDetermineOrder(EObj * const *lst, int num,
EObj ** first, EObj ** last,
Desk * dsk, XserverRegion clip);
Desk * dsk, EX_SrvRegion clip);
#define PIXMAP_DESTROY(pmap) \
if (pmap != NoXID) { XFreePixmap(disp, pmap); pmap = NoXID; }
@ -245,7 +245,7 @@ static int ECompMgrDetermineOrder(EObj * const *lst, int num,
void
ECompMgrWinClipToGC(EObj * eo, GC gc)
{
XserverRegion rgn = rgn_tmp2;
EX_SrvRegion rgn = rgn_tmp2;
if (!eo || !eo->cmhook)
return;
@ -265,10 +265,10 @@ ECompMgrDeskConfigure(Desk * dsk)
{
EObj *eo;
ECmWinInfo *cw;
Picture pict;
EX_Picture pict;
XRenderPictFormat *pictfmt;
XRenderPictureAttributes pa;
Pixmap pmap;
EX_Pixmap pmap;
eo = dsk->bg.o;
cw = eo->cmhook;
@ -295,7 +295,7 @@ ECompMgrDeskConfigure(Desk * dsk)
cw->picture = pict;
D1printf
("ECompMgrDeskConfigure: Desk %d: using pixmap %#lx picture=%#lx\n",
("ECompMgrDeskConfigure: Desk %d: using pixmap %#x picture=%#x\n",
dsk->num, pmap, cw->picture);
/* New background, all must be repainted */
@ -344,7 +344,7 @@ ECompMgrDeskVisibility(EObj * eo, XEvent * ev)
*/
static void
ECompMgrDamageMerge(XserverRegion damage)
ECompMgrDamageMerge(EX_SrvRegion damage)
{
if (Mode_compmgr.got_damage)
{
@ -368,7 +368,7 @@ ECompMgrDamageMerge(XserverRegion damage)
}
static void
ECompMgrDamageMergeObject(EObj * eo, XserverRegion damage)
ECompMgrDamageMergeObject(EObj * eo, EX_SrvRegion damage)
{
ECmWinInfo *cw = eo->cmhook;
Desk *dsk = eo->desk;
@ -413,7 +413,7 @@ ECompMgrDamageAll(void)
#define M_2PI_F ((float)(2 * M_PI))
static Picture transBlackPicture;
static EX_Picture transBlackPicture;
typedef struct {
int size;
@ -624,12 +624,12 @@ make_shadow(float opacity, int width, int height)
return ximage;
}
static Picture
static EX_Picture
shadow_picture(float opacity, int width, int height, int *wp, int *hp)
{
XImage *shadowImage;
Pixmap shadowPixmap;
Picture shadowPicture;
EX_Pixmap shadowPixmap;
EX_Picture shadowPicture;
GC gc;
shadowImage = make_shadow(opacity, width, height);
@ -775,7 +775,7 @@ ECompMgrWinSetExtents(EObj * eo)
done:
cw->have_extents = 1;
D1printf("extents %#lx %d %d %d %d\n", EobjGetXwin(eo), r.x, r.y, r.width,
D1printf("extents %#x %d %d %d %d\n", EobjGetXwin(eo), r.x, r.y, r.width,
r.height);
if (EDebug(EDBUG_TYPE_COMPMGR2))
@ -821,12 +821,12 @@ ECompMgrWinSetShape(EObj * eo)
cw->shape_y = EobjGetY(eo) + EobjGetBW(eo);
cw->have_shape = 1;
D1printf("shape %#lx: %d %d\n", EobjGetXwin(eo), cw->shape_x, cw->shape_y);
D1printf("shape %#x: %d %d\n", EobjGetXwin(eo), cw->shape_x, cw->shape_y);
if (EDebug(EDBUG_TYPE_COMPMGR2))
ERegionShow("shape", cw->shape, NULL);
}
Pixmap
EX_Pixmap
ECompMgrWinGetPixmap(const EObj * eo)
{
ECmWinInfo *cw = eo->cmhook;
@ -845,7 +845,7 @@ ECompMgrWinGetPixmap(const EObj * eo)
return cw->pixmap;
}
Picture
EX_Picture
ECompMgrWinGetAlphaPict(const EObj * eo)
{
return (eo->cmhook) ? eo->cmhook->pict_alpha : NoXID;
@ -859,7 +859,7 @@ ECompMgrWinInvalidate(EObj * eo, int what)
if (!cw)
return;
D1printf("ECompMgrWinInvalidate %#lx: %#x\n", EobjGetXwin(eo), what);
D1printf("ECompMgrWinInvalidate %#x: %#x\n", EobjGetXwin(eo), what);
if ((what & (INV_SIZE | INV_PIXMAP)) && cw->pixmap != NoXID)
{
@ -908,7 +908,7 @@ ECompMgrWinSetOpacity(EObj * eo, unsigned int opacity)
cw->opacity = opacity;
D1printf("ECompMgrWinSetOpacity: %#lx opacity=%#x\n", EobjGetXwin(eo),
D1printf("ECompMgrWinSetOpacity: %#x opacity=%#x\n", EobjGetXwin(eo),
cw->opacity);
if (eo->shown || cw->fadeout)
@ -942,7 +942,7 @@ doECompMgrWinFade(EObj * eo, int run, void *data __UNUSED__)
op = cw->opacity_to;
#if DEBUG_OPACITY
Eprintf("%s %#lx: %u/%u, %#x->%#x\n", __func__, EobjGetXwin(eo),
Eprintf("%s %#x: %u/%u, %#x->%#x\n", __func__, EobjGetXwin(eo),
eo->fading, cw->fadeout, cw->opacity, op);
#endif
if (!eo->fading)
@ -977,7 +977,7 @@ doECompMgrWinFade(EObj * eo, int run, void *data __UNUSED__)
}
#if DEBUG_OPACITY
Eprintf("%s %#lx: %#x\n", __func__, EobjGetXwin(eo), op);
Eprintf("%s %#x: %#x\n", __func__, EobjGetXwin(eo), op);
#endif
ECompMgrWinSetOpacity(eo, op);
@ -1017,7 +1017,7 @@ ECompMgrWinFadeIn(EObj * eo)
#if DEBUG_OPACITY
ECmWinInfo *cw = eo->cmhook;
Eprintf("%s %#lx: %u/%u, %#x %#x->%#x\n", __func__, EobjGetXwin(eo),
Eprintf("%s %#x: %u/%u, %#x %#x->%#x\n", __func__, EobjGetXwin(eo),
eo->fading, cw->fadeout, eo->opacity, 0x10000000, cw->opacity);
#endif
ECompMgrWinFade(eo, 0x10000000, eo->opacity);
@ -1029,7 +1029,7 @@ ECompMgrWinFadeOut(EObj * eo)
ECmWinInfo *cw = eo->cmhook;
#if DEBUG_OPACITY
Eprintf("%s %#lx: %u/%u, %#x %#x->%#x\n", __func__, EobjGetXwin(eo),
Eprintf("%s %#x: %u/%u, %#x %#x->%#x\n", __func__, EobjGetXwin(eo),
eo->fading, cw->fadeout, eo->opacity, cw->opacity, 0x10000000);
#endif
cw->fadeout = 1;
@ -1042,7 +1042,7 @@ ECompMgrWinFadeEnd(EObj * eo, int done)
ECmWinInfo *cw = eo->cmhook;
#if DEBUG_OPACITY
Eprintf("%s %#lx: done=%d\n", __func__, EobjGetXwin(eo), done);
Eprintf("%s %#x: done=%d\n", __func__, EobjGetXwin(eo), done);
#endif
if (cw->fadeout)
{
@ -1083,7 +1083,7 @@ ECompMgrWinMap(EObj * eo)
return;
}
D1printf("ECompMgrWinMap %#lx\n", EobjGetXwin(eo));
D1printf("ECompMgrWinMap %#x\n", EobjGetXwin(eo));
if (!cw->have_extents)
ECompMgrWinSetExtents(eo);
@ -1100,7 +1100,7 @@ ECompMgrWinUnmap(EObj * eo)
{
ECmWinInfo *cw = eo->cmhook;
D1printf("ECompMgrWinUnmap %#lx shown=%d\n", EobjGetXwin(eo), eo->shown);
D1printf("ECompMgrWinUnmap %#x shown=%d\n", EobjGetXwin(eo), eo->shown);
if (!eo->shown) /* Sometimes we get a synthetic one too */
return;
@ -1124,7 +1124,7 @@ ECompMgrWinSetPicts(EObj * eo)
(Mode_compmgr.use_pixmap || (eo->fade && Conf_compmgr.fading.enable)))
{
cw->pixmap = EWindowGetPixmap(EobjGetWin(eo));
D1printf("ECompMgrWinSetPicts %#lx: Pmap=%#lx\n", EobjGetXwin(eo),
D1printf("ECompMgrWinSetPicts %#x: Pmap=%#x\n", EobjGetXwin(eo),
cw->pixmap);
}
@ -1132,7 +1132,7 @@ ECompMgrWinSetPicts(EObj * eo)
{
XRenderPictFormat *pictfmt;
XRenderPictureAttributes pa;
Drawable draw = EobjGetXwin(eo);
EX_Drawable draw = EobjGetXwin(eo);
if ((cw->pixmap && Mode_compmgr.use_pixmap) || (cw->fadeout))
draw = cw->pixmap;
@ -1143,13 +1143,13 @@ ECompMgrWinSetPicts(EObj * eo)
pa.subwindow_mode = IncludeInferiors;
cw->picture = XRenderCreatePicture(disp, draw,
pictfmt, CPSubwindowMode, &pa);
D1printf("ECompMgrWinSetPicts %#lx: Pict=%#lx (drawable=%#lx)\n",
D1printf("ECompMgrWinSetPicts %#x: Pict=%#x (drawable=%#x)\n",
EobjGetXwin(eo), cw->picture, draw);
#if 0 /* Pixmap must be clipped by window shape */
if (draw == cw->pixmap && WinIsShaped(EobjGetWin(eo)))
{
XserverRegion clip;
EX_SrvRegion clip;
clip = ERegionCreateFromWindow(EobjGetWin(eo));
EPictureSetClip(cw->picture, clip);
@ -1177,7 +1177,7 @@ ECompMgrWinNew(EObj * eo)
if (!cw)
return;
D1printf("ECompMgrWinNew %#lx\n", EobjGetXwin(eo));
D1printf("ECompMgrWinNew %#x\n", EobjGetXwin(eo));
eo->cmhook = cw;
@ -1241,7 +1241,7 @@ ECompMgrWinMoveResize(EObj * eo, int change_xy, int change_wh, int change_bw)
ECmWinInfo *cw = eo->cmhook;
int invalidate;
D1printf("ECompMgrWinMoveResize %#lx xy=%d wh=%d bw=%d\n",
D1printf("ECompMgrWinMoveResize %#x xy=%d wh=%d bw=%d\n",
EobjGetXwin(eo), change_xy, change_wh, change_bw);
invalidate = 0;
@ -1350,7 +1350,7 @@ ECompMgrWinReparent(EObj * eo, Desk * dsk, int change_xy)
{
ECmWinInfo *cw = eo->cmhook;
D1printf("ECompMgrWinReparent %#lx %#lx d=%d->%d x,y=%d,%d %d\n",
D1printf("ECompMgrWinReparent %#x %#x d=%d->%d x,y=%d,%d %d\n",
EobjGetXwin(eo), cw->extents,
(eo->desk) ? (int)eo->desk->num : -1, dsk->num,
EobjGetX(eo), EobjGetY(eo), change_xy);
@ -1382,7 +1382,7 @@ ECompMgrWinReparent(EObj * eo, Desk * dsk, int change_xy)
static void
ECompMgrWinCirculate(EObj * eo, XEvent * ev)
{
D1printf("ECompMgrWinCirculate %#lx %#lx\n", ev->xany.window,
D1printf("ECompMgrWinCirculate %#lx %#x\n", ev->xany.window,
EobjGetXwin(eo));
_ECM_SET_STACK_CHANGED();
@ -1393,7 +1393,7 @@ ECompMgrWinChangeShape(EObj * eo)
{
ECmWinInfo *cw = eo->cmhook;
D1printf("ECompMgrWinChangeShape %#lx\n", EobjGetXwin(eo));
D1printf("ECompMgrWinChangeShape %#x\n", EobjGetXwin(eo));
EShapeUpdate(EobjGetWin(eo));
@ -1412,7 +1412,7 @@ ECompMgrWinRaiseLower(EObj * eo, int delta)
{
ECmWinInfo *cw = eo->cmhook;
D1printf("ECompMgrWinRaiseLower %#lx delta=%d\n", EobjGetXwin(eo), delta);
D1printf("ECompMgrWinRaiseLower %#x delta=%d\n", EobjGetXwin(eo), delta);
if (delta < 0) /* Raise */
_ECM_SET_STACK_CHANGED();
@ -1429,7 +1429,7 @@ ECompMgrWinDel(EObj * eo)
if (!cw)
return;
D1printf("ECompMgrWinDel %#lx\n", EobjGetXwin(eo));
D1printf("ECompMgrWinDel %#x\n", EobjGetXwin(eo));
if (eo->fading)
ECompMgrWinFadeEnd(eo, 1);
@ -1473,9 +1473,9 @@ ECompMgrWinDamage(EObj * eo, XEvent * ev)
{
ECmWinInfo *cw = eo->cmhook;
XDamageNotifyEvent *de = (XDamageNotifyEvent *) ev;
XserverRegion parts;
EX_SrvRegion parts;
D2printf("ECompMgrWinDamage %#lx %#lx damaged=%d %d,%d %dx%d\n",
D2printf("ECompMgrWinDamage %#lx %#x damaged=%d %d,%d %dx%d\n",
ev->xany.window, EobjGetXwin(eo), cw->damaged,
de->area.x, de->area.y, de->area.width, de->area.height);
@ -1500,14 +1500,14 @@ ECompMgrWinDamage(EObj * eo, XEvent * ev)
}
static void
ECompMgrWinDumpInfo(const char *txt, EObj * eo, XserverRegion rgn, int ipc)
ECompMgrWinDumpInfo(const char *txt, EObj * eo, EX_SrvRegion rgn, int ipc)
{
void (*prf) (const char *fmt, ...);
ECmWinInfo *cw = eo->cmhook;
prf = (ipc) ? IpcPrintf : Eprintf;
prf("%s %#lx: %d,%d %dx%d: %s\n", txt, EobjGetXwin(eo),
prf("%s %#x: %d,%d %dx%d: %s\n", txt, EobjGetXwin(eo),
EobjGetX(eo), EobjGetY(eo), EobjGetW(eo), EobjGetH(eo), EobjGetName(eo));
if (!cw)
{
@ -1517,7 +1517,7 @@ ECompMgrWinDumpInfo(const char *txt, EObj * eo, XserverRegion rgn, int ipc)
if (ipc || EDebug(EDBUG_TYPE_COMPMGR3))
{
prf(" - pict=%#lx pmap=%#lx\n", cw->picture, cw->pixmap);
prf(" - pict=%#x pmap=%#x\n", cw->picture, cw->pixmap);
ERegionShow("win extents", cw->extents, prf);
ERegionShow("win shape ", cw->shape, prf);
@ -1547,7 +1547,7 @@ ECompMgrDestroyClip(void)
static int
ECompMgrDetermineOrder(EObj * const *lst, int num, EObj ** first,
EObj ** last, Desk * dsk, XserverRegion clip)
EObj ** last, Desk * dsk, EX_SrvRegion clip)
{
EObj *eo, *eo_prev, *eo_first;
int i, stop;
@ -1591,7 +1591,7 @@ ECompMgrDetermineOrder(EObj * const *lst, int num, EObj ** first,
if (!cw->have_extents)
ECompMgrWinSetExtents(eo);
D3printf(" - %#lx desk=%d shown=%d fading=%d fadeout=%d\n",
D3printf(" - %#x desk=%d shown=%d fading=%d fadeout=%d\n",
EobjGetXwin(eo), eo->desk->num, eo->shown, eo->fading,
cw->fadeout);
@ -1636,7 +1636,7 @@ ECompMgrDetermineOrder(EObj * const *lst, int num, EObj ** first,
ECompMgrWinSetPicts(eo);
D3printf(" - %#lx desk=%d shown=%d dam=%d pict=%#lx\n",
D3printf(" - %#x desk=%d shown=%d dam=%d pict=%#x\n",
EobjGetXwin(eo), eo->desk->num, eo->shown, cw->damaged,
cw->picture);
@ -1654,7 +1654,7 @@ ECompMgrDetermineOrder(EObj * const *lst, int num, EObj ** first,
}
D3printf
("ECompMgrDetermineOrder hook in %d - %#lx desk=%d shown=%d\n",
("ECompMgrDetermineOrder hook in %d - %#x desk=%d shown=%d\n",
dsk->num, EobjGetXwin(eo), eo->desk->num, eo->shown);
if (!eo_first)
@ -1668,7 +1668,7 @@ ECompMgrDetermineOrder(EObj * const *lst, int num, EObj ** first,
{
case WINDOW_UNREDIR:
case WINDOW_SOLID:
D3printf("- clip %#lx %#lx %d,%d %dx%d: %s\n", EobjGetXwin(eo),
D3printf("- clip %#x %#x %d,%d %dx%d: %s\n", EobjGetXwin(eo),
cw->clip, EobjGetX(eo), EobjGetY(eo), EobjGetW(eo),
EobjGetH(eo), EobjGetName(eo));
#if USE_CLIP_RELATIVE_TO_DESK
@ -1680,7 +1680,7 @@ ECompMgrDetermineOrder(EObj * const *lst, int num, EObj ** first,
break;
default:
D3printf("- noclip %#lx %#lx %d,%d %dx%d: %s\n", EobjGetXwin(eo),
D3printf("- noclip %#x %#x %d,%d %dx%d: %s\n", EobjGetXwin(eo),
cw->clip, EobjGetX(eo), EobjGetY(eo), EobjGetW(eo),
EobjGetH(eo), EobjGetName(eo));
break;
@ -1705,9 +1705,9 @@ ECompMgrDetermineOrder(EObj * const *lst, int num, EObj ** first,
return stop;
}
static XserverRegion
ECompMgrRepaintObjSetClip(XserverRegion rgn, XserverRegion damage,
XserverRegion clip, int x, int y)
static EX_SrvRegion
ECompMgrRepaintObjSetClip(EX_SrvRegion rgn, EX_SrvRegion damage,
EX_SrvRegion clip, int x, int y)
{
ERegionCopy(rgn, damage);
#if USE_CLIP_RELATIVE_TO_DESK
@ -1719,8 +1719,8 @@ ECompMgrRepaintObjSetClip(XserverRegion rgn, XserverRegion damage,
return rgn;
}
static XserverRegion
ECompMgrRepaintObjSetClip2(EObj * eo, XserverRegion clip, int x, int y)
static EX_SrvRegion
ECompMgrRepaintObjSetClip2(EObj * eo, EX_SrvRegion clip, int x, int y)
{
#if 1
/* This is only needed when source clipping in XRenderComposite() is broken.
@ -1739,14 +1739,14 @@ ECompMgrRepaintObjSetClip2(EObj * eo, XserverRegion clip, int x, int y)
}
static void
ECompMgrRepaintObj(Picture pbuf, XserverRegion region, EObj * eo, int mode)
ECompMgrRepaintObj(EX_Picture pbuf, EX_SrvRegion region, EObj * eo, int mode)
{
static XserverRegion rgn_clip = NoXID;
static EX_SrvRegion rgn_clip = NoXID;
ECmWinInfo *cw;
Desk *dsk = eo->desk;
int x, y;
XserverRegion clip, clip2;
Picture alpha;
EX_SrvRegion clip, clip2;
EX_Picture alpha;
cw = eo->cmhook;
@ -1866,7 +1866,7 @@ ECompMgrRepaintObj(Picture pbuf, XserverRegion region, EObj * eo, int mode)
}
static void
ECompMgrPaintGhosts(Picture pict, XserverRegion damage)
ECompMgrPaintGhosts(EX_Picture pict, EX_SrvRegion damage)
{
EObj *eo, *const *lst;
int i, num;
@ -1899,7 +1899,7 @@ void
ECompMgrRepaint(void)
{
EObj *eo;
Picture pbuf;
EX_Picture pbuf;
Desk *dsk = DeskGet(0);
if (!Mode_compmgr.active || !Mode_compmgr.got_damage)
@ -1907,7 +1907,7 @@ ECompMgrRepaint(void)
ERegionIntersect(Mode_compmgr.damage, Mode_compmgr.rgn_screen);
Dprintf("ECompMgrRepaint rootBuffer=%#lx rootPicture=%#lx\n",
Dprintf("ECompMgrRepaint rootBuffer=%#x rootPicture=%#x\n",
rootBuffer, rootPicture);
if (EDebug(EDBUG_TYPE_COMPMGR2))
ERegionShow("damage", Mode_compmgr.damage, NULL);
@ -1927,7 +1927,7 @@ ECompMgrRepaint(void)
ECompMgrRepaintObj(pbuf, Mode_compmgr.damage, eo, 0);
#if 0 /* FIXME - NoBg? */
Picture pict;
EX_Picture pict;
if (EDebug(EDBUG_TYPE_COMPMGR2))
ERegionShow("after opaque", region, NULL);
@ -2009,7 +2009,7 @@ ECompMgrRootBufferDestroy(void)
REGION_DESTROY(Mode_compmgr.rgn_clip);
}
Pixmap
EX_Pixmap
ECompMgrGetRootBuffer(void)
{
return (Mode_compmgr.pmap != NoXID) ? Mode_compmgr.pmap : WinGetXwin(VROOT);
@ -2051,7 +2051,7 @@ ECompMgrRootExpose(void *prm __UNUSED__, XEvent * ev)
n_expose++;
if (ev->xexpose.count == 0)
{
XserverRegion region;
EX_SrvRegion region;
region = ERegionCreateFromRects(expose_rects, n_expose);
@ -2148,7 +2148,7 @@ ECompMgrStart(void)
/* Pass all input events through */
XShapeCombineRectangles(disp, Mode_compmgr.cow, ShapeInput, 0, 0,
NULL, 0, ShapeSet, Unsorted);
Dprintf("COW/CMroot=%#lx/%#lx\n",
Dprintf("COW/CMroot=%#x/%#x\n",
Mode_compmgr.cow, Mode_compmgr.root);
}
}
@ -2397,7 +2397,7 @@ ECompMgrHandleWindowEvent(Win win __UNUSED__, XEvent * ev, void *prm)
static void
ECompMgrHandleRootEvent(Win win __UNUSED__, XEvent * ev, void *prm)
{
Window xwin;
EX_Window xwin;
EObj *eo;
D2printf("ECompMgrHandleRootEvent: type=%d\n", ev->type);
@ -2578,11 +2578,11 @@ CompMgrIpc(const char *params)
}
else if (!strncmp(cmd, "oi", 2))
{
Window win;
EX_Window win;
EObj *eo;
win = NoXID;
sscanf(prm, "%lx", &win);
sscanf(prm, "%x", &win);
eo = EobjListStackFind(win);
if (eo)
ECompMgrWinDumpInfo("EObj", eo, NoXID, 1);

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -42,7 +42,7 @@ int ECompMgrIsActive(void);
void ECompMgrDeskConfigure(Desk * dsk);
Pixmap ECompMgrGetRootBuffer(void);
EX_Pixmap ECompMgrGetRootBuffer(void);
void ECompMgrWinNew(EObj * eo);
void ECompMgrWinDel(EObj * eo);
@ -58,8 +58,8 @@ void ECompMgrWinChangeShape(EObj * eo);
void ECompMgrWinSetOpacity(EObj * eo, unsigned int opacity);
void ECompMgrWinChangeOpacity(EObj * eo, unsigned int opacity);
void ECompMgrWinChangeShadow(EObj * eo, int shadow);
Pixmap ECompMgrWinGetPixmap(const EObj * eo);
Picture ECompMgrWinGetAlphaPict(const EObj * eo);
EX_Pixmap ECompMgrWinGetPixmap(const EObj * eo);
EX_Picture ECompMgrWinGetAlphaPict(const EObj * eo);
void ECompMgrWinClipToGC(EObj * eo, GC gc);
void ECompMgrConfigGet(cfg_composite * cfg);

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2007-2013 Kim Woelders
* Copyright (C) 2007-2014 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
@ -299,7 +299,7 @@ EGlGetDepth(void)
}
void
EGlWindowConnect(Window xwin)
EGlWindowConnect(EX_Window xwin)
{
glXMakeContextCurrent(disp, xwin, xwin, egl.ctx);
@ -377,14 +377,14 @@ EGlTextureFromImage(EImage * im, int mode)
}
static GLXPixmap
GetGlPixmap(Window xwin, Drawable draw)
GetGlPixmap(EX_Window xwin, EX_Drawable draw)
{
static const int attrs[] = {
GLX_TEXTURE_TARGET_EXT, GLX_TEXTURE_2D_EXT,
GLX_TEXTURE_FORMAT_EXT, GLX_TEXTURE_FORMAT_RGB_EXT,
0
};
Pixmap pixmap;
EX_Pixmap pixmap;
GLXPixmap glxpixmap;
if (xwin == NoXID && draw == NoXID)
@ -392,14 +392,14 @@ GetGlPixmap(Window xwin, Drawable draw)
pixmap = (draw) ? draw : XCompositeNameWindowPixmap(disp, xwin);
glxpixmap = glXCreatePixmap(disp, egl.fbc, pixmap, attrs);
Dprintf("GetGlPixmap: Window=%#lx Drawable=%#lx glxpixmap=%#lx\n",
Dprintf("GetGlPixmap: Window=%#x Drawable=%#x glxpixmap=%#lx\n",
xwin, draw, glxpixmap);
return glxpixmap;
}
static void
_EGlTextureFromDrawable(ETexture * et, Drawable draw, int mode)
_EGlTextureFromDrawable(ETexture * et, EX_Drawable draw, int mode)
{
if (!et || draw == NoXID)
return;
@ -416,7 +416,7 @@ _EGlTextureFromDrawable(ETexture * et, Drawable draw, int mode)
}
ETexture *
EGlTextureFromDrawable(Drawable draw, int mode)
EGlTextureFromDrawable(EX_Drawable draw, int mode)
{
ETexture *et;
@ -506,7 +506,7 @@ EobjGetTexture(EObj * eo)
void
EobjTextureCreate(EObj * eo)
{
Pixmap pmap;
EX_Pixmap pmap;
pmap = EobjGetPixmap(eo);
if (pmap == NoXID)

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2007-2010 Kim Woelders
* Copyright (C) 2007-2014 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
@ -41,11 +41,11 @@ void EGlExit(void);
Visual *EGlGetVisual(void);
unsigned int EGlGetDepth(void);
void EGlWindowConnect(Window xwin);
void EGlWindowConnect(EX_Window xwin);
void EGlWindowDisconnect(void);
ETexture *EGlTextureFromImage(EImage * im, int mode);
ETexture *EGlTextureFromDrawable(Drawable draw, int mode);
ETexture *EGlTextureFromDrawable(EX_Drawable draw, int mode);
void EGlTextureDestroy(ETexture * et);
void EGlTextureInvalidate(ETexture * et);

View File

@ -373,11 +373,11 @@ EImageTile(EImage * im, EImage * tile, int flags, int tw, int th,
}
EImage *
EImageGrabDrawable(Drawable draw, Pixmap mask, int x, int y, int w, int h,
int grab)
EImageGrabDrawable(EX_Drawable draw, EX_Pixmap mask, int x, int y, int w,
int h, int grab)
{
EImage *im;
Colormap cm;
EX_Colormap cm;
cm = imlib_context_get_colormap();
imlib_context_set_colormap(NoXID); /* Fix for grabbing bitmaps */
@ -389,7 +389,7 @@ EImageGrabDrawable(Drawable draw, Pixmap mask, int x, int y, int w, int h,
}
EImage *
EImageGrabDrawableScaled(Win win, Drawable draw, Pixmap mask,
EImageGrabDrawableScaled(Win win, EX_Drawable draw, EX_Pixmap mask,
int x, int y, int w, int h,
int iw, int ih, int grab, int get_mask_from_shape)
{
@ -411,7 +411,7 @@ EImageGrabDrawableScaled(Win win, Drawable draw, Pixmap mask,
}
void
EImageRenderOnDrawable(EImage * im, Win win, Drawable draw, int flags,
EImageRenderOnDrawable(EImage * im, Win win, EX_Drawable draw, int flags,
int x, int y, int w, int h)
{
Visual *vis;
@ -434,10 +434,10 @@ EImageRenderOnDrawable(EImage * im, Win win, Drawable draw, int flags,
void
EImageRenderPixmaps(EImage * im, Win win, int flags,
Pixmap * pmap, Pixmap * mask, int w, int h)
EX_Pixmap * ppmap, EX_Pixmap * pmask, int w, int h)
{
Visual *vis;
Pixmap m;
Pixmap pmap, mask, *pm;
imlib_context_set_image(im);
imlib_context_set_drawable((win) ? WinGetXwin(win) : WinGetXwin(VROOT));
@ -445,27 +445,28 @@ EImageRenderPixmaps(EImage * im, Win win, int flags,
if (vis)
imlib_context_set_visual(vis);
*pmap = NoXID;
if (!mask) /* Imlib2 <= 1.3.0 needs a mask pointer */
mask = &m; /* ... to avoid bogus error messages */
if (mask)
*mask = NoXID;
pmap = mask = NoXID;
pm = pmask ? &mask : NULL;
if (flags)
_EImageFlagsSet(flags);
if (w <= 0 || h <= 0)
imlib_render_pixmaps_for_whole_image(pmap, mask);
imlib_render_pixmaps_for_whole_image(&pmap, pm);
else
imlib_render_pixmaps_for_whole_image_at_size(pmap, mask, w, h);
imlib_render_pixmaps_for_whole_image_at_size(&pmap, pm, w, h);
if (flags)
_EImageFlagsReset();
if (vis)
imlib_context_set_visual(WinGetVisual(VROOT));
*ppmap = pmap;
if (pmask)
*pmask = mask;
}
void
EImagePixmapsFree(Pixmap pmap, Pixmap mask __UNUSED__)
EImagePixmapsFree(EX_Pixmap pmap, EX_Pixmap mask __UNUSED__)
{
imlib_free_pixmap_and_mask(pmap);
}
@ -473,7 +474,7 @@ EImagePixmapsFree(Pixmap pmap, Pixmap mask __UNUSED__)
void
EImageApplyToWin(EImage * im, Win win, int flags, int w, int h)
{
Pixmap pmap, mask;
EX_Pixmap pmap, mask;
EImageRenderPixmaps(im, win, flags, &pmap, &mask, w, h);
ESetWindowBackgroundPixmap(win, pmap, 0);
@ -484,7 +485,7 @@ EImageApplyToWin(EImage * im, Win win, int flags, int w, int h)
}
void
ScaleRect(Win wsrc, Drawable src, Win wdst, Pixmap dst,
ScaleRect(Win wsrc, EX_Drawable src, Win wdst, EX_Pixmap dst,
int sx, int sy, int sw, int sh,
int dx, int dy, int dw, int dh, int flags)
{
@ -494,7 +495,7 @@ ScaleRect(Win wsrc, Drawable src, Win wdst, Pixmap dst,
XRenderPictFormat *pictfmt;
XRenderPictureAttributes pa;
XTransform tr;
Picture psrc, pdst;
EX_Picture psrc, pdst;
double scale_x, scale_y;
scale_x = (double)sw / (double)dw;
@ -544,7 +545,7 @@ ScaleRect(Win wsrc, Drawable src, Win wdst, Pixmap dst,
}
void
ScaleTile(Win wsrc, Drawable src, Win wdst, Pixmap dst,
ScaleTile(Win wsrc, EX_Drawable src, Win wdst, EX_Pixmap dst,
int dx, int dy, int dw, int dh, int scale)
{
Imlib_Image im, tim;
@ -581,7 +582,7 @@ ScaleTile(Win wsrc, Drawable src, Win wdst, Pixmap dst,
#if 0 /* Unused */
void
EDrawableDumpImage(Drawable draw, const char *txt)
EDrawableDumpImage(EX_Drawable draw, const char *txt)
{
static int seqn = 0;
char buf[1024];

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -75,22 +75,22 @@ void EImageTile(EImage * im, EImage * tile, int flags, int tw,
int th, int dx, int dy, int dw, int dh, int ox,
int oy);
EImage *EImageGrabDrawable(Drawable draw, Pixmap mask,
EImage *EImageGrabDrawable(EX_Drawable draw, EX_Pixmap mask,
int x, int y, int w, int h, int grab);
EImage *EImageGrabDrawableScaled(Win win,
Drawable draw, Pixmap mask,
int x, int y, int w, int h,
int iw, int ih, int grab,
int get_mask_from_shape);
EX_Drawable draw,
EX_Pixmap mask, int x, int y,
int w, int h, int iw, int ih,
int grab, int get_mask_from_shape);
void EImageRenderOnDrawable(EImage * im, Win win, Drawable draw,
int flags,
void EImageRenderOnDrawable(EImage * im, Win win,
EX_Drawable draw, int flags,
int x, int y, int w, int h);
void EImageRenderPixmaps(EImage * im, Win win, int flags,
Pixmap * pmap, Pixmap * mask,
int w, int h);
void EImagePixmapsFree(Pixmap pmap, Pixmap mask);
EX_Pixmap * pmap,
EX_Pixmap * mask, int w, int h);
void EImagePixmapsFree(EX_Pixmap pmap, EX_Pixmap mask);
void EImageApplyToWin(EImage * im, Win win, int flags,
int w, int h);
@ -102,13 +102,14 @@ void EImageColorModifierSetTables(EImageColorModifier * icm,
unsigned char *b,
unsigned char *a);
void ScaleRect(Win wsrc, Drawable src, Win wdst, Pixmap dst,
int sx, int sy, int sw, int sh,
int dx, int dy, int dw, int dh, int flags);
void ScaleTile(Win wsrc, Drawable src, Win wdst, Pixmap dst,
void ScaleRect(Win wsrc, EX_Drawable src, Win wdst,
EX_Pixmap dst, int sx, int sy, int sw, int sh,
int dx, int dy, int dw, int dh, int flags);
void ScaleTile(Win wsrc, EX_Drawable src, Win wdst,
EX_Pixmap dst, int dx, int dy, int dw, int dh,
int flags);
void EDrawableDumpImage(Drawable draw, const char *txt);
void EDrawableDumpImage(EX_Drawable draw, const char *txt);
EImage *ThemeImageLoad(const char *file);

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -235,14 +235,14 @@ EobjInit(EObj * eo, int type, Win win, int x, int y, int w, int h,
EobjListStackAdd(eo, 1);
if (EDebug(EDBUG_TYPE_EWINS))
Eprintf("%s: %#lx %s\n", __func__, EobjGetXwin(eo), EobjGetName(eo));
Eprintf("%s: %#x %s\n", __func__, EobjGetXwin(eo), EobjGetName(eo));
}
void
EobjFini(EObj * eo)
{
if (EDebug(EDBUG_TYPE_EWINS))
Eprintf("%s: %#lx %s\n", __func__, EobjGetXwin(eo), EobjGetName(eo));
Eprintf("%s: %#x %s\n", __func__, EobjGetXwin(eo), EobjGetName(eo));
EobjListStackDel(eo);
@ -269,7 +269,7 @@ void
EobjDestroy(EObj * eo)
{
if (EDebug(EDBUG_TYPE_EWINS))
Eprintf("%s: %#lx %s\n", __func__, EobjGetXwin(eo), EobjGetName(eo));
Eprintf("%s: %#x %s\n", __func__, EobjGetXwin(eo), EobjGetName(eo));
EobjFini(eo);
@ -306,7 +306,7 @@ EobjWindowDestroy(EObj * eo)
}
EObj *
EobjRegisterOR(Window xwin __UNUSED__, XWindowAttributes * pxwa __UNUSED__,
EobjRegisterOR(EX_Window xwin __UNUSED__, XWindowAttributes * pxwa __UNUSED__,
int mapped __UNUSED__)
{
EObj *eo = NULL;
@ -371,7 +371,7 @@ EobjRegisterOR(Window xwin __UNUSED__, XWindowAttributes * pxwa __UNUSED__,
}
#if 0
Eprintf("%s: %#lx depth=%d argb=%d %s\n", __func__,
Eprintf("%s: %#x depth=%d argb=%d %s\n", __func__,
EobjGetXwin(eo), win->depth, win->argb, EobjGetName(eo));
#endif
@ -384,7 +384,7 @@ void
EobjUnregister(EObj * eo)
{
#if 0
Eprintf("%s: %#lx type=%d: %s\n", __func__, EobjGetXwin(eo), eo->type,
Eprintf("%s: %#x type=%d: %s\n", __func__, EobjGetXwin(eo), eo->type,
EobjGetName(eo));
#endif
EobjDestroy(eo);
@ -576,13 +576,13 @@ EobjShapeUpdate(EObj * eo, int propagate)
}
#if USE_COMPOSITE
Pixmap
EX_Pixmap
EobjGetPixmap(const EObj * eo)
{
return ECompMgrWinGetPixmap(eo);
}
#else
Pixmap
EX_Pixmap
EobjGetPixmap(const EObj * eo __UNUSED__)
{
return NoXID;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -155,7 +155,7 @@ EObj *EobjWindowCreate(int type, int x, int y, int w, int h,
int su, const char *name);
void EobjWindowDestroy(EObj * eo);
EObj *EobjRegisterOR(Window xwin, XWindowAttributes * pxwa,
EObj *EobjRegisterOR(EX_Window xwin, XWindowAttributes * pxwa,
int mapped);
void EobjUnregister(EObj * eo);
@ -170,7 +170,7 @@ int EobjRaise(EObj * eo);
int EobjLower(EObj * eo);
void EobjShapeUpdate(EObj * eo, int propagate);
void EobjsRepaint(void);
Pixmap EobjGetPixmap(const EObj * eo);
EX_Pixmap EobjGetPixmap(const EObj * eo);
#if USE_GLX
void EobjTextureCreate(EObj * eo);
@ -193,7 +193,7 @@ void EobjListStackDel(EObj * eo);
int EobjListStackRaise(EObj * eo, int test);
int EobjListStackLower(EObj * eo, int test);
int EobjListStackCheck(EObj * eo);
EObj *EobjListStackFind(Window win);
EObj *EobjListStackFind(EX_Window win);
EObj *const *EobjListStackGet(int *num);
EObj *const *EobjListStackGetForDesk(int *num, Desk * dsk);
void EobjListFocusAdd(EObj * eo, int ontop);

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -179,7 +179,7 @@ doEwinMoveResize(EWin * ewin, Desk * dsk, int x, int y, int w, int h, int flags)
call_depth++;
if (EDebug(EDBUG_TYPE_MOVERESIZE))
Eprintf("doEwinMoveResize(%d,%d) %#lx f=%x d=%d %d+%d %d*%d %s\n",
Eprintf("doEwinMoveResize(%d,%d) %#x f=%x d=%d %d+%d %d*%d %s\n",
call_depth, Mode.mode, EwinGetClientXwin(ewin), flags,
(dsk) ? (int)dsk->num : -1, x, y, w, h, EwinGetTitle(ewin));

View File

@ -66,7 +66,7 @@ static void EwinHandleEventsClient(Win win, XEvent * ev, void *prm);
static void EwinUnmap1(EWin * ewin);
static void EwinUnmap2(EWin * ewin);
Window
EX_Window
EwinGetClientXwin(const EWin * ewin)
{
Win win = EwinGetClientWin(ewin);
@ -120,7 +120,8 @@ EwinCreate(int type)
}
static int
EwinGetAttributes(EWin * ewin, Win win, Window xwin, XWindowAttributes * pxwa)
EwinGetAttributes(EWin * ewin, Win win, EX_Window xwin,
XWindowAttributes * pxwa)
{
XWindowAttributes xwa;
@ -141,7 +142,7 @@ EwinGetAttributes(EWin * ewin, Win win, Window xwin, XWindowAttributes * pxwa)
ewin->client.bw = xwa.border_width;
if (EDebug(EDBUG_TYPE_SNAPS))
Eprintf("Snap get attr %#lx: %4d+%4d %4dx%4d: %s\n",
Eprintf("Snap get attr %#x: %4d+%4d %4dx%4d: %s\n",
EwinGetClientXwin(ewin), ewin->client.x, ewin->client.y,
ewin->client.w, ewin->client.h, EwinGetTitle(ewin));
@ -152,7 +153,7 @@ static void
EwinGetHints(EWin * ewin)
{
if (EDebug(EDBUG_TYPE_EWINS))
Eprintf("%s %#lx\n", __func__, EwinGetClientXwin(ewin));
Eprintf("%s %#x\n", __func__, EwinGetClientXwin(ewin));
ICCCM_GetTitle(ewin);
ICCCM_GetHints(ewin);
@ -275,7 +276,7 @@ EwinManage(EWin * ewin)
ESelectInput(EwinGetClientWin(ewin), ewin->client.event_mask);
if (EDebug(EDBUG_TYPE_EWINS))
Eprintf("%s %#lx frame=%#lx cont=%#lx st=%d\n", __func__,
Eprintf("%s %#x frame=%#x cont=%#x st=%d\n", __func__,
EwinGetClientXwin(ewin), EoGetXwin(ewin),
EwinGetContainerXwin(ewin), ewin->state.state);
@ -366,7 +367,7 @@ EwinConfigure(EWin * ewin)
HintsSetClientList();
if (EDebug(EDBUG_TYPE_EWINS))
Eprintf("%s %#lx st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
Eprintf("%s %#x st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
ewin->state.state, EwinGetTitle(ewin));
}
@ -394,7 +395,7 @@ EwinDestroy(EWin * ewin)
}
if (EDebug(EDBUG_TYPE_EWINS))
Eprintf("%s %#lx st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
Eprintf("%s %#x st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
ewin->state.state, EwinGetTitle(ewin));
EventCallbackUnregister(EoGetWin(ewin), EwinHandleEventsToplevel, ewin);
@ -540,7 +541,7 @@ GetContextEwin(void)
done:
#if 0
Eprintf("%s %#lx %s\n", __func__, EwinGetClientXwin(ewin),
Eprintf("%s %#x %s\n", __func__, EwinGetClientXwin(ewin),
EwinGetTitle(ewin));
#endif
return ewin;
@ -552,7 +553,7 @@ SetContextEwin(EWin * ewin)
if (ewin && ewin->type == EWIN_TYPE_MENU)
return;
#if 0
Eprintf("%s %#lx %s\n", __func__, EwinGetClientXwin(ewin),
Eprintf("%s %#x %s\n", __func__, EwinGetClientXwin(ewin),
EwinGetTitle(ewin));
#endif
Mode.context_ewin = ewin;
@ -670,7 +671,7 @@ EwinUpdateShapeInfo(EWin * ewin)
#endif
if (EDebug(EX_EVENT_SHAPE_NOTIFY))
Eprintf("%s %#lx cont=%#lx shaped=%d\n", __func__,
Eprintf("%s %#x cont=%#x shaped=%d\n", __func__,
EwinGetClientXwin(ewin), EwinGetContainerXwin(ewin),
ewin->state.shaped);
}
@ -688,7 +689,7 @@ EwinPropagateShapes(EWin * ewin)
return;
if (EDebug(EX_EVENT_SHAPE_NOTIFY))
Eprintf("%s %#lx frame=%#lx shaped=%d\n", __func__,
Eprintf("%s %#x frame=%#x shaped=%d\n", __func__,
EwinGetClientXwin(ewin), EoGetXwin(ewin), ewin->state.shaped);
EoShapeUpdate(ewin, 1);
@ -733,7 +734,7 @@ EwinStateUpdate(EWin * ewin)
}
static void
AddToFamily(EWin * ewin, Window xwin, XWindowAttributes * pxwa, int startup)
AddToFamily(EWin * ewin, EX_Window xwin, XWindowAttributes * pxwa, int startup)
{
XWindowAttributes attr;
EWin *ewin2;
@ -766,7 +767,7 @@ AddToFamily(EWin * ewin, Window xwin, XWindowAttributes * pxwa, int startup)
if (EwinGetAttributes(ewin, NULL, xwin, pxwa))
{
if (EDebug(EDBUG_TYPE_EWINS))
Eprintf("Window is gone %#lx\n", xwin);
Eprintf("Window is gone %#x\n", xwin);
/* We got here by MapRequest. DestroyNotify should follow. */
goto done;
}
@ -1119,7 +1120,7 @@ EwinWithdraw(EWin * ewin, Win to)
/* Only external clients should go here */
if (EDebug(EDBUG_TYPE_EWINS))
Eprintf("%s %#lx st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
Eprintf("%s %#x st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
ewin->state.state, EwinGetTitle(ewin));
EGrabServer();
@ -1147,7 +1148,7 @@ EwinWithdraw(EWin * ewin, Win to)
static void
EwinEventMapRequest(EWin * ewin, XEvent * ev)
{
Window xwin;
EX_Window xwin;
xwin = ev->xmaprequest.window;
@ -1160,7 +1161,7 @@ EwinEventMapRequest(EWin * ewin, XEvent * ev)
else
{
if (EDebug(EDBUG_TYPE_EWINS))
Eprintf("%s: Already managing %s %#lx\n", __func__, "A",
Eprintf("%s: Already managing %s %#x\n", __func__, "A",
EwinGetClientXwin(ewin));
EReparentWindow(EwinGetClientWin(ewin), EwinGetContainerWin(ewin),
0, 0);
@ -1175,7 +1176,7 @@ EwinEventMapRequest(EWin * ewin, XEvent * ev)
if (ewin)
{
if (EDebug(EDBUG_TYPE_EWINS))
Eprintf("%s: Already managing %s %#lx\n", __func__, "B",
Eprintf("%s: Already managing %s %#x\n", __func__, "B",
EwinGetClientXwin(ewin));
EReparentWindow(EwinGetClientWin(ewin), EwinGetContainerWin(ewin),
0, 0);
@ -1190,7 +1191,7 @@ static void
EwinEventDestroy(EWin * ewin)
{
if (EDebug(EDBUG_TYPE_EWINS))
Eprintf("%s %#lx st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
Eprintf("%s %#x st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
ewin->state.state, EwinGetTitle(ewin));
EwinDestroy(ewin);
@ -1199,14 +1200,14 @@ EwinEventDestroy(EWin * ewin)
static void
EwinEventReparent(EWin * ewin, XEvent * ev)
{
Window parent;
EX_Window parent;
EGrabServer();
parent = EoIsGone(ewin) ? NoXID : ev->xreparent.parent;
if (EDebug(EDBUG_TYPE_EWINS))
Eprintf("%s %#lx st=%d parent=%#lx: %s\n", __func__,
Eprintf("%s %#x st=%d parent=%#x: %s\n", __func__,
EwinGetClientXwin(ewin), ewin->state.state, parent,
EwinGetTitle(ewin));
@ -1229,7 +1230,7 @@ EwinEventMap(EWin * ewin, XEvent * ev)
ewin->state.state = EWIN_STATE_MAPPED;
if (EDebug(EDBUG_TYPE_EWINS))
Eprintf("%s %#lx st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
Eprintf("%s %#x st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
ewin->state.state, EwinGetTitle(ewin));
/* If first time we may want to focus it (unless during startup) */
@ -1245,7 +1246,7 @@ static void
EwinEventUnmap(EWin * ewin, XEvent * ev)
{
if (EDebug(EDBUG_TYPE_EWINS))
Eprintf("%s %#lx st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
Eprintf("%s %#x st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
ewin->state.state, EwinGetTitle(ewin));
if (ewin->state.state == EWIN_STATE_STARTUP ||
@ -1254,7 +1255,7 @@ EwinEventUnmap(EWin * ewin, XEvent * ev)
#if 0
/* We get here after reparenting to container and occasionally in
* other(?) situations */
Eprintf("%s %#lx: Ignoring bogus Unmap event\n", __func__,
Eprintf("%s %#x: Ignoring bogus Unmap event\n", __func__,
EwinGetClientXwin(ewin));
#endif
return;
@ -1298,7 +1299,7 @@ EwinEventUnmap(EWin * ewin, XEvent * ev)
static void
EwinEventConfigureRequest(EWin * ewin, XEvent * ev)
{
Window winrel;
EX_Window winrel;
EWin *ewin2;
int x = 0, y = 0, w = 0, h = 0;
XWindowChanges xwc;
@ -1438,7 +1439,7 @@ EwinEventShapeChange(EWin * ewin, XEvent * ev)
XShapeEvent *se = (XShapeEvent *) ev;
if (EDebug(EX_EVENT_SHAPE_NOTIFY))
Eprintf("%s %#lx %s: state.shaped=%d ev->shaped=%d\n", __func__,
Eprintf("%s %#x %s: state.shaped=%d ev->shaped=%d\n", __func__,
EwinGetClientXwin(ewin), EoGetName(ewin), ewin->state.shaped,
se->shaped);
if (!se->shaped && !ewin->state.shaped)
@ -1474,7 +1475,7 @@ EwinRaise(EWin * ewin)
num = EoRaise(ewin);
if (EDebug(EDBUG_TYPE_RAISELOWER))
Eprintf("%s(%d) %#lx %s n=%d\n", __func__, call_depth,
Eprintf("%s(%d) %#x %s n=%d\n", __func__, call_depth,
EwinGetClientXwin(ewin), EwinGetTitle(ewin), num);
if (num == 0) /* Quit if stacking is unchanged */
@ -1511,7 +1512,7 @@ EwinLower(EWin * ewin)
num = EoLower(ewin);
if (EDebug(EDBUG_TYPE_RAISELOWER))
Eprintf("%s(%d) %#lx %s n=%d\n", __func__, call_depth,
Eprintf("%s(%d) %#x %s n=%d\n", __func__, call_depth,
EwinGetClientXwin(ewin), EwinGetTitle(ewin), num);
if (num == 0) /* Quit if stacking is unchanged */
@ -2241,7 +2242,8 @@ EwinsMoveStickyToDesk(Desk * dsk)
void
EwinsManage(void)
{
Window *xwins, xwin, par, rt;
Window *xwins, par, rt;
EX_Window xwin;
XWindowAttributes attr;
unsigned int i, num;
@ -2359,7 +2361,7 @@ _EwinEventEwinCheck(const char *txt, XEvent * ev, EWin * ewin)
}
static EWin *
_EwinEventEwinFind(XEvent * ev, Window xwin)
_EwinEventEwinFind(XEvent * ev, EX_Window xwin)
{
EWin *ewin;
@ -2373,7 +2375,7 @@ _EwinEventEwinFind(XEvent * ev, Window xwin)
static int
EwinHandleContainerEvents(EWin * ewin, XEvent * ev)
{
Window xwin = EwinGetClientXwin(ewin);
EX_Window xwin = EwinGetClientXwin(ewin);
switch (ev->type)
{
@ -2502,7 +2504,7 @@ EwinHandleEventsContainer(Win win __UNUSED__, XEvent * ev, void *prm)
if (EwinHandleContainerEvents(ewin, ev))
break;
#if DEBUG_EWIN_EVENTS
Eprintf("%s: type=%2d win=%#lx: %s\n", __func__,
Eprintf("%s: type=%2d win=%#x: %s\n", __func__,
ev->type, EwinGetClientXwin(ewin), EwinGetTitle(ewin));
#endif
break;
@ -2559,7 +2561,7 @@ EwinHandleEventsClient(Win win __UNUSED__, XEvent * ev, void *prm)
default:
#if DEBUG_EWIN_EVENTS
Eprintf("%s: type=%2d win=%#lx: %s\n", __func__,
Eprintf("%s: type=%2d win=%#x: %s\n", __func__,
ev->type, EwinGetClientXwin(ewin), EwinGetTitle(ewin));
#endif
break;
@ -2578,7 +2580,7 @@ EwinHandleEventsRoot(Win win __UNUSED__, XEvent * ev, void *prm __UNUSED__)
break;
case ConfigureRequest:
#if 0
Eprintf("%s ConfigureRequest %#lx\n", __func__,
Eprintf("%s ConfigureRequest %#x\n", __func__,
ev->xconfigurerequest.window);
#endif
ewin = EwinFindByClient(ev->xconfigurerequest.window);
@ -2586,14 +2588,14 @@ EwinHandleEventsRoot(Win win __UNUSED__, XEvent * ev, void *prm __UNUSED__)
break;
case ResizeRequest:
#if 0
Eprintf("%s ResizeRequest %#lx\n", __func__, ev->xresizerequest.window);
Eprintf("%s ResizeRequest %#x\n", __func__, ev->xresizerequest.window);
#endif
ewin = EwinFindByClient(ev->xresizerequest.window);
EwinEventResizeRequest(ewin, ev);
break;
case CirculateRequest:
#if 0
Eprintf("%s CirculateRequest %#lx\n", __func__,
Eprintf("%s CirculateRequest %#x\n", __func__,
ev->xcirculaterequest.window);
#endif
EwinEventCirculateRequest(NULL, ev);
@ -2634,7 +2636,7 @@ EwinHandleEventsRoot(Win win __UNUSED__, XEvent * ev, void *prm __UNUSED__)
default:
#if 0
Eprintf("%s: type=%2d win=%#lx\n", __func__, ev->type, ev->xany.window);
Eprintf("%s: type=%2d win=%#x\n", __func__, ev->type, ev->xany.window);
#endif
break;
}

View File

@ -169,19 +169,19 @@ struct _ewin {
/* WM_HINTS */
char need_input;
char start_iconified;
Pixmap icon_pmap, icon_mask;
Window icon_win;
Window group;
EX_Pixmap icon_pmap, icon_mask;
EX_Window icon_win;
EX_Window group;
char urgency;
/* WM_PROTOCOLS */
char take_focus;
char delete_window;
/* WM_TRANSIENT_FOR */
signed char transient;
Window transient_for; /* We are a transient for ... */
EX_Window transient_for; /* We are a transient for ... */
int transient_count; /* We have <N> transients */
/* WM_CLIENT_LEADER */
Window client_leader;
EX_Window client_leader;
/* WM_NORMAL_HINTS */
int width_min, width_max;
@ -354,7 +354,7 @@ int DrawEwinShapeNeedsGrab(int mode);
#define EWIN_CHANGE_OPACITY (1<<5)
#define EWIN_CHANGE_ATTENTION (1<<6)
Window EwinGetClientXwin(const EWin * ewin);
EX_Window EwinGetClientXwin(const EWin * ewin);
void EwinShapeSet(EWin * ewin);
int EwinRaise(EWin * ewin);
@ -458,7 +458,7 @@ void EwinOpFullscreen(EWin * ewin, int source, int on);
/* finders.c */
EWin *EwinFindByPtr(const EWin * ewin);
EWin *EwinFindByClient(Window win);
EWin *EwinFindByClient(EX_Window win);
EWin **EwinsFindByExpr(const char *match, int *pnum, int *pflags);
EWin *EwinFindByExpr(const char *match);

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2003-2013 Kim Woelders
* Copyright (C) 2003-2014 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
@ -93,7 +93,7 @@ atom_list_set(EX_Atom * atoms, int size, int *count, EX_Atom atom, int set)
* Initialize EWMH stuff
*/
void
EWMH_Init(Window win_wm_check)
EWMH_Init(EX_Window win_wm_check)
{
EX_Atom atom_list[64];
int atom_count;
@ -341,9 +341,9 @@ EWMH_SetClientStacking(void)
}
void
EWMH_SetActiveWindow(Window win)
EWMH_SetActiveWindow(EX_Window win)
{
static Window win_last_set = NoXID;
static EX_Window win_last_set = NoXID;
if (win == win_last_set)
return;
@ -357,7 +357,7 @@ EWMH_SetActiveWindow(Window win)
*/
void
EWMH_SetWindowName(Window win, const char *name)
EWMH_SetWindowName(EX_Window win, const char *name)
{
const char *str;
@ -817,7 +817,7 @@ EWMH_DelWindowHints(const EWin * ewin)
* Process property change
*/
int
EWMH_ProcessPropertyChange(EWin * ewin, Atom atom_change)
EWMH_ProcessPropertyChange(EWin * ewin, EX_Atom atom_change)
{
if (atom_change == EX_ATOM_NET_WM_NAME)
{
@ -874,7 +874,7 @@ EWMH_ProcessClientClientMessage(EWin * ewin, XClientMessageEvent * ev)
{
int source;
/* Time ts; */
/* EX_Time ts; */
if (ev->message_type == EX_ATOM_NET_ACTIVE_WINDOW)
{
@ -915,7 +915,7 @@ EWMH_ProcessClientClientMessage(EWin * ewin, XClientMessageEvent * ev)
* in one message.
*/
unsigned int action;
Atom atom, atom2;
EX_Atom atom, atom2;
action = ev->data.l[0];
atom = ev->data.l[1];

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -34,20 +34,20 @@
#endif
typedef struct {
Cursor curs;
EX_Cursor curs;
XSetWindowAttributes attr;
Window cwin;
EX_Window cwin;
} EiwData;
typedef void (EiwLoopFunc) (Window win, EImage * im, EiwData * d);
typedef void (EiwLoopFunc) (EX_Window win, EImage * im, EiwData * d);
#if USE_EIWC_RENDER
#include <Imlib2.h>
static void _eiw_render_loop(Window win, EImage * im, EiwData * d);
static void _eiw_render_loop(EX_Window win, EImage * im, EiwData * d);
static EiwLoopFunc *
_eiw_render_init(Window win __UNUSED__, EiwData * d)
_eiw_render_init(EX_Window win __UNUSED__, EiwData * d)
{
Visual *vis;
@ -64,12 +64,12 @@ _eiw_render_init(Window win __UNUSED__, EiwData * d)
}
static void
_eiw_render_loop(Window win, EImage * im, EiwData * d)
_eiw_render_loop(EX_Window win, EImage * im, EiwData * d)
{
int w, h;
XRenderPictFormat *pictfmt;
Pixmap pmap;
Picture pict;
EX_Pixmap pmap;
EX_Picture pict;
EImageGetSize(im, &w, &h);
@ -93,12 +93,12 @@ _eiw_render_loop(Window win, EImage * im, EiwData * d)
#if USE_EIWC_WINDOW
static void _eiw_window_loop(Window win, EImage * im, EiwData * d);
static void _eiw_window_loop(EX_Window win, EImage * im, EiwData * d);
static EiwLoopFunc *
_eiw_window_init(Window win, EiwData * d)
_eiw_window_init(EX_Window win, EiwData * d)
{
Pixmap pmap, mask;
EX_Pixmap pmap, mask;
XColor cl;
d->cwin = XCreateWindow(disp, win, 0, 0, 32, 32, 0, CopyFromParent,
@ -120,9 +120,9 @@ _eiw_window_init(Window win, EiwData * d)
}
static void
_eiw_window_loop(Window win, EImage * im, EiwData * d)
_eiw_window_loop(EX_Window win, EImage * im, EiwData * d)
{
Pixmap pmap, mask;
EX_Pixmap pmap, mask;
Window ww;
int dd, x, y, w, h;
unsigned int mm;
@ -140,14 +140,14 @@ _eiw_window_loop(Window win, EImage * im, EiwData * d)
#endif /* USE_EIWC_WINDOW */
static Window
static EX_Window
ExtInitWinMain(void)
{
int i, loop, err;
EX_Window win;
XGCValues gcv;
GC gc;
Pixmap pmap;
EX_Pixmap pmap;
EX_Atom a;
EiwData eiwd;
EiwLoopFunc *eiwc_loop_func;
@ -248,11 +248,11 @@ ExtInitWinMain(void)
exit(0);
}
Window
EX_Window
ExtInitWinCreate(void)
{
EX_Window win_ex; /* Hmmm.. */
Window win;
EX_Window win;
EX_Atom a;
if (EDebug(EDBUG_TYPE_SESSION))
@ -281,7 +281,7 @@ ExtInitWinCreate(void)
win = win_ex;
if (EDebug(EDBUG_TYPE_SESSION))
Eprintf("ExtInitWinCreate - parent - %#lx\n", win);
Eprintf("ExtInitWinCreate - parent - %#x\n", win);
return win;
}
@ -304,15 +304,15 @@ ExtInitWinCreate(void)
return NoXID;
}
static Window init_win_ext = NoXID;
static EX_Window init_win_ext = NoXID;
void
ExtInitWinSet(Window win)
ExtInitWinSet(EX_Window win)
{
init_win_ext = win;
}
Window
EX_Window
ExtInitWinGet(void)
{
return init_win_ext;
@ -325,7 +325,7 @@ ExtInitWinKill(void)
return;
if (EDebug(EDBUG_TYPE_SESSION))
Eprintf("Kill init window %#lx\n", init_win_ext);
Eprintf("Kill init window %#x\n", init_win_ext);
XUnmapWindow(disp, init_win_ext);
init_win_ext = NoXID;
}

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2008-2010 Kim Woelders
* Copyright (C) 2008-2014 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
@ -45,7 +45,7 @@ EwinFindByPtr(const EWin * ewin)
}
EWin *
EwinFindByClient(Window win)
EwinFindByClient(EX_Window win)
{
EWin *const *ewins;
int i, num;
@ -60,7 +60,7 @@ EwinFindByClient(Window win)
}
static EWin *
EwinFindByChildren(Window win)
EwinFindByChildren(EX_Window win)
{
EWin *const *ewins;
int i, j, num;

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -74,7 +74,7 @@ FocusEwinValid(EWin * ewin, int want_on_screen, int click, int want_visible)
return 0;
#if 0
Eprintf("FocusEwinValid %#lx %s: st=%d sh=%d inh=%d cl=%d(%d) vis=%d(%d)\n",
Eprintf("FocusEwinValid %#x %s: st=%d sh=%d inh=%d cl=%d(%d) vis=%d(%d)\n",
EwinGetClientXwin(ewin), EwinGetTitle(ewin),
ewin->state.state, EoIsShown(ewin), ewin->state.inhibit_focus,
click, ewin->props.focusclick, want_visible, ewin->state.visibility);
@ -224,7 +224,7 @@ ClickGrabsSet(EWin * ewin)
GrabButtonSet(AnyButton, AnyModifier, EwinGetClientConWin(ewin),
ButtonPressMask, ECSR_PGRAB, 1);
if (EDebug(EDBUG_TYPE_GRABS))
Eprintf("ClickGrabsSet: %#lx set %s\n",
Eprintf("ClickGrabsSet: %#x set %s\n",
EwinGetClientXwin(ewin), EwinGetTitle(ewin));
ewin->state.click_grab_isset = 1;
}
@ -236,7 +236,7 @@ ClickGrabsSet(EWin * ewin)
GrabButtonRelease(AnyButton, AnyModifier,
EwinGetClientConWin(ewin));
if (EDebug(EDBUG_TYPE_GRABS))
Eprintf("ClickGrabsSet: %#lx unset %s\n",
Eprintf("ClickGrabsSet: %#x unset %s\n",
EwinGetClientXwin(ewin), EwinGetTitle(ewin));
ewin->state.click_grab_isset = 0;
}
@ -291,7 +291,7 @@ doFocusToEwin(EWin * ewin, int why)
return;
if (EDebug(EDBUG_TYPE_FOCUS))
Eprintf("doFocusToEWin %#lx %s why=%d\n",
Eprintf("doFocusToEWin %#x %s why=%d\n",
(ewin) ? EwinGetClientXwin(ewin) : 0,
(ewin) ? EwinGetTitle(ewin) : "None", why);
@ -466,7 +466,7 @@ void
FocusToEWin(EWin * ewin, int why)
{
if (EDebug(EDBUG_TYPE_FOCUS))
Eprintf("FocusToEWin(%d) %#lx %s why=%d\n", focus_inhibit,
Eprintf("FocusToEWin(%d) %#x %s why=%d\n", focus_inhibit,
(ewin) ? EwinGetClientXwin(ewin) : 0,
(ewin) ? EwinGetTitle(ewin) : "None", why);
@ -539,7 +539,7 @@ FocusNewDesk(void)
}
static void
_FocusScreenSendEvent(Window xwin, int x, int y, Time t, int enter)
_FocusScreenSendEvent(EX_Window xwin, int x, int y, EX_Time t, int enter)
{
XEvent xe;
@ -562,8 +562,8 @@ _FocusScreenSendEvent(Window xwin, int x, int y, Time t, int enter)
void
FocusScreen(int scr)
{
Window xwin;
Time t;
EX_Window xwin;
EX_Time t;
int x, y;
if (scr < 0 || scr >= ScreenCount(disp))
@ -701,7 +701,7 @@ FocusHandleClick(EWin * ewin, Win win)
/* Allow click to pass thorugh */
if (EDebug(EDBUG_TYPE_GRABS))
Eprintf("FocusHandleClick %#lx %#lx\n", WinGetXwin(win),
Eprintf("FocusHandleClick %#x %#x\n", WinGetXwin(win),
EwinGetContainerXwin(ewin));
if (win == EwinGetClientConWin(ewin))
{
@ -1067,7 +1067,7 @@ FocusIpc(const char *params)
ewin = GetFocusEwin();
if (ewin)
IpcPrintf("Focused: %#lx\n", EwinGetClientXwin(ewin));
IpcPrintf("Focused: %#x\n", EwinGetClientXwin(ewin));
else
IpcPrintf("Focused: none\n");
}

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -62,7 +62,7 @@ typedef struct {
typedef struct {
Win win;
Pixmap above;
EX_Pixmap above;
int count;
float incv, inch;
GC gc1;
@ -172,7 +172,7 @@ FX_Ripple_Ops(int op)
typedef struct {
Win win;
Pixmap above;
EX_Pixmap above;
int count;
float incv, inch, incx;
GC gc1;

View File

@ -474,7 +474,7 @@ GlwinRun(EObj * eobj __UNUSED__, int remaining __UNUSED__,
}
static int
GlwinKeyPress(GLWindow * gw, KeySym keysym)
GlwinKeyPress(GLWindow * gw, EX_KeySym keysym)
{
switch (keysym)
{
@ -576,7 +576,7 @@ static void
GlwinEvent(Win win __UNUSED__, XEvent * ev, void *prm)
{
GLWindow *gw = (GLWindow *) prm;
KeySym keysym;
EX_KeySym keysym;
int done = 0;
switch (ev->type)

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -287,13 +287,13 @@
#if 0 /* Does nothing useful */
static void
GNOME_GetHintIcons(EWin * ewin, Atom atom_change)
GNOME_GetHintIcons(EWin * ewin, EX_Atom atom_change)
{
static EX_Atom atom_get = 0;
int num, i;
EX_ID *plst;
Pixmap pmap;
Pixmap mask;
EX_Pixmap pmap;
EX_Pixmap mask;
if (EwinIsInternal(ewin))
return;
@ -318,7 +318,7 @@ GNOME_GetHintIcons(EWin * ewin, Atom atom_change)
#endif
static void
GNOME_GetHintLayer(EWin * ewin, Atom atom_change)
GNOME_GetHintLayer(EWin * ewin, EX_Atom atom_change)
{
static EX_Atom atom_get = 0;
int num;
@ -342,7 +342,7 @@ GNOME_GetHintLayer(EWin * ewin, Atom atom_change)
}
static void
GNOME_GetHintState(EWin * ewin, Atom atom_change)
GNOME_GetHintState(EWin * ewin, EX_Atom atom_change)
{
static EX_Atom atom_get = 0;
int num;
@ -373,7 +373,7 @@ GNOME_GetHintState(EWin * ewin, Atom atom_change)
#if 0 /* Does nothing */
static void
GNOME_GetHintAppState(EWin * ewin, Atom atom_change)
GNOME_GetHintAppState(EWin * ewin, EX_Atom atom_change)
{
static EX_Atom atom_get = 0;
int num;
@ -397,7 +397,7 @@ GNOME_GetHintAppState(EWin * ewin, Atom atom_change)
#endif
static void
GNOME_GetHintDesktop(EWin * ewin, Atom atom_change)
GNOME_GetHintDesktop(EWin * ewin, EX_Atom atom_change)
{
static EX_Atom atom_get = 0;
int num;
@ -420,7 +420,7 @@ GNOME_GetHintDesktop(EWin * ewin, Atom atom_change)
}
static void
GNOME_GetHint(EWin * ewin, Atom atom_change)
GNOME_GetHint(EWin * ewin, EX_Atom atom_change)
{
static EX_Atom atom_get = 0;
int num;
@ -502,7 +502,7 @@ GNOME_SetEwinDesk(const EWin * ewin)
#if 0 /* Does nothing */
static void
GNOME_GetExpandedSize(EWin * ewin, Atom atom_change)
GNOME_GetExpandedSize(EWin * ewin, EX_Atom atom_change)
{
static EX_Atom atom_get = 0;
int num;
@ -578,7 +578,7 @@ GNOME_SetCurrentDesk(void)
}
static void
GNOME_SetWMCheck(Window win_wm_check)
GNOME_SetWMCheck(EX_Window win_wm_check)
{
static EX_Atom atom_set = 0;
unsigned int val;
@ -692,7 +692,7 @@ void
GNOME_DelHints(const EWin * ewin)
{
static EX_Atom atom_get[6] = { 0, 0, 0, 0, 0, 0 };
Window win;
EX_Window win;
if (!atom_get[0])
{
@ -714,7 +714,7 @@ GNOME_DelHints(const EWin * ewin)
}
void
GNOME_GetHints(EWin * ewin, Atom atom_change)
GNOME_GetHints(EWin * ewin, EX_Atom atom_change)
{
GNOME_GetHintDesktop(ewin, atom_change);
GNOME_GetHintLayer(ewin, atom_change);
@ -728,7 +728,7 @@ GNOME_GetHints(EWin * ewin, Atom atom_change)
}
void
GNOME_SetHints(Window win_wm_check)
GNOME_SetHints(EX_Window win_wm_check)
{
GNOME_SetWMNameVer();
GNOME_SetUsedHints();

View File

@ -98,7 +98,7 @@ GrabPointerSet(Win win, unsigned int csr, int confine __UNUSED__)
rc = XIGrabDevice(disp, DEV_PTR, WinGetXwin(win), CurrentTime, ECsrGet(csr),
GrabModeAsync, GrabModeAsync, False, &em.em);
#else
Window confine_to = (confine) ? WinGetXwin(VROOT) : NoXID;
EX_Window confine_to = (confine) ? WinGetXwin(VROOT) : NoXID;
rc = XGrabPointer(disp, WinGetXwin(win), False,
ButtonPressMask | ButtonReleaseMask | PointerMotionMask |
@ -111,8 +111,7 @@ GrabPointerSet(Win win, unsigned int csr, int confine __UNUSED__)
Mode.grabs.pointer_grab_active = 1;
if (EDebug(EDBUG_TYPE_GRABS))
Eprintf("%s: %#lx, rc=%d\n", __func__, Mode.grabs.pointer_grab_window,
rc);
Eprintf("%s: %#x, rc=%d\n", __func__, Mode.grabs.pointer_grab_window, rc);
return rc;
}
@ -127,7 +126,7 @@ GrabPointerRelease(void)
#endif
if (EDebug(EDBUG_TYPE_GRABS))
Eprintf("%s: %#lx\n", __func__, Mode.grabs.pointer_grab_window);
Eprintf("%s: %#x\n", __func__, Mode.grabs.pointer_grab_window);
Mode.grabs.pointer_grab_active = 0;
Mode.grabs.pointer_grab_window = NoXID;
@ -182,7 +181,7 @@ GrabButtonSet(unsigned int button, unsigned int modifiers, Win win,
pointer_mode, keyboard_mode, owner_events,
&em.em, num_modifiers, modifiers_inouts);
#else
Window confine_to = (confine) ? WinGetXwin(win) : NoXID;
EX_Window confine_to = (confine) ? WinGetXwin(win) : NoXID;
if (modifiers == AnyModifier)
{

View File

@ -65,7 +65,7 @@ static unsigned int desk_info = 0;
void
HintsInit(void)
{
Window win;
EX_Window win;
ex_atoms_get(atoms_misc_names, N_ITEMS(atoms_misc_names), atoms_misc);
@ -160,7 +160,7 @@ HintsSetDesktopViewport(void)
}
void
HintsSetActiveWindow(Window win)
HintsSetActiveWindow(EX_Window win)
{
EWMH_SetActiveWindow(win);
}
@ -312,7 +312,7 @@ HintsProcessRootClientMessage(XClientMessageEvent * event)
}
}
Pixmap
EX_Pixmap
HintsGetRootPixmap(Win win)
{
EX_Pixmap pm;
@ -324,7 +324,7 @@ HintsGetRootPixmap(Win win)
}
void
HintsSetRootInfo(Win win, Pixmap pmap, unsigned int color)
HintsSetRootInfo(Win win, EX_Pixmap pmap, unsigned int color)
{
EX_Pixmap pm;
@ -384,7 +384,7 @@ EHintsSetInfo(const EWin * ewin)
ewin->normal_border->name);
if (EDebug(EDBUG_TYPE_SNAPS))
Eprintf("Snap set einf %#lx: %4d+%4d %4dx%4d: %s\n",
Eprintf("Snap set einf %#x: %4d+%4d %4dx%4d: %s\n",
EwinGetClientXwin(ewin), ewin->client.x, ewin->client.y,
ewin->client.w, ewin->client.h, EwinGetTitle(ewin));
}
@ -447,7 +447,7 @@ EHintsGetInfo(EWin * ewin)
Efree(str);
if (EDebug(EDBUG_TYPE_SNAPS))
Eprintf("Snap get einf %#lx: %4d+%4d %4dx%4d: %s\n",
Eprintf("Snap get einf %#x: %4d+%4d %4dx%4d: %s\n",
EwinGetClientXwin(ewin), ewin->client.x, ewin->client.y,
ewin->client.w, ewin->client.h, EwinGetTitle(ewin));
}
@ -576,7 +576,7 @@ EHintsSetInfoOnAll(void)
struct _selection {
EX_Atom atom;
Time time;
EX_Time time;
Win win;
EventCallbackFunc *func;
void *data;
@ -622,7 +622,7 @@ SelectionAcquire(const char *name, EventCallbackFunc * func, void *data)
WinGetXwin(sel->win), 0, 0);
if (EDebug(EDBUG_TYPE_SELECTION))
Eprintf("Window %#lx is now %s owner, time=%lu\n",
Eprintf("Window %#x is now %s owner, time=%u\n",
WinGetXwin(sel->win), buf, sel->time);
return sel;
@ -635,7 +635,7 @@ SelectionRelease(ESelection * sel)
return;
if (EDebug(EDBUG_TYPE_SELECTION))
Eprintf("Window %#lx is no longer %s owner\n",
Eprintf("Window %#x is no longer %s owner\n",
WinGetXwin(sel->win), XGetAtomName(disp, sel->atom));
XSetSelectionOwner(disp, sel->atom, NoXID, sel->time);

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -48,7 +48,7 @@ extern EX_Atom atoms_misc[];
#define E16_ATOM_WIN_BORDER atoms_misc[9]
/* ewmh.c */
void EWMH_Init(Window win_wm_check);
void EWMH_Init(EX_Window win_wm_check);
void EWMH_SetDesktopCount(void);
void EWMH_SetDesktopRoots(void);
void EWMH_SetDesktopNames(void);
@ -58,9 +58,9 @@ void EWMH_SetDesktopViewport(void);
void EWMH_SetWorkArea(void);
void EWMH_SetClientList(void);
void EWMH_SetClientStacking(void);
void EWMH_SetActiveWindow(Window win);
void EWMH_SetActiveWindow(EX_Window win);
void EWMH_SetShowingDesktop(int on);
void EWMH_SetWindowName(Window win, const char *name);
void EWMH_SetWindowName(EX_Window win, const char *name);
void EWMH_SetWindowDesktop(const EWin * ewin);
void EWMH_SetWindowState(const EWin * ewin);
void EWMH_SetWindowBorder(const EWin * ewin);
@ -68,7 +68,8 @@ void EWMH_SetWindowOpacity(EWin * ewin);
void EWMH_SetWindowActions(const EWin * ewin);
void EWMH_GetWindowHints(EWin * ewin);
void EWMH_DelWindowHints(const EWin * ewin);
int EWMH_ProcessPropertyChange(EWin * ewin, Atom atom_change);
int EWMH_ProcessPropertyChange(EWin * ewin,
EX_Atom atom_change);
int EWMH_ProcessClientClientMessage(EWin * ewin,
XClientMessageEvent *
event);
@ -85,9 +86,9 @@ void GNOME_SetEwinArea(const EWin * ewin);
void GNOME_SetHint(const EWin * ewin);
void GNOME_SetCurrentArea(void);
void GNOME_SetAreaCount(void);
void GNOME_GetHints(EWin * ewin, Atom atom_change);
void GNOME_GetHints(EWin * ewin, EX_Atom atom_change);
void GNOME_DelHints(const EWin * ewin);
void GNOME_SetHints(Window win_wm_check);
void GNOME_SetHints(EX_Window win_wm_check);
int GNOME_ProcessClientClientMessage(EWin * ewin,
XClientMessageEvent *
event);
@ -102,7 +103,7 @@ void HintsSetCurrentDesktop(void);
void HintsSetDesktopViewport(void);
void HintsSetClientList(void);
void HintsSetClientStacking(void);
void HintsSetActiveWindow(Window win);
void HintsSetActiveWindow(EX_Window win);
void HintsSetWindowName(Win win, const char *name);
void HintsSetWindowClass(Win win, const char *name,
const char *clss);
@ -119,9 +120,10 @@ void HintsProcessClientClientMessage(EWin * ewin,
event);
void HintsProcessRootClientMessage(XClientMessageEvent * event);
Pixmap HintsGetRootPixmap(Win win);
EX_Pixmap HintsGetRootPixmap(Win win);
void HintsSetRootHints(Win win);
void HintsSetRootInfo(Win win, Pixmap pmap, unsigned int color);
void HintsSetRootInfo(Win win, EX_Pixmap pmap,
unsigned int color);
void EHintsSetInfo(const EWin * ewin);
void EHintsGetInfo(EWin * ewin);
@ -166,10 +168,11 @@ void ICCCM_Focus(const EWin * ewin);
void ICCCM_GetGeoms(EWin * ewin);
void ICCCM_GetInfo(EWin * ewin);
void ICCCM_GetHints(EWin * ewin);
int ICCCM_ProcessPropertyChange(EWin * ewin, Atom atom_change);
int ICCCM_ProcessPropertyChange(EWin * ewin,
EX_Atom atom_change);
/* mwm.c */
void MWM_GetHints(EWin * ewin, Atom atom_change);
void MWM_GetHints(EWin * ewin, EX_Atom atom_change);
void MWM_SetInfo(void);
/* session.c */

View File

@ -54,10 +54,10 @@ static ImageClass *hiwin_ic = NULL;
/* TBD: Move elsewhere? */
static EImage *
EobjGetImage(EObj * eo, Drawable draw)
EobjGetImage(EObj * eo, EX_Drawable draw)
{
EImage *im;
Pixmap mask;
EX_Pixmap mask;
mask = EWindowGetShapePixmap(EobjGetWin(eo));
im = EImageGrabDrawable(draw, mask, 0, 0, EobjGetW(eo), EobjGetH(eo), 0);
@ -71,7 +71,7 @@ static void
HiwinRenderImageInit(Hiwin * phi)
{
EWin *ewin = phi->ewin;
Pixmap pmap;
EX_Pixmap pmap;
pmap = EoGetPixmap(ewin);
if (pmap)
@ -99,7 +99,7 @@ HiwinRenderImageInit(Hiwin * phi)
}
static void
HiwinRenderImageDrawX(Hiwin * phi, Drawable draw __UNUSED__)
HiwinRenderImageDrawX(Hiwin * phi, EX_Drawable draw __UNUSED__)
{
EImageApplyToWin(phi->im, EoGetWin(phi), EIMAGE_ANTI_ALIAS,
EoGetW(phi), EoGetH(phi));
@ -125,7 +125,7 @@ HiwinRenderImageFini(Hiwin * phi, int shown)
static void
HiwinRenderImageUpdate(Hiwin * phi)
{
Pixmap pmap;
EX_Pixmap pmap;
EWin *ewin = phi->ewin;
pmap = EoGetPixmap(ewin);
@ -171,7 +171,7 @@ HiwinRenderPixmapInit(Hiwin * phi __UNUSED__)
}
static void
HiwinRenderPixmapDrawX(Hiwin * phi, Drawable draw)
HiwinRenderPixmapDrawX(Hiwin * phi, EX_Drawable draw)
{
EXPaintRectangle(draw, 0, 0, EoGetW(phi), EoGetH(phi),
Dpy.pixel_black, Dpy.pixel_white);
@ -187,7 +187,7 @@ HiwinRenderPixmapDraw(Hiwin * phi)
static void
HiwinRenderPixmapFini(Hiwin * phi, int shown)
{
Pixmap pmap;
EX_Pixmap pmap;
if (shown)
{

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -302,7 +302,7 @@ ICCCM_Configure(EWin * ewin)
void
ICCCM_AdoptStart(const EWin * ewin)
{
Window win = EwinGetClientXwin(ewin);
EX_Window win = EwinGetClientXwin(ewin);
if (!EwinIsInternal(ewin))
XAddToSaveSet(disp, win);
@ -311,7 +311,7 @@ ICCCM_AdoptStart(const EWin * ewin)
void
ICCCM_Adopt(const EWin * ewin)
{
Window win = EwinGetClientXwin(ewin);
EX_Window win = EwinGetClientXwin(ewin);
if (ewin->icccm.start_iconified)
ex_icccm_state_set_iconic(win);
@ -322,7 +322,7 @@ ICCCM_Adopt(const EWin * ewin)
void
ICCCM_Cmap(EWin * ewin)
{
Colormap ecmap, dcmap, ccmap;
EX_Colormap ecmap, dcmap, ccmap;
XWindowAttributes xwa;
int i, num;
EX_Window *wlist;
@ -369,7 +369,7 @@ ICCCM_Cmap(EWin * ewin)
set_cmap:
if (EDebug(EDBUG_TYPE_FOCUS))
Eprintf("ICCCM_Cmap %#lx\n", ccmap);
Eprintf("ICCCM_Cmap %#x\n", ccmap);
XInstallColormap(disp, ccmap);
Mode.current_cmap = ccmap;
}
@ -380,12 +380,12 @@ ICCCM_Focus(const EWin * ewin)
if (EDebug(EDBUG_TYPE_FOCUS))
{
if (ewin)
Eprintf("ICCCM_Focus T=%#lx R=%#lx %#lx %s\n", Mode.events.time,
NextRequest(disp), EwinGetClientXwin(ewin),
Eprintf("ICCCM_Focus T=%#x R=%#x %#x %s\n", Mode.events.time,
(int)NextRequest(disp), EwinGetClientXwin(ewin),
EwinGetTitle(ewin));
else
Eprintf("ICCCM_Focus T=%#lx R=%#lx None\n", Mode.events.time,
NextRequest(disp));
Eprintf("ICCCM_Focus T=%#x R=%#x None\n", Mode.events.time,
(int)NextRequest(disp));
}
if (!ewin)
@ -541,7 +541,7 @@ ICCCM_GetGeoms(EWin * ewin)
ewin->props.no_resize_v = (ewin->icccm.height_min == ewin->icccm.height_max);
if (EDebug(EDBUG_TYPE_SNAPS))
Eprintf("Snap get icccm %#lx: %4d+%4d %4dx%4d: %s\n",
Eprintf("Snap get icccm %#x: %4d+%4d %4dx%4d: %s\n",
EwinGetClientXwin(ewin), ewin->client.x, ewin->client.y,
ewin->client.w, ewin->client.h, EwinGetTitle(ewin));
}
@ -799,7 +799,7 @@ ICCCM_SetIconSizes(void)
* Process received window property change
*/
int
ICCCM_ProcessPropertyChange(EWin * ewin, Atom atom_change)
ICCCM_ProcessPropertyChange(EWin * ewin, EX_Atom atom_change)
{
if (atom_change == EX_ATOM_WM_NAME)
{

View File

@ -780,7 +780,7 @@ pt_get_bg_image(Win win, int w, int h, int use_root)
{
EImage *ii = NULL;
Win cr;
Drawable bg;
EX_Drawable bg;
int xx, yy;
bg = DeskGetBackgroundPixmap(DesksGetCurrent());
@ -887,7 +887,7 @@ ImagestateMakePmapMask(ImageState * is, Win win, PmapMask * pmm,
#ifdef ENABLE_TRANSPARENCY
EImage *ii = NULL;
int flags;
Pixmap pmap, mask;
EX_Pixmap pmap, mask;
flags = pt_type_to_flags(image_type);
@ -994,7 +994,8 @@ ImagestateMakePmapMask(ImageState * is, Win win, PmapMask * pmm,
XDrawRectangle(disp, win, gc, x, y, w, h);
static void
ImagestateDrawBevel(ImageState * is, Drawable win, int x, int y, int w, int h)
ImagestateDrawBevel(ImageState * is, EX_Drawable win,
int x, int y, int w, int h)
{
GC gc;
@ -1096,7 +1097,8 @@ ImagestateDrawBevel(ImageState * is, Drawable win, int x, int y, int w, int h)
}
static void
ImagestateDrawNoImg(ImageState * is, Drawable draw, int x, int y, int w, int h)
ImagestateDrawNoImg(ImageState * is, EX_Drawable draw, int x, int y, int w,
int h)
{
ImagestateColorsAlloc(is);
@ -1144,7 +1146,7 @@ ITApply(Win win, ImageClass * ic, ImageState * is,
if (pmm.pmap)
{
Pixmap pmap = pmm.pmap;
EX_Pixmap pmap = pmm.pmap;
if ((ts && text) || (is->bevelstyle != BEVEL_NONE) ||
(flags & ITA_BGPMAP))
@ -1193,7 +1195,7 @@ ITApply(Win win, ImageClass * ic, ImageState * is,
}
else
{
Pixmap pmap;
EX_Pixmap pmap;
pmap = EGetWindowBackgroundPixmap(win);
ImagestateDrawNoImg(is, pmap, 0, 0, w, h);
@ -1218,7 +1220,7 @@ ImageclassApply(ImageClass * ic, Win win, int active, int sticky, int state,
static void
PmapMaskTile(PmapMask * pmm, Win win, unsigned int w, unsigned int h)
{
Pixmap pmap, mask;
EX_Pixmap pmap, mask;
pmap = ECreatePixmap(win, w, h, 0);
if (pmap == NoXID)
@ -1296,7 +1298,7 @@ ImageclassApplyCopy(ImageClass * ic, Win win, int w, int h,
}
void
ImageclassApplySimple(ImageClass * ic, Win win, Drawable draw, int state,
ImageclassApplySimple(ImageClass * ic, Win win, EX_Drawable draw, int state,
int x, int y, int w, int h)
{
EImage *im;
@ -1414,9 +1416,9 @@ ImageclassIpc(const char *params)
if (!strcmp(param2, "free_pixmap"))
{
Pixmap pmap;
EX_Pixmap pmap;
pmap = (Pixmap) strtol(p, NULL, 0);
pmap = (EX_Pixmap) strtol(p, NULL, 0);
EImagePixmapsFree(pmap, NoXID);
return;
}
@ -1448,7 +1450,7 @@ ImageclassIpc(const char *params)
}
else if (!strcmp(param2, "apply"))
{
Window xwin;
EX_Window xwin;
Win win;
char state[20];
int st, w, h;
@ -1457,7 +1459,7 @@ ImageclassIpc(const char *params)
xwin = NoXID;
state[0] = '\0';
w = h = -1;
sscanf(p, "%lx %16s %d %d", &xwin, state, &w, &h);
sscanf(p, "%x %16s %d %d", &xwin, state, &w, &h);
win = ECreateWinFromXwin(xwin);
if (!win)
@ -1479,7 +1481,7 @@ ImageclassIpc(const char *params)
}
else if (!strcmp(param2, "apply_copy"))
{
Window xwin;
EX_Window xwin;
Win win;
char state[20];
int st, w, h;
@ -1489,7 +1491,7 @@ ImageclassIpc(const char *params)
xwin = NoXID;
state[0] = '\0';
w = h = -1;
sscanf(p, "%lx %16s %d %d", &xwin, state, &w, &h);
sscanf(p, "%x %16s %d %d", &xwin, state, &w, &h);
win = ECreateWinFromXwin(xwin);
if (!win)
@ -1514,7 +1516,7 @@ ImageclassIpc(const char *params)
ImageclassApplyCopy(ic, win, w, h, 0, 0, st, &pmm,
IC_FLAG_MAKE_MASK | IC_FLAG_FULL_SIZE, ST_SOLID);
IpcPrintf("0x%08lx 0x%08lx\n", pmm.pmap, pmm.mask);
IpcPrintf("0x%08x 0x%08x\n", pmm.pmap, pmm.mask);
EDestroyWin(win);
}
else if (!strcmp(param2, "query"))

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2009 Kim Woelders
* Copyright (C) 2004-2014 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
@ -99,7 +99,7 @@ ImageClass *ImageclassGetBlack(void);
EImage *ImageclassGetImage(ImageClass * ic, int active, int sticky,
int state);
void ImageclassApplySimple(ImageClass * ic, Win win,
Drawable draw, int state, int x,
EX_Drawable draw, int state, int x,
int y, int w, int h);
void ImageclassApply(ImageClass * ic, Win win,
int active, int sticky, int state,

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -66,7 +66,7 @@ IB_Animate_A(char iconify, EWin * ewin, EWin * ibox)
float a, aa, spd;
int x, y, x1, y1, x2, y2, x3, y3, x4, y4, w, h;
int fx, fy, fw, fh, tx, ty, tw, th;
Window root = WinGetXwin(VROOT);
EX_Window root = WinGetXwin(VROOT);
GC gc;
XGCValues gcv;
@ -163,7 +163,7 @@ IB_Animate_B(char iconify, EWin * ewin, EWin * ibox)
float a, spd;
int x, y, w, h;
int fx, fy, fw, fh, tx, ty, tw, th;
Window root = WinGetXwin(VROOT);
EX_Window root = WinGetXwin(VROOT);
GC gc;
XGCValues gcv;

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -108,7 +108,7 @@ IB_SnapEWin(EWin * ewin, int size)
int w, h, ww, hh;
int was_shaded;
EImage *im;
Drawable draw;
EX_Drawable draw;
if (!EoIsShown(ewin))
return NULL;
@ -131,7 +131,7 @@ IB_SnapEWin(EWin * ewin, int size)
draw = EoGetPixmap(ewin);
if (draw != NoXID)
{
Pixmap mask;
EX_Pixmap mask;
mask = EWindowGetShapePixmap(EoGetWin(ewin));
im = EImageGrabDrawableScaled(EoGetWin(ewin), draw, mask, 0, 0, ww, hh,

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -334,19 +334,19 @@ IPC_WinList(const char *params)
switch (format[0])
{
case '\0':
IpcPrintf("%#lx : %s\n", EwinGetClientXwin(e),
IpcPrintf("%#x : %s\n", EwinGetClientXwin(e),
SS(EwinGetIcccmName(e)));
break;
default:
IpcPrintf("%#lx : %s :: %d : %d %d : %d %d %dx%d\n",
IpcPrintf("%#x : %s :: %d : %d %d : %d %d %dx%d\n",
EwinGetClientXwin(e), SS(EwinGetIcccmName(e)),
(EoIsSticky(e)) ? -1 : (int)EoGetDeskNum(e), e->area_x,
e->area_y, EoGetX(e), EoGetY(e), EoGetW(e), EoGetH(e));
break;
case 'a':
IpcPrintf("%#10lx : %5d %5d %4dx%4d :: %2d : %d %d : %s\n",
IpcPrintf("%#10x : %5d %5d %4dx%4d :: %2d : %d %d : %s\n",
EwinGetClientXwin(e), EoGetX(e), EoGetY(e), EoGetW(e),
EoGetH(e), (EoIsSticky(e)) ? -1 : (int)EoGetDeskNum(e),
e->area_x, e->area_y, SS(EwinGetIcccmName(e)));
@ -354,7 +354,7 @@ IPC_WinList(const char *params)
case 'g':
IpcPrintf
("%#10lx : %5d %5d %4dx%4d :: %2d : %s %4d,%4d %2d,%2d : %s\n",
("%#10x : %5d %5d %4dx%4d :: %2d : %s %4d,%4d %2d,%2d : %s\n",
EwinGetClientXwin(e), EoGetX(e), EoGetY(e), EoGetW(e),
EoGetH(e), (EoIsSticky(e)) ? -1 : (int)EoGetDeskNum(e),
TxtPG[e->place.gravity & 3], e->place.gx, e->place.gy,
@ -363,7 +363,7 @@ IPC_WinList(const char *params)
case 'p':
IpcPrintf
("%#10lx : %5d %5d %4dx%4d :: %2d : \"%s\" \"%s\" : \"%s\" : \"%s\"\n",
("%#10x : %5d %5d %4dx%4d :: %2d : \"%s\" \"%s\" : \"%s\" : \"%s\"\n",
EwinGetClientXwin(e), EoGetX(e), EoGetY(e), EoGetW(e),
EoGetH(e), (EoIsSticky(e)) ? -1 : (int)EoGetDeskNum(e),
SS(EwinGetIcccmCName(e)), SS(EwinGetIcccmClass(e)),
@ -1025,7 +1025,7 @@ IPC_Debug(const char *params)
if (!strcmp(param, "?"))
{
IpcPrintf("Pointer grab on=%d win=%#lx\n",
IpcPrintf("Pointer grab on=%d win=%#x\n",
Mode.grabs.pointer_grab_active,
Mode.grabs.pointer_grab_window);
}
@ -1085,16 +1085,16 @@ EwinShowInfo(const EWin * ewin)
"WM_WINDOW_ROLE %s\n"
"WM_COMMAND %s\n"
"WM_CLIENT_MACHINE %s\n"
"Client window %#10lx x,y %4i,%4i wxh %4ix%4i\n"
"Container window %#10lx\n"
"Frame window %#10lx x,y %4i,%4i wxh %4ix%4i\n"
"Client window %#10x x,y %4i,%4i wxh %4ix%4i\n"
"Container window %#10x\n"
"Frame window %#10x x,y %4i,%4i wxh %4ix%4i\n"
#if USE_COMPOSITE
"Named pixmap %#10lx\n"
"Named pixmap %#10x\n"
#endif
"Border %s lrtb %i,%i,%i,%i\n"
"Icon window, pixmap, mask %#10lx, %#10lx, %#10lx\n"
"Is group leader %i Window group leader %#lx Client leader %#10lx\n"
"Has transients %i Transient type %i Transient for %#10lx\n"
"Icon window, pixmap, mask %#10x, %#10x, %#10x\n"
"Is group leader %i Window group leader %#x Client leader %#10x\n"
"Has transients %i Transient type %i Transient for %#10x\n"
"No resize H/V %i/%i Shaped %i\n"
"Base, min, max, inc w/h %ix%i, %ix%i, %ix%i %ix%i\n"
"Aspect min, max %5.5f, %5.5f\n"
@ -1208,7 +1208,7 @@ IPC_ObjInfo(const char *params __UNUSED__)
{
eo = lst[i];
IpcPrintf
(" %2d %#9lx %2d %d %d %2d/%2d %3d %d %d %3d %5d,%5d %4dx%4d %d %d %s\n",
(" %2d %#9x %2d %d %d %2d/%2d %3d %d %d %3d %5d,%5d %4dx%4d %d %d %s\n",
i, EobjGetXwin(eo), WinGetDepth(EobjGetWin(eo)), eo->type,
eo->shown, eo->shaped, EShapeCheck(EobjGetWin(eo)), eo->desk->num,
eo->sticky, eo->floating, eo->ilayer,
@ -1389,7 +1389,7 @@ static const struct _keyset ks[] = {
static void
IPC_InsertKeys(const char *params, Client * c __UNUSED__)
{
Window win = 0;
EX_Window win = 0;
int i, rev;
const char *s;
XKeyEvent ev;

View File

@ -49,7 +49,7 @@ typedef struct {
int scale; /* Zoom level */
int sx, sy; /* Scene x,y */
int sw, sh; /* Scene wxh */
Time grab_time;
EX_Time grab_time;
char disable_text;
char configured;
char btn_down;
@ -83,7 +83,7 @@ MagwinDrawText(MagWindow * mw, int x, int y, const char *txt)
}
static unsigned int
MagwinGetPixel(Drawable draw, unsigned int x, unsigned int y)
MagwinGetPixel(EX_Drawable draw, unsigned int x, unsigned int y)
{
EImage *im;
unsigned int *pd, pixel = 0;
@ -106,7 +106,7 @@ MagwinRedraw(MagWindow * mw, int paint)
int sx, sy, sw, sh;
float scale;
int zoom_res;
Drawable draw;
EX_Drawable draw;
char buf[128];
int px, py;
int qx, qy;
@ -240,7 +240,7 @@ _MagwinGrabRelease(MagWindow * mw)
}
static int
MagwinKeyPress(MagWindow * mw, KeySym keysym)
MagwinKeyPress(MagWindow * mw, EX_KeySym keysym)
{
switch (keysym)
{
@ -312,7 +312,7 @@ static void
MagwinEvent(Win win __UNUSED__, XEvent * ev, void *prm)
{
MagWindow *mw = (MagWindow *) prm;
KeySym keysym;
EX_KeySym keysym;
int done = 0;
switch (ev->type)

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -512,7 +512,7 @@ MenuLoadFromEwins(Menu * m, int (*f) (EWin * ewin, void *prm), void *prm)
if (!f(lst[i], prm))
continue;
Esnprintf(s, sizeof(s), "wop %#lx focus", EwinGetClientXwin(lst[i]));
Esnprintf(s, sizeof(s), "wop %#x focus", EwinGetClientXwin(lst[i]));
mi = MenuItemCreate(EwinGetTitle(lst[i]), NULL, s, NULL);
MenuAddItem(m, mi);
}
@ -599,11 +599,11 @@ MenuLoadFromGroups(Menu * m)
{
mm = MenuCreate("__SUBMENUGROUP_E", NULL, m, NULL);
Esnprintf(s, sizeof(s), "gop %li showhide",
Esnprintf(s, sizeof(s), "gop %i showhide",
EwinGetClientXwin(lst[i]->members[0]));
mi = MenuItemCreate(_("Show/Hide this group"), NULL, s, NULL);
Esnprintf(s, sizeof(s), "wop %#lx ic",
Esnprintf(s, sizeof(s), "wop %#x ic",
EwinGetClientXwin(lst[i]->members[0]));
MenuAddItem(mm, mi);
mi = MenuItemCreate(_("Iconify this group"), NULL, s, NULL);
@ -611,7 +611,7 @@ MenuLoadFromGroups(Menu * m)
for (j = 0; j < lst[i]->num_members; j++)
{
Esnprintf(s, sizeof(s), "wop %#lx focus",
Esnprintf(s, sizeof(s), "wop %#x focus",
EwinGetClientXwin(lst[i]->members[j]));
mi = MenuItemCreate(EwinGetTitle(lst[i]->members[j]), NULL,
s, NULL);

View File

@ -1197,8 +1197,8 @@ MenuFindNextItem(Menu * m, MenuItem * mi, int inc)
return NULL;
}
static KeySym
MenuKeyPressConversion(KeySym keysym)
static EX_KeySym
MenuKeyPressConversion(EX_KeySym keysym)
{
if (keysym == Conf.menus.key.left)
return XK_Left;
@ -1221,7 +1221,7 @@ MenuKeyPressConversion(KeySym keysym)
static void
MenuEventKeyPress(Menu * m, XEvent * ev)
{
KeySym keysym;
EX_KeySym keysym;
MenuItem *mi;
EWin *ewin;

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2003-2013 Kim Woelders
* Copyright (C) 2003-2014 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
@ -70,7 +70,7 @@ typedef struct {
} MWMHints;
void
MWM_GetHints(EWin * ewin, Atom atom_change)
MWM_GetHints(EWin * ewin, EX_Atom atom_change)
{
int num;
MWMHints mhs, *mwmhints = &mhs;

View File

@ -39,6 +39,9 @@
#include "timers.h"
#include "tooltips.h"
#include "xwin.h"
#if USE_XRENDER
#include <X11/extensions/Xrender.h>
#endif
#define DEBUG_PAGER 0
#if DEBUG_PAGER
@ -88,7 +91,7 @@ typedef struct {
Win win;
int w, h;
char *name;
Pixmap bgpmap;
EX_Pixmap bgpmap;
Desk *dsk;
int dw, dh;
int screen_w, screen_h;
@ -271,7 +274,7 @@ static void
PagerEwinUpdateMini(Pager * p, EWin * ewin)
{
int w, h, update, use_iclass, serdif;
Drawable draw;
EX_Drawable draw;
int pager_mode = PagersGetMode();
w = (EoGetW(ewin) * p->dw) / WinGetW(VROOT);
@ -299,7 +302,7 @@ PagerEwinUpdateMini(Pager * p, EWin * ewin)
if (!update)
return;
Dprintf("%s %#lx/%#lx wxh=%dx%d ser=%#x/%#x dif=%d: %s\n", __func__,
Dprintf("%s %#x/%#x wxh=%dx%d ser=%#x/%#x dif=%d: %s\n", __func__,
EwinGetClientXwin(ewin), EoGetXwin(ewin), w, h,
EoGetSerial(ewin), p->serial, serdif, EwinGetTitle(ewin));
@ -323,13 +326,13 @@ PagerEwinUpdateMini(Pager * p, EWin * ewin)
ic = ImageclassFind("PAGER_WIN", 1);
ImageclassApplySimple(ic, EoGetWin(ewin), ewin->mini_pmm.pmap,
STATE_NORMAL, 0, 0, w, h);
Dprintf("Use Iclass, pmap=%#lx\n", ewin->mini_pmm.pmap);
Dprintf("Use Iclass, pmap=%#x\n", ewin->mini_pmm.pmap);
}
else
{
ScaleRect(EoGetWin(ewin), draw, EoGetWin(ewin), ewin->mini_pmm.pmap,
0, 0, EoGetW(ewin), EoGetH(ewin), 0, 0, w, h, HIQ);
Dprintf("Grab scaled, pmap=%#lx\n", ewin->mini_pmm.pmap);
Dprintf("Grab scaled, pmap=%#x\n", ewin->mini_pmm.pmap);
}
#if 0 /* FIXME - Remove? */
@ -346,10 +349,10 @@ doPagerUpdate(Pager * p)
EWin *const *lst;
int i, num, update_screen_included, update_screen_only;
int pager_mode = PagersGetMode();
Pixmap pmap;
EX_Pixmap pmap;
#if USE_COMPOSITE
Picture pager_pict, pict, alpha;
EX_Picture pager_pict, pict, alpha;
XRenderPictureAttributes pa;
#endif
@ -557,7 +560,7 @@ PagerReconfigure(Pager * p, int apply)
static void
PagerUpdateBg(Pager * p)
{
Pixmap pmap;
EX_Pixmap pmap;
Background *bg;
ImageClass *ic;
int pager_mode = PagersGetMode();
@ -997,19 +1000,19 @@ PagerMenuShow(Pager * p, int x, int y)
MenuSetTransient(m); /* Destroy when hidden */
Esnprintf(s, sizeof(s), "wop %#lx ic", EwinGetClientXwin(ewin));
Esnprintf(s, sizeof(s), "wop %#x ic", EwinGetClientXwin(ewin));
mi = MenuItemCreate(_("Iconify"), NULL, s, NULL);
MenuAddItem(m, mi);
Esnprintf(s, sizeof(s), "wop %#lx close", EwinGetClientXwin(ewin));
Esnprintf(s, sizeof(s), "wop %#x close", EwinGetClientXwin(ewin));
mi = MenuItemCreate(_("Close"), NULL, s, NULL);
MenuAddItem(m, mi);
Esnprintf(s, sizeof(s), "wop %#lx kill", EwinGetClientXwin(ewin));
Esnprintf(s, sizeof(s), "wop %#x kill", EwinGetClientXwin(ewin));
mi = MenuItemCreate(_("Annihilate"), NULL, s, NULL);
MenuAddItem(m, mi);
Esnprintf(s, sizeof(s), "wop %#lx st", EwinGetClientXwin(ewin));
Esnprintf(s, sizeof(s), "wop %#x st", EwinGetClientXwin(ewin));
mi = MenuItemCreate(_("Stick / Unstick"), NULL, s, NULL);
MenuAddItem(m, mi);

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -37,7 +37,7 @@
#include "xwin.h"
#ifdef USE_EXT_INIT_WIN
static Window new_init_win_ext = NoXID;
static EX_Window new_init_win_ext = NoXID;
#endif
/* True if we are saving state for a doExit("restart") */
@ -181,7 +181,7 @@ set_save_props(SmcConn smc_conn, int master_flag)
#ifdef USE_EXT_INIT_WIN
if (restarting)
{
Esnprintf(bufx, sizeof(bufx), "%#lx", new_init_win_ext);
Esnprintf(bufx, sizeof(bufx), "%#x", new_init_win_ext);
restartVal[n++].value = (char *)"-X";
restartVal[n++].value = bufx;
}
@ -551,7 +551,7 @@ doSMExit(int mode, const char *params)
#endif
#ifdef USE_EXT_INIT_WIN
if (new_init_win_ext != NoXID)
l += Esnprintf(s + l, sizeof(s) - l, " -X %#lx", new_init_win_ext);
l += Esnprintf(s + l, sizeof(s) - l, " -X %#x", new_init_win_ext);
#endif
if (ss)
l += Esnprintf(s + l, sizeof(s) - l, " -t %s", ss);

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -135,7 +135,7 @@ SetupX(const char *dstr)
VROOT = ECreateWindow(RROOT, 0, 0, Mode.wm.win_w, Mode.wm.win_h, 0);
/* Enable eesh and edox to pick up the virtual root */
Esnprintf(buf, sizeof(buf), "%#lx", WinGetXwin(VROOT));
Esnprintf(buf, sizeof(buf), "%#x", WinGetXwin(VROOT));
Esetenv("ENL_WM_ROOT", buf);
}
else
@ -193,7 +193,7 @@ SetupX(const char *dstr)
/* to hunt them down to mask them out - EVIL EVIL EVIL hack but needed */
{
XModifierKeymap *mod;
KeyCode nl, sl;
EX_KeyCode nl, sl;
unsigned int numlock, scrollock;
int i;

View File

@ -31,7 +31,7 @@
typedef struct _ShapeWin ShapeWin;
struct _ShapeWin {
EObj o;
Pixmap mask;
EX_Pixmap mask;
GC gc;
};
@ -41,7 +41,7 @@ void ShapewinShapeSet(ShapeWin * sw, int md, int x, int y, int w,
int h, int bl, int br, int bt, int bb,
int seqno);
void do_draw_technical(Drawable dr, GC gc,
void do_draw_technical(EX_Drawable dr, GC gc,
int a, int b, int c, int d, int bl,
int br, int bt, int bb);

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -42,7 +42,7 @@ struct _snapshot {
char *win_name;
char *win_class;
char *win_role;
Window win;
EX_Window win;
EWin *used;
unsigned int startup_id;
char track_changes;
@ -550,7 +550,7 @@ _EwinSnapRemove(EWin * ewin)
* Snapshot dialogs
*/
typedef struct {
Window client;
EX_Window client;
struct {
char title;
@ -928,7 +928,7 @@ _EwinSnapDialog(const EWin * ewin)
{
char s[1024];
Esnprintf(s, sizeof(s), "SNAPSHOT_WINDOW-%#lx", EwinGetClientXwin(ewin));
Esnprintf(s, sizeof(s), "SNAPSHOT_WINDOW-%#x", EwinGetClientXwin(ewin));
DialogShowSimpleWithName(&DlgSnap, s, (void *)ewin);
}
@ -1106,7 +1106,7 @@ SnapshotsSaveReal(void)
{
fprintf(f, "NEW: %s\n", sn->name);
if (sn->used)
fprintf(f, "WIN: %#lx\n", EwinGetClientXwin(sn->used));
fprintf(f, "WIN: %#x\n", EwinGetClientXwin(sn->used));
if ((sn->match_flags & SNAP_MATCH_TITLE) && sn->win_title)
fprintf(f, "TITLE: %s\n", sn->win_title);
if ((sn->match_flags & SNAP_MATCH_NAME) && sn->win_name)
@ -1498,7 +1498,7 @@ SnapshotEwinApply(EWin * ewin)
#endif
if (EDebug(EDBUG_TYPE_SNAPS))
Eprintf("Snap get snap %#lx: %4d+%4d %4dx%4d: %s\n",
Eprintf("Snap get snap %#x: %4d+%4d %4dx%4d: %s\n",
EwinGetClientXwin(ewin), ewin->client.x, ewin->client.y,
ewin->client.w, ewin->client.h, EwinGetTitle(ewin));
}
@ -1627,7 +1627,7 @@ _SnapShow(void *data, void *prm)
#define SU(sn, item) ((sn->match_flags & item) ? '>' : ':')
if (sn->used)
Esnprintf(buf, sizeof(buf), "In use - %#lx", EwinGetClientXwin(sn->used));
Esnprintf(buf, sizeof(buf), "In use - %#x", EwinGetClientXwin(sn->used));
else
Esnprintf(buf, sizeof(buf), "*** Unused ***");
IpcPrintf(" Snapshot Name: %s %s\n", name, buf);

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -58,7 +58,7 @@ EobjListShow(const char *txt, EobjList * ewl)
for (i = 0; i < ewl->nwins; i++)
{
eo = ewl->list[i];
Eprintf(" %2d: %#10lx %#10lx %d %d %s\n", i, EobjGetXwin(eo),
Eprintf(" %2d: %#10x %#10x %d %d %s\n", i, EobjGetXwin(eo),
EobjGetCwin(eo), eo->desk->num, eo->ilayer, EobjGetName(eo));
}
}
@ -246,7 +246,7 @@ EobjListRaise(EobjList * ewl, EObj * eo, int test)
}
static EObj *
EobjListFind(const EobjList * ewl, Window win)
EobjListFind(const EobjList * ewl, EX_Window win)
{
int i;
@ -290,7 +290,7 @@ EobjListStackCheck(EObj * eo)
}
EObj *
EobjListStackFind(Window win)
EobjListStackFind(EX_Window win)
{
return EobjListFind(&EwinListStack, win);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -63,7 +63,7 @@ static void SystrayItemEvent(Win win, XEvent * ev, void *prm);
#define XEMBED_MAPPED (1 << 0)
static int
SystrayGetXembedInfo(Window xwin, unsigned int *info)
SystrayGetXembedInfo(EX_Window xwin, unsigned int *info)
{
int num;
@ -97,7 +97,7 @@ SystrayGetXembedInfo(Window xwin, unsigned int *info)
* Return index, -1 if not found.
*/
static int
SystrayObjFind(Container * ct, Window xwin)
SystrayObjFind(Container * ct, EX_Window xwin)
{
int i;
@ -109,12 +109,12 @@ SystrayObjFind(Container * ct, Window xwin)
}
static Win
SystrayObjManage(Container * ct, Window xwin)
SystrayObjManage(Container * ct, EX_Window xwin)
{
Win win;
#if DEBUG_SYSTRAY
Eprintf("%s: %#lx\n", __func__, xwin);
Eprintf("%s: %#x\n", __func__, xwin);
#endif
win = ERegisterWindow(xwin, NULL);
if (!win)
@ -132,7 +132,7 @@ static void
SystrayObjUnmanage(Container * ct __UNUSED__, Win win, int gone)
{
#if DEBUG_SYSTRAY
Eprintf("%s: %#lx gone=%d\n", __func__, WinGetXwin(win), gone);
Eprintf("%s: %#x gone=%d\n", __func__, WinGetXwin(win), gone);
#endif
if (!gone)
@ -147,7 +147,7 @@ SystrayObjUnmanage(Container * ct __UNUSED__, Win win, int gone)
}
static void
SystrayObjAdd(Container * ct, Window xwin)
SystrayObjAdd(Container * ct, EX_Window xwin)
{
SWin *swin = NULL;
Win win;
@ -162,14 +162,14 @@ SystrayObjAdd(Container * ct, Window xwin)
switch (SystrayGetXembedInfo(xwin, xembed_info))
{
case -1: /* Error - assume invalid window */
Eprintf("%s: %#lx: Hmm.. Invalid window? Ignoring.\n", __func__, xwin);
Eprintf("%s: %#x: Hmm.. Invalid window? Ignoring.\n", __func__, xwin);
goto bail_out;
case 0: /* Assume broken - proceed anyway */
Eprintf("%s: %#lx: Hmm.. No _XEMBED_INFO?\n", __func__, xwin);
Eprintf("%s: %#x: Hmm.. No _XEMBED_INFO?\n", __func__, xwin);
break;
default:
if (EDebug(EDBUG_TYPE_ICONBOX))
Eprintf("%s: %#lx: _XEMBED_INFO: %u %u\n", __func__, xwin,
Eprintf("%s: %#x: _XEMBED_INFO: %u %u\n", __func__, xwin,
xembed_info[0], xembed_info[1]);
break;
}
@ -218,7 +218,7 @@ SystrayObjDel(Container * ct, Win win, int gone)
return;
if (EDebug(EDBUG_TYPE_ICONBOX))
Eprintf("%s: %#lx\n", __func__, WinGetXwin(win));
Eprintf("%s: %#x\n", __func__, WinGetXwin(win));
swin = (SWin *) ct->objs[i].obj;
@ -231,7 +231,7 @@ SystrayObjDel(Container * ct, Win win, int gone)
}
static void
SystrayObjMapUnmap(Container * ct, Window xwin)
SystrayObjMapUnmap(Container * ct, EX_Window xwin)
{
int i, map;
SWin *swin;
@ -246,7 +246,7 @@ SystrayObjMapUnmap(Container * ct, Window xwin)
if (SystrayGetXembedInfo(xwin, xembed_info) >= 0)
{
if (EDebug(EDBUG_TYPE_ICONBOX))
Eprintf("%s: %#lx: _XEMBED_INFO: %u %u\n", __func__, xwin,
Eprintf("%s: %#x: _XEMBED_INFO: %u %u\n", __func__, xwin,
xembed_info[0], xembed_info[1]);
map = (xembed_info[1] & XEMBED_MAPPED) != 0;
@ -261,7 +261,7 @@ SystrayObjMapUnmap(Container * ct, Window xwin)
else
{
if (EDebug(EDBUG_TYPE_ICONBOX))
Eprintf("%s: %#lx: _XEMBED_INFO: gone?\n", __func__, xwin);
Eprintf("%s: %#x: _XEMBED_INFO: gone?\n", __func__, xwin);
map = 0;
if (map == swin->mapped)
@ -275,7 +275,7 @@ SystrayObjMapUnmap(Container * ct, Window xwin)
static void
SystrayEventClientMessage(Container * ct, XClientMessageEvent * ev)
{
Window xwin;
EX_Window xwin;
if (EDebug(EDBUG_TYPE_ICONBOX))
Eprintf("%s: ev->type=%ld ev->data.l: %#lx %#lx %#lx %#lx\n", __func__,
@ -343,7 +343,7 @@ SystrayEvent(Win _win __UNUSED__, XEvent * ev, void *prm __UNUSED__)
Eprintf("%s: %2d %#lx\n", __func__, ev->type, ev->xany.window);
#if 0 /* FIXME - Need this one at all? ConfigureRequest? */
Window xwin;
EX_Window xwin;
switch (ev->type)
{

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -417,7 +417,7 @@ TextclassIpc(const char *params)
if (!strcmp(param2, "apply"))
{
Window xwin;
EX_Window xwin;
Win win;
char state[20];
int x, y, st;
@ -427,7 +427,7 @@ TextclassIpc(const char *params)
x = y = 0;
state[0] = '\0';
l = 0;
sscanf(p, "%lx %d %d %16s %n", &xwin, &x, &y, state, &l);
sscanf(p, "%x %d %d %16s %n", &xwin, &x, &y, state, &l);
p += l;
if (!strcmp(state, "normal"))

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -53,7 +53,7 @@ typedef struct {
int *pwidth, int textwidth_limit);
void (*TextDraw) (TextState * ts, int x, int y,
const char *text, int len);
int (*FdcInit) (TextState * ts, Win win, Drawable draw);
int (*FdcInit) (TextState * ts, Win win, EX_Drawable draw);
void (*FdcFini) (TextState * ts);
void (*FdcSetDrawable) (TextState * ts, unsigned long draw);
void (*FdcSetColor) (TextState * ts, unsigned int color);
@ -100,19 +100,20 @@ TextState *TextclassGetTextState(TextClass * tclass, int state,
int active, int sticky);
__EXPORT__ void TextstateTextFit(TextState * ts, char **ptext, int *pw,
int textwidth_limit);
void TextstateTextDraw(TextState * ts, Win win, Drawable draw,
const char *text, int x, int y, int w,
int h, const EImageBorder * pad,
int fsize, int justh, int justv);
void TextstateTextDraw(TextState * ts, Win win,
EX_Drawable draw, const char *text,
int x, int y, int w, int h,
const EImageBorder * pad, int fsize,
int justh, int justv);
void TextSize(TextClass * tclass, int active, int sticky,
int state, const char *text, int *width,
int *height, int fsize);
void TextDraw(TextClass * tclass, Win win, Drawable draw,
void TextDraw(TextClass * tclass, Win win, EX_Drawable draw,
int active, int sticky, int state,
const char *text, int x, int y, int w, int h,
int fsize, int justification);
__EXPORT__ int _xft_FdcInit(TextState * ts, Win win, Drawable draw);
__EXPORT__ int _xft_FdcInit(TextState * ts, Win win, EX_Drawable draw);
__EXPORT__ void _xft_FdcFini(TextState * ts);
__EXPORT__ void _xft_FdcSetDrawable(TextState * ts, unsigned long draw);
__EXPORT__ void _xft_FdcSetColor(TextState * ts, unsigned int color);

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -49,7 +49,7 @@ _get_gc(Win win)
}
static void
TextDrawRotTo(Win win, Drawable src, Drawable dst, int x, int y,
TextDrawRotTo(Win win, EX_Drawable src, EX_Drawable dst, int x, int y,
int w, int h, TextState * ts)
{
EImage *im;
@ -82,7 +82,7 @@ TextDrawRotTo(Win win, Drawable src, Drawable dst, int x, int y,
}
static void
TextDrawRotBack(Win win, Drawable dst, Drawable src, int x, int y,
TextDrawRotBack(Win win, EX_Drawable dst, EX_Drawable src, int x, int y,
int w, int h, TextState * ts)
{
EImage *im;
@ -116,7 +116,7 @@ TextDrawRotBack(Win win, Drawable dst, Drawable src, int x, int y,
#if FONT_TYPE_IFT
static EImage *
TextImageGet(Win win __UNUSED__, Drawable src, int x, int y, int w, int h,
TextImageGet(Win win __UNUSED__, EX_Drawable src, int x, int y, int w, int h,
TextState * ts)
{
EImage *im;
@ -147,7 +147,7 @@ TextImageGet(Win win __UNUSED__, Drawable src, int x, int y, int w, int h,
}
static void
TextImagePut(EImage * im, Win win, Drawable dst, int x, int y,
TextImagePut(EImage * im, Win win, EX_Drawable dst, int x, int y,
int w, int h, TextState * ts)
{
int win_w;
@ -408,7 +408,7 @@ typedef struct {
XFontSet font;
int ascent;
Win win;
Drawable draw;
EX_Drawable draw;
GC gc;
} FontCtxXfs;
@ -482,7 +482,7 @@ _xfs_TextDraw(TextState * ts, int x, int y, const char *text, int len)
}
static int
_xfs_FdcInit(TextState * ts, Win win, Drawable draw)
_xfs_FdcInit(TextState * ts, Win win, EX_Drawable draw)
{
FontCtxXfs *fdc = (FontCtxXfs *) ts->fdc;
@ -525,7 +525,7 @@ extern const FontOps FontOpsXfont;
typedef struct {
XFontStruct *font;
Win win;
Drawable draw;
EX_Drawable draw;
GC gc;
} FontCtxXfont;
@ -585,7 +585,7 @@ _xfont_TextDraw(TextState * ts, int x, int y, const char *text, int len)
}
static int
_xfont_FdcInit(TextState * ts, Win win, Drawable draw)
_xfont_FdcInit(TextState * ts, Win win, EX_Drawable draw)
{
FontCtxXfont *fdc = (FontCtxXfont *) ts->fdc;
@ -829,16 +829,17 @@ TextstateTextFit(TextState * ts, char **ptext, int *pw, int textwidth_limit)
}
void
TextstateTextDraw(TextState * ts, Win win, Drawable draw, const char *text,
int x, int y, int w, int h, const EImageBorder * pad,
int fsize __UNUSED__, int justh, int justv)
TextstateTextDraw(TextState * ts, Win win, EX_Drawable draw,
const char *text, int x, int y, int w, int h,
const EImageBorder * pad, int fsize __UNUSED__, int justh,
int justv)
{
const char *str;
char **lines;
int i, num_lines;
int textwidth_limit, textheight_limit, offset_x, offset_y;
int xx, yy, ww, hh, ascent;
Pixmap drawable;
EX_Pixmap drawable;
if (w <= 0 || h <= 0)
return;
@ -982,9 +983,9 @@ TextstateTextDraw(TextState * ts, Win win, Drawable draw, const char *text,
}
void
TextDraw(TextClass * tclass, Win win, Drawable draw, int active, int sticky,
int state, const char *text, int x, int y, int w, int h, int fsize,
int justh)
TextDraw(TextClass * tclass, Win win, EX_Drawable draw, int active,
int sticky, int state, const char *text, int x, int y, int w, int h,
int fsize, int justh)
{
TextState *ts;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2007-2010 Kim Woelders
* Copyright (C) 2007-2014 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
@ -40,7 +40,7 @@ static PangoContext *_pango_ctx = NULL;
typedef struct {
PangoFontDescription *font;
Win win;
Drawable draw;
EX_Drawable draw;
XftDraw *xftd;
XftColor xftc;
} FontCtxPangoXft;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2006-2009 Kim Woelders
* Copyright (C) 2006-2014 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
@ -36,7 +36,7 @@ __EXPORT__ extern const FontOps FontOps_xft;
typedef struct {
XftFont *font;
Win win;
Drawable draw;
EX_Drawable draw;
XftDraw *xftd;
XftColor xftc;
} FontCtxXft;
@ -118,7 +118,7 @@ _xft_TextDraw(TextState * ts, int x, int y, const char *text, int len)
}
int
_xft_FdcInit(TextState * ts, Win win, Drawable draw)
_xft_FdcInit(TextState * ts, Win win, EX_Drawable draw)
{
FontCtxXft *fdc = (FontCtxXft *) ts->fdc;

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2009 Kim Woelders
* Copyright (C) 2004-2014 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
@ -164,7 +164,7 @@ _ift_TextDraw(TextState * ts, int x, int y, const char *text,
static int
_ift_FdcInit(TextState * ts __UNUSED__, Win win __UNUSED__,
Drawable draw __UNUSED__)
EX_Drawable draw __UNUSED__)
{
return 0;
}
@ -201,7 +201,7 @@ main(int argc, char **argv)
Efont *f;
GC gc;
XGCValues gcv;
Window win;
EX_Window win;
int i, j;
disp = XOpenDisplay(NULL);

View File

@ -443,7 +443,7 @@ static void
WarpFocusHandleEvent(Win win __UNUSED__, XEvent * ev, void *prm __UNUSED__)
{
WarpFocusWin *fw = warpFocusWindow;
KeySym keysym;
EX_KeySym keysym;
unsigned int mask;
if (!EoIsShown(fw))

261
src/x.c
View File

@ -49,7 +49,7 @@ Display *disp;
#if USE_COMPOSITE
static Visual *argb_visual = NULL;
static Colormap argb_cmap = NoXID;
static EX_Colormap argb_cmap = NoXID;
#endif
static XContext xid_context = 0;
@ -151,7 +151,7 @@ _EXidDel(Win win)
#define EXidLookup ELookupXwin
Win
EXidLookup(Window xwin)
EXidLookup(EX_Window xwin)
{
Win win;
XPointer xp;
@ -168,8 +168,8 @@ EXidLookup(Window xwin)
}
static Win
_EXidSet(Window xwin, Win parent, int x, int y, int w, int h, int depth,
Visual * visual, Colormap cmap)
_EXidSet(EX_Window xwin, Win parent, int x, int y, int w, int h, int depth,
Visual * visual, EX_Colormap cmap)
{
Win win;
@ -279,7 +279,7 @@ Win
ECreateWindow(Win parent, int x, int y, int w, int h, int saveunder)
{
Win win;
Window xwin;
EX_Window xwin;
XSetWindowAttributes attr;
attr.backing_store = NotUseful;
@ -308,10 +308,10 @@ ECreateWindow(Win parent, int x, int y, int w, int h, int saveunder)
#if USE_COMPOSITE
static Win
_ECreateWindowVDC(Win parent, int x, int y, int w, int h,
Visual * vis, unsigned int depth, Colormap cmap)
Visual * vis, unsigned int depth, EX_Colormap cmap)
{
Win win;
Window xwin;
EX_Window xwin;
XSetWindowAttributes attr;
attr.background_pixmap = NoXID;
@ -335,7 +335,7 @@ ECreateArgbWindow(Win parent, int x, int y, int w, int h, Win cwin)
{
int depth;
Visual *vis;
Colormap cmap;
EX_Colormap cmap;
if (cwin && Conf.testing.argb_clients_inherit_attr)
{
@ -365,7 +365,7 @@ static Win
_ECreateWindowVD(Win parent, int x, int y, int w, int h,
Visual * vis, unsigned int depth)
{
Colormap cmap;
EX_Colormap cmap;
if (!vis || depth == 0)
return 0;
@ -438,7 +438,7 @@ Win
ECreateEventWindow(Win parent, int x, int y, int w, int h)
{
Win win;
Window xwin;
EX_Window xwin;
XSetWindowAttributes attr;
attr.override_redirect = False;
@ -469,7 +469,7 @@ ECreateFocusWindow(Win parent, int x, int y, int w, int h)
attr.save_under = False;
attr.event_mask = KeyPressMask | FocusChangeMask;
Window xwin, xpar;
EX_Window xwin, xpar;
win = XCreateWindow(disp, parent, x, y, w, h, 0, 0, InputOnly,
CopyFromParent,
@ -644,8 +644,8 @@ EWindowSetMapped(Win win, int mapped)
win->mapped = mapped;
}
Window
EXWindowGetParent(Window xwin)
EX_Window
EXWindowGetParent(EX_Window xwin)
{
Window parent, rt;
Window *pch = NULL;
@ -661,7 +661,7 @@ EXWindowGetParent(Window xwin)
}
Win
ECreateWinFromXwin(Window xwin)
ECreateWinFromXwin(EX_Window xwin)
{
Win win;
Window rr;
@ -697,7 +697,7 @@ EDestroyWin(Win win)
}
Win
ERegisterWindow(Window xwin, XWindowAttributes * pxwa)
ERegisterWindow(EX_Window xwin, XWindowAttributes * pxwa)
{
Win win;
XWindowAttributes xwa;
@ -726,7 +726,7 @@ ERegisterWindow(Window xwin, XWindowAttributes * pxwa)
}
void
EUnregisterXwin(Window xwin)
EUnregisterXwin(EX_Window xwin)
{
Win win;
@ -737,7 +737,7 @@ EUnregisterXwin(Window xwin)
/* FIXME - We shouldn't go here */
_EXidDel(win);
#if 1 /* Debug - Fix code if we get here */
Eprintf("*** FIXME - %s %#lx\n", __func__, xwin);
Eprintf("*** FIXME - %s %#x\n", __func__, xwin);
#endif
}
@ -750,7 +750,7 @@ EUnregisterWindow(Win win)
if (win->cbl.lst)
{
if (EDebug(1))
Eprintf("%s(%#lx) Ignored (%d callbacks remain)\n",
Eprintf("%s(%#x) Ignored (%d callbacks remain)\n",
__func__, win->xwin, win->cbl.num);
return;
}
@ -836,13 +836,13 @@ EMapRaised(Win win)
}
int
EXGetWindowAttributes(Window xwin, XWindowAttributes * pxwa)
EXGetWindowAttributes(EX_Window xwin, XWindowAttributes * pxwa)
{
return XGetWindowAttributes(disp, xwin, pxwa);
}
int
EXGetGeometry(Drawable draw, Window * root_return, int *x, int *y,
EXGetGeometry(EX_Drawable draw, EX_Window * root_return, int *x, int *y,
int *w, int *h, int *bw, int *depth)
{
int ok;
@ -878,7 +878,7 @@ EXGetGeometry(Drawable draw, Window * root_return, int *x, int *y,
}
int
EGetGeometry(Win win, Window * root_return, int *x, int *y,
EGetGeometry(Win win, EX_Window * root_return, int *x, int *y,
int *w, int *h, int *bw, int *depth)
{
if (!win)
@ -956,7 +956,7 @@ EConfigureWindow(Win win, unsigned int mask, XWindowChanges * wc)
#endif
void
ESetWindowBackgroundPixmap(Win win, Pixmap pmap, int kept)
ESetWindowBackgroundPixmap(Win win, EX_Pixmap pmap, int kept)
{
if (!win)
return;
@ -970,10 +970,10 @@ ESetWindowBackgroundPixmap(Win win, Pixmap pmap, int kept)
XSetWindowBackgroundPixmap(disp, win->xwin, pmap);
}
Pixmap
EX_Pixmap
EGetWindowBackgroundPixmap(Win win)
{
Pixmap pmap;
EX_Pixmap pmap;
if (!win)
return NoXID;
@ -1135,9 +1135,24 @@ ELowerWindow(Win win)
}
void
EXRestackWindows(Window * windows, int nwindows)
EXRestackWindows(EX_Window * windows, int nwindows)
{
XRestackWindows(disp, windows, nwindows);
#if SIZEOF_INT == SIZEOF_LONG
XRestackWindows(disp, (Window *) windows, nwindows);
#else
int i;
Window *_wins;
_wins = EMALLOC(Window, nwindows);
if (!_wins)
return;
for (i = 0; i < nwindows; i++)
_wins[i] = windows[i];
XRestackWindows(disp, _wins, nwindows);
Efree(_wins);
#endif
}
void
@ -1161,19 +1176,22 @@ EClearArea(Win win, int x, int y, unsigned int w, unsigned int h)
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)
EX_Window * child_return)
{
Window child;
Bool rc;
if (!child_return)
child_return = &child;
rc = XTranslateCoordinates(disp, src_w->xwin, dst_w->xwin, src_x, src_y,
dest_x_return, dest_y_return, &child);
return XTranslateCoordinates(disp, src_w->xwin, dst_w->xwin, src_x, src_y,
dest_x_return, dest_y_return, child_return);
if (child_return)
*child_return = child;
return rc;
}
void
EXWarpPointer(Window xwin, int x, int y)
EXWarpPointer(EX_Window xwin, int x, int y)
{
XWarpPointer(disp, NoXID, xwin, 0, 0, 0, 0, x, y);
}
@ -1185,12 +1203,13 @@ EWarpPointer(Win win, int x, int y)
}
int
EXQueryPointer(Window xwin, int *px, int *py, Window * pchild,
EXQueryPointer(EX_Window xwin, int *px, int *py, EX_Window * pchild,
unsigned int *pmask)
{
Window root, child;
int root_x, root_y;
unsigned int mask;
Bool rc;
if (xwin == NoXID)
xwin = WinGetXwin(VROOT);
@ -1199,19 +1218,23 @@ EXQueryPointer(Window xwin, int *px, int *py, Window * pchild,
px = &root_x;
if (!py)
py = &root_y;
if (!pchild)
pchild = &child;
if (!pmask)
pmask = &mask;
return XQueryPointer(disp, xwin, &root, pchild, &root_x, &root_y, px, py,
pmask);
rc = XQueryPointer(disp, xwin, &root, &child, &root_x, &root_y, px, py,
pmask);
if (pchild)
*pchild = child;
return rc;
}
int
EQueryPointer(Win win, int *px, int *py, Window * pchild, unsigned int *pmask)
EQueryPointer(Win win, int *px, int *py, EX_Window * pchild,
unsigned int *pmask)
{
Window xwin;
EX_Window xwin;
xwin = (win) ? win->xwin : WinGetXwin(VROOT);
@ -1219,7 +1242,7 @@ EQueryPointer(Win win, int *px, int *py, Window * pchild, unsigned int *pmask)
}
int
EXDrawableOk(Drawable draw)
EXDrawableOk(EX_Drawable draw)
{
if (draw == NoXID)
return 0;
@ -1228,7 +1251,7 @@ EXDrawableOk(Drawable draw)
}
int
EXWindowOk(Window xwin)
EXWindowOk(EX_Window xwin)
{
XWindowAttributes xwa;
@ -1238,13 +1261,13 @@ EXWindowOk(Window xwin)
return EXGetWindowAttributes(xwin, &xwa);
}
KeyCode
EKeysymToKeycode(KeySym keysym)
EX_KeyCode
EKeysymToKeycode(EX_KeySym keysym)
{
return XKeysymToKeycode(disp, keysym);
}
KeyCode
EX_KeyCode
EKeynameToKeycode(const char *name)
{
return XKeysymToKeycode(disp, XStringToKeysym(name));
@ -1255,7 +1278,7 @@ EKeynameToKeycode(const char *name)
#if DEBUG_SHAPE_OPS || DEBUG_SHAPE_PROPAGATE
static void
_EShapeShow(const char *txt, Window xwin, XRectangle * pr, int nr)
_EShapeShow(const char *txt, EX_Window xwin, XRectangle * pr, int nr)
{
int i;
@ -1315,7 +1338,7 @@ EShapeUpdate(Win win)
}
static void
_EShapeCombineMask(Win win, int dest, int x, int y, Pixmap pmap, int op)
_EShapeCombineMask(Win win, int dest, int x, int y, EX_Pixmap pmap, int op)
{
char wasshaped = 0;
@ -1345,11 +1368,11 @@ _EShapeCombineMask(Win win, int dest, int x, int y, Pixmap pmap, int op)
static void
_EShapeCombineMaskTiled(Win win, int dest, int x, int y,
Pixmap pmap, int op, int w, int h)
EX_Pixmap pmap, int op, int w, int h)
{
XGCValues gcv;
GC gc;
Window tm;
EX_Window tm;
gcv.fill_style = FillTiled;
gcv.tile = pmap;
@ -1529,19 +1552,19 @@ EShapeCheck(Win win)
}
void
EShapeSetMask(Win win, int x, int y, Pixmap mask)
EShapeSetMask(Win win, int x, int y, EX_Pixmap mask)
{
_EShapeCombineMask(win, ShapeBounding, x, y, mask, ShapeSet);
}
void
EShapeUnionMask(Win win, int x, int y, Pixmap mask)
EShapeUnionMask(Win win, int x, int y, EX_Pixmap mask)
{
_EShapeCombineMask(win, ShapeBounding, x, y, mask, ShapeUnion);
}
void
EShapeSetMaskTiled(Win win, int x, int y, Pixmap mask, int w, int h)
EShapeSetMaskTiled(Win win, int x, int y, EX_Pixmap mask, int w, int h)
{
_EShapeCombineMaskTiled(win, ShapeBounding, x, y, mask, ShapeSet, w, h);
}
@ -1568,10 +1591,10 @@ EShapeSetShape(Win win, int x, int y, Win src_win)
return win->num_rect != 0;
}
static Pixmap
static EX_Pixmap
_EWindowGetShapePixmap(Win win, unsigned int fg, unsigned int bg)
{
Pixmap mask;
EX_Pixmap mask;
GC gc;
int i;
const XRectangle *rect;
@ -1597,24 +1620,24 @@ _EWindowGetShapePixmap(Win win, unsigned int fg, unsigned int bg)
}
/* Build mask from window shape rects */
Pixmap
EX_Pixmap
EWindowGetShapePixmap(Win win)
{
return _EWindowGetShapePixmap(win, 1, 0);
}
/* Build inverted mask from window shape rects */
Pixmap
EX_Pixmap
EWindowGetShapePixmapInverted(Win win)
{
return _EWindowGetShapePixmap(win, 0, 1);
}
Pixmap
EX_Pixmap
ECreatePixmap(Win win, unsigned int width, unsigned int height,
unsigned int depth)
{
Pixmap pmap;
EX_Pixmap pmap;
if (depth == 0)
depth = win->depth;
@ -1627,7 +1650,7 @@ ECreatePixmap(Win win, unsigned int width, unsigned int height,
}
void
EFreePixmap(Pixmap pmap)
EFreePixmap(EX_Pixmap pmap)
{
#if DEBUG_PIXMAP
Eprintf("%s: %#lx\n", __func__, pmap);
@ -1635,11 +1658,11 @@ EFreePixmap(Pixmap pmap)
XFreePixmap(disp, pmap);
}
Pixmap
EXCreatePixmapCopy(Pixmap src, unsigned int w, unsigned int h,
EX_Pixmap
EXCreatePixmapCopy(EX_Pixmap src, unsigned int w, unsigned int h,
unsigned int depth)
{
Pixmap pmap;
EX_Pixmap pmap;
GC gc;
pmap = XCreatePixmap(disp, src, w, h, depth);
@ -1653,14 +1676,14 @@ EXCreatePixmapCopy(Pixmap src, unsigned int w, unsigned int h,
}
void
EXCopyAreaGC(Drawable src, Drawable dst, GC gc, int sx, int sy,
EXCopyAreaGC(EX_Drawable src, EX_Drawable dst, GC gc, int sx, int sy,
unsigned int w, unsigned int h, int dx, int dy)
{
XCopyArea(disp, src, dst, gc, sx, sy, w, h, dx, dy);
}
void
EXCopyArea(Drawable src, Drawable dst, int sx, int sy,
EXCopyArea(EX_Drawable src, EX_Drawable dst, int sx, int sy,
unsigned int w, unsigned int h, int dx, int dy)
{
GC gc;
@ -1671,8 +1694,8 @@ EXCopyArea(Drawable src, Drawable dst, int sx, int sy,
}
void
EXCopyAreaTiled(Drawable src, Pixmap mask, Drawable dst, int sx, int sy,
unsigned int w, unsigned int h, int dx, int dy)
EXCopyAreaTiled(EX_Drawable src, EX_Pixmap mask, EX_Drawable dst,
int sx, int sy, unsigned int w, unsigned int h, int dx, int dy)
{
GC gc;
XGCValues gcv;
@ -1690,7 +1713,7 @@ EXCopyAreaTiled(Drawable src, Pixmap mask, Drawable dst, int sx, int sy,
}
void
EXFillAreaSolid(Drawable dst, int x, int y, unsigned int w, unsigned int h,
EXFillAreaSolid(EX_Drawable dst, int x, int y, unsigned int w, unsigned int h,
unsigned int pixel)
{
GC gc;
@ -1703,7 +1726,7 @@ EXFillAreaSolid(Drawable dst, int x, int y, unsigned int w, unsigned int h,
}
static void
_EXDrawRectangle(Drawable dst, GC gc, int x, int y,
_EXDrawRectangle(EX_Drawable dst, GC gc, int x, int y,
unsigned int w, unsigned int h, unsigned int pixel)
{
XSetForeground(disp, gc, pixel);
@ -1711,7 +1734,7 @@ _EXDrawRectangle(Drawable dst, GC gc, int x, int y,
}
static void
_EXFillRectangle(Drawable dst, GC gc, int x, int y,
_EXFillRectangle(EX_Drawable dst, GC gc, int x, int y,
unsigned int w, unsigned int h, unsigned int pixel)
{
XSetForeground(disp, gc, pixel);
@ -1719,7 +1742,7 @@ _EXFillRectangle(Drawable dst, GC gc, int x, int y,
}
void
EXPaintRectangle(Drawable dst, int x, int y,
EXPaintRectangle(EX_Drawable dst, int x, int y,
unsigned int w, unsigned int h,
unsigned int fg, unsigned int bg)
{
@ -1735,7 +1758,7 @@ EXPaintRectangle(Drawable dst, int x, int y,
}
GC
EXCreateGC(Drawable draw, unsigned int mask, XGCValues * val)
EXCreateGC(EX_Drawable draw, unsigned int mask, XGCValues * val)
{
XGCValues xgcv;
@ -1761,13 +1784,13 @@ EXFreeGC(GC gc)
}
void
EXSendEvent(Window xwin, unsigned int event_mask, XEvent * ev)
EXSendEvent(EX_Window xwin, unsigned int event_mask, XEvent * ev)
{
XSendEvent(disp, xwin, False, event_mask, ev);
}
unsigned int
EAllocColor(Colormap cmap, unsigned int argb)
EAllocColor(EX_Colormap cmap, unsigned int argb)
{
XColor xc;
@ -1982,10 +2005,10 @@ EVisualIsARGB(Visual * vis)
* Misc
*/
Time
EX_Time
EGetTimestamp(void)
{
static Window win_ts = NoXID;
static EX_Window win_ts = NoXID;
XSetWindowAttributes attr;
XEvent ev;
@ -2009,7 +2032,7 @@ EGetTimestamp(void)
#include <X11/extensions/Xcomposite.h>
Pixmap
EX_Pixmap
EWindowGetPixmap(const Win win)
{
XWindowAttributes xwa;
@ -2032,10 +2055,10 @@ EWindowGetPixmap(const Win win)
#define _G(x) (((x) >> 8) & 0xff)
#define _B(x) (((x) ) & 0xff)
Picture
EPictureCreate(Win win, Drawable draw)
EX_Picture
EPictureCreate(Win win, EX_Drawable draw)
{
Picture pict;
EX_Picture pict;
XRenderPictFormat *pictfmt;
if (!win)
@ -2046,12 +2069,12 @@ EPictureCreate(Win win, Drawable draw)
return pict;
}
Picture
EPictureCreateSolid(Window xwin, int argb, unsigned int a, unsigned int rgb)
EX_Picture
EPictureCreateSolid(EX_Window xwin, int argb, unsigned int a, unsigned int rgb)
{
Display *dpy = disp;
Pixmap pmap;
Picture pict;
EX_Pixmap pmap;
EX_Picture pict;
XRenderPictFormat *pictfmt;
XRenderPictureAttributes pa;
XRenderColor c;
@ -2074,11 +2097,11 @@ EPictureCreateSolid(Window xwin, int argb, unsigned int a, unsigned int rgb)
return pict;
}
Picture
EPictureCreateBuffer(Win win, int w, int h, Pixmap * ppmap)
EX_Picture
EPictureCreateBuffer(Win win, int w, int h, EX_Pixmap * ppmap)
{
Picture pict;
Pixmap pmap;
EX_Picture pict;
EX_Pixmap pmap;
XRenderPictFormat *pictfmt;
pmap = XCreatePixmap(disp, WinGetXwin(win), w, h, WinGetDepth(win));
@ -2093,7 +2116,7 @@ EPictureCreateBuffer(Win win, int w, int h, Pixmap * ppmap)
}
void
EPictureDestroy(Picture pict)
EPictureDestroy(EX_Picture pict)
{
XRenderFreePicture(disp, pict);
}
@ -2103,7 +2126,7 @@ EPictureDestroy(Picture pict)
#if USE_COMPOSITE
void
EPictureSetClip(Picture pict, XserverRegion clip)
EPictureSetClip(EX_Picture pict, EX_SrvRegion clip)
{
XFixesSetPictureClipRegion(disp, pict, 0, 0, clip);
}
@ -2118,10 +2141,10 @@ static int n_rgn_c = 0;
static int n_rgn_d = 0;
#endif
XserverRegion
EX_SrvRegion
ERegionCreate(void)
{
XserverRegion rgn;
EX_SrvRegion rgn;
rgn = XFixesCreateRegion(disp, NULL, 0);
@ -2133,10 +2156,10 @@ ERegionCreate(void)
return rgn;
}
XserverRegion
EX_SrvRegion
ERegionCreateRect(int x, int y, int w, int h)
{
XserverRegion rgn;
EX_SrvRegion rgn;
XRectangle rct;
rct.x = x;
@ -2154,10 +2177,10 @@ ERegionCreateRect(int x, int y, int w, int h)
}
#if USE_DESK_EXPOSE
XserverRegion
EX_SrvRegion
ERegionCreateFromRects(XRectangle * rectangles, int nrectangles)
{
XserverRegion rgn;
EX_SrvRegion rgn;
rgn = XFixesCreateRegion(disp, rectangles, nrectangles);
@ -2170,10 +2193,10 @@ ERegionCreateFromRects(XRectangle * rectangles, int nrectangles)
}
#endif
XserverRegion
EX_SrvRegion
ERegionCreateFromWindow(Win win)
{
XserverRegion rgn;
EX_SrvRegion rgn;
rgn =
XFixesCreateRegionFromWindow(disp, WinGetXwin(win), WindowRegionBounding);
@ -2186,17 +2209,17 @@ ERegionCreateFromWindow(Win win)
return rgn;
}
XserverRegion
ERegionCopy(XserverRegion rgn, XserverRegion src)
EX_SrvRegion
ERegionCopy(EX_SrvRegion rgn, EX_SrvRegion src)
{
XFixesCopyRegion(disp, rgn, src);
return rgn;
}
XserverRegion
ERegionClone(XserverRegion src)
EX_SrvRegion
ERegionClone(EX_SrvRegion src)
{
XserverRegion rgn;
EX_SrvRegion rgn;
rgn = ERegionCreate();
ERegionCopy(rgn, src);
@ -2205,7 +2228,7 @@ ERegionClone(XserverRegion src)
}
void
ERegionDestroy(XserverRegion rgn)
ERegionDestroy(EX_SrvRegion rgn)
{
#if DEBUG_REGIONS
n_rgn_d++;
@ -2216,13 +2239,13 @@ ERegionDestroy(XserverRegion rgn)
}
void
ERegionEmpty(XserverRegion rgn)
ERegionEmpty(EX_SrvRegion rgn)
{
XFixesSetRegion(disp, rgn, NULL, 0);
}
void
ERegionSetRect(XserverRegion rgn, int x, int y, int w, int h)
ERegionSetRect(EX_SrvRegion rgn, int x, int y, int w, int h)
{
XRectangle rct;
@ -2234,7 +2257,7 @@ ERegionSetRect(XserverRegion rgn, int x, int y, int w, int h)
}
void
ERegionTranslate(XserverRegion rgn, int dx, int dy)
ERegionTranslate(EX_SrvRegion rgn, int dx, int dy)
{
if (dx == 0 && dy == 0)
return;
@ -2242,29 +2265,29 @@ ERegionTranslate(XserverRegion rgn, int dx, int dy)
}
void
ERegionIntersect(XserverRegion dst, XserverRegion src)
ERegionIntersect(EX_SrvRegion dst, EX_SrvRegion src)
{
XFixesIntersectRegion(disp, dst, dst, src);
}
void
ERegionUnion(XserverRegion dst, XserverRegion src)
ERegionUnion(EX_SrvRegion dst, EX_SrvRegion src)
{
XFixesUnionRegion(disp, dst, dst, src);
}
void
ERegionSubtract(XserverRegion dst, XserverRegion src)
ERegionSubtract(EX_SrvRegion dst, EX_SrvRegion src)
{
XFixesSubtractRegion(disp, dst, dst, src);
}
void
ERegionIntersectOffset(XserverRegion dst, int dx, int dy, XserverRegion src,
XserverRegion tmp)
ERegionIntersectOffset(EX_SrvRegion dst, int dx, int dy, EX_SrvRegion src,
EX_SrvRegion tmp)
{
Display *dpy = disp;
XserverRegion rgn;
EX_SrvRegion rgn;
rgn = src;
if (dx != 0 || dy != 0)
@ -2276,11 +2299,11 @@ ERegionIntersectOffset(XserverRegion dst, int dx, int dy, XserverRegion src,
}
void
ERegionSubtractOffset(XserverRegion dst, int dx, int dy, XserverRegion src,
XserverRegion tmp)
ERegionSubtractOffset(EX_SrvRegion dst, int dx, int dy, EX_SrvRegion src,
EX_SrvRegion tmp)
{
Display *dpy = disp;
XserverRegion rgn;
EX_SrvRegion rgn;
rgn = src;
if (dx != 0 || dy != 0)
@ -2293,11 +2316,11 @@ ERegionSubtractOffset(XserverRegion dst, int dx, int dy, XserverRegion src,
#if 0 /* Unused */
void
ERegionUnionOffset(XserverRegion dst, int dx, int dy, XserverRegion src,
XserverRegion tmp)
ERegionUnionOffset(EX_SrvRegion dst, int dx, int dy, EX_SrvRegion src,
EX_SrvRegion tmp)
{
Display *dpy = disp;
XserverRegion rgn;
EX_SrvRegion rgn;
rgn = src;
if (dx != 0 || dy != 0)
@ -2311,7 +2334,7 @@ ERegionUnionOffset(XserverRegion dst, int dx, int dy, XserverRegion src,
#if 0 /* Unused (for debug) */
int
ERegionIsEmpty(XserverRegion rgn)
ERegionIsEmpty(EX_SrvRegion rgn)
{
int nr;
XRectangle *pr;
@ -2324,7 +2347,7 @@ ERegionIsEmpty(XserverRegion rgn)
#endif
void
ERegionShow(const char *txt, XserverRegion rgn,
ERegionShow(const char *txt, EX_SrvRegion rgn,
void (*prf) (const char *fmt, ...))
{
int i, nr;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2004-2013 Kim Woelders
* Copyright (C) 2004-2014 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
@ -23,13 +23,7 @@
#ifndef _XPROP_H_
#define _XPROP_H_
#define EX_ID unsigned int
#define EX_Drawable EX_ID
#define EX_Window EX_ID
#define EX_Pixmap EX_ID
#define EX_Atom EX_ID
#define EX_Time EX_ID
#define EX_GC GC
#include "xtypes.h"
EX_Atom ex_atom_get(const char *name);
void ex_atoms_get(const char *const *names,

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 Kim Woelders
* Copyright (C) 2008-2014 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
@ -25,8 +25,22 @@
#include <X11/Xlib.h>
#define EX_ID unsigned int
#define EX_Atom EX_ID
#define EX_Colormap EX_ID
#define EX_Cursor EX_ID
#define EX_Drawable EX_ID
#define EX_KeySym EX_ID
#define EX_Picture EX_ID
#define EX_Pixmap EX_ID
#define EX_SrvRegion EX_ID
#define EX_Window EX_ID
#define EX_KeyCode unsigned char
#define EX_Time unsigned int
typedef struct _xwin *Win;
#define NoXID None
#define NoXID 0U
#endif /* _XTYPES_H_ */

View File

@ -75,7 +75,7 @@ void ESync(unsigned int mask);
int EVisualIsARGB(Visual * vis);
Visual *EVisualFindARGB(void);
Time EGetTimestamp(void);
EX_Time EGetTimestamp(void);
typedef void (EventCallbackFunc) (Win win, XEvent * ev, void *prm);
@ -93,7 +93,7 @@ struct _xwin {
struct _xwin *next;
struct _xwin *prev;
EventCallbackList cbl;
Window xwin;
EX_Window xwin;
Win parent;
int x, y, w, h;
short depth;
@ -108,15 +108,15 @@ struct _xwin {
int ord;
XRectangle *rects;
Visual *visual;
Colormap cmap;
Pixmap bgpmap;
EX_Colormap cmap;
EX_Pixmap bgpmap;
unsigned int bgcol;
#if USE_XI2
unsigned int event_mask;
#endif
};
Win ELookupXwin(Window xwin);
Win ELookupXwin(EX_Window xwin);
#define WinGetXwin(win) ((win)->xwin)
#define WinGetPmap(win) ((win)->bgpmap)
@ -132,12 +132,12 @@ Win ELookupXwin(Window xwin);
#define WinIsMapped(win) ((win)->mapped != 0)
#define WinIsShaped(win) ((win)->num_rect != 0)
Win ECreateWinFromXwin(Window xwin);
Win ECreateWinFromXwin(EX_Window xwin);
void EDestroyWin(Win win);
Win ERegisterWindow(Window xwin, XWindowAttributes * pxwa);
Win ERegisterWindow(EX_Window xwin, XWindowAttributes * pxwa);
void EUnregisterWindow(Win win);
void EUnregisterXwin(Window xwin);
void EUnregisterXwin(EX_Window xwin);
void EventCallbackRegister(Win win, EventCallbackFunc * func,
void *prm);
void EventCallbackUnregister(Win win, EventCallbackFunc * func,
@ -172,23 +172,24 @@ void EMapWindow(Win win);
void EMapRaised(Win win);
void EUnmapWindow(Win win);
void EReparentWindow(Win win, Win parent, int x, int y);
int EGetGeometry(Win win, Window * root_return,
int EGetGeometry(Win win, EX_Window * root_return,
int *x, int *y, int *w, int *h, int *bw,
int *depth);
void EGetWindowAttributes(Win win, XWindowAttributes * pxwa);
void EConfigureWindow(Win win, unsigned int mask,
XWindowChanges * wc);
void ESetWindowBackgroundPixmap(Win win, Pixmap pmap, int kept);
Pixmap EGetWindowBackgroundPixmap(Win win);
void ESetWindowBackgroundPixmap(Win win, EX_Pixmap pmap,
int kept);
EX_Pixmap EGetWindowBackgroundPixmap(Win win);
void EFreeWindowBackgroundPixmap(Win win);
void ESetWindowBackground(Win win, unsigned int col);
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);
int EXDrawableOk(Drawable draw);
int EXWindowOk(Window xwin);
EX_Window * child_return);
int EXDrawableOk(EX_Drawable draw);
int EXWindowOk(EX_Window xwin);
void ESelectInput(Win win, unsigned int event_mask);
void ESelectInputChange(Win win, unsigned int set,
@ -203,14 +204,14 @@ void EClearWindowExpose(Win win);
void EClearArea(Win win, int x, int y,
unsigned int w, unsigned int h);
Pixmap ECreatePixmap(Win win, unsigned int width,
EX_Pixmap ECreatePixmap(Win win, unsigned int width,
unsigned int height, unsigned int depth);
void EFreePixmap(Pixmap pixmap);
void EFreePixmap(EX_Pixmap pixmap);
int EShapeUpdate(Win win);
void EShapeSetMask(Win win, int x, int y, Pixmap mask);
void EShapeUnionMask(Win win, int x, int y, Pixmap mask);
void EShapeSetMaskTiled(Win win, int x, int y, Pixmap mask,
void EShapeSetMask(Win win, int x, int y, EX_Pixmap mask);
void EShapeUnionMask(Win win, int x, int y, EX_Pixmap mask);
void EShapeSetMaskTiled(Win win, int x, int y, EX_Pixmap mask,
int w, int h);
void EShapeSetRects(Win win, int x, int y,
XRectangle * rect, int n_rects);
@ -219,14 +220,14 @@ void EShapeUnionRects(Win win, int x, int y,
int EShapeSetShape(Win win, int x, int y, Win src_win);
int EShapePropagate(Win win);
int EShapeCheck(Win win);
Pixmap EWindowGetShapePixmap(Win win);
Pixmap EWindowGetShapePixmapInverted(Win win);
EX_Pixmap EWindowGetShapePixmap(Win win);
EX_Pixmap EWindowGetShapePixmapInverted(Win win);
void EWarpPointer(Win win, int x, int y);
int EQueryPointer(Win win, int *px, int *py,
Window * pchild, unsigned int *pmask);
EX_Window * pchild, unsigned int *pmask);
unsigned int EAllocColor(Colormap cmap, unsigned int argb);
unsigned int EAllocColor(EX_Colormap cmap, unsigned int argb);
#define _A(x) (((x) >> 24) & 0xff)
#define _R(x) (((x) >> 16) & 0xff)
@ -248,52 +249,54 @@ unsigned int EAllocColor(Colormap cmap, unsigned int argb);
#define COLOR32_TO_ARGB16(c, a, r, g, b) \
do { a = _A16(c); r = _R16(c); g = _G16(c); b = _B16(c); } while (0)
Window EXWindowGetParent(Window xwin);
int EXGetWindowAttributes(Window w, XWindowAttributes * pxwa);
int EXGetGeometry(Window xwin, Window * root_return,
EX_Window EXWindowGetParent(EX_Window xwin);
int EXGetWindowAttributes(EX_Window xwin,
XWindowAttributes * pxwa);
int EXGetGeometry(EX_Window xwin, EX_Window * root_return,
int *x, int *y, int *w, int *h, int *bw,
int *depth);
void EXRestackWindows(Window * windows, int nwindows);
void EXRestackWindows(EX_Window * windows, int nwindows);
void EXCopyAreaGC(Drawable src, Drawable dst, GC gc,
void EXCopyAreaGC(EX_Drawable src, EX_Drawable dst, GC gc,
int sx, int sy, unsigned int w, unsigned int h,
int dx, int dy);
void EXCopyArea(Drawable src, Drawable dst, int sx, int sy,
unsigned int w, unsigned int h, int dx, int dy);
void EXCopyAreaTiled(Drawable src, Pixmap mask, Drawable dst,
int sx, int sy,
unsigned int w, unsigned int h,
int dx, int dy);
void EXFillAreaSolid(Drawable dst, int x, int y,
void EXCopyArea(EX_Drawable src, EX_Drawable dst, int sx,
int sy, unsigned int w, unsigned int h, int dx,
int dy);
void EXCopyAreaTiled(EX_Drawable src, EX_Pixmap mask,
EX_Drawable dst, int sx, int sy,
unsigned int w, unsigned int h, int dx,
int dy);
void EXFillAreaSolid(EX_Drawable dst, int x, int y,
unsigned int w, unsigned int h,
unsigned int pixel);
void EXPaintRectangle(Drawable dst, int x, int y,
void EXPaintRectangle(EX_Drawable dst, int x, int y,
unsigned int w, unsigned int h,
unsigned int fg, unsigned int bg);
void EXWarpPointer(Window xwin, int x, int y);
int EXQueryPointer(Window xwin, int *px, int *py,
Window * pchild, unsigned int *pmask);
void EXWarpPointer(EX_Window xwin, int x, int y);
int EXQueryPointer(EX_Window xwin, int *px, int *py,
EX_Window * pchild, unsigned int *pmask);
Pixmap EXCreatePixmapCopy(Pixmap src, unsigned int w,
EX_Pixmap EXCreatePixmapCopy(EX_Pixmap src, unsigned int w,
unsigned int h, unsigned int depth);
GC EXCreateGC(Drawable draw, unsigned int mask,
GC EXCreateGC(EX_Drawable draw, unsigned int mask,
XGCValues * val);
void EXFreeGC(GC gc);
void EXSendEvent(Window xwin,
unsigned int event_mask, XEvent * ev);
void EXSendEvent(EX_Window xwin, unsigned int event_mask,
XEvent * ev);
KeyCode EKeysymToKeycode(KeySym keysym);
KeyCode EKeynameToKeycode(const char *name);
EX_KeyCode EKeysymToKeycode(EX_KeySym keysym);
EX_KeyCode EKeynameToKeycode(const char *name);
typedef struct {
char type;
char depth;
Pixmap pmap;
Pixmap mask;
EX_Pixmap pmap;
EX_Pixmap mask;
unsigned short w, h;
} PmapMask;
@ -301,53 +304,50 @@ void PmapMaskInit(PmapMask * pmm, Win win, int w, int h);
void PmapMaskFree(PmapMask * pmm);
#if USE_XRENDER
#include <X11/extensions/Xrender.h>
Picture EPictureCreate(Win win, Drawable draw);
Picture EPictureCreateSolid(Window xwin, int argb,
EX_Picture EPictureCreate(Win win, EX_Drawable draw);
EX_Picture EPictureCreateSolid(EX_Window xwin, int argb,
unsigned int a, unsigned int rgb);
Picture EPictureCreateBuffer(Win win, int w, int h, Pixmap * ppmap);
void EPictureDestroy(Picture pict);
EX_Picture EPictureCreateBuffer(Win win, int w, int h,
EX_Pixmap * ppmap);
void EPictureDestroy(EX_Picture pict);
#endif /* USE_XRENDER */
#if USE_COMPOSITE
#include <X11/extensions/Xfixes.h>
XserverRegion ERegionCreate(void);
XserverRegion ERegionCreateRect(int x, int y, int w, int h);
EX_SrvRegion ERegionCreate(void);
EX_SrvRegion ERegionCreateRect(int x, int y, int w, int h);
#if USE_DESK_EXPOSE
XserverRegion ERegionCreateFromRects(XRectangle * rectangles,
EX_SrvRegion ERegionCreateFromRects(XRectangle * rectangles,
int nrectangles);
#endif
XserverRegion ERegionCreateFromWindow(Win win);
XserverRegion ERegionCopy(XserverRegion rgn, XserverRegion src);
XserverRegion ERegionClone(XserverRegion src);
void ERegionDestroy(XserverRegion rgn);
void ERegionEmpty(XserverRegion rgn);
void ERegionSetRect(XserverRegion rgn, int x, int y, int w,
EX_SrvRegion ERegionCreateFromWindow(Win win);
EX_SrvRegion ERegionCopy(EX_SrvRegion rgn, EX_SrvRegion src);
EX_SrvRegion ERegionClone(EX_SrvRegion src);
void ERegionDestroy(EX_SrvRegion rgn);
void ERegionEmpty(EX_SrvRegion rgn);
void ERegionSetRect(EX_SrvRegion rgn, int x, int y, int w,
int h);
void ERegionTranslate(XserverRegion rgn, int dx, int dy);
void ERegionIntersect(XserverRegion dst, XserverRegion src);
void ERegionSubtract(XserverRegion dst, XserverRegion src);
void ERegionUnion(XserverRegion dst, XserverRegion src);
void ERegionIntersectOffset(XserverRegion dst, int dx, int dy,
XserverRegion src,
XserverRegion tmp);
void ERegionSubtractOffset(XserverRegion dst, int dx, int dy,
XserverRegion src, XserverRegion tmp);
void ERegionUnionOffset(XserverRegion dst, int dx, int dy,
XserverRegion src, XserverRegion tmp);
void ERegionTranslate(EX_SrvRegion rgn, int dx, int dy);
void ERegionIntersect(EX_SrvRegion dst, EX_SrvRegion src);
void ERegionSubtract(EX_SrvRegion dst, EX_SrvRegion src);
void ERegionUnion(EX_SrvRegion dst, EX_SrvRegion src);
void ERegionIntersectOffset(EX_SrvRegion dst, int dx, int dy,
EX_SrvRegion src, EX_SrvRegion tmp);
void ERegionSubtractOffset(EX_SrvRegion dst, int dx, int dy,
EX_SrvRegion src, EX_SrvRegion tmp);
void ERegionUnionOffset(EX_SrvRegion dst, int dx, int dy,
EX_SrvRegion src, EX_SrvRegion tmp);
#if 0 /* Unused (for debug) */
int ERegionIsEmpty(XserverRegion rgn);
int ERegionIsEmpty(EX_SrvRegion rgn);
#endif
void ERegionShow(const char *txt, XserverRegion rgn,
void ERegionShow(const char *txt, EX_SrvRegion rgn,
void (*prf) (const char *fmt, ...));
void EPictureSetClip(Picture pict, XserverRegion clip);
void EPictureSetClip(EX_Picture pict, EX_SrvRegion clip);
Pixmap EWindowGetPixmap(const Win win);
EX_Pixmap EWindowGetPixmap(const Win win);
#endif /* USE_COMPOSITE */