jpayne@69: jpayne@69: /*********************************************************** jpayne@69: jpayne@69: Copyright 1987, 1998 The Open Group jpayne@69: jpayne@69: Permission to use, copy, modify, distribute, and sell this software and its jpayne@69: documentation for any purpose is hereby granted without fee, provided that jpayne@69: the above copyright notice appear in all copies and that both that jpayne@69: copyright notice and this permission notice appear in supporting jpayne@69: documentation. jpayne@69: jpayne@69: The above copyright notice and this permission notice shall be included in jpayne@69: all copies or substantial portions of the Software. jpayne@69: jpayne@69: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR jpayne@69: IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, jpayne@69: FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE jpayne@69: OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN jpayne@69: AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN jpayne@69: CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. jpayne@69: jpayne@69: Except as contained in this notice, the name of The Open Group shall not be jpayne@69: used in advertising or otherwise to promote the sale, use or other dealings jpayne@69: in this Software without prior written authorization from The Open Group. jpayne@69: jpayne@69: jpayne@69: Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. jpayne@69: jpayne@69: All Rights Reserved jpayne@69: jpayne@69: Permission to use, copy, modify, and distribute this software and its jpayne@69: documentation for any purpose and without fee is hereby granted, jpayne@69: provided that the above copyright notice appear in all copies and that jpayne@69: both that copyright notice and this permission notice appear in jpayne@69: supporting documentation, and that the name of Digital not be jpayne@69: used in advertising or publicity pertaining to distribution of the jpayne@69: software without specific, written prior permission. jpayne@69: jpayne@69: DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING jpayne@69: ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL jpayne@69: DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR jpayne@69: ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, jpayne@69: WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, jpayne@69: ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS jpayne@69: SOFTWARE. jpayne@69: jpayne@69: ******************************************************************/ jpayne@69: jpayne@69: #ifndef _X11_XUTIL_H_ jpayne@69: #define _X11_XUTIL_H_ jpayne@69: jpayne@69: /* You must include before including this file */ jpayne@69: #include jpayne@69: #include jpayne@69: jpayne@69: /* The Xlib structs are full of implicit padding to properly align members. jpayne@69: We can't clean that up without breaking ABI, so tell clang not to bother jpayne@69: complaining about it. */ jpayne@69: #ifdef __clang__ jpayne@69: #pragma clang diagnostic push jpayne@69: #pragma clang diagnostic ignored "-Wpadded" jpayne@69: #endif jpayne@69: jpayne@69: /* jpayne@69: * Bitmask returned by XParseGeometry(). Each bit tells if the corresponding jpayne@69: * value (x, y, width, height) was found in the parsed string. jpayne@69: */ jpayne@69: #define NoValue 0x0000 jpayne@69: #define XValue 0x0001 jpayne@69: #define YValue 0x0002 jpayne@69: #define WidthValue 0x0004 jpayne@69: #define HeightValue 0x0008 jpayne@69: #define AllValues 0x000F jpayne@69: #define XNegative 0x0010 jpayne@69: #define YNegative 0x0020 jpayne@69: jpayne@69: /* jpayne@69: * new version containing base_width, base_height, and win_gravity fields; jpayne@69: * used with WM_NORMAL_HINTS. jpayne@69: */ jpayne@69: typedef struct { jpayne@69: long flags; /* marks which fields in this structure are defined */ jpayne@69: int x, y; /* obsolete for new window mgrs, but clients */ jpayne@69: int width, height; /* should set so old wm's don't mess up */ jpayne@69: int min_width, min_height; jpayne@69: int max_width, max_height; jpayne@69: int width_inc, height_inc; jpayne@69: struct { jpayne@69: int x; /* numerator */ jpayne@69: int y; /* denominator */ jpayne@69: } min_aspect, max_aspect; jpayne@69: int base_width, base_height; /* added by ICCCM version 1 */ jpayne@69: int win_gravity; /* added by ICCCM version 1 */ jpayne@69: } XSizeHints; jpayne@69: jpayne@69: /* jpayne@69: * The next block of definitions are for window manager properties that jpayne@69: * clients and applications use for communication. jpayne@69: */ jpayne@69: jpayne@69: /* flags argument in size hints */ jpayne@69: #define USPosition (1L << 0) /* user specified x, y */ jpayne@69: #define USSize (1L << 1) /* user specified width, height */ jpayne@69: jpayne@69: #define PPosition (1L << 2) /* program specified position */ jpayne@69: #define PSize (1L << 3) /* program specified size */ jpayne@69: #define PMinSize (1L << 4) /* program specified minimum size */ jpayne@69: #define PMaxSize (1L << 5) /* program specified maximum size */ jpayne@69: #define PResizeInc (1L << 6) /* program specified resize increments */ jpayne@69: #define PAspect (1L << 7) /* program specified min and max aspect ratios */ jpayne@69: #define PBaseSize (1L << 8) /* program specified base for incrementing */ jpayne@69: #define PWinGravity (1L << 9) /* program specified window gravity */ jpayne@69: jpayne@69: /* obsolete */ jpayne@69: #define PAllHints (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect) jpayne@69: jpayne@69: jpayne@69: jpayne@69: typedef struct { jpayne@69: long flags; /* marks which fields in this structure are defined */ jpayne@69: Bool input; /* does this application rely on the window manager to jpayne@69: get keyboard input? */ jpayne@69: int initial_state; /* see below */ jpayne@69: Pixmap icon_pixmap; /* pixmap to be used as icon */ jpayne@69: Window icon_window; /* window to be used as icon */ jpayne@69: int icon_x, icon_y; /* initial position of icon */ jpayne@69: Pixmap icon_mask; /* icon mask bitmap */ jpayne@69: XID window_group; /* id of related window group */ jpayne@69: /* this structure may be extended in the future */ jpayne@69: } XWMHints; jpayne@69: jpayne@69: /* definition for flags of XWMHints */ jpayne@69: jpayne@69: #define InputHint (1L << 0) jpayne@69: #define StateHint (1L << 1) jpayne@69: #define IconPixmapHint (1L << 2) jpayne@69: #define IconWindowHint (1L << 3) jpayne@69: #define IconPositionHint (1L << 4) jpayne@69: #define IconMaskHint (1L << 5) jpayne@69: #define WindowGroupHint (1L << 6) jpayne@69: #define AllHints (InputHint|StateHint|IconPixmapHint|IconWindowHint| \ jpayne@69: IconPositionHint|IconMaskHint|WindowGroupHint) jpayne@69: #define XUrgencyHint (1L << 8) jpayne@69: jpayne@69: /* definitions for initial window state */ jpayne@69: #define WithdrawnState 0 /* for windows that are not mapped */ jpayne@69: #define NormalState 1 /* most applications want to start this way */ jpayne@69: #define IconicState 3 /* application wants to start as an icon */ jpayne@69: jpayne@69: /* jpayne@69: * Obsolete states no longer defined by ICCCM jpayne@69: */ jpayne@69: #define DontCareState 0 /* don't know or care */ jpayne@69: #define ZoomState 2 /* application wants to start zoomed */ jpayne@69: #define InactiveState 4 /* application believes it is seldom used; */ jpayne@69: /* some wm's may put it on inactive menu */ jpayne@69: jpayne@69: jpayne@69: /* jpayne@69: * new structure for manipulating TEXT properties; used with WM_NAME, jpayne@69: * WM_ICON_NAME, WM_CLIENT_MACHINE, and WM_COMMAND. jpayne@69: */ jpayne@69: typedef struct { jpayne@69: unsigned char *value; /* same as Property routines */ jpayne@69: Atom encoding; /* prop type */ jpayne@69: int format; /* prop data format: 8, 16, or 32 */ jpayne@69: unsigned long nitems; /* number of data items in value */ jpayne@69: } XTextProperty; jpayne@69: jpayne@69: #define XNoMemory -1 jpayne@69: #define XLocaleNotSupported -2 jpayne@69: #define XConverterNotFound -3 jpayne@69: jpayne@69: typedef enum { jpayne@69: XStringStyle, /* STRING */ jpayne@69: XCompoundTextStyle, /* COMPOUND_TEXT */ jpayne@69: XTextStyle, /* text in owner's encoding (current locale)*/ jpayne@69: XStdICCTextStyle, /* STRING, else COMPOUND_TEXT */ jpayne@69: /* The following is an XFree86 extension, introduced in November 2000 */ jpayne@69: XUTF8StringStyle /* UTF8_STRING */ jpayne@69: } XICCEncodingStyle; jpayne@69: jpayne@69: typedef struct { jpayne@69: int min_width, min_height; jpayne@69: int max_width, max_height; jpayne@69: int width_inc, height_inc; jpayne@69: } XIconSize; jpayne@69: jpayne@69: typedef struct { jpayne@69: char *res_name; jpayne@69: char *res_class; jpayne@69: } XClassHint; jpayne@69: jpayne@69: #ifdef XUTIL_DEFINE_FUNCTIONS jpayne@69: extern int XDestroyImage( jpayne@69: XImage *ximage); jpayne@69: extern unsigned long XGetPixel( jpayne@69: XImage *ximage, jpayne@69: int x, int y); jpayne@69: extern int XPutPixel( jpayne@69: XImage *ximage, jpayne@69: int x, int y, jpayne@69: unsigned long pixel); jpayne@69: extern XImage *XSubImage( jpayne@69: XImage *ximage, jpayne@69: int x, int y, jpayne@69: unsigned int width, unsigned int height); jpayne@69: extern int XAddPixel( jpayne@69: XImage *ximage, jpayne@69: long value); jpayne@69: #else jpayne@69: /* jpayne@69: * These macros are used to give some sugar to the image routines so that jpayne@69: * naive people are more comfortable with them. jpayne@69: */ jpayne@69: #define XDestroyImage(ximage) \ jpayne@69: ((*((ximage)->f.destroy_image))((ximage))) jpayne@69: #define XGetPixel(ximage, x, y) \ jpayne@69: ((*((ximage)->f.get_pixel))((ximage), (x), (y))) jpayne@69: #define XPutPixel(ximage, x, y, pixel) \ jpayne@69: ((*((ximage)->f.put_pixel))((ximage), (x), (y), (pixel))) jpayne@69: #define XSubImage(ximage, x, y, width, height) \ jpayne@69: ((*((ximage)->f.sub_image))((ximage), (x), (y), (width), (height))) jpayne@69: #define XAddPixel(ximage, value) \ jpayne@69: ((*((ximage)->f.add_pixel))((ximage), (value))) jpayne@69: #endif jpayne@69: jpayne@69: /* jpayne@69: * Compose sequence status structure, used in calling XLookupString. jpayne@69: */ jpayne@69: typedef struct _XComposeStatus { jpayne@69: XPointer compose_ptr; /* state table pointer */ jpayne@69: int chars_matched; /* match state */ jpayne@69: } XComposeStatus; jpayne@69: jpayne@69: /* jpayne@69: * Keysym macros, used on Keysyms to test for classes of symbols jpayne@69: */ jpayne@69: #define IsKeypadKey(keysym) \ jpayne@69: (((KeySym)(keysym) >= XK_KP_Space) && ((KeySym)(keysym) <= XK_KP_Equal)) jpayne@69: jpayne@69: #define IsPrivateKeypadKey(keysym) \ jpayne@69: (((KeySym)(keysym) >= 0x11000000) && ((KeySym)(keysym) <= 0x1100FFFF)) jpayne@69: jpayne@69: #define IsCursorKey(keysym) \ jpayne@69: (((KeySym)(keysym) >= XK_Home) && ((KeySym)(keysym) < XK_Select)) jpayne@69: jpayne@69: #define IsPFKey(keysym) \ jpayne@69: (((KeySym)(keysym) >= XK_KP_F1) && ((KeySym)(keysym) <= XK_KP_F4)) jpayne@69: jpayne@69: #define IsFunctionKey(keysym) \ jpayne@69: (((KeySym)(keysym) >= XK_F1) && ((KeySym)(keysym) <= XK_F35)) jpayne@69: jpayne@69: #define IsMiscFunctionKey(keysym) \ jpayne@69: (((KeySym)(keysym) >= XK_Select) && ((KeySym)(keysym) <= XK_Break)) jpayne@69: jpayne@69: #ifdef XK_XKB_KEYS jpayne@69: #define IsModifierKey(keysym) \ jpayne@69: ((((KeySym)(keysym) >= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \ jpayne@69: || (((KeySym)(keysym) >= XK_ISO_Lock) && \ jpayne@69: ((KeySym)(keysym) <= XK_ISO_Level5_Lock)) \ jpayne@69: || ((KeySym)(keysym) == XK_Mode_switch) \ jpayne@69: || ((KeySym)(keysym) == XK_Num_Lock)) jpayne@69: #else jpayne@69: #define IsModifierKey(keysym) \ jpayne@69: ((((KeySym)(keysym) >= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \ jpayne@69: || ((KeySym)(keysym) == XK_Mode_switch) \ jpayne@69: || ((KeySym)(keysym) == XK_Num_Lock)) jpayne@69: #endif jpayne@69: /* jpayne@69: * opaque reference to Region data type jpayne@69: */ jpayne@69: typedef struct _XRegion *Region; jpayne@69: jpayne@69: /* Return values from XRectInRegion() */ jpayne@69: jpayne@69: #define RectangleOut 0 jpayne@69: #define RectangleIn 1 jpayne@69: #define RectanglePart 2 jpayne@69: jpayne@69: jpayne@69: /* jpayne@69: * Information used by the visual utility routines to find desired visual jpayne@69: * type from the many visuals a display may support. jpayne@69: */ jpayne@69: jpayne@69: typedef struct { jpayne@69: Visual *visual; jpayne@69: VisualID visualid; jpayne@69: int screen; jpayne@69: int depth; jpayne@69: #if defined(__cplusplus) || defined(c_plusplus) jpayne@69: int c_class; /* C++ */ jpayne@69: #else jpayne@69: int class; jpayne@69: #endif jpayne@69: unsigned long red_mask; jpayne@69: unsigned long green_mask; jpayne@69: unsigned long blue_mask; jpayne@69: int colormap_size; jpayne@69: int bits_per_rgb; jpayne@69: } XVisualInfo; jpayne@69: jpayne@69: #define VisualNoMask 0x0 jpayne@69: #define VisualIDMask 0x1 jpayne@69: #define VisualScreenMask 0x2 jpayne@69: #define VisualDepthMask 0x4 jpayne@69: #define VisualClassMask 0x8 jpayne@69: #define VisualRedMaskMask 0x10 jpayne@69: #define VisualGreenMaskMask 0x20 jpayne@69: #define VisualBlueMaskMask 0x40 jpayne@69: #define VisualColormapSizeMask 0x80 jpayne@69: #define VisualBitsPerRGBMask 0x100 jpayne@69: #define VisualAllMask 0x1FF jpayne@69: jpayne@69: /* jpayne@69: * This defines a window manager property that clients may use to jpayne@69: * share standard color maps of type RGB_COLOR_MAP: jpayne@69: */ jpayne@69: typedef struct { jpayne@69: Colormap colormap; jpayne@69: unsigned long red_max; jpayne@69: unsigned long red_mult; jpayne@69: unsigned long green_max; jpayne@69: unsigned long green_mult; jpayne@69: unsigned long blue_max; jpayne@69: unsigned long blue_mult; jpayne@69: unsigned long base_pixel; jpayne@69: VisualID visualid; /* added by ICCCM version 1 */ jpayne@69: XID killid; /* added by ICCCM version 1 */ jpayne@69: } XStandardColormap; jpayne@69: jpayne@69: #define ReleaseByFreeingColormap ((XID) 1L) /* for killid field above */ jpayne@69: jpayne@69: jpayne@69: /* jpayne@69: * return codes for XReadBitmapFile and XWriteBitmapFile jpayne@69: */ jpayne@69: #define BitmapSuccess 0 jpayne@69: #define BitmapOpenFailed 1 jpayne@69: #define BitmapFileInvalid 2 jpayne@69: #define BitmapNoMemory 3 jpayne@69: jpayne@69: /**************************************************************** jpayne@69: * jpayne@69: * Context Management jpayne@69: * jpayne@69: ****************************************************************/ jpayne@69: jpayne@69: jpayne@69: /* Associative lookup table return codes */ jpayne@69: jpayne@69: #define XCSUCCESS 0 /* No error. */ jpayne@69: #define XCNOMEM 1 /* Out of memory */ jpayne@69: #define XCNOENT 2 /* No entry in table */ jpayne@69: jpayne@69: typedef int XContext; jpayne@69: jpayne@69: #define XUniqueContext() ((XContext) XrmUniqueQuark()) jpayne@69: #define XStringToContext(string) ((XContext) XrmStringToQuark(string)) jpayne@69: jpayne@69: _XFUNCPROTOBEGIN jpayne@69: jpayne@69: /* The following declarations are alphabetized. */ jpayne@69: jpayne@69: extern XClassHint *XAllocClassHint ( jpayne@69: void jpayne@69: ); jpayne@69: jpayne@69: extern XIconSize *XAllocIconSize ( jpayne@69: void jpayne@69: ); jpayne@69: jpayne@69: extern XSizeHints *XAllocSizeHints ( jpayne@69: void jpayne@69: ); jpayne@69: jpayne@69: extern XStandardColormap *XAllocStandardColormap ( jpayne@69: void jpayne@69: ); jpayne@69: jpayne@69: extern XWMHints *XAllocWMHints ( jpayne@69: void jpayne@69: ); jpayne@69: jpayne@69: extern int XClipBox( jpayne@69: Region /* r */, jpayne@69: XRectangle* /* rect_return */ jpayne@69: ); jpayne@69: jpayne@69: extern Region XCreateRegion( jpayne@69: void jpayne@69: ); jpayne@69: jpayne@69: extern const char *XDefaultString (void); jpayne@69: jpayne@69: extern int XDeleteContext( jpayne@69: Display* /* display */, jpayne@69: XID /* rid */, jpayne@69: XContext /* context */ jpayne@69: ); jpayne@69: jpayne@69: extern int XDestroyRegion( jpayne@69: Region /* r */ jpayne@69: ); jpayne@69: jpayne@69: extern Bool XEmptyRegion( jpayne@69: Region /* r */ jpayne@69: ); jpayne@69: jpayne@69: extern Bool XEqualRegion( jpayne@69: Region /* r1 */, jpayne@69: Region /* r2 */ jpayne@69: ); jpayne@69: jpayne@69: extern int XFindContext( jpayne@69: Display* /* display */, jpayne@69: XID /* rid */, jpayne@69: XContext /* context */, jpayne@69: XPointer* /* data_return */ jpayne@69: ); jpayne@69: jpayne@69: extern Status XGetClassHint( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XClassHint* /* class_hints_return */ jpayne@69: ); jpayne@69: jpayne@69: extern Status XGetIconSizes( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XIconSize** /* size_list_return */, jpayne@69: int* /* count_return */ jpayne@69: ); jpayne@69: jpayne@69: extern Status XGetNormalHints( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XSizeHints* /* hints_return */ jpayne@69: ); jpayne@69: jpayne@69: extern Status XGetRGBColormaps( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XStandardColormap** /* stdcmap_return */, jpayne@69: int* /* count_return */, jpayne@69: Atom /* property */ jpayne@69: ); jpayne@69: jpayne@69: extern Status XGetSizeHints( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XSizeHints* /* hints_return */, jpayne@69: Atom /* property */ jpayne@69: ); jpayne@69: jpayne@69: extern Status XGetStandardColormap( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XStandardColormap* /* colormap_return */, jpayne@69: Atom /* property */ jpayne@69: ); jpayne@69: jpayne@69: extern Status XGetTextProperty( jpayne@69: Display* /* display */, jpayne@69: Window /* window */, jpayne@69: XTextProperty* /* text_prop_return */, jpayne@69: Atom /* property */ jpayne@69: ); jpayne@69: jpayne@69: extern XVisualInfo *XGetVisualInfo( jpayne@69: Display* /* display */, jpayne@69: long /* vinfo_mask */, jpayne@69: XVisualInfo* /* vinfo_template */, jpayne@69: int* /* nitems_return */ jpayne@69: ); jpayne@69: jpayne@69: extern Status XGetWMClientMachine( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XTextProperty* /* text_prop_return */ jpayne@69: ); jpayne@69: jpayne@69: extern XWMHints *XGetWMHints( jpayne@69: Display* /* display */, jpayne@69: Window /* w */ jpayne@69: ); jpayne@69: jpayne@69: extern Status XGetWMIconName( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XTextProperty* /* text_prop_return */ jpayne@69: ); jpayne@69: jpayne@69: extern Status XGetWMName( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XTextProperty* /* text_prop_return */ jpayne@69: ); jpayne@69: jpayne@69: extern Status XGetWMNormalHints( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XSizeHints* /* hints_return */, jpayne@69: long* /* supplied_return */ jpayne@69: ); jpayne@69: jpayne@69: extern Status XGetWMSizeHints( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XSizeHints* /* hints_return */, jpayne@69: long* /* supplied_return */, jpayne@69: Atom /* property */ jpayne@69: ); jpayne@69: jpayne@69: extern Status XGetZoomHints( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XSizeHints* /* zhints_return */ jpayne@69: ); jpayne@69: jpayne@69: extern int XIntersectRegion( jpayne@69: Region /* sra */, jpayne@69: Region /* srb */, jpayne@69: Region /* dr_return */ jpayne@69: ); jpayne@69: jpayne@69: extern void XConvertCase( jpayne@69: KeySym /* sym */, jpayne@69: KeySym* /* lower */, jpayne@69: KeySym* /* upper */ jpayne@69: ); jpayne@69: jpayne@69: extern int XLookupString( jpayne@69: XKeyEvent* /* event_struct */, jpayne@69: char* /* buffer_return */, jpayne@69: int /* bytes_buffer */, jpayne@69: KeySym* /* keysym_return */, jpayne@69: XComposeStatus* /* status_in_out */ jpayne@69: ); jpayne@69: jpayne@69: extern Status XMatchVisualInfo( jpayne@69: Display* /* display */, jpayne@69: int /* screen */, jpayne@69: int /* depth */, jpayne@69: int /* class */, jpayne@69: XVisualInfo* /* vinfo_return */ jpayne@69: ); jpayne@69: jpayne@69: extern int XOffsetRegion( jpayne@69: Region /* r */, jpayne@69: int /* dx */, jpayne@69: int /* dy */ jpayne@69: ); jpayne@69: jpayne@69: extern Bool XPointInRegion( jpayne@69: Region /* r */, jpayne@69: int /* x */, jpayne@69: int /* y */ jpayne@69: ); jpayne@69: jpayne@69: extern Region XPolygonRegion( jpayne@69: XPoint* /* points */, jpayne@69: int /* n */, jpayne@69: int /* fill_rule */ jpayne@69: ); jpayne@69: jpayne@69: extern int XRectInRegion( jpayne@69: Region /* r */, jpayne@69: int /* x */, jpayne@69: int /* y */, jpayne@69: unsigned int /* width */, jpayne@69: unsigned int /* height */ jpayne@69: ); jpayne@69: jpayne@69: extern int XSaveContext( jpayne@69: Display* /* display */, jpayne@69: XID /* rid */, jpayne@69: XContext /* context */, jpayne@69: _Xconst char* /* data */ jpayne@69: ); jpayne@69: jpayne@69: extern int XSetClassHint( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XClassHint* /* class_hints */ jpayne@69: ); jpayne@69: jpayne@69: extern int XSetIconSizes( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XIconSize* /* size_list */, jpayne@69: int /* count */ jpayne@69: ); jpayne@69: jpayne@69: extern int XSetNormalHints( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XSizeHints* /* hints */ jpayne@69: ); jpayne@69: jpayne@69: extern void XSetRGBColormaps( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XStandardColormap* /* stdcmaps */, jpayne@69: int /* count */, jpayne@69: Atom /* property */ jpayne@69: ); jpayne@69: jpayne@69: extern int XSetSizeHints( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XSizeHints* /* hints */, jpayne@69: Atom /* property */ jpayne@69: ); jpayne@69: jpayne@69: extern int XSetStandardProperties( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: _Xconst char* /* window_name */, jpayne@69: _Xconst char* /* icon_name */, jpayne@69: Pixmap /* icon_pixmap */, jpayne@69: char** /* argv */, jpayne@69: int /* argc */, jpayne@69: XSizeHints* /* hints */ jpayne@69: ); jpayne@69: jpayne@69: extern void XSetTextProperty( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XTextProperty* /* text_prop */, jpayne@69: Atom /* property */ jpayne@69: ); jpayne@69: jpayne@69: extern void XSetWMClientMachine( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XTextProperty* /* text_prop */ jpayne@69: ); jpayne@69: jpayne@69: extern int XSetWMHints( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XWMHints* /* wm_hints */ jpayne@69: ); jpayne@69: jpayne@69: extern void XSetWMIconName( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XTextProperty* /* text_prop */ jpayne@69: ); jpayne@69: jpayne@69: extern void XSetWMName( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XTextProperty* /* text_prop */ jpayne@69: ); jpayne@69: jpayne@69: extern void XSetWMNormalHints( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XSizeHints* /* hints */ jpayne@69: ); jpayne@69: jpayne@69: extern void XSetWMProperties( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XTextProperty* /* window_name */, jpayne@69: XTextProperty* /* icon_name */, jpayne@69: char** /* argv */, jpayne@69: int /* argc */, jpayne@69: XSizeHints* /* normal_hints */, jpayne@69: XWMHints* /* wm_hints */, jpayne@69: XClassHint* /* class_hints */ jpayne@69: ); jpayne@69: jpayne@69: extern void XmbSetWMProperties( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: _Xconst char* /* window_name */, jpayne@69: _Xconst char* /* icon_name */, jpayne@69: char** /* argv */, jpayne@69: int /* argc */, jpayne@69: XSizeHints* /* normal_hints */, jpayne@69: XWMHints* /* wm_hints */, jpayne@69: XClassHint* /* class_hints */ jpayne@69: ); jpayne@69: jpayne@69: extern void Xutf8SetWMProperties( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: _Xconst char* /* window_name */, jpayne@69: _Xconst char* /* icon_name */, jpayne@69: char** /* argv */, jpayne@69: int /* argc */, jpayne@69: XSizeHints* /* normal_hints */, jpayne@69: XWMHints* /* wm_hints */, jpayne@69: XClassHint* /* class_hints */ jpayne@69: ); jpayne@69: jpayne@69: extern void XSetWMSizeHints( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XSizeHints* /* hints */, jpayne@69: Atom /* property */ jpayne@69: ); jpayne@69: jpayne@69: extern int XSetRegion( jpayne@69: Display* /* display */, jpayne@69: GC /* gc */, jpayne@69: Region /* r */ jpayne@69: ); jpayne@69: jpayne@69: extern void XSetStandardColormap( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XStandardColormap* /* colormap */, jpayne@69: Atom /* property */ jpayne@69: ); jpayne@69: jpayne@69: extern int XSetZoomHints( jpayne@69: Display* /* display */, jpayne@69: Window /* w */, jpayne@69: XSizeHints* /* zhints */ jpayne@69: ); jpayne@69: jpayne@69: extern int XShrinkRegion( jpayne@69: Region /* r */, jpayne@69: int /* dx */, jpayne@69: int /* dy */ jpayne@69: ); jpayne@69: jpayne@69: extern Status XStringListToTextProperty( jpayne@69: char** /* list */, jpayne@69: int /* count */, jpayne@69: XTextProperty* /* text_prop_return */ jpayne@69: ); jpayne@69: jpayne@69: extern int XSubtractRegion( jpayne@69: Region /* sra */, jpayne@69: Region /* srb */, jpayne@69: Region /* dr_return */ jpayne@69: ); jpayne@69: jpayne@69: extern int XmbTextListToTextProperty( jpayne@69: Display* display, jpayne@69: char** list, jpayne@69: int count, jpayne@69: XICCEncodingStyle style, jpayne@69: XTextProperty* text_prop_return jpayne@69: ); jpayne@69: jpayne@69: extern int XwcTextListToTextProperty( jpayne@69: Display* display, jpayne@69: wchar_t** list, jpayne@69: int count, jpayne@69: XICCEncodingStyle style, jpayne@69: XTextProperty* text_prop_return jpayne@69: ); jpayne@69: jpayne@69: extern int Xutf8TextListToTextProperty( jpayne@69: Display* display, jpayne@69: char** list, jpayne@69: int count, jpayne@69: XICCEncodingStyle style, jpayne@69: XTextProperty* text_prop_return jpayne@69: ); jpayne@69: jpayne@69: extern void XwcFreeStringList( jpayne@69: wchar_t** list jpayne@69: ); jpayne@69: jpayne@69: extern Status XTextPropertyToStringList( jpayne@69: XTextProperty* /* text_prop */, jpayne@69: char*** /* list_return */, jpayne@69: int* /* count_return */ jpayne@69: ); jpayne@69: jpayne@69: extern int XmbTextPropertyToTextList( jpayne@69: Display* display, jpayne@69: const XTextProperty* text_prop, jpayne@69: char*** list_return, jpayne@69: int* count_return jpayne@69: ); jpayne@69: jpayne@69: extern int XwcTextPropertyToTextList( jpayne@69: Display* display, jpayne@69: const XTextProperty* text_prop, jpayne@69: wchar_t*** list_return, jpayne@69: int* count_return jpayne@69: ); jpayne@69: jpayne@69: extern int Xutf8TextPropertyToTextList( jpayne@69: Display* display, jpayne@69: const XTextProperty* text_prop, jpayne@69: char*** list_return, jpayne@69: int* count_return jpayne@69: ); jpayne@69: jpayne@69: extern int XUnionRectWithRegion( jpayne@69: XRectangle* /* rectangle */, jpayne@69: Region /* src_region */, jpayne@69: Region /* dest_region_return */ jpayne@69: ); jpayne@69: jpayne@69: extern int XUnionRegion( jpayne@69: Region /* sra */, jpayne@69: Region /* srb */, jpayne@69: Region /* dr_return */ jpayne@69: ); jpayne@69: jpayne@69: extern int XWMGeometry( jpayne@69: Display* /* display */, jpayne@69: int /* screen_number */, jpayne@69: _Xconst char* /* user_geometry */, jpayne@69: _Xconst char* /* default_geometry */, jpayne@69: unsigned int /* border_width */, jpayne@69: XSizeHints* /* hints */, jpayne@69: int* /* x_return */, jpayne@69: int* /* y_return */, jpayne@69: int* /* width_return */, jpayne@69: int* /* height_return */, jpayne@69: int* /* gravity_return */ jpayne@69: ); jpayne@69: jpayne@69: extern int XXorRegion( jpayne@69: Region /* sra */, jpayne@69: Region /* srb */, jpayne@69: Region /* dr_return */ jpayne@69: ); jpayne@69: jpayne@69: #ifdef __clang__ jpayne@69: #pragma clang diagnostic pop jpayne@69: #endif jpayne@69: jpayne@69: _XFUNCPROTOEND jpayne@69: jpayne@69: #endif /* _X11_XUTIL_H_ */