2005-07-16 09:57:45 -07:00
|
|
|
/*
|
2007-01-13 11:14:29 -08:00
|
|
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
2021-01-09 00:45:09 -08:00
|
|
|
* Copyright (C) 2004-2021 Kim Woelders
|
2005-07-16 09:57:45 -07:00
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* of this software and associated documentation files (the "Software"), to
|
|
|
|
* deal in the Software without restriction, including without limitation the
|
|
|
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
|
|
* sell copies of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
* all copies of the Software, its documentation and marketing & publicity
|
|
|
|
* materials, and acknowledgment shall be given in the documentation, materials
|
|
|
|
* and software packages that this Software was used.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
* THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
|
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
*/
|
|
|
|
#ifndef _XWIN_H_
|
|
|
|
#define _XWIN_H_
|
|
|
|
|
2008-03-29 03:48:45 -07:00
|
|
|
#include "util.h"
|
2008-03-30 05:13:16 -07:00
|
|
|
#include "xtypes.h"
|
2008-03-29 10:18:58 -07:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
char *name;
|
|
|
|
int screens;
|
|
|
|
int screen;
|
|
|
|
unsigned int pixel_black;
|
|
|
|
unsigned int pixel_white;
|
|
|
|
|
|
|
|
Win rroot; /* Real root window */
|
|
|
|
Win vroot; /* Virtual root window */
|
|
|
|
|
2014-04-21 07:28:47 -07:00
|
|
|
void *root_gc;
|
|
|
|
|
2008-03-29 10:18:58 -07:00
|
|
|
int server_grabbed;
|
|
|
|
|
|
|
|
unsigned char last_error_code;
|
|
|
|
} EDisplay;
|
|
|
|
|
2021-01-09 00:45:09 -08:00
|
|
|
extern EDisplay Dpy;
|
|
|
|
extern Display *disp;
|
2008-03-29 10:18:58 -07:00
|
|
|
|
|
|
|
#define RROOT Dpy.rroot
|
|
|
|
#define VROOT Dpy.vroot
|
|
|
|
|
|
|
|
void EXInit(void);
|
2008-03-29 03:48:45 -07:00
|
|
|
|
|
|
|
int EDisplayOpen(const char *dstr, int scr);
|
2006-06-01 13:18:40 -07:00
|
|
|
void EDisplayClose(void);
|
|
|
|
void EDisplayDisconnect(void);
|
2010-07-29 13:39:25 -07:00
|
|
|
|
2013-12-28 12:57:54 -08:00
|
|
|
typedef void (EXErrorHandler) (const XEvent *);
|
2010-07-29 13:39:25 -07:00
|
|
|
typedef void (EXIOErrorHandler) (void);
|
|
|
|
void EDisplaySetErrorHandlers(EXErrorHandler * error,
|
|
|
|
EXIOErrorHandler * fatal);
|
2006-06-01 13:18:40 -07:00
|
|
|
|
|
|
|
void EGrabServer(void);
|
|
|
|
void EUngrabServer(void);
|
|
|
|
int EServerIsGrabbed(void);
|
|
|
|
void EFlush(void);
|
2008-02-13 13:31:29 -08:00
|
|
|
|
|
|
|
#define ESYNC_MAIN 0x0001
|
|
|
|
#define ESYNC_DESKS 0x0002
|
|
|
|
#define ESYNC_MENUS 0x0004
|
|
|
|
#define ESYNC_MOVRES 0x0008
|
|
|
|
#define ESYNC_FOCUS 0x0010
|
|
|
|
#define ESYNC_SLIDEOUT 0x0080
|
|
|
|
void ESync(unsigned int mask);
|
2006-06-01 13:18:40 -07:00
|
|
|
|
|
|
|
int EVisualIsARGB(Visual * vis);
|
|
|
|
Visual *EVisualFindARGB(void);
|
|
|
|
|
2009-12-03 11:29:30 -08:00
|
|
|
EX_Time EGetTimestamp(void);
|
2006-06-01 13:18:40 -07:00
|
|
|
|
2006-09-08 16:13:57 -07:00
|
|
|
typedef void (EventCallbackFunc) (Win win, XEvent * ev, void *prm);
|
|
|
|
|
2008-03-23 04:54:24 -07:00
|
|
|
typedef struct {
|
2006-09-08 16:13:57 -07:00
|
|
|
EventCallbackFunc *func;
|
|
|
|
void *prm;
|
|
|
|
} EventCallbackItem;
|
|
|
|
|
2008-03-23 04:54:24 -07:00
|
|
|
typedef struct {
|
2006-09-08 16:13:57 -07:00
|
|
|
int num;
|
|
|
|
EventCallbackItem *lst;
|
|
|
|
} EventCallbackList;
|
|
|
|
|
2008-03-23 04:54:24 -07:00
|
|
|
struct _xwin {
|
2006-09-08 16:13:57 -07:00
|
|
|
struct _xwin *next;
|
|
|
|
struct _xwin *prev;
|
|
|
|
EventCallbackList cbl;
|
2009-12-03 11:29:30 -08:00
|
|
|
EX_Window xwin;
|
2006-09-08 16:13:57 -07:00
|
|
|
Win parent;
|
|
|
|
int x, y, w, h;
|
2007-05-20 01:08:59 -07:00
|
|
|
short depth;
|
|
|
|
unsigned short bw;
|
|
|
|
char argb;
|
2006-09-08 16:13:57 -07:00
|
|
|
char mapped;
|
|
|
|
char in_use;
|
|
|
|
signed char do_del;
|
|
|
|
char attached;
|
2007-05-25 15:40:47 -07:00
|
|
|
signed char bg_owned; /* bgpmap "owned" by Win */
|
2006-09-08 16:13:57 -07:00
|
|
|
int num_rect;
|
|
|
|
int ord;
|
|
|
|
XRectangle *rects;
|
|
|
|
Visual *visual;
|
2009-12-03 11:29:30 -08:00
|
|
|
EX_Colormap cmap;
|
|
|
|
EX_Pixmap bgpmap;
|
2006-09-08 16:13:57 -07:00
|
|
|
unsigned int bgcol;
|
2009-12-26 02:35:42 -08:00
|
|
|
#if USE_XI2
|
|
|
|
unsigned int event_mask;
|
|
|
|
#endif
|
2006-09-08 16:13:57 -07:00
|
|
|
};
|
|
|
|
|
2009-12-03 11:29:30 -08:00
|
|
|
Win ELookupXwin(EX_Window xwin);
|
2006-04-29 12:39:21 -07:00
|
|
|
|
2006-09-08 16:13:57 -07:00
|
|
|
#define WinGetXwin(win) ((win)->xwin)
|
2007-05-25 15:40:47 -07:00
|
|
|
#define WinGetPmap(win) ((win)->bgpmap)
|
2006-09-08 16:13:57 -07:00
|
|
|
#define WinGetX(win) ((win)->x)
|
|
|
|
#define WinGetY(win) ((win)->y)
|
|
|
|
#define WinGetW(win) ((win)->w)
|
|
|
|
#define WinGetH(win) ((win)->h)
|
|
|
|
#define WinGetBorderWidth(win) ((win)->bw)
|
|
|
|
#define WinGetDepth(win) ((win)->depth)
|
|
|
|
#define WinGetVisual(win) ((win)->visual)
|
|
|
|
#define WinGetCmap(win) ((win)->cmap)
|
2010-04-11 04:43:00 -07:00
|
|
|
#define WinGetNumRect(win) ((win)->num_rect)
|
2009-09-20 01:16:00 -07:00
|
|
|
#define WinIsMapped(win) ((win)->mapped != 0)
|
2007-12-15 09:10:47 -08:00
|
|
|
#define WinIsShaped(win) ((win)->num_rect != 0)
|
2006-05-07 08:08:01 -07:00
|
|
|
|
2009-12-03 11:29:30 -08:00
|
|
|
Win ECreateWinFromXwin(EX_Window xwin);
|
2006-05-07 08:08:01 -07:00
|
|
|
void EDestroyWin(Win win);
|
2006-04-29 12:39:21 -07:00
|
|
|
|
2009-12-03 11:29:30 -08:00
|
|
|
Win ERegisterWindow(EX_Window xwin, XWindowAttributes * pxwa);
|
2006-04-29 12:39:21 -07:00
|
|
|
void EUnregisterWindow(Win win);
|
2009-12-03 11:29:30 -08:00
|
|
|
void EUnregisterXwin(EX_Window xwin);
|
2009-07-27 09:46:54 -07:00
|
|
|
void EventCallbackRegister(Win win, EventCallbackFunc * func,
|
|
|
|
void *prm);
|
|
|
|
void EventCallbackUnregister(Win win, EventCallbackFunc * func,
|
2005-07-16 09:57:45 -07:00
|
|
|
void *prm);
|
2006-04-29 12:39:21 -07:00
|
|
|
void EventCallbacksProcess(Win win, XEvent * ev);
|
2005-07-16 09:57:45 -07:00
|
|
|
|
2006-04-29 12:39:21 -07:00
|
|
|
Win ECreateWindow(Win parent, int x, int y, int w, int h,
|
2005-07-16 09:57:45 -07:00
|
|
|
int saveunder);
|
2006-06-03 07:11:34 -07:00
|
|
|
Win ECreateArgbWindow(Win parent, int x, int y, int w, int h,
|
|
|
|
Win cwin);
|
|
|
|
Win ECreateClientWindow(Win parent, int x, int y, int w, int h);
|
2008-06-05 10:45:01 -07:00
|
|
|
|
|
|
|
#define WIN_TYPE_CLIENT 0
|
|
|
|
#define WIN_TYPE_INTERNAL 1
|
2008-06-05 10:59:51 -07:00
|
|
|
#define WIN_TYPE_NO_ARGB 2
|
|
|
|
#define WIN_TYPE_GLX 3
|
2006-06-03 07:11:34 -07:00
|
|
|
Win ECreateObjectWindow(Win parent, int x, int y, int w,
|
|
|
|
int h, int saveunder, int type,
|
2007-05-20 01:08:59 -07:00
|
|
|
Win cwin);
|
2006-04-29 12:39:21 -07:00
|
|
|
Win ECreateEventWindow(Win parent, int x, int y, int w, int h);
|
|
|
|
Win ECreateFocusWindow(Win parent, int x, int y, int w, int h);
|
|
|
|
void EWindowSync(Win win);
|
2006-09-08 16:13:57 -07:00
|
|
|
void EWindowSetGeometry(Win win, int x, int y, int w, int h,
|
|
|
|
int bw);
|
2006-04-29 12:39:21 -07:00
|
|
|
void EWindowSetMapped(Win win, int mapped);
|
|
|
|
|
|
|
|
void EMoveWindow(Win win, int x, int y);
|
|
|
|
void EResizeWindow(Win win, int w, int h);
|
|
|
|
void EMoveResizeWindow(Win win, int x, int y, int w, int h);
|
|
|
|
void EDestroyWindow(Win win);
|
|
|
|
void EMapWindow(Win win);
|
|
|
|
void EMapRaised(Win win);
|
|
|
|
void EUnmapWindow(Win win);
|
|
|
|
void EReparentWindow(Win win, Win parent, int x, int y);
|
2009-12-03 11:29:30 -08:00
|
|
|
int EGetGeometry(Win win, EX_Window * root_return,
|
2005-07-16 09:57:45 -07:00
|
|
|
int *x, int *y, int *w, int *h, int *bw,
|
|
|
|
int *depth);
|
2006-05-21 05:09:14 -07:00
|
|
|
void EGetWindowAttributes(Win win, XWindowAttributes * pxwa);
|
2006-04-29 12:39:21 -07:00
|
|
|
void EConfigureWindow(Win win, unsigned int mask,
|
2005-07-16 09:57:45 -07:00
|
|
|
XWindowChanges * wc);
|
2009-12-03 11:29:30 -08:00
|
|
|
void ESetWindowBackgroundPixmap(Win win, EX_Pixmap pmap,
|
|
|
|
int kept);
|
|
|
|
EX_Pixmap EGetWindowBackgroundPixmap(Win win);
|
2007-05-25 15:40:47 -07:00
|
|
|
void EFreeWindowBackgroundPixmap(Win win);
|
2006-05-21 11:44:18 -07:00
|
|
|
void ESetWindowBackground(Win win, unsigned int col);
|
2006-04-29 12:39:21 -07:00
|
|
|
int ETranslateCoordinates(Win src_w, Win dst_w,
|
2005-07-16 09:57:45 -07:00
|
|
|
int src_x, int src_y,
|
|
|
|
int *dest_x_return,
|
|
|
|
int *dest_y_return,
|
2009-12-03 11:29:30 -08:00
|
|
|
EX_Window * child_return);
|
|
|
|
int EXDrawableOk(EX_Drawable draw);
|
|
|
|
int EXWindowOk(EX_Window xwin);
|
2005-07-16 09:57:45 -07:00
|
|
|
|
2008-03-30 05:13:16 -07:00
|
|
|
void ESelectInput(Win win, unsigned int event_mask);
|
2009-12-20 04:13:31 -08:00
|
|
|
void ESelectInputChange(Win win, unsigned int set,
|
|
|
|
unsigned int clear);
|
2008-03-30 05:13:16 -07:00
|
|
|
void EChangeWindowAttributes(Win win, unsigned int mask,
|
|
|
|
XSetWindowAttributes * attr);
|
|
|
|
void ESetWindowBorderWidth(Win win, unsigned int bw);
|
|
|
|
void ERaiseWindow(Win win);
|
|
|
|
void ELowerWindow(Win win);
|
|
|
|
void EClearWindow(Win win);
|
2013-12-28 12:10:18 -08:00
|
|
|
void EClearWindowExpose(Win win);
|
2008-03-30 05:13:16 -07:00
|
|
|
void EClearArea(Win win, int x, int y,
|
|
|
|
unsigned int w, unsigned int h);
|
2005-07-16 09:57:45 -07:00
|
|
|
|
2009-12-03 11:29:30 -08:00
|
|
|
EX_Pixmap ECreatePixmap(Win win, unsigned int width,
|
2006-05-07 08:08:01 -07:00
|
|
|
unsigned int height, unsigned int depth);
|
2009-12-03 11:29:30 -08:00
|
|
|
void EFreePixmap(EX_Pixmap pixmap);
|
2006-04-29 12:39:21 -07:00
|
|
|
|
2011-07-09 23:08:19 -07:00
|
|
|
int EShapeUpdate(Win win);
|
2009-12-03 11:29:30 -08:00
|
|
|
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,
|
2008-06-05 01:55:21 -07:00
|
|
|
int w, int h);
|
|
|
|
void EShapeSetRects(Win win, int x, int y,
|
|
|
|
XRectangle * rect, int n_rects);
|
|
|
|
void EShapeUnionRects(Win win, int x, int y,
|
|
|
|
XRectangle * rect, int n_rects);
|
|
|
|
int EShapeSetShape(Win win, int x, int y, Win src_win);
|
2006-04-29 12:39:21 -07:00
|
|
|
int EShapePropagate(Win win);
|
|
|
|
int EShapeCheck(Win win);
|
2009-12-03 11:29:30 -08:00
|
|
|
EX_Pixmap EWindowGetShapePixmap(Win win);
|
|
|
|
EX_Pixmap EWindowGetShapePixmapInverted(Win win);
|
2006-04-29 12:39:21 -07:00
|
|
|
|
2010-11-19 23:30:26 -08:00
|
|
|
void EWarpPointer(Win win, int x, int y);
|
2013-12-28 03:29:26 -08:00
|
|
|
int EQueryPointer(Win win, int *px, int *py,
|
2009-12-03 11:29:30 -08:00
|
|
|
EX_Window * pchild, unsigned int *pmask);
|
2006-08-24 14:52:28 -07:00
|
|
|
|
2009-12-03 11:29:30 -08:00
|
|
|
unsigned int EAllocColor(EX_Colormap cmap, unsigned int argb);
|
2009-09-13 06:45:34 -07:00
|
|
|
|
|
|
|
#define _A(x) (((x) >> 24) & 0xff)
|
|
|
|
#define _R(x) (((x) >> 16) & 0xff)
|
|
|
|
#define _G(x) (((x) >> 8) & 0xff)
|
|
|
|
#define _B(x) (((x) ) & 0xff)
|
|
|
|
#define _A16(x) (((x) >> 16) & 0xff00)
|
|
|
|
#define _R16(x) (((x) >> 8) & 0xff00)
|
|
|
|
#define _G16(x) (((x) ) & 0xff00)
|
|
|
|
#define _B16(x) (((x) << 8) & 0xff00)
|
|
|
|
|
|
|
|
#define COLOR32_FROM_RGB(c, r, g, b) \
|
|
|
|
c = (0xff000000 | (((r) & 0xff) << 16) | (((g) & 0xff) << 8) | ((b) & 0xff))
|
|
|
|
#define COLOR32_TO_RGB(c, r, g, b) \
|
|
|
|
do { r = _R(c); g = _G(c); b = _B(c); } while (0)
|
|
|
|
#define COLOR32_TO_ARGB(c, a, r, g, b) \
|
|
|
|
do { a = _A(c); r = _R(c); g = _G(c); b = _B(c); } while (0)
|
|
|
|
#define COLOR32_TO_RGB16(c, r, g, b) \
|
|
|
|
do { r = _R16(c); g = _G16(c); b = _B16(c); } while (0)
|
|
|
|
#define COLOR32_TO_ARGB16(c, a, r, g, b) \
|
|
|
|
do { a = _A16(c); r = _R16(c); g = _G16(c); b = _B16(c); } while (0)
|
2006-04-29 12:39:21 -07:00
|
|
|
|
2009-12-03 11:29:30 -08:00
|
|
|
EX_Window EXWindowGetParent(EX_Window xwin);
|
|
|
|
int EXGetWindowAttributes(EX_Window xwin,
|
|
|
|
XWindowAttributes * pxwa);
|
|
|
|
int EXGetGeometry(EX_Window xwin, EX_Window * root_return,
|
2006-04-29 12:39:21 -07:00
|
|
|
int *x, int *y, int *w, int *h, int *bw,
|
|
|
|
int *depth);
|
2008-03-30 05:13:16 -07:00
|
|
|
|
2009-12-03 11:29:30 -08:00
|
|
|
void EXRestackWindows(EX_Window * windows, int nwindows);
|
2006-04-29 12:39:21 -07:00
|
|
|
|
2009-12-03 11:29:30 -08:00
|
|
|
void EXCopyAreaGC(EX_Drawable src, EX_Drawable dst, GC gc,
|
2013-12-28 12:50:34 -08:00
|
|
|
int sx, int sy, unsigned int w, unsigned int h,
|
|
|
|
int dx, int dy);
|
2009-12-03 11:29:30 -08:00
|
|
|
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,
|
2013-12-28 13:35:10 -08:00
|
|
|
unsigned int w, unsigned int h,
|
|
|
|
unsigned int pixel);
|
2009-12-03 11:29:30 -08:00
|
|
|
void EXPaintRectangle(EX_Drawable dst, int x, int y,
|
2013-12-28 13:55:44 -08:00
|
|
|
unsigned int w, unsigned int h,
|
|
|
|
unsigned int fg, unsigned int bg);
|
2005-10-16 09:27:48 -07:00
|
|
|
|
2009-12-03 11:29:30 -08:00
|
|
|
void EXWarpPointer(EX_Window xwin, int x, int y);
|
|
|
|
int EXQueryPointer(EX_Window xwin, int *px, int *py,
|
|
|
|
EX_Window * pchild, unsigned int *pmask);
|
2006-04-29 12:39:21 -07:00
|
|
|
|
2009-12-03 11:29:30 -08:00
|
|
|
EX_Pixmap EXCreatePixmapCopy(EX_Pixmap src, unsigned int w,
|
2006-04-29 12:39:21 -07:00
|
|
|
unsigned int h, unsigned int depth);
|
2006-04-23 16:18:23 -07:00
|
|
|
|
2009-12-03 11:29:30 -08:00
|
|
|
GC EXCreateGC(EX_Drawable draw, unsigned int mask,
|
2006-04-17 14:55:34 -07:00
|
|
|
XGCValues * val);
|
2010-01-23 06:26:31 -08:00
|
|
|
void EXFreeGC(GC gc);
|
2005-07-16 09:57:45 -07:00
|
|
|
|
2009-12-03 11:29:30 -08:00
|
|
|
void EXSendEvent(EX_Window xwin, unsigned int event_mask,
|
|
|
|
XEvent * ev);
|
2008-03-30 05:13:16 -07:00
|
|
|
|
2009-12-03 11:29:30 -08:00
|
|
|
EX_KeyCode EKeysymToKeycode(EX_KeySym keysym);
|
|
|
|
EX_KeyCode EKeynameToKeycode(const char *name);
|
2008-03-30 05:13:16 -07:00
|
|
|
|
2008-03-23 04:54:24 -07:00
|
|
|
typedef struct {
|
2005-09-26 10:32:10 -07:00
|
|
|
char type;
|
2010-10-23 03:22:52 -07:00
|
|
|
char depth;
|
2009-12-03 11:29:30 -08:00
|
|
|
EX_Pixmap pmap;
|
|
|
|
EX_Pixmap mask;
|
2010-10-23 03:22:52 -07:00
|
|
|
unsigned short w, h;
|
2005-09-26 10:32:10 -07:00
|
|
|
} PmapMask;
|
|
|
|
|
2010-10-23 03:22:52 -07:00
|
|
|
void PmapMaskInit(PmapMask * pmm, Win win, int w, int h);
|
2010-10-23 03:22:50 -07:00
|
|
|
void PmapMaskFree(PmapMask * pmm);
|
2005-09-26 10:32:10 -07:00
|
|
|
|
2012-01-06 16:24:38 -08:00
|
|
|
#if USE_XRENDER
|
2009-12-03 11:29:30 -08:00
|
|
|
EX_Picture EPictureCreate(Win win, EX_Drawable draw);
|
2015-01-24 15:05:10 -08:00
|
|
|
EX_Picture EPictureCreateII(Win win, EX_Drawable draw);
|
2009-12-03 11:29:30 -08:00
|
|
|
EX_Picture EPictureCreateSolid(EX_Window xwin, int argb,
|
2012-01-06 16:24:38 -08:00
|
|
|
unsigned int a, unsigned int rgb);
|
2014-08-17 04:27:53 -07:00
|
|
|
EX_Picture EPictureCreateBuffer(Win win, int w, int h, int argb,
|
2009-12-03 11:29:30 -08:00
|
|
|
EX_Pixmap * ppmap);
|
|
|
|
void EPictureDestroy(EX_Picture pict);
|
2014-08-17 05:25:36 -07:00
|
|
|
void EPictureFillRect(EX_Picture pict, int x, int y,
|
|
|
|
int w, int h, unsigned int color);
|
2012-01-06 16:24:38 -08:00
|
|
|
|
|
|
|
#endif /* USE_XRENDER */
|
|
|
|
|
2009-12-20 04:13:25 -08:00
|
|
|
#if USE_COMPOSITE
|
|
|
|
|
2009-12-03 11:29:30 -08:00
|
|
|
EX_SrvRegion ERegionCreate(void);
|
|
|
|
EX_SrvRegion ERegionCreateRect(int x, int y, int w, int h);
|
2009-12-20 04:13:25 -08:00
|
|
|
|
|
|
|
#if USE_DESK_EXPOSE
|
2009-12-03 11:29:30 -08:00
|
|
|
EX_SrvRegion ERegionCreateFromRects(XRectangle * rectangles,
|
2009-12-20 04:13:25 -08:00
|
|
|
int nrectangles);
|
|
|
|
#endif
|
2009-12-03 11:29:30 -08:00
|
|
|
EX_SrvRegion ERegionCreateFromWindow(Win win);
|
2014-08-17 05:25:36 -07:00
|
|
|
EX_SrvRegion ERegionCreateFromBitmap(EX_Pixmap mask);
|
2009-12-03 11:29:30 -08:00
|
|
|
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,
|
2009-12-20 04:13:25 -08:00
|
|
|
int h);
|
2009-12-03 11:29:30 -08:00
|
|
|
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);
|
2009-12-20 04:13:25 -08:00
|
|
|
#if 0 /* Unused (for debug) */
|
2009-12-03 11:29:30 -08:00
|
|
|
int ERegionIsEmpty(EX_SrvRegion rgn);
|
2009-12-20 04:13:25 -08:00
|
|
|
#endif
|
2009-12-03 11:29:30 -08:00
|
|
|
void ERegionShow(const char *txt, EX_SrvRegion rgn,
|
2019-08-14 09:45:13 -07:00
|
|
|
void (*prf)(const char *fmt, ...));
|
2009-12-20 04:13:25 -08:00
|
|
|
|
2009-12-03 11:29:30 -08:00
|
|
|
void EPictureSetClip(EX_Picture pict, EX_SrvRegion clip);
|
2009-12-20 04:13:25 -08:00
|
|
|
|
2009-12-03 11:29:30 -08:00
|
|
|
EX_Pixmap EWindowGetPixmap(const Win win);
|
2010-01-10 09:17:02 -08:00
|
|
|
|
2009-12-20 04:13:25 -08:00
|
|
|
#endif /* USE_COMPOSITE */
|
|
|
|
|
2012-12-27 10:21:56 -08:00
|
|
|
#if USE_XI2
|
2013-12-28 04:07:33 -08:00
|
|
|
#include <X11/extensions/XInput2.h>
|
2012-12-27 10:21:56 -08:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
XIEventMask em;
|
|
|
|
unsigned char mb[(XI_LASTEVENT + 8) / 8]; /* Mask bits */
|
|
|
|
} EXIEventMask;
|
|
|
|
|
|
|
|
void EXIMaskSetup(EXIEventMask * em, int dev,
|
|
|
|
unsigned int event_mask);
|
|
|
|
#endif
|
|
|
|
|
2005-07-16 09:57:45 -07:00
|
|
|
#endif /* _XWIN_H_ */
|