mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 18:45:23 -04:00
Even more minimal X11
This commit is contained in:
parent
a422564bc7
commit
9607fa2cf1
457
misc/linux/min-X.h
Normal file
457
misc/linux/min-X.h
Normal file
@ -0,0 +1,457 @@
|
|||||||
|
/* Definitions for the X window system likely to be used by applications */
|
||||||
|
|
||||||
|
#ifndef X_H
|
||||||
|
#define X_H
|
||||||
|
|
||||||
|
/***********************************************************
|
||||||
|
|
||||||
|
Copyright 1987, 1998 The Open Group
|
||||||
|
|
||||||
|
Permission to use, copy, modify, distribute, and sell this software and its
|
||||||
|
documentation for any purpose is hereby granted without fee, provided that
|
||||||
|
the above copyright notice appear in all copies and that both that
|
||||||
|
copyright notice and this permission notice appear in supporting
|
||||||
|
documentation.
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
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
|
||||||
|
OPEN GROUP 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.
|
||||||
|
|
||||||
|
Except as contained in this notice, the name of The Open Group shall not be
|
||||||
|
used in advertising or otherwise to promote the sale, use or other dealings
|
||||||
|
in this Software without prior written authorization from The Open Group.
|
||||||
|
|
||||||
|
|
||||||
|
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
||||||
|
|
||||||
|
All Rights Reserved
|
||||||
|
|
||||||
|
Permission to use, copy, modify, and distribute this software and its
|
||||||
|
documentation for any purpose and without fee is hereby granted,
|
||||||
|
provided that the above copyright notice appear in all copies and that
|
||||||
|
both that copyright notice and this permission notice appear in
|
||||||
|
supporting documentation, and that the name of Digital not be
|
||||||
|
used in advertising or publicity pertaining to distribution of the
|
||||||
|
software without specific, written prior permission.
|
||||||
|
|
||||||
|
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
||||||
|
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
||||||
|
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
||||||
|
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
******************************************************************/
|
||||||
|
|
||||||
|
#define X_PROTOCOL 11 /* current protocol version */
|
||||||
|
#define X_PROTOCOL_REVISION 0 /* current minor version */
|
||||||
|
|
||||||
|
/* Resources */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* _XSERVER64 must ONLY be defined when compiling X server sources on
|
||||||
|
* systems where unsigned long is not 32 bits, must NOT be used in
|
||||||
|
* client or library code.
|
||||||
|
*/
|
||||||
|
#ifndef _XSERVER64
|
||||||
|
# ifndef _XTYPEDEF_XID
|
||||||
|
# define _XTYPEDEF_XID
|
||||||
|
typedef unsigned long XID;
|
||||||
|
# endif
|
||||||
|
# ifndef _XTYPEDEF_MASK
|
||||||
|
# define _XTYPEDEF_MASK
|
||||||
|
typedef unsigned long Mask;
|
||||||
|
# endif
|
||||||
|
# ifndef _XTYPEDEF_ATOM
|
||||||
|
# define _XTYPEDEF_ATOM
|
||||||
|
typedef unsigned long Atom; /* Also in Xdefs.h */
|
||||||
|
# endif
|
||||||
|
typedef unsigned long VisualID;
|
||||||
|
typedef unsigned long Time;
|
||||||
|
#else
|
||||||
|
# include <X11/Xmd.h>
|
||||||
|
# ifndef _XTYPEDEF_XID
|
||||||
|
# define _XTYPEDEF_XID
|
||||||
|
typedef CARD32 XID;
|
||||||
|
# endif
|
||||||
|
# ifndef _XTYPEDEF_MASK
|
||||||
|
# define _XTYPEDEF_MASK
|
||||||
|
typedef CARD32 Mask;
|
||||||
|
# endif
|
||||||
|
# ifndef _XTYPEDEF_ATOM
|
||||||
|
# define _XTYPEDEF_ATOM
|
||||||
|
typedef CARD32 Atom;
|
||||||
|
# endif
|
||||||
|
typedef CARD32 VisualID;
|
||||||
|
typedef CARD32 Time;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef XID Window;
|
||||||
|
typedef XID Drawable;
|
||||||
|
#ifndef _XTYPEDEF_FONT
|
||||||
|
# define _XTYPEDEF_FONT
|
||||||
|
typedef XID Font;
|
||||||
|
#endif
|
||||||
|
typedef XID Pixmap;
|
||||||
|
typedef XID Cursor;
|
||||||
|
typedef XID Colormap;
|
||||||
|
typedef XID GContext;
|
||||||
|
typedef XID KeySym;
|
||||||
|
|
||||||
|
typedef unsigned char KeyCode;
|
||||||
|
|
||||||
|
/*****************************************************************
|
||||||
|
* RESERVED RESOURCE AND CONSTANT DEFINITIONS
|
||||||
|
*****************************************************************/
|
||||||
|
|
||||||
|
#ifndef None
|
||||||
|
#define None 0L /* universal null resource or null atom */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define ParentRelative 1L /* background pixmap in CreateWindow
|
||||||
|
and ChangeWindowAttributes */
|
||||||
|
|
||||||
|
#define CopyFromParent 0L /* border pixmap in CreateWindow
|
||||||
|
and ChangeWindowAttributes
|
||||||
|
special VisualID and special window
|
||||||
|
class passed to CreateWindow */
|
||||||
|
|
||||||
|
#define PointerWindow 0L /* destination window in SendEvent */
|
||||||
|
#define InputFocus 1L /* destination window in SendEvent */
|
||||||
|
|
||||||
|
#define PointerRoot 1L /* focus window in SetInputFocus */
|
||||||
|
|
||||||
|
#define AnyPropertyType 0L /* special Atom, passed to GetProperty */
|
||||||
|
|
||||||
|
#define AnyKey 0L /* special Key Code, passed to GrabKey */
|
||||||
|
|
||||||
|
#define AnyButton 0L /* special Button Code, passed to GrabButton */
|
||||||
|
|
||||||
|
#define AllTemporary 0L /* special Resource ID passed to KillClient */
|
||||||
|
|
||||||
|
#define CurrentTime 0L /* special Time */
|
||||||
|
|
||||||
|
#define NoSymbol 0L /* special KeySym */
|
||||||
|
|
||||||
|
/*****************************************************************
|
||||||
|
* EVENT DEFINITIONS
|
||||||
|
*****************************************************************/
|
||||||
|
|
||||||
|
/* Input Event Masks. Used as event-mask window attribute and as arguments
|
||||||
|
to Grab requests. Not to be confused with event names. */
|
||||||
|
|
||||||
|
#define NoEventMask 0L
|
||||||
|
#define KeyPressMask (1L<<0)
|
||||||
|
#define KeyReleaseMask (1L<<1)
|
||||||
|
#define ButtonPressMask (1L<<2)
|
||||||
|
#define ButtonReleaseMask (1L<<3)
|
||||||
|
#define EnterWindowMask (1L<<4)
|
||||||
|
#define LeaveWindowMask (1L<<5)
|
||||||
|
#define PointerMotionMask (1L<<6)
|
||||||
|
#define PointerMotionHintMask (1L<<7)
|
||||||
|
#define Button1MotionMask (1L<<8)
|
||||||
|
#define Button2MotionMask (1L<<9)
|
||||||
|
#define Button3MotionMask (1L<<10)
|
||||||
|
#define Button4MotionMask (1L<<11)
|
||||||
|
#define Button5MotionMask (1L<<12)
|
||||||
|
#define ButtonMotionMask (1L<<13)
|
||||||
|
#define KeymapStateMask (1L<<14)
|
||||||
|
#define ExposureMask (1L<<15)
|
||||||
|
#define VisibilityChangeMask (1L<<16)
|
||||||
|
#define StructureNotifyMask (1L<<17)
|
||||||
|
#define ResizeRedirectMask (1L<<18)
|
||||||
|
#define SubstructureNotifyMask (1L<<19)
|
||||||
|
#define SubstructureRedirectMask (1L<<20)
|
||||||
|
#define FocusChangeMask (1L<<21)
|
||||||
|
#define PropertyChangeMask (1L<<22)
|
||||||
|
#define ColormapChangeMask (1L<<23)
|
||||||
|
#define OwnerGrabButtonMask (1L<<24)
|
||||||
|
|
||||||
|
/* Event names. Used in "type" field in XEvent structures. Not to be
|
||||||
|
confused with event masks above. They start from 2 because 0 and 1
|
||||||
|
are reserved in the protocol for errors and replies. */
|
||||||
|
|
||||||
|
#define KeyPress 2
|
||||||
|
#define KeyRelease 3
|
||||||
|
#define ButtonPress 4
|
||||||
|
#define ButtonRelease 5
|
||||||
|
#define MotionNotify 6
|
||||||
|
#define EnterNotify 7
|
||||||
|
#define LeaveNotify 8
|
||||||
|
#define FocusIn 9
|
||||||
|
#define FocusOut 10
|
||||||
|
#define KeymapNotify 11
|
||||||
|
#define Expose 12
|
||||||
|
#define GraphicsExpose 13
|
||||||
|
#define NoExpose 14
|
||||||
|
#define VisibilityNotify 15
|
||||||
|
#define CreateNotify 16
|
||||||
|
#define DestroyNotify 17
|
||||||
|
#define UnmapNotify 18
|
||||||
|
#define MapNotify 19
|
||||||
|
#define MapRequest 20
|
||||||
|
#define ReparentNotify 21
|
||||||
|
#define ConfigureNotify 22
|
||||||
|
#define ConfigureRequest 23
|
||||||
|
#define GravityNotify 24
|
||||||
|
#define ResizeRequest 25
|
||||||
|
#define CirculateNotify 26
|
||||||
|
#define CirculateRequest 27
|
||||||
|
#define PropertyNotify 28
|
||||||
|
#define SelectionClear 29
|
||||||
|
#define SelectionRequest 30
|
||||||
|
#define SelectionNotify 31
|
||||||
|
#define ColormapNotify 32
|
||||||
|
#define ClientMessage 33
|
||||||
|
#define MappingNotify 34
|
||||||
|
#define GenericEvent 35
|
||||||
|
#define LASTEvent 36 /* must be bigger than any event # */
|
||||||
|
|
||||||
|
|
||||||
|
/* Key masks. Used as modifiers to GrabButton and GrabKey, results of QueryPointer,
|
||||||
|
state in various key-, mouse-, and button-related events. */
|
||||||
|
|
||||||
|
#define ShiftMask (1<<0)
|
||||||
|
#define LockMask (1<<1)
|
||||||
|
#define ControlMask (1<<2)
|
||||||
|
#define Mod1Mask (1<<3)
|
||||||
|
#define Mod2Mask (1<<4)
|
||||||
|
#define Mod3Mask (1<<5)
|
||||||
|
#define Mod4Mask (1<<6)
|
||||||
|
#define Mod5Mask (1<<7)
|
||||||
|
|
||||||
|
/* modifier names. Used to build a SetModifierMapping request or
|
||||||
|
to read a GetModifierMapping request. These correspond to the
|
||||||
|
masks defined above. */
|
||||||
|
#define ShiftMapIndex 0
|
||||||
|
#define LockMapIndex 1
|
||||||
|
#define ControlMapIndex 2
|
||||||
|
#define Mod1MapIndex 3
|
||||||
|
#define Mod2MapIndex 4
|
||||||
|
#define Mod3MapIndex 5
|
||||||
|
#define Mod4MapIndex 6
|
||||||
|
#define Mod5MapIndex 7
|
||||||
|
|
||||||
|
|
||||||
|
/* button masks. Used in same manner as Key masks above. Not to be confused
|
||||||
|
with button names below. */
|
||||||
|
|
||||||
|
#define Button1Mask (1<<8)
|
||||||
|
#define Button2Mask (1<<9)
|
||||||
|
#define Button3Mask (1<<10)
|
||||||
|
#define Button4Mask (1<<11)
|
||||||
|
#define Button5Mask (1<<12)
|
||||||
|
|
||||||
|
#define AnyModifier (1<<15) /* used in GrabButton, GrabKey */
|
||||||
|
|
||||||
|
|
||||||
|
/* button names. Used as arguments to GrabButton and as detail in ButtonPress
|
||||||
|
and ButtonRelease events. Not to be confused with button masks above.
|
||||||
|
Note that 0 is already defined above as "AnyButton". */
|
||||||
|
|
||||||
|
#define Button1 1
|
||||||
|
#define Button2 2
|
||||||
|
#define Button3 3
|
||||||
|
#define Button4 4
|
||||||
|
#define Button5 5
|
||||||
|
|
||||||
|
/* Notify modes */
|
||||||
|
|
||||||
|
#define NotifyNormal 0
|
||||||
|
#define NotifyGrab 1
|
||||||
|
#define NotifyUngrab 2
|
||||||
|
#define NotifyWhileGrabbed 3
|
||||||
|
|
||||||
|
#define NotifyHint 1 /* for MotionNotify events */
|
||||||
|
|
||||||
|
/* Notify detail */
|
||||||
|
|
||||||
|
#define NotifyAncestor 0
|
||||||
|
#define NotifyVirtual 1
|
||||||
|
#define NotifyInferior 2
|
||||||
|
#define NotifyNonlinear 3
|
||||||
|
#define NotifyNonlinearVirtual 4
|
||||||
|
#define NotifyPointer 5
|
||||||
|
#define NotifyPointerRoot 6
|
||||||
|
#define NotifyDetailNone 7
|
||||||
|
|
||||||
|
/* Visibility notify */
|
||||||
|
|
||||||
|
#define VisibilityUnobscured 0
|
||||||
|
#define VisibilityPartiallyObscured 1
|
||||||
|
#define VisibilityFullyObscured 2
|
||||||
|
|
||||||
|
/* GrabPointer, GrabButton, GrabKeyboard, GrabKey Modes */
|
||||||
|
|
||||||
|
#define GrabModeSync 0
|
||||||
|
#define GrabModeAsync 1
|
||||||
|
|
||||||
|
/* GrabPointer, GrabKeyboard reply status */
|
||||||
|
|
||||||
|
#define GrabSuccess 0
|
||||||
|
#define AlreadyGrabbed 1
|
||||||
|
#define GrabInvalidTime 2
|
||||||
|
#define GrabNotViewable 3
|
||||||
|
#define GrabFrozen 4
|
||||||
|
|
||||||
|
/* AllowEvents modes */
|
||||||
|
|
||||||
|
#define AsyncPointer 0
|
||||||
|
#define SyncPointer 1
|
||||||
|
#define ReplayPointer 2
|
||||||
|
#define AsyncKeyboard 3
|
||||||
|
#define SyncKeyboard 4
|
||||||
|
#define ReplayKeyboard 5
|
||||||
|
#define AsyncBoth 6
|
||||||
|
#define SyncBoth 7
|
||||||
|
|
||||||
|
/* Used in SetInputFocus, GetInputFocus */
|
||||||
|
|
||||||
|
#define RevertToNone (int)None
|
||||||
|
#define RevertToPointerRoot (int)PointerRoot
|
||||||
|
#define RevertToParent 2
|
||||||
|
|
||||||
|
/*****************************************************************
|
||||||
|
* ERROR CODES
|
||||||
|
*****************************************************************/
|
||||||
|
|
||||||
|
#define Success 0 /* everything's okay */
|
||||||
|
#define BadRequest 1 /* bad request code */
|
||||||
|
#define BadValue 2 /* int parameter out of range */
|
||||||
|
#define BadWindow 3 /* parameter not a Window */
|
||||||
|
#define BadPixmap 4 /* parameter not a Pixmap */
|
||||||
|
#define BadAtom 5 /* parameter not an Atom */
|
||||||
|
#define BadCursor 6 /* parameter not a Cursor */
|
||||||
|
#define BadFont 7 /* parameter not a Font */
|
||||||
|
#define BadMatch 8 /* parameter mismatch */
|
||||||
|
#define BadDrawable 9 /* parameter not a Pixmap or Window */
|
||||||
|
#define BadAccess 10 /* depending on context:
|
||||||
|
- key/button already grabbed
|
||||||
|
- attempt to free an illegal
|
||||||
|
cmap entry
|
||||||
|
- attempt to store into a read-only
|
||||||
|
color map entry.
|
||||||
|
- attempt to modify the access control
|
||||||
|
list from other than the local host.
|
||||||
|
*/
|
||||||
|
#define BadAlloc 11 /* insufficient resources */
|
||||||
|
#define BadColor 12 /* no such colormap */
|
||||||
|
#define BadGC 13 /* parameter not a GC */
|
||||||
|
#define BadIDChoice 14 /* choice not in range or already used */
|
||||||
|
#define BadName 15 /* font or color name doesn't exist */
|
||||||
|
#define BadLength 16 /* Request length incorrect */
|
||||||
|
#define BadImplementation 17 /* server is defective */
|
||||||
|
|
||||||
|
#define FirstExtensionError 128
|
||||||
|
#define LastExtensionError 255
|
||||||
|
|
||||||
|
/*****************************************************************
|
||||||
|
* WINDOW DEFINITIONS
|
||||||
|
*****************************************************************/
|
||||||
|
|
||||||
|
/* Window classes used by CreateWindow */
|
||||||
|
/* Note that CopyFromParent is already defined as 0 above */
|
||||||
|
|
||||||
|
#define InputOutput 1
|
||||||
|
#define InputOnly 2
|
||||||
|
|
||||||
|
/* Window attributes for CreateWindow and ChangeWindowAttributes */
|
||||||
|
|
||||||
|
#define CWBackPixmap (1L<<0)
|
||||||
|
#define CWBackPixel (1L<<1)
|
||||||
|
#define CWBorderPixmap (1L<<2)
|
||||||
|
#define CWBorderPixel (1L<<3)
|
||||||
|
#define CWBitGravity (1L<<4)
|
||||||
|
#define CWWinGravity (1L<<5)
|
||||||
|
#define CWBackingStore (1L<<6)
|
||||||
|
#define CWBackingPlanes (1L<<7)
|
||||||
|
#define CWBackingPixel (1L<<8)
|
||||||
|
#define CWOverrideRedirect (1L<<9)
|
||||||
|
#define CWSaveUnder (1L<<10)
|
||||||
|
#define CWEventMask (1L<<11)
|
||||||
|
#define CWDontPropagate (1L<<12)
|
||||||
|
#define CWColormap (1L<<13)
|
||||||
|
#define CWCursor (1L<<14)
|
||||||
|
|
||||||
|
/* Property modes */
|
||||||
|
|
||||||
|
#define PropModeReplace 0
|
||||||
|
#define PropModePrepend 1
|
||||||
|
#define PropModeAppend 2
|
||||||
|
|
||||||
|
/*****************************************************************
|
||||||
|
* IMAGING
|
||||||
|
*****************************************************************/
|
||||||
|
|
||||||
|
/* ImageFormat -- PutImage, GetImage */
|
||||||
|
|
||||||
|
#define XYBitmap 0 /* depth 1, XYFormat */
|
||||||
|
#define XYPixmap 1 /* depth == drawable depth */
|
||||||
|
#define ZPixmap 2 /* depth == drawable depth */
|
||||||
|
|
||||||
|
/*****************************************************************
|
||||||
|
* COLOR MAP STUFF
|
||||||
|
*****************************************************************/
|
||||||
|
|
||||||
|
/* For CreateColormap */
|
||||||
|
|
||||||
|
#define AllocNone 0 /* create map with no entries */
|
||||||
|
#define AllocAll 1 /* allocate entire map writeable */
|
||||||
|
|
||||||
|
|
||||||
|
/* Flags used in StoreNamedColor, StoreColors */
|
||||||
|
|
||||||
|
#define DoRed (1<<0)
|
||||||
|
#define DoGreen (1<<1)
|
||||||
|
#define DoBlue (1<<2)
|
||||||
|
|
||||||
|
/*****************************************************************
|
||||||
|
* CURSOR STUFF
|
||||||
|
*****************************************************************/
|
||||||
|
|
||||||
|
/* QueryBestSize Class */
|
||||||
|
|
||||||
|
#define CursorShape 0 /* largest size that can be displayed */
|
||||||
|
#define TileShape 1 /* size tiled fastest */
|
||||||
|
#define StippleShape 2 /* size stippled fastest */
|
||||||
|
|
||||||
|
/*****************************************************************
|
||||||
|
* KEYBOARD/POINTER STUFF
|
||||||
|
*****************************************************************/
|
||||||
|
#define MappingSuccess 0
|
||||||
|
#define MappingBusy 1
|
||||||
|
#define MappingFailed 2
|
||||||
|
|
||||||
|
#define MappingModifier 0
|
||||||
|
#define MappingKeyboard 1
|
||||||
|
#define MappingPointer 2
|
||||||
|
|
||||||
|
/*****************************************************************
|
||||||
|
* HOSTS AND CONNECTIONS
|
||||||
|
*****************************************************************/
|
||||||
|
|
||||||
|
/* Display classes used in opening the connection
|
||||||
|
* Note that the statically allocated ones are even numbered and the
|
||||||
|
* dynamically changeable ones are odd numbered */
|
||||||
|
|
||||||
|
#define StaticGray 0
|
||||||
|
#define GrayScale 1
|
||||||
|
#define StaticColor 2
|
||||||
|
#define PseudoColor 3
|
||||||
|
#define TrueColor 4
|
||||||
|
#define DirectColor 5
|
||||||
|
|
||||||
|
|
||||||
|
/* Byte order used in imageByteOrder and bitmapBitOrder */
|
||||||
|
|
||||||
|
#define LSBFirst 0
|
||||||
|
#define MSBFirst 1
|
||||||
|
|
||||||
|
#endif /* X_H */
|
@ -27,7 +27,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||||||
#ifndef _X11_XKBLIB_H_
|
#ifndef _X11_XKBLIB_H_
|
||||||
#define _X11_XKBLIB_H_
|
#define _X11_XKBLIB_H_
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
#include "min-xlib.h"
|
||||||
|
|
||||||
extern Bool XkbSetDetectableAutoRepeat(
|
extern Bool XkbSetDetectableAutoRepeat(
|
||||||
Display * /* dpy */,
|
Display * /* dpy */,
|
||||||
|
1778
misc/linux/min-xlib.h
Normal file
1778
misc/linux/min-xlib.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -50,7 +50,7 @@ SOFTWARE.
|
|||||||
#define _X11_XUTIL_H_
|
#define _X11_XUTIL_H_
|
||||||
|
|
||||||
/* You must include <X11/Xlib.h> before including this file */
|
/* You must include <X11/Xlib.h> before including this file */
|
||||||
#include <X11/Xlib.h>
|
#include "min-xlib.h"
|
||||||
|
|
||||||
/* The Xlib structs are full of implicit padding to properly align members.
|
/* The Xlib structs are full of implicit padding to properly align members.
|
||||||
We can't clean that up without breaking ABI, so tell clang not to bother
|
We can't clean that up without breaking ABI, so tell clang not to bother
|
||||||
@ -100,53 +100,6 @@ typedef struct {
|
|||||||
/* obsolete */
|
/* obsolete */
|
||||||
#define PAllHints (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect)
|
#define PAllHints (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
long flags; /* marks which fields in this structure are defined */
|
|
||||||
Bool input; /* does this application rely on the window manager to
|
|
||||||
get keyboard input? */
|
|
||||||
int initial_state; /* see below */
|
|
||||||
Pixmap icon_pixmap; /* pixmap to be used as icon */
|
|
||||||
Window icon_window; /* window to be used as icon */
|
|
||||||
int icon_x, icon_y; /* initial position of icon */
|
|
||||||
Pixmap icon_mask; /* icon mask bitmap */
|
|
||||||
XID window_group; /* id of related window group */
|
|
||||||
/* this structure may be extended in the future */
|
|
||||||
} XWMHints;
|
|
||||||
|
|
||||||
/* definition for flags of XWMHints */
|
|
||||||
|
|
||||||
#define InputHint (1L << 0)
|
|
||||||
#define StateHint (1L << 1)
|
|
||||||
#define IconPixmapHint (1L << 2)
|
|
||||||
#define IconWindowHint (1L << 3)
|
|
||||||
#define IconPositionHint (1L << 4)
|
|
||||||
#define IconMaskHint (1L << 5)
|
|
||||||
#define WindowGroupHint (1L << 6)
|
|
||||||
#define AllHints (InputHint|StateHint|IconPixmapHint|IconWindowHint| \
|
|
||||||
IconPositionHint|IconMaskHint|WindowGroupHint)
|
|
||||||
#define XUrgencyHint (1L << 8)
|
|
||||||
|
|
||||||
/* definitions for initial window state */
|
|
||||||
#define WithdrawnState 0 /* for windows that are not mapped */
|
|
||||||
#define NormalState 1 /* most applications want to start this way */
|
|
||||||
#define IconicState 3 /* application wants to start as an icon */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Obsolete states no longer defined by ICCCM
|
|
||||||
*/
|
|
||||||
#define DontCareState 0 /* don't know or care */
|
|
||||||
#define ZoomState 2 /* application wants to start zoomed */
|
|
||||||
#define InactiveState 4 /* application believes it is seldom used; */
|
|
||||||
/* some wm's may put it on inactive menu */
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
int min_width, min_height;
|
|
||||||
int max_width, max_height;
|
|
||||||
int width_inc, height_inc;
|
|
||||||
} XIconSize;
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *res_name;
|
char *res_name;
|
||||||
char *res_class;
|
char *res_class;
|
||||||
@ -271,12 +224,6 @@ extern int XSetSizeHints(
|
|||||||
Atom /* property */
|
Atom /* property */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int XSetWMHints(
|
|
||||||
Display* /* display */,
|
|
||||||
Window /* w */,
|
|
||||||
XWMHints* /* wm_hints */
|
|
||||||
);
|
|
||||||
|
|
||||||
extern void XSetWMNormalHints(
|
extern void XSetWMNormalHints(
|
||||||
Display* /* display */,
|
Display* /* display */,
|
||||||
Window /* w */,
|
Window /* w */,
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include <X11/extensions/XInput2.h>
|
#include <X11/extensions/XInput2.h>
|
||||||
#endif
|
#endif
|
||||||
*/
|
*/
|
||||||
#include <X11/Xlib.h>
|
#include "../misc/linux/min-xlib.h"
|
||||||
#include "../misc/linux/min-keysymdef.h"
|
#include "../misc/linux/min-keysymdef.h"
|
||||||
#include "../misc/linux/min-xutil.h"
|
#include "../misc/linux/min-xutil.h"
|
||||||
#include "../misc/linux/min-xkblib.h"
|
#include "../misc/linux/min-xkblib.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user