chore(macos): vendor system-sdk dependency
This commit is contained in:
parent
7f8d05101e
commit
a50d52bae5
|
@ -11,6 +11,6 @@
|
|||
.dependencies = .{
|
||||
// .zglfw = .{ .path = "../zglfw" },
|
||||
// .zgpu = .{ .path = "../zgpu" },
|
||||
// .system_sdk = .{ .path = "../system-sdk" },
|
||||
.system_sdk = .{ .path = "libs/system-sdk" },
|
||||
},
|
||||
}
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2021 Michal Ziulek
|
||||
Copyright (c) 2024 zig-gamedev contributors
|
||||
|
||||
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 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
|
||||
AUTHORS OR COPYRIGHT HOLDERS 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.
|
|
@ -0,0 +1,9 @@
|
|||
# [zig-gamedev system-sdk](https://github.com/zig-gamedev/zig-gamedev/tree/main/libs/system-sdk)
|
||||
|
||||
System libraries and headers for cross-compiling [zig-gamedev libs](https://github.com/zig-gamedev/zig-gamedev#libraries)
|
||||
|
||||
## Usage
|
||||
build.zig
|
||||
```zig
|
||||
@import("system_sdk").addLibraryPathsTo(exe);
|
||||
```
|
|
@ -0,0 +1,32 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub fn build(_: *std.Build) void {}
|
||||
|
||||
pub fn addLibraryPathsTo(compile_step: *std.Build.Step.Compile) void {
|
||||
const b = compile_step.step.owner;
|
||||
const target = compile_step.rootModuleTarget();
|
||||
|
||||
const system_sdk = b.dependency("system_sdk", .{});
|
||||
|
||||
switch (target.os.tag) {
|
||||
.windows => {
|
||||
if (target.cpu.arch.isX86()) {
|
||||
if (target.abi.isGnu() or target.abi.isMusl()) {
|
||||
compile_step.addLibraryPath(system_sdk.path("windows/lib/x86_64-windows-gnu"));
|
||||
}
|
||||
}
|
||||
},
|
||||
.macos => {
|
||||
compile_step.addLibraryPath(system_sdk.path("macos12/usr/lib"));
|
||||
compile_step.addFrameworkPath(system_sdk.path("macos12/System/Library/Frameworks"));
|
||||
},
|
||||
.linux => {
|
||||
if (target.cpu.arch.isX86()) {
|
||||
compile_step.addLibraryPath(system_sdk.path("linux/lib/x86_64-linux-gnu"));
|
||||
} else if (target.cpu.arch == .aarch64) {
|
||||
compile_step.addLibraryPath(system_sdk.path("linux/lib/aarch64-linux-gnu"));
|
||||
}
|
||||
},
|
||||
else => {},
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
.{
|
||||
.name = "system-sdk",
|
||||
.version = "0.1.1",
|
||||
.paths = .{
|
||||
"build.zig",
|
||||
"build.zig.zon",
|
||||
"linux",
|
||||
"macos12",
|
||||
"windows",
|
||||
},
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,441 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* 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 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 AUTHORS OR COPYRIGHT HOLDERS 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 GLX_H
|
||||
#define GLX_H
|
||||
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <GL/gl.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#define GLX_VERSION_1_1 1
|
||||
#define GLX_VERSION_1_2 1
|
||||
#define GLX_VERSION_1_3 1
|
||||
#define GLX_VERSION_1_4 1
|
||||
|
||||
#define GLX_EXTENSION_NAME "GLX"
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Tokens for glXChooseVisual and glXGetConfig:
|
||||
*/
|
||||
#define GLX_USE_GL 1
|
||||
#define GLX_BUFFER_SIZE 2
|
||||
#define GLX_LEVEL 3
|
||||
#define GLX_RGBA 4
|
||||
#define GLX_DOUBLEBUFFER 5
|
||||
#define GLX_STEREO 6
|
||||
#define GLX_AUX_BUFFERS 7
|
||||
#define GLX_RED_SIZE 8
|
||||
#define GLX_GREEN_SIZE 9
|
||||
#define GLX_BLUE_SIZE 10
|
||||
#define GLX_ALPHA_SIZE 11
|
||||
#define GLX_DEPTH_SIZE 12
|
||||
#define GLX_STENCIL_SIZE 13
|
||||
#define GLX_ACCUM_RED_SIZE 14
|
||||
#define GLX_ACCUM_GREEN_SIZE 15
|
||||
#define GLX_ACCUM_BLUE_SIZE 16
|
||||
#define GLX_ACCUM_ALPHA_SIZE 17
|
||||
|
||||
|
||||
/*
|
||||
* Error codes returned by glXGetConfig:
|
||||
*/
|
||||
#define GLX_BAD_SCREEN 1
|
||||
#define GLX_BAD_ATTRIBUTE 2
|
||||
#define GLX_NO_EXTENSION 3
|
||||
#define GLX_BAD_VISUAL 4
|
||||
#define GLX_BAD_CONTEXT 5
|
||||
#define GLX_BAD_VALUE 6
|
||||
#define GLX_BAD_ENUM 7
|
||||
|
||||
|
||||
/*
|
||||
* GLX 1.1 and later:
|
||||
*/
|
||||
#define GLX_VENDOR 1
|
||||
#define GLX_VERSION 2
|
||||
#define GLX_EXTENSIONS 3
|
||||
|
||||
|
||||
/*
|
||||
* GLX 1.3 and later:
|
||||
*/
|
||||
#define GLX_CONFIG_CAVEAT 0x20
|
||||
#define GLX_DONT_CARE 0xFFFFFFFF
|
||||
#define GLX_X_VISUAL_TYPE 0x22
|
||||
#define GLX_TRANSPARENT_TYPE 0x23
|
||||
#define GLX_TRANSPARENT_INDEX_VALUE 0x24
|
||||
#define GLX_TRANSPARENT_RED_VALUE 0x25
|
||||
#define GLX_TRANSPARENT_GREEN_VALUE 0x26
|
||||
#define GLX_TRANSPARENT_BLUE_VALUE 0x27
|
||||
#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
|
||||
#define GLX_WINDOW_BIT 0x00000001
|
||||
#define GLX_PIXMAP_BIT 0x00000002
|
||||
#define GLX_PBUFFER_BIT 0x00000004
|
||||
#define GLX_AUX_BUFFERS_BIT 0x00000010
|
||||
#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
|
||||
#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
|
||||
#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
|
||||
#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
|
||||
#define GLX_DEPTH_BUFFER_BIT 0x00000020
|
||||
#define GLX_STENCIL_BUFFER_BIT 0x00000040
|
||||
#define GLX_ACCUM_BUFFER_BIT 0x00000080
|
||||
#define GLX_NONE 0x8000
|
||||
#define GLX_SLOW_CONFIG 0x8001
|
||||
#define GLX_TRUE_COLOR 0x8002
|
||||
#define GLX_DIRECT_COLOR 0x8003
|
||||
#define GLX_PSEUDO_COLOR 0x8004
|
||||
#define GLX_STATIC_COLOR 0x8005
|
||||
#define GLX_GRAY_SCALE 0x8006
|
||||
#define GLX_STATIC_GRAY 0x8007
|
||||
#define GLX_TRANSPARENT_RGB 0x8008
|
||||
#define GLX_TRANSPARENT_INDEX 0x8009
|
||||
#define GLX_VISUAL_ID 0x800B
|
||||
#define GLX_SCREEN 0x800C
|
||||
#define GLX_NON_CONFORMANT_CONFIG 0x800D
|
||||
#define GLX_DRAWABLE_TYPE 0x8010
|
||||
#define GLX_RENDER_TYPE 0x8011
|
||||
#define GLX_X_RENDERABLE 0x8012
|
||||
#define GLX_FBCONFIG_ID 0x8013
|
||||
#define GLX_RGBA_TYPE 0x8014
|
||||
#define GLX_COLOR_INDEX_TYPE 0x8015
|
||||
#define GLX_MAX_PBUFFER_WIDTH 0x8016
|
||||
#define GLX_MAX_PBUFFER_HEIGHT 0x8017
|
||||
#define GLX_MAX_PBUFFER_PIXELS 0x8018
|
||||
#define GLX_PRESERVED_CONTENTS 0x801B
|
||||
#define GLX_LARGEST_PBUFFER 0x801C
|
||||
#define GLX_WIDTH 0x801D
|
||||
#define GLX_HEIGHT 0x801E
|
||||
#define GLX_EVENT_MASK 0x801F
|
||||
#define GLX_DAMAGED 0x8020
|
||||
#define GLX_SAVED 0x8021
|
||||
#define GLX_WINDOW 0x8022
|
||||
#define GLX_PBUFFER 0x8023
|
||||
#define GLX_PBUFFER_HEIGHT 0x8040
|
||||
#define GLX_PBUFFER_WIDTH 0x8041
|
||||
#define GLX_RGBA_BIT 0x00000001
|
||||
#define GLX_COLOR_INDEX_BIT 0x00000002
|
||||
#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
|
||||
|
||||
|
||||
/*
|
||||
* GLX 1.4 and later:
|
||||
*/
|
||||
#define GLX_SAMPLE_BUFFERS 0x186a0 /*100000*/
|
||||
#define GLX_SAMPLES 0x186a1 /*100001*/
|
||||
|
||||
|
||||
|
||||
typedef struct __GLXcontextRec *GLXContext;
|
||||
typedef XID GLXPixmap;
|
||||
typedef XID GLXDrawable;
|
||||
/* GLX 1.3 and later */
|
||||
typedef struct __GLXFBConfigRec *GLXFBConfig;
|
||||
typedef XID GLXFBConfigID;
|
||||
typedef XID GLXContextID;
|
||||
typedef XID GLXWindow;
|
||||
typedef XID GLXPbuffer;
|
||||
|
||||
|
||||
/*
|
||||
** Events.
|
||||
** __GLX_NUMBER_EVENTS is set to 17 to account for the BufferClobberSGIX
|
||||
** event - this helps initialization if the server supports the pbuffer
|
||||
** extension and the client doesn't.
|
||||
*/
|
||||
#define GLX_PbufferClobber 0
|
||||
#define GLX_BufferSwapComplete 1
|
||||
|
||||
#define __GLX_NUMBER_EVENTS 17
|
||||
|
||||
extern XVisualInfo* glXChooseVisual( Display *dpy, int screen,
|
||||
int *attribList );
|
||||
|
||||
extern GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
|
||||
GLXContext shareList, Bool direct );
|
||||
|
||||
extern void glXDestroyContext( Display *dpy, GLXContext ctx );
|
||||
|
||||
extern Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable,
|
||||
GLXContext ctx);
|
||||
|
||||
extern void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
|
||||
unsigned long mask );
|
||||
|
||||
extern void glXSwapBuffers( Display *dpy, GLXDrawable drawable );
|
||||
|
||||
extern GLXPixmap glXCreateGLXPixmap( Display *dpy, XVisualInfo *visual,
|
||||
Pixmap pixmap );
|
||||
|
||||
extern void glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap );
|
||||
|
||||
extern Bool glXQueryExtension( Display *dpy, int *errorb, int *event );
|
||||
|
||||
extern Bool glXQueryVersion( Display *dpy, int *maj, int *min );
|
||||
|
||||
extern Bool glXIsDirect( Display *dpy, GLXContext ctx );
|
||||
|
||||
extern int glXGetConfig( Display *dpy, XVisualInfo *visual,
|
||||
int attrib, int *value );
|
||||
|
||||
extern GLXContext glXGetCurrentContext( void );
|
||||
|
||||
extern GLXDrawable glXGetCurrentDrawable( void );
|
||||
|
||||
extern void glXWaitGL( void );
|
||||
|
||||
extern void glXWaitX( void );
|
||||
|
||||
extern void glXUseXFont( Font font, int first, int count, int list );
|
||||
|
||||
|
||||
|
||||
/* GLX 1.1 and later */
|
||||
extern const char *glXQueryExtensionsString( Display *dpy, int screen );
|
||||
|
||||
extern const char *glXQueryServerString( Display *dpy, int screen, int name );
|
||||
|
||||
extern const char *glXGetClientString( Display *dpy, int name );
|
||||
|
||||
|
||||
/* GLX 1.2 and later */
|
||||
extern Display *glXGetCurrentDisplay( void );
|
||||
|
||||
|
||||
/* GLX 1.3 and later */
|
||||
extern GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
|
||||
const int *attribList, int *nitems );
|
||||
|
||||
extern int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config,
|
||||
int attribute, int *value );
|
||||
|
||||
extern GLXFBConfig *glXGetFBConfigs( Display *dpy, int screen,
|
||||
int *nelements );
|
||||
|
||||
extern XVisualInfo *glXGetVisualFromFBConfig( Display *dpy,
|
||||
GLXFBConfig config );
|
||||
|
||||
extern GLXWindow glXCreateWindow( Display *dpy, GLXFBConfig config,
|
||||
Window win, const int *attribList );
|
||||
|
||||
extern void glXDestroyWindow( Display *dpy, GLXWindow window );
|
||||
|
||||
extern GLXPixmap glXCreatePixmap( Display *dpy, GLXFBConfig config,
|
||||
Pixmap pixmap, const int *attribList );
|
||||
|
||||
extern void glXDestroyPixmap( Display *dpy, GLXPixmap pixmap );
|
||||
|
||||
extern GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
|
||||
const int *attribList );
|
||||
|
||||
extern void glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf );
|
||||
|
||||
extern void glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute,
|
||||
unsigned int *value );
|
||||
|
||||
extern GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config,
|
||||
int renderType, GLXContext shareList,
|
||||
Bool direct );
|
||||
|
||||
extern Bool glXMakeContextCurrent( Display *dpy, GLXDrawable draw,
|
||||
GLXDrawable read, GLXContext ctx );
|
||||
|
||||
extern GLXDrawable glXGetCurrentReadDrawable( void );
|
||||
|
||||
extern int glXQueryContext( Display *dpy, GLXContext ctx, int attribute,
|
||||
int *value );
|
||||
|
||||
extern void glXSelectEvent( Display *dpy, GLXDrawable drawable,
|
||||
unsigned long mask );
|
||||
|
||||
extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
|
||||
unsigned long *mask );
|
||||
|
||||
/* GLX 1.3 function pointer typedefs */
|
||||
typedef GLXFBConfig * (* PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
|
||||
typedef GLXFBConfig * (* PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
|
||||
typedef int (* PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
|
||||
typedef XVisualInfo * (* PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
|
||||
typedef GLXWindow (* PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
|
||||
typedef void (* PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
|
||||
typedef GLXPixmap (* PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
|
||||
typedef void (* PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
|
||||
typedef GLXPbuffer (* PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
|
||||
typedef void (* PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
|
||||
typedef void (* PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
|
||||
typedef GLXContext (* PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
|
||||
typedef Bool (* PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
||||
typedef GLXDrawable (* PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
|
||||
typedef Display * (* PFNGLXGETCURRENTDISPLAYPROC) (void);
|
||||
typedef int (* PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
|
||||
typedef void (* PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
|
||||
typedef void (* PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
|
||||
|
||||
|
||||
/*
|
||||
* ARB 2. GLX_ARB_get_proc_address
|
||||
*/
|
||||
#ifndef GLX_ARB_get_proc_address
|
||||
#define GLX_ARB_get_proc_address 1
|
||||
|
||||
typedef void (*__GLXextFuncPtr)(void);
|
||||
extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
|
||||
|
||||
#endif /* GLX_ARB_get_proc_address */
|
||||
|
||||
|
||||
|
||||
/* GLX 1.4 and later */
|
||||
extern void (*glXGetProcAddress(const GLubyte *procname))( void );
|
||||
|
||||
/* GLX 1.4 function pointer typedefs */
|
||||
typedef __GLXextFuncPtr (* PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
|
||||
|
||||
|
||||
#ifndef GLX_GLXEXT_LEGACY
|
||||
|
||||
#include <GL/glxext.h>
|
||||
|
||||
#endif /* GLX_GLXEXT_LEGACY */
|
||||
|
||||
|
||||
/**
|
||||
** The following aren't in glxext.h yet.
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
* ???. GLX_NV_vertex_array_range
|
||||
*/
|
||||
#ifndef GLX_NV_vertex_array_range
|
||||
#define GLX_NV_vertex_array_range
|
||||
|
||||
extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
|
||||
extern void glXFreeMemoryNV(GLvoid *pointer);
|
||||
typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
|
||||
typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer);
|
||||
|
||||
#endif /* GLX_NV_vertex_array_range */
|
||||
|
||||
|
||||
/*
|
||||
* ARB ?. GLX_ARB_render_texture
|
||||
* XXX This was never finalized!
|
||||
*/
|
||||
#ifndef GLX_ARB_render_texture
|
||||
#define GLX_ARB_render_texture 1
|
||||
|
||||
extern Bool glXBindTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
|
||||
extern Bool glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
|
||||
extern Bool glXDrawableAttribARB(Display *dpy, GLXDrawable draw, const int *attribList);
|
||||
|
||||
#endif /* GLX_ARB_render_texture */
|
||||
|
||||
|
||||
/*
|
||||
* #?. GLX_MESA_swap_frame_usage
|
||||
*/
|
||||
#ifndef GLX_MESA_swap_frame_usage
|
||||
#define GLX_MESA_swap_frame_usage 1
|
||||
|
||||
extern int glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable, float *usage);
|
||||
extern int glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
|
||||
extern int glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
|
||||
extern int glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
|
||||
|
||||
typedef int (*PFNGLXGETFRAMEUSAGEMESAPROC) (Display *dpy, GLXDrawable drawable, float *usage);
|
||||
typedef int (*PFNGLXBEGINFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
|
||||
typedef int (*PFNGLXENDFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
|
||||
typedef int (*PFNGLXQUERYFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
|
||||
|
||||
#endif /* GLX_MESA_swap_frame_usage */
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* #?. GLX_MESA_swap_control
|
||||
*/
|
||||
#ifndef GLX_MESA_swap_control
|
||||
#define GLX_MESA_swap_control 1
|
||||
|
||||
extern int glXSwapIntervalMESA(unsigned int interval);
|
||||
extern int glXGetSwapIntervalMESA(void);
|
||||
|
||||
typedef int (*PFNGLXSWAPINTERVALMESAPROC)(unsigned int interval);
|
||||
typedef int (*PFNGLXGETSWAPINTERVALMESAPROC)(void);
|
||||
|
||||
#endif /* GLX_MESA_swap_control */
|
||||
|
||||
|
||||
/*** Should these go here, or in another header? */
|
||||
/*
|
||||
** GLX Events
|
||||
*/
|
||||
typedef struct {
|
||||
int event_type; /* GLX_DAMAGED or GLX_SAVED */
|
||||
int draw_type; /* GLX_WINDOW or GLX_PBUFFER */
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came for SendEvent request */
|
||||
Display *display; /* display the event was read from */
|
||||
GLXDrawable drawable; /* XID of Drawable */
|
||||
unsigned int buffer_mask; /* mask indicating which buffers are affected */
|
||||
unsigned int aux_buffer; /* which aux buffer was affected */
|
||||
int x, y;
|
||||
int width, height;
|
||||
int count; /* if nonzero, at least this many more */
|
||||
} GLXPbufferClobberEvent;
|
||||
|
||||
typedef struct {
|
||||
int type;
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came from a SendEvent request */
|
||||
Display *display; /* Display the event was read from */
|
||||
Drawable drawable; /* drawable on which event was requested in event mask */
|
||||
int event_type;
|
||||
int64_t ust;
|
||||
int64_t msc;
|
||||
int64_t sbc;
|
||||
} GLXBufferSwapComplete;
|
||||
|
||||
typedef union __GLXEvent {
|
||||
GLXPbufferClobberEvent glxpbufferclobber;
|
||||
GLXBufferSwapComplete glxbufferswapcomplete;
|
||||
long pad[24];
|
||||
} GLXEvent;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -0,0 +1,953 @@
|
|||
#ifndef __glx_glxext_h_
|
||||
#define __glx_glxext_h_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2013-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE 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 OR COPYRIGHT HOLDERS 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
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
/*
|
||||
** This header is generated from the Khronos OpenGL / OpenGL ES XML
|
||||
** API Registry. The current version of the Registry, generator scripts
|
||||
** used to make the header, and the header can be found at
|
||||
** https://github.com/KhronosGroup/OpenGL-Registry
|
||||
*/
|
||||
|
||||
#define GLX_GLXEXT_VERSION 20180525
|
||||
|
||||
/* Generated C header for:
|
||||
* API: glx
|
||||
* Versions considered: .*
|
||||
* Versions emitted: 1\.[3-9]
|
||||
* Default extensions included: glx
|
||||
* Additional extensions included: _nomatch_^
|
||||
* Extensions removed: _nomatch_^
|
||||
*/
|
||||
|
||||
#ifndef GLX_VERSION_1_3
|
||||
#define GLX_VERSION_1_3 1
|
||||
typedef XID GLXContextID;
|
||||
typedef struct __GLXFBConfigRec *GLXFBConfig;
|
||||
typedef XID GLXWindow;
|
||||
typedef XID GLXPbuffer;
|
||||
#define GLX_WINDOW_BIT 0x00000001
|
||||
#define GLX_PIXMAP_BIT 0x00000002
|
||||
#define GLX_PBUFFER_BIT 0x00000004
|
||||
#define GLX_RGBA_BIT 0x00000001
|
||||
#define GLX_COLOR_INDEX_BIT 0x00000002
|
||||
#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
|
||||
#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
|
||||
#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
|
||||
#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
|
||||
#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
|
||||
#define GLX_AUX_BUFFERS_BIT 0x00000010
|
||||
#define GLX_DEPTH_BUFFER_BIT 0x00000020
|
||||
#define GLX_STENCIL_BUFFER_BIT 0x00000040
|
||||
#define GLX_ACCUM_BUFFER_BIT 0x00000080
|
||||
#define GLX_CONFIG_CAVEAT 0x20
|
||||
#define GLX_X_VISUAL_TYPE 0x22
|
||||
#define GLX_TRANSPARENT_TYPE 0x23
|
||||
#define GLX_TRANSPARENT_INDEX_VALUE 0x24
|
||||
#define GLX_TRANSPARENT_RED_VALUE 0x25
|
||||
#define GLX_TRANSPARENT_GREEN_VALUE 0x26
|
||||
#define GLX_TRANSPARENT_BLUE_VALUE 0x27
|
||||
#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
|
||||
#define GLX_DONT_CARE 0xFFFFFFFF
|
||||
#define GLX_NONE 0x8000
|
||||
#define GLX_SLOW_CONFIG 0x8001
|
||||
#define GLX_TRUE_COLOR 0x8002
|
||||
#define GLX_DIRECT_COLOR 0x8003
|
||||
#define GLX_PSEUDO_COLOR 0x8004
|
||||
#define GLX_STATIC_COLOR 0x8005
|
||||
#define GLX_GRAY_SCALE 0x8006
|
||||
#define GLX_STATIC_GRAY 0x8007
|
||||
#define GLX_TRANSPARENT_RGB 0x8008
|
||||
#define GLX_TRANSPARENT_INDEX 0x8009
|
||||
#define GLX_VISUAL_ID 0x800B
|
||||
#define GLX_SCREEN 0x800C
|
||||
#define GLX_NON_CONFORMANT_CONFIG 0x800D
|
||||
#define GLX_DRAWABLE_TYPE 0x8010
|
||||
#define GLX_RENDER_TYPE 0x8011
|
||||
#define GLX_X_RENDERABLE 0x8012
|
||||
#define GLX_FBCONFIG_ID 0x8013
|
||||
#define GLX_RGBA_TYPE 0x8014
|
||||
#define GLX_COLOR_INDEX_TYPE 0x8015
|
||||
#define GLX_MAX_PBUFFER_WIDTH 0x8016
|
||||
#define GLX_MAX_PBUFFER_HEIGHT 0x8017
|
||||
#define GLX_MAX_PBUFFER_PIXELS 0x8018
|
||||
#define GLX_PRESERVED_CONTENTS 0x801B
|
||||
#define GLX_LARGEST_PBUFFER 0x801C
|
||||
#define GLX_WIDTH 0x801D
|
||||
#define GLX_HEIGHT 0x801E
|
||||
#define GLX_EVENT_MASK 0x801F
|
||||
#define GLX_DAMAGED 0x8020
|
||||
#define GLX_SAVED 0x8021
|
||||
#define GLX_WINDOW 0x8022
|
||||
#define GLX_PBUFFER 0x8023
|
||||
#define GLX_PBUFFER_HEIGHT 0x8040
|
||||
#define GLX_PBUFFER_WIDTH 0x8041
|
||||
typedef GLXFBConfig *( *PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
|
||||
typedef GLXFBConfig *( *PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
|
||||
typedef int ( *PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
|
||||
typedef XVisualInfo *( *PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
|
||||
typedef GLXWindow ( *PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
|
||||
typedef void ( *PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
|
||||
typedef GLXPixmap ( *PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
|
||||
typedef void ( *PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
|
||||
typedef GLXPbuffer ( *PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
|
||||
typedef void ( *PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
|
||||
typedef void ( *PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
|
||||
typedef GLXContext ( *PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
|
||||
typedef Bool ( *PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
||||
typedef GLXDrawable ( *PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
|
||||
typedef int ( *PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
|
||||
typedef void ( *PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
|
||||
typedef void ( *PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
GLXFBConfig *glXGetFBConfigs (Display *dpy, int screen, int *nelements);
|
||||
GLXFBConfig *glXChooseFBConfig (Display *dpy, int screen, const int *attrib_list, int *nelements);
|
||||
int glXGetFBConfigAttrib (Display *dpy, GLXFBConfig config, int attribute, int *value);
|
||||
XVisualInfo *glXGetVisualFromFBConfig (Display *dpy, GLXFBConfig config);
|
||||
GLXWindow glXCreateWindow (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
|
||||
void glXDestroyWindow (Display *dpy, GLXWindow win);
|
||||
GLXPixmap glXCreatePixmap (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
|
||||
void glXDestroyPixmap (Display *dpy, GLXPixmap pixmap);
|
||||
GLXPbuffer glXCreatePbuffer (Display *dpy, GLXFBConfig config, const int *attrib_list);
|
||||
void glXDestroyPbuffer (Display *dpy, GLXPbuffer pbuf);
|
||||
void glXQueryDrawable (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
|
||||
GLXContext glXCreateNewContext (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
|
||||
Bool glXMakeContextCurrent (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
||||
GLXDrawable glXGetCurrentReadDrawable (void);
|
||||
int glXQueryContext (Display *dpy, GLXContext ctx, int attribute, int *value);
|
||||
void glXSelectEvent (Display *dpy, GLXDrawable draw, unsigned long event_mask);
|
||||
void glXGetSelectedEvent (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
|
||||
#endif
|
||||
#endif /* GLX_VERSION_1_3 */
|
||||
|
||||
#ifndef GLX_VERSION_1_4
|
||||
#define GLX_VERSION_1_4 1
|
||||
typedef void ( *__GLXextFuncPtr)(void);
|
||||
#define GLX_SAMPLE_BUFFERS 100000
|
||||
#define GLX_SAMPLES 100001
|
||||
typedef __GLXextFuncPtr ( *PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
__GLXextFuncPtr glXGetProcAddress (const GLubyte *procName);
|
||||
#endif
|
||||
#endif /* GLX_VERSION_1_4 */
|
||||
|
||||
#ifndef GLX_ARB_context_flush_control
|
||||
#define GLX_ARB_context_flush_control 1
|
||||
#define GLX_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097
|
||||
#define GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0
|
||||
#define GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098
|
||||
#endif /* GLX_ARB_context_flush_control */
|
||||
|
||||
#ifndef GLX_ARB_create_context
|
||||
#define GLX_ARB_create_context 1
|
||||
#define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001
|
||||
#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
|
||||
#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
||||
#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
|
||||
#define GLX_CONTEXT_FLAGS_ARB 0x2094
|
||||
typedef GLXContext ( *PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
GLXContext glXCreateContextAttribsARB (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
|
||||
#endif
|
||||
#endif /* GLX_ARB_create_context */
|
||||
|
||||
#ifndef GLX_ARB_create_context_no_error
|
||||
#define GLX_ARB_create_context_no_error 1
|
||||
#define GLX_CONTEXT_OPENGL_NO_ERROR_ARB 0x31B3
|
||||
#endif /* GLX_ARB_create_context_no_error */
|
||||
|
||||
#ifndef GLX_ARB_create_context_profile
|
||||
#define GLX_ARB_create_context_profile 1
|
||||
#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
|
||||
#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
|
||||
#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126
|
||||
#endif /* GLX_ARB_create_context_profile */
|
||||
|
||||
#ifndef GLX_ARB_create_context_robustness
|
||||
#define GLX_ARB_create_context_robustness 1
|
||||
#define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
|
||||
#define GLX_LOSE_CONTEXT_ON_RESET_ARB 0x8252
|
||||
#define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
|
||||
#define GLX_NO_RESET_NOTIFICATION_ARB 0x8261
|
||||
#endif /* GLX_ARB_create_context_robustness */
|
||||
|
||||
#ifndef GLX_ARB_fbconfig_float
|
||||
#define GLX_ARB_fbconfig_float 1
|
||||
#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
|
||||
#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
|
||||
#endif /* GLX_ARB_fbconfig_float */
|
||||
|
||||
#ifndef GLX_ARB_framebuffer_sRGB
|
||||
#define GLX_ARB_framebuffer_sRGB 1
|
||||
#define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20B2
|
||||
#endif /* GLX_ARB_framebuffer_sRGB */
|
||||
|
||||
#ifndef GLX_ARB_get_proc_address
|
||||
#define GLX_ARB_get_proc_address 1
|
||||
typedef __GLXextFuncPtr ( *PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
__GLXextFuncPtr glXGetProcAddressARB (const GLubyte *procName);
|
||||
#endif
|
||||
#endif /* GLX_ARB_get_proc_address */
|
||||
|
||||
#ifndef GLX_ARB_multisample
|
||||
#define GLX_ARB_multisample 1
|
||||
#define GLX_SAMPLE_BUFFERS_ARB 100000
|
||||
#define GLX_SAMPLES_ARB 100001
|
||||
#endif /* GLX_ARB_multisample */
|
||||
|
||||
#ifndef GLX_ARB_robustness_application_isolation
|
||||
#define GLX_ARB_robustness_application_isolation 1
|
||||
#define GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
|
||||
#endif /* GLX_ARB_robustness_application_isolation */
|
||||
|
||||
#ifndef GLX_ARB_robustness_share_group_isolation
|
||||
#define GLX_ARB_robustness_share_group_isolation 1
|
||||
#endif /* GLX_ARB_robustness_share_group_isolation */
|
||||
|
||||
#ifndef GLX_ARB_vertex_buffer_object
|
||||
#define GLX_ARB_vertex_buffer_object 1
|
||||
#define GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB 0x2095
|
||||
#endif /* GLX_ARB_vertex_buffer_object */
|
||||
|
||||
#ifndef GLX_3DFX_multisample
|
||||
#define GLX_3DFX_multisample 1
|
||||
#define GLX_SAMPLE_BUFFERS_3DFX 0x8050
|
||||
#define GLX_SAMPLES_3DFX 0x8051
|
||||
#endif /* GLX_3DFX_multisample */
|
||||
|
||||
#ifndef GLX_AMD_gpu_association
|
||||
#define GLX_AMD_gpu_association 1
|
||||
#define GLX_GPU_VENDOR_AMD 0x1F00
|
||||
#define GLX_GPU_RENDERER_STRING_AMD 0x1F01
|
||||
#define GLX_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
|
||||
#define GLX_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
|
||||
#define GLX_GPU_RAM_AMD 0x21A3
|
||||
#define GLX_GPU_CLOCK_AMD 0x21A4
|
||||
#define GLX_GPU_NUM_PIPES_AMD 0x21A5
|
||||
#define GLX_GPU_NUM_SIMD_AMD 0x21A6
|
||||
#define GLX_GPU_NUM_RB_AMD 0x21A7
|
||||
#define GLX_GPU_NUM_SPI_AMD 0x21A8
|
||||
typedef unsigned int ( *PFNGLXGETGPUIDSAMDPROC) (unsigned int maxCount, unsigned int *ids);
|
||||
typedef int ( *PFNGLXGETGPUINFOAMDPROC) (unsigned int id, int property, GLenum dataType, unsigned int size, void *data);
|
||||
typedef unsigned int ( *PFNGLXGETCONTEXTGPUIDAMDPROC) (GLXContext ctx);
|
||||
typedef GLXContext ( *PFNGLXCREATEASSOCIATEDCONTEXTAMDPROC) (unsigned int id, GLXContext share_list);
|
||||
typedef GLXContext ( *PFNGLXCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (unsigned int id, GLXContext share_context, const int *attribList);
|
||||
typedef Bool ( *PFNGLXDELETEASSOCIATEDCONTEXTAMDPROC) (GLXContext ctx);
|
||||
typedef Bool ( *PFNGLXMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (GLXContext ctx);
|
||||
typedef GLXContext ( *PFNGLXGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
|
||||
typedef void ( *PFNGLXBLITCONTEXTFRAMEBUFFERAMDPROC) (GLXContext dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
unsigned int glXGetGPUIDsAMD (unsigned int maxCount, unsigned int *ids);
|
||||
int glXGetGPUInfoAMD (unsigned int id, int property, GLenum dataType, unsigned int size, void *data);
|
||||
unsigned int glXGetContextGPUIDAMD (GLXContext ctx);
|
||||
GLXContext glXCreateAssociatedContextAMD (unsigned int id, GLXContext share_list);
|
||||
GLXContext glXCreateAssociatedContextAttribsAMD (unsigned int id, GLXContext share_context, const int *attribList);
|
||||
Bool glXDeleteAssociatedContextAMD (GLXContext ctx);
|
||||
Bool glXMakeAssociatedContextCurrentAMD (GLXContext ctx);
|
||||
GLXContext glXGetCurrentAssociatedContextAMD (void);
|
||||
void glXBlitContextFramebufferAMD (GLXContext dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
#endif
|
||||
#endif /* GLX_AMD_gpu_association */
|
||||
|
||||
#ifndef GLX_EXT_buffer_age
|
||||
#define GLX_EXT_buffer_age 1
|
||||
#define GLX_BACK_BUFFER_AGE_EXT 0x20F4
|
||||
#endif /* GLX_EXT_buffer_age */
|
||||
|
||||
#ifndef GLX_EXT_create_context_es2_profile
|
||||
#define GLX_EXT_create_context_es2_profile 1
|
||||
#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
|
||||
#endif /* GLX_EXT_create_context_es2_profile */
|
||||
|
||||
#ifndef GLX_EXT_create_context_es_profile
|
||||
#define GLX_EXT_create_context_es_profile 1
|
||||
#define GLX_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
|
||||
#endif /* GLX_EXT_create_context_es_profile */
|
||||
|
||||
#ifndef GLX_EXT_fbconfig_packed_float
|
||||
#define GLX_EXT_fbconfig_packed_float 1
|
||||
#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
|
||||
#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
|
||||
#endif /* GLX_EXT_fbconfig_packed_float */
|
||||
|
||||
#ifndef GLX_EXT_framebuffer_sRGB
|
||||
#define GLX_EXT_framebuffer_sRGB 1
|
||||
#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
|
||||
#endif /* GLX_EXT_framebuffer_sRGB */
|
||||
|
||||
#ifndef GLX_EXT_import_context
|
||||
#define GLX_EXT_import_context 1
|
||||
#define GLX_SHARE_CONTEXT_EXT 0x800A
|
||||
#define GLX_VISUAL_ID_EXT 0x800B
|
||||
#define GLX_SCREEN_EXT 0x800C
|
||||
typedef Display *( *PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
|
||||
typedef int ( *PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
|
||||
typedef GLXContextID ( *PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
|
||||
typedef GLXContext ( *PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
|
||||
typedef void ( *PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Display *glXGetCurrentDisplayEXT (void);
|
||||
int glXQueryContextInfoEXT (Display *dpy, GLXContext context, int attribute, int *value);
|
||||
GLXContextID glXGetContextIDEXT (const GLXContext context);
|
||||
GLXContext glXImportContextEXT (Display *dpy, GLXContextID contextID);
|
||||
void glXFreeContextEXT (Display *dpy, GLXContext context);
|
||||
#endif
|
||||
#endif /* GLX_EXT_import_context */
|
||||
|
||||
#ifndef GLX_EXT_libglvnd
|
||||
#define GLX_EXT_libglvnd 1
|
||||
#define GLX_VENDOR_NAMES_EXT 0x20F6
|
||||
#endif /* GLX_EXT_libglvnd */
|
||||
|
||||
#ifndef GLX_EXT_no_config_context
|
||||
#define GLX_EXT_no_config_context 1
|
||||
#endif /* GLX_EXT_no_config_context */
|
||||
|
||||
#ifndef GLX_EXT_stereo_tree
|
||||
#define GLX_EXT_stereo_tree 1
|
||||
typedef struct {
|
||||
int type;
|
||||
unsigned long serial;
|
||||
Bool send_event;
|
||||
Display *display;
|
||||
int extension;
|
||||
int evtype;
|
||||
GLXDrawable window;
|
||||
Bool stereo_tree;
|
||||
} GLXStereoNotifyEventEXT;
|
||||
#define GLX_STEREO_TREE_EXT 0x20F5
|
||||
#define GLX_STEREO_NOTIFY_MASK_EXT 0x00000001
|
||||
#define GLX_STEREO_NOTIFY_EXT 0x00000000
|
||||
#endif /* GLX_EXT_stereo_tree */
|
||||
|
||||
#ifndef GLX_EXT_swap_control
|
||||
#define GLX_EXT_swap_control 1
|
||||
#define GLX_SWAP_INTERVAL_EXT 0x20F1
|
||||
#define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2
|
||||
typedef void ( *PFNGLXSWAPINTERVALEXTPROC) (Display *dpy, GLXDrawable drawable, int interval);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXSwapIntervalEXT (Display *dpy, GLXDrawable drawable, int interval);
|
||||
#endif
|
||||
#endif /* GLX_EXT_swap_control */
|
||||
|
||||
#ifndef GLX_EXT_swap_control_tear
|
||||
#define GLX_EXT_swap_control_tear 1
|
||||
#define GLX_LATE_SWAPS_TEAR_EXT 0x20F3
|
||||
#endif /* GLX_EXT_swap_control_tear */
|
||||
|
||||
#ifndef GLX_EXT_texture_from_pixmap
|
||||
#define GLX_EXT_texture_from_pixmap 1
|
||||
#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
|
||||
#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
|
||||
#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
|
||||
#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
|
||||
#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
|
||||
#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
|
||||
#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
|
||||
#define GLX_Y_INVERTED_EXT 0x20D4
|
||||
#define GLX_TEXTURE_FORMAT_EXT 0x20D5
|
||||
#define GLX_TEXTURE_TARGET_EXT 0x20D6
|
||||
#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
|
||||
#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
|
||||
#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
|
||||
#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
|
||||
#define GLX_TEXTURE_1D_EXT 0x20DB
|
||||
#define GLX_TEXTURE_2D_EXT 0x20DC
|
||||
#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
|
||||
#define GLX_FRONT_LEFT_EXT 0x20DE
|
||||
#define GLX_FRONT_RIGHT_EXT 0x20DF
|
||||
#define GLX_BACK_LEFT_EXT 0x20E0
|
||||
#define GLX_BACK_RIGHT_EXT 0x20E1
|
||||
#define GLX_FRONT_EXT 0x20DE
|
||||
#define GLX_BACK_EXT 0x20E0
|
||||
#define GLX_AUX0_EXT 0x20E2
|
||||
#define GLX_AUX1_EXT 0x20E3
|
||||
#define GLX_AUX2_EXT 0x20E4
|
||||
#define GLX_AUX3_EXT 0x20E5
|
||||
#define GLX_AUX4_EXT 0x20E6
|
||||
#define GLX_AUX5_EXT 0x20E7
|
||||
#define GLX_AUX6_EXT 0x20E8
|
||||
#define GLX_AUX7_EXT 0x20E9
|
||||
#define GLX_AUX8_EXT 0x20EA
|
||||
#define GLX_AUX9_EXT 0x20EB
|
||||
typedef void ( *PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
|
||||
typedef void ( *PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXBindTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
|
||||
void glXReleaseTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer);
|
||||
#endif
|
||||
#endif /* GLX_EXT_texture_from_pixmap */
|
||||
|
||||
#ifndef GLX_EXT_visual_info
|
||||
#define GLX_EXT_visual_info 1
|
||||
#define GLX_X_VISUAL_TYPE_EXT 0x22
|
||||
#define GLX_TRANSPARENT_TYPE_EXT 0x23
|
||||
#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
|
||||
#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
|
||||
#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
|
||||
#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
|
||||
#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
|
||||
#define GLX_NONE_EXT 0x8000
|
||||
#define GLX_TRUE_COLOR_EXT 0x8002
|
||||
#define GLX_DIRECT_COLOR_EXT 0x8003
|
||||
#define GLX_PSEUDO_COLOR_EXT 0x8004
|
||||
#define GLX_STATIC_COLOR_EXT 0x8005
|
||||
#define GLX_GRAY_SCALE_EXT 0x8006
|
||||
#define GLX_STATIC_GRAY_EXT 0x8007
|
||||
#define GLX_TRANSPARENT_RGB_EXT 0x8008
|
||||
#define GLX_TRANSPARENT_INDEX_EXT 0x8009
|
||||
#endif /* GLX_EXT_visual_info */
|
||||
|
||||
#ifndef GLX_EXT_visual_rating
|
||||
#define GLX_EXT_visual_rating 1
|
||||
#define GLX_VISUAL_CAVEAT_EXT 0x20
|
||||
#define GLX_SLOW_VISUAL_EXT 0x8001
|
||||
#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
|
||||
#endif /* GLX_EXT_visual_rating */
|
||||
|
||||
#ifndef GLX_INTEL_swap_event
|
||||
#define GLX_INTEL_swap_event 1
|
||||
#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000
|
||||
#define GLX_EXCHANGE_COMPLETE_INTEL 0x8180
|
||||
#define GLX_COPY_COMPLETE_INTEL 0x8181
|
||||
#define GLX_FLIP_COMPLETE_INTEL 0x8182
|
||||
#endif /* GLX_INTEL_swap_event */
|
||||
|
||||
#ifndef GLX_MESA_agp_offset
|
||||
#define GLX_MESA_agp_offset 1
|
||||
typedef unsigned int ( *PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
unsigned int glXGetAGPOffsetMESA (const void *pointer);
|
||||
#endif
|
||||
#endif /* GLX_MESA_agp_offset */
|
||||
|
||||
#ifndef GLX_MESA_copy_sub_buffer
|
||||
#define GLX_MESA_copy_sub_buffer 1
|
||||
typedef void ( *PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXCopySubBufferMESA (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
|
||||
#endif
|
||||
#endif /* GLX_MESA_copy_sub_buffer */
|
||||
|
||||
#ifndef GLX_MESA_pixmap_colormap
|
||||
#define GLX_MESA_pixmap_colormap 1
|
||||
typedef GLXPixmap ( *PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
GLXPixmap glXCreateGLXPixmapMESA (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
|
||||
#endif
|
||||
#endif /* GLX_MESA_pixmap_colormap */
|
||||
|
||||
#ifndef GLX_MESA_query_renderer
|
||||
#define GLX_MESA_query_renderer 1
|
||||
#define GLX_RENDERER_VENDOR_ID_MESA 0x8183
|
||||
#define GLX_RENDERER_DEVICE_ID_MESA 0x8184
|
||||
#define GLX_RENDERER_VERSION_MESA 0x8185
|
||||
#define GLX_RENDERER_ACCELERATED_MESA 0x8186
|
||||
#define GLX_RENDERER_VIDEO_MEMORY_MESA 0x8187
|
||||
#define GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA 0x8188
|
||||
#define GLX_RENDERER_PREFERRED_PROFILE_MESA 0x8189
|
||||
#define GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA 0x818A
|
||||
#define GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818B
|
||||
#define GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA 0x818C
|
||||
#define GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0x818D
|
||||
#define GLX_RENDERER_ID_MESA 0x818E
|
||||
typedef Bool ( *PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC) (int attribute, unsigned int *value);
|
||||
typedef const char *( *PFNGLXQUERYCURRENTRENDERERSTRINGMESAPROC) (int attribute);
|
||||
typedef Bool ( *PFNGLXQUERYRENDERERINTEGERMESAPROC) (Display *dpy, int screen, int renderer, int attribute, unsigned int *value);
|
||||
typedef const char *( *PFNGLXQUERYRENDERERSTRINGMESAPROC) (Display *dpy, int screen, int renderer, int attribute);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Bool glXQueryCurrentRendererIntegerMESA (int attribute, unsigned int *value);
|
||||
const char *glXQueryCurrentRendererStringMESA (int attribute);
|
||||
Bool glXQueryRendererIntegerMESA (Display *dpy, int screen, int renderer, int attribute, unsigned int *value);
|
||||
const char *glXQueryRendererStringMESA (Display *dpy, int screen, int renderer, int attribute);
|
||||
#endif
|
||||
#endif /* GLX_MESA_query_renderer */
|
||||
|
||||
#ifndef GLX_MESA_release_buffers
|
||||
#define GLX_MESA_release_buffers 1
|
||||
typedef Bool ( *PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Bool glXReleaseBuffersMESA (Display *dpy, GLXDrawable drawable);
|
||||
#endif
|
||||
#endif /* GLX_MESA_release_buffers */
|
||||
|
||||
#ifndef GLX_MESA_set_3dfx_mode
|
||||
#define GLX_MESA_set_3dfx_mode 1
|
||||
#define GLX_3DFX_WINDOW_MODE_MESA 0x1
|
||||
#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
|
||||
typedef Bool ( *PFNGLXSET3DFXMODEMESAPROC) (int mode);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Bool glXSet3DfxModeMESA (int mode);
|
||||
#endif
|
||||
#endif /* GLX_MESA_set_3dfx_mode */
|
||||
|
||||
#ifndef GLX_MESA_swap_control
|
||||
#define GLX_MESA_swap_control 1
|
||||
typedef int ( *PFNGLXGETSWAPINTERVALMESAPROC) (void);
|
||||
typedef int ( *PFNGLXSWAPINTERVALMESAPROC) (unsigned int interval);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
int glXGetSwapIntervalMESA (void);
|
||||
int glXSwapIntervalMESA (unsigned int interval);
|
||||
#endif
|
||||
#endif /* GLX_MESA_swap_control */
|
||||
|
||||
#ifndef GLX_NV_copy_buffer
|
||||
#define GLX_NV_copy_buffer 1
|
||||
typedef void ( *PFNGLXCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
||||
typedef void ( *PFNGLXNAMEDCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXCopyBufferSubDataNV (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
||||
void glXNamedCopyBufferSubDataNV (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
||||
#endif
|
||||
#endif /* GLX_NV_copy_buffer */
|
||||
|
||||
#ifndef GLX_NV_copy_image
|
||||
#define GLX_NV_copy_image 1
|
||||
typedef void ( *PFNGLXCOPYIMAGESUBDATANVPROC) (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXCopyImageSubDataNV (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||
#endif
|
||||
#endif /* GLX_NV_copy_image */
|
||||
|
||||
#ifndef GLX_NV_delay_before_swap
|
||||
#define GLX_NV_delay_before_swap 1
|
||||
typedef Bool ( *PFNGLXDELAYBEFORESWAPNVPROC) (Display *dpy, GLXDrawable drawable, GLfloat seconds);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Bool glXDelayBeforeSwapNV (Display *dpy, GLXDrawable drawable, GLfloat seconds);
|
||||
#endif
|
||||
#endif /* GLX_NV_delay_before_swap */
|
||||
|
||||
#ifndef GLX_NV_float_buffer
|
||||
#define GLX_NV_float_buffer 1
|
||||
#define GLX_FLOAT_COMPONENTS_NV 0x20B0
|
||||
#endif /* GLX_NV_float_buffer */
|
||||
|
||||
#ifndef GLX_NV_multisample_coverage
|
||||
#define GLX_NV_multisample_coverage 1
|
||||
#define GLX_COVERAGE_SAMPLES_NV 100001
|
||||
#define GLX_COLOR_SAMPLES_NV 0x20B3
|
||||
#endif /* GLX_NV_multisample_coverage */
|
||||
|
||||
#ifndef GLX_NV_present_video
|
||||
#define GLX_NV_present_video 1
|
||||
#define GLX_NUM_VIDEO_SLOTS_NV 0x20F0
|
||||
typedef unsigned int *( *PFNGLXENUMERATEVIDEODEVICESNVPROC) (Display *dpy, int screen, int *nelements);
|
||||
typedef int ( *PFNGLXBINDVIDEODEVICENVPROC) (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
unsigned int *glXEnumerateVideoDevicesNV (Display *dpy, int screen, int *nelements);
|
||||
int glXBindVideoDeviceNV (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list);
|
||||
#endif
|
||||
#endif /* GLX_NV_present_video */
|
||||
|
||||
#ifndef GLX_NV_robustness_video_memory_purge
|
||||
#define GLX_NV_robustness_video_memory_purge 1
|
||||
#define GLX_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV 0x20F7
|
||||
#endif /* GLX_NV_robustness_video_memory_purge */
|
||||
|
||||
#ifndef GLX_NV_swap_group
|
||||
#define GLX_NV_swap_group 1
|
||||
typedef Bool ( *PFNGLXJOINSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint group);
|
||||
typedef Bool ( *PFNGLXBINDSWAPBARRIERNVPROC) (Display *dpy, GLuint group, GLuint barrier);
|
||||
typedef Bool ( *PFNGLXQUERYSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier);
|
||||
typedef Bool ( *PFNGLXQUERYMAXSWAPGROUPSNVPROC) (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers);
|
||||
typedef Bool ( *PFNGLXQUERYFRAMECOUNTNVPROC) (Display *dpy, int screen, GLuint *count);
|
||||
typedef Bool ( *PFNGLXRESETFRAMECOUNTNVPROC) (Display *dpy, int screen);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Bool glXJoinSwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint group);
|
||||
Bool glXBindSwapBarrierNV (Display *dpy, GLuint group, GLuint barrier);
|
||||
Bool glXQuerySwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier);
|
||||
Bool glXQueryMaxSwapGroupsNV (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers);
|
||||
Bool glXQueryFrameCountNV (Display *dpy, int screen, GLuint *count);
|
||||
Bool glXResetFrameCountNV (Display *dpy, int screen);
|
||||
#endif
|
||||
#endif /* GLX_NV_swap_group */
|
||||
|
||||
#ifndef GLX_NV_video_capture
|
||||
#define GLX_NV_video_capture 1
|
||||
typedef XID GLXVideoCaptureDeviceNV;
|
||||
#define GLX_DEVICE_ID_NV 0x20CD
|
||||
#define GLX_UNIQUE_ID_NV 0x20CE
|
||||
#define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
|
||||
typedef int ( *PFNGLXBINDVIDEOCAPTUREDEVICENVPROC) (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device);
|
||||
typedef GLXVideoCaptureDeviceNV *( *PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC) (Display *dpy, int screen, int *nelements);
|
||||
typedef void ( *PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device);
|
||||
typedef int ( *PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value);
|
||||
typedef void ( *PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
int glXBindVideoCaptureDeviceNV (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device);
|
||||
GLXVideoCaptureDeviceNV *glXEnumerateVideoCaptureDevicesNV (Display *dpy, int screen, int *nelements);
|
||||
void glXLockVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device);
|
||||
int glXQueryVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value);
|
||||
void glXReleaseVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device);
|
||||
#endif
|
||||
#endif /* GLX_NV_video_capture */
|
||||
|
||||
#ifndef GLX_NV_video_out
|
||||
#define GLX_NV_video_out 1
|
||||
typedef unsigned int GLXVideoDeviceNV;
|
||||
#define GLX_VIDEO_OUT_COLOR_NV 0x20C3
|
||||
#define GLX_VIDEO_OUT_ALPHA_NV 0x20C4
|
||||
#define GLX_VIDEO_OUT_DEPTH_NV 0x20C5
|
||||
#define GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
|
||||
#define GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
|
||||
#define GLX_VIDEO_OUT_FRAME_NV 0x20C8
|
||||
#define GLX_VIDEO_OUT_FIELD_1_NV 0x20C9
|
||||
#define GLX_VIDEO_OUT_FIELD_2_NV 0x20CA
|
||||
#define GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB
|
||||
#define GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC
|
||||
typedef int ( *PFNGLXGETVIDEODEVICENVPROC) (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice);
|
||||
typedef int ( *PFNGLXRELEASEVIDEODEVICENVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice);
|
||||
typedef int ( *PFNGLXBINDVIDEOIMAGENVPROC) (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer);
|
||||
typedef int ( *PFNGLXRELEASEVIDEOIMAGENVPROC) (Display *dpy, GLXPbuffer pbuf);
|
||||
typedef int ( *PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock);
|
||||
typedef int ( *PFNGLXGETVIDEOINFONVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
int glXGetVideoDeviceNV (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice);
|
||||
int glXReleaseVideoDeviceNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice);
|
||||
int glXBindVideoImageNV (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer);
|
||||
int glXReleaseVideoImageNV (Display *dpy, GLXPbuffer pbuf);
|
||||
int glXSendPbufferToVideoNV (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock);
|
||||
int glXGetVideoInfoNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
||||
#endif
|
||||
#endif /* GLX_NV_video_out */
|
||||
|
||||
#ifndef GLX_OML_swap_method
|
||||
#define GLX_OML_swap_method 1
|
||||
#define GLX_SWAP_METHOD_OML 0x8060
|
||||
#define GLX_SWAP_EXCHANGE_OML 0x8061
|
||||
#define GLX_SWAP_COPY_OML 0x8062
|
||||
#define GLX_SWAP_UNDEFINED_OML 0x8063
|
||||
#endif /* GLX_OML_swap_method */
|
||||
|
||||
#ifndef GLX_OML_sync_control
|
||||
#define GLX_OML_sync_control 1
|
||||
#ifndef GLEXT_64_TYPES_DEFINED
|
||||
/* This code block is duplicated in glext.h, so must be protected */
|
||||
#define GLEXT_64_TYPES_DEFINED
|
||||
/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
|
||||
/* (as used in the GLX_OML_sync_control extension). */
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#include <inttypes.h>
|
||||
#elif defined(__sun__) || defined(__digital__)
|
||||
#include <inttypes.h>
|
||||
#if defined(__STDC__)
|
||||
#if defined(__arch64__) || defined(_LP64)
|
||||
typedef long int int64_t;
|
||||
typedef unsigned long int uint64_t;
|
||||
#else
|
||||
typedef long long int int64_t;
|
||||
typedef unsigned long long int uint64_t;
|
||||
#endif /* __arch64__ */
|
||||
#endif /* __STDC__ */
|
||||
#elif defined( __VMS ) || defined(__sgi)
|
||||
#include <inttypes.h>
|
||||
#elif defined(__SCO__) || defined(__USLC__)
|
||||
#include <stdint.h>
|
||||
#elif defined(__UNIXOS2__) || defined(__SOL64__)
|
||||
typedef long int int32_t;
|
||||
typedef long long int int64_t;
|
||||
typedef unsigned long long int uint64_t;
|
||||
#elif defined(_WIN32) && defined(__GNUC__)
|
||||
#include <stdint.h>
|
||||
#elif defined(_WIN32)
|
||||
typedef __int32 int32_t;
|
||||
typedef __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#else
|
||||
/* Fallback if nothing above works */
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
#endif
|
||||
typedef Bool ( *PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
typedef Bool ( *PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
|
||||
typedef int64_t ( *PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
|
||||
typedef Bool ( *PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
typedef Bool ( *PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Bool glXGetSyncValuesOML (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
Bool glXGetMscRateOML (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
|
||||
int64_t glXSwapBuffersMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
|
||||
Bool glXWaitForMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
Bool glXWaitForSbcOML (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
#endif
|
||||
#endif /* GLX_OML_sync_control */
|
||||
|
||||
#ifndef GLX_SGIS_blended_overlay
|
||||
#define GLX_SGIS_blended_overlay 1
|
||||
#define GLX_BLENDED_RGBA_SGIS 0x8025
|
||||
#endif /* GLX_SGIS_blended_overlay */
|
||||
|
||||
#ifndef GLX_SGIS_multisample
|
||||
#define GLX_SGIS_multisample 1
|
||||
#define GLX_SAMPLE_BUFFERS_SGIS 100000
|
||||
#define GLX_SAMPLES_SGIS 100001
|
||||
#endif /* GLX_SGIS_multisample */
|
||||
|
||||
#ifndef GLX_SGIS_shared_multisample
|
||||
#define GLX_SGIS_shared_multisample 1
|
||||
#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
|
||||
#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
|
||||
#endif /* GLX_SGIS_shared_multisample */
|
||||
|
||||
#ifndef GLX_SGIX_dmbuffer
|
||||
#define GLX_SGIX_dmbuffer 1
|
||||
typedef XID GLXPbufferSGIX;
|
||||
#ifdef _DM_BUFFER_H_
|
||||
#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
|
||||
typedef Bool ( *PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Bool glXAssociateDMPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
|
||||
#endif
|
||||
#endif /* _DM_BUFFER_H_ */
|
||||
#endif /* GLX_SGIX_dmbuffer */
|
||||
|
||||
#ifndef GLX_SGIX_fbconfig
|
||||
#define GLX_SGIX_fbconfig 1
|
||||
typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
|
||||
#define GLX_WINDOW_BIT_SGIX 0x00000001
|
||||
#define GLX_PIXMAP_BIT_SGIX 0x00000002
|
||||
#define GLX_RGBA_BIT_SGIX 0x00000001
|
||||
#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
|
||||
#define GLX_DRAWABLE_TYPE_SGIX 0x8010
|
||||
#define GLX_RENDER_TYPE_SGIX 0x8011
|
||||
#define GLX_X_RENDERABLE_SGIX 0x8012
|
||||
#define GLX_FBCONFIG_ID_SGIX 0x8013
|
||||
#define GLX_RGBA_TYPE_SGIX 0x8014
|
||||
#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
|
||||
typedef int ( *PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
|
||||
typedef GLXFBConfigSGIX *( *PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
|
||||
typedef GLXPixmap ( *PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
|
||||
typedef GLXContext ( *PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
|
||||
typedef XVisualInfo *( *PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
|
||||
typedef GLXFBConfigSGIX ( *PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
int glXGetFBConfigAttribSGIX (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
|
||||
GLXFBConfigSGIX *glXChooseFBConfigSGIX (Display *dpy, int screen, int *attrib_list, int *nelements);
|
||||
GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
|
||||
GLXContext glXCreateContextWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
|
||||
XVisualInfo *glXGetVisualFromFBConfigSGIX (Display *dpy, GLXFBConfigSGIX config);
|
||||
GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *dpy, XVisualInfo *vis);
|
||||
#endif
|
||||
#endif /* GLX_SGIX_fbconfig */
|
||||
|
||||
#ifndef GLX_SGIX_hyperpipe
|
||||
#define GLX_SGIX_hyperpipe 1
|
||||
typedef struct {
|
||||
char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
|
||||
int networkId;
|
||||
} GLXHyperpipeNetworkSGIX;
|
||||
typedef struct {
|
||||
char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
|
||||
int channel;
|
||||
unsigned int participationType;
|
||||
int timeSlice;
|
||||
} GLXHyperpipeConfigSGIX;
|
||||
typedef struct {
|
||||
char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
|
||||
int srcXOrigin, srcYOrigin, srcWidth, srcHeight;
|
||||
int destXOrigin, destYOrigin, destWidth, destHeight;
|
||||
} GLXPipeRect;
|
||||
typedef struct {
|
||||
char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
|
||||
int XOrigin, YOrigin, maxHeight, maxWidth;
|
||||
} GLXPipeRectLimits;
|
||||
#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
|
||||
#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
|
||||
#define GLX_BAD_HYPERPIPE_SGIX 92
|
||||
#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
|
||||
#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
|
||||
#define GLX_PIPE_RECT_SGIX 0x00000001
|
||||
#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
|
||||
#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
|
||||
#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
|
||||
#define GLX_HYPERPIPE_ID_SGIX 0x8030
|
||||
typedef GLXHyperpipeNetworkSGIX *( *PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
|
||||
typedef int ( *PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
|
||||
typedef GLXHyperpipeConfigSGIX *( *PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
|
||||
typedef int ( *PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
|
||||
typedef int ( *PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
|
||||
typedef int ( *PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
|
||||
typedef int ( *PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
|
||||
typedef int ( *PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
GLXHyperpipeNetworkSGIX *glXQueryHyperpipeNetworkSGIX (Display *dpy, int *npipes);
|
||||
int glXHyperpipeConfigSGIX (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
|
||||
GLXHyperpipeConfigSGIX *glXQueryHyperpipeConfigSGIX (Display *dpy, int hpId, int *npipes);
|
||||
int glXDestroyHyperpipeConfigSGIX (Display *dpy, int hpId);
|
||||
int glXBindHyperpipeSGIX (Display *dpy, int hpId);
|
||||
int glXQueryHyperpipeBestAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
|
||||
int glXHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
|
||||
int glXQueryHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
|
||||
#endif
|
||||
#endif /* GLX_SGIX_hyperpipe */
|
||||
|
||||
#ifndef GLX_SGIX_pbuffer
|
||||
#define GLX_SGIX_pbuffer 1
|
||||
#define GLX_PBUFFER_BIT_SGIX 0x00000004
|
||||
#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
|
||||
#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
|
||||
#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
|
||||
#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
|
||||
#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
|
||||
#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
|
||||
#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
|
||||
#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
|
||||
#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
|
||||
#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
|
||||
#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
|
||||
#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
|
||||
#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
|
||||
#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
|
||||
#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
|
||||
#define GLX_PRESERVED_CONTENTS_SGIX 0x801B
|
||||
#define GLX_LARGEST_PBUFFER_SGIX 0x801C
|
||||
#define GLX_WIDTH_SGIX 0x801D
|
||||
#define GLX_HEIGHT_SGIX 0x801E
|
||||
#define GLX_EVENT_MASK_SGIX 0x801F
|
||||
#define GLX_DAMAGED_SGIX 0x8020
|
||||
#define GLX_SAVED_SGIX 0x8021
|
||||
#define GLX_WINDOW_SGIX 0x8022
|
||||
#define GLX_PBUFFER_SGIX 0x8023
|
||||
typedef GLXPbufferSGIX ( *PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
|
||||
typedef void ( *PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
|
||||
typedef int ( *PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
|
||||
typedef void ( *PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
|
||||
typedef void ( *PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
|
||||
void glXDestroyGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf);
|
||||
int glXQueryGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
|
||||
void glXSelectEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long mask);
|
||||
void glXGetSelectedEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long *mask);
|
||||
#endif
|
||||
#endif /* GLX_SGIX_pbuffer */
|
||||
|
||||
#ifndef GLX_SGIX_swap_barrier
|
||||
#define GLX_SGIX_swap_barrier 1
|
||||
typedef void ( *PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
|
||||
typedef Bool ( *PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXBindSwapBarrierSGIX (Display *dpy, GLXDrawable drawable, int barrier);
|
||||
Bool glXQueryMaxSwapBarriersSGIX (Display *dpy, int screen, int *max);
|
||||
#endif
|
||||
#endif /* GLX_SGIX_swap_barrier */
|
||||
|
||||
#ifndef GLX_SGIX_swap_group
|
||||
#define GLX_SGIX_swap_group 1
|
||||
typedef void ( *PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXJoinSwapGroupSGIX (Display *dpy, GLXDrawable drawable, GLXDrawable member);
|
||||
#endif
|
||||
#endif /* GLX_SGIX_swap_group */
|
||||
|
||||
#ifndef GLX_SGIX_video_resize
|
||||
#define GLX_SGIX_video_resize 1
|
||||
#define GLX_SYNC_FRAME_SGIX 0x00000000
|
||||
#define GLX_SYNC_SWAP_SGIX 0x00000001
|
||||
typedef int ( *PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
|
||||
typedef int ( *PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
|
||||
typedef int ( *PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
|
||||
typedef int ( *PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
|
||||
typedef int ( *PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
int glXBindChannelToWindowSGIX (Display *display, int screen, int channel, Window window);
|
||||
int glXChannelRectSGIX (Display *display, int screen, int channel, int x, int y, int w, int h);
|
||||
int glXQueryChannelRectSGIX (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
|
||||
int glXQueryChannelDeltasSGIX (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
|
||||
int glXChannelRectSyncSGIX (Display *display, int screen, int channel, GLenum synctype);
|
||||
#endif
|
||||
#endif /* GLX_SGIX_video_resize */
|
||||
|
||||
#ifndef GLX_SGIX_video_source
|
||||
#define GLX_SGIX_video_source 1
|
||||
typedef XID GLXVideoSourceSGIX;
|
||||
#ifdef _VL_H
|
||||
typedef GLXVideoSourceSGIX ( *PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
|
||||
typedef void ( *PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
|
||||
void glXDestroyGLXVideoSourceSGIX (Display *dpy, GLXVideoSourceSGIX glxvideosource);
|
||||
#endif
|
||||
#endif /* _VL_H */
|
||||
#endif /* GLX_SGIX_video_source */
|
||||
|
||||
#ifndef GLX_SGIX_visual_select_group
|
||||
#define GLX_SGIX_visual_select_group 1
|
||||
#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
|
||||
#endif /* GLX_SGIX_visual_select_group */
|
||||
|
||||
#ifndef GLX_SGI_cushion
|
||||
#define GLX_SGI_cushion 1
|
||||
typedef void ( *PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXCushionSGI (Display *dpy, Window window, float cushion);
|
||||
#endif
|
||||
#endif /* GLX_SGI_cushion */
|
||||
|
||||
#ifndef GLX_SGI_make_current_read
|
||||
#define GLX_SGI_make_current_read 1
|
||||
typedef Bool ( *PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
||||
typedef GLXDrawable ( *PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Bool glXMakeCurrentReadSGI (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
||||
GLXDrawable glXGetCurrentReadDrawableSGI (void);
|
||||
#endif
|
||||
#endif /* GLX_SGI_make_current_read */
|
||||
|
||||
#ifndef GLX_SGI_swap_control
|
||||
#define GLX_SGI_swap_control 1
|
||||
typedef int ( *PFNGLXSWAPINTERVALSGIPROC) (int interval);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
int glXSwapIntervalSGI (int interval);
|
||||
#endif
|
||||
#endif /* GLX_SGI_swap_control */
|
||||
|
||||
#ifndef GLX_SGI_video_sync
|
||||
#define GLX_SGI_video_sync 1
|
||||
typedef int ( *PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
|
||||
typedef int ( *PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
int glXGetVideoSyncSGI (unsigned int *count);
|
||||
int glXWaitVideoSyncSGI (int divisor, int remainder, unsigned int *count);
|
||||
#endif
|
||||
#endif /* GLX_SGI_video_sync */
|
||||
|
||||
#ifndef GLX_SUN_get_transparent_index
|
||||
#define GLX_SUN_get_transparent_index 1
|
||||
typedef Status ( *PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Status glXGetTransparentIndexSUN (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
|
||||
#endif
|
||||
#endif /* GLX_SUN_get_transparent_index */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -0,0 +1,137 @@
|
|||
#ifndef __GLX_glxint_h__
|
||||
#define __GLX_glxint_h__
|
||||
|
||||
/*
|
||||
* SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
|
||||
* Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
|
||||
*
|
||||
* 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 including the dates of first publication and
|
||||
* either this permission notice or a reference to
|
||||
* http://oss.sgi.com/projects/FreeB/
|
||||
* 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
|
||||
* SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc.
|
||||
* shall not be used in advertising or otherwise to promote the sale, use or
|
||||
* other dealings in this Software without prior written authorization from
|
||||
* Silicon Graphics, Inc.
|
||||
*/
|
||||
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xdefs.h>
|
||||
#include "GL/gl.h"
|
||||
|
||||
typedef struct __GLXvisualConfigRec __GLXvisualConfig;
|
||||
typedef struct __GLXFBConfigRec __GLXFBConfig;
|
||||
|
||||
struct __GLXvisualConfigRec {
|
||||
VisualID vid;
|
||||
int class;
|
||||
Bool rgba;
|
||||
int redSize, greenSize, blueSize, alphaSize;
|
||||
unsigned long redMask, greenMask, blueMask, alphaMask;
|
||||
int accumRedSize, accumGreenSize, accumBlueSize, accumAlphaSize;
|
||||
Bool doubleBuffer;
|
||||
Bool stereo;
|
||||
int bufferSize;
|
||||
int depthSize;
|
||||
int stencilSize;
|
||||
int auxBuffers;
|
||||
int level;
|
||||
/* Start of Extended Visual Properties */
|
||||
int visualRating; /* visual_rating extension */
|
||||
int transparentPixel; /* visual_info extension */
|
||||
/* colors are floats scaled to ints */
|
||||
int transparentRed, transparentGreen, transparentBlue, transparentAlpha;
|
||||
int transparentIndex;
|
||||
int multiSampleSize;
|
||||
int nMultiSampleBuffers;
|
||||
int visualSelectGroup;
|
||||
};
|
||||
|
||||
#define __GLX_MIN_CONFIG_PROPS 18
|
||||
#define __GLX_MAX_CONFIG_PROPS 500
|
||||
|
||||
#define __GLX_EXT_CONFIG_PROPS 10
|
||||
|
||||
/*
|
||||
** Since we send all non-core visual properties as token, value pairs,
|
||||
** we require 2 words across the wire. In order to maintain backwards
|
||||
** compatibility, we need to send the total number of words that the
|
||||
** VisualConfigs are sent back in so old libraries can simply "ignore"
|
||||
** the new properties.
|
||||
*/
|
||||
#define __GLX_TOTAL_CONFIG (__GLX_MIN_CONFIG_PROPS + \
|
||||
2 * __GLX_EXT_CONFIG_PROPS)
|
||||
|
||||
struct __GLXFBConfigRec {
|
||||
int visualType;
|
||||
int transparentType;
|
||||
/* colors are floats scaled to ints */
|
||||
int transparentRed, transparentGreen, transparentBlue, transparentAlpha;
|
||||
int transparentIndex;
|
||||
|
||||
int visualCaveat;
|
||||
|
||||
int associatedVisualId;
|
||||
int screen;
|
||||
|
||||
int drawableType;
|
||||
int renderType;
|
||||
|
||||
int maxPbufferWidth, maxPbufferHeight, maxPbufferPixels;
|
||||
int optimalPbufferWidth, optimalPbufferHeight; /* for SGIX_pbuffer */
|
||||
|
||||
int visualSelectGroup; /* visuals grouped by select priority */
|
||||
|
||||
unsigned int id;
|
||||
|
||||
GLboolean rgbMode;
|
||||
GLboolean colorIndexMode;
|
||||
GLboolean doubleBufferMode;
|
||||
GLboolean stereoMode;
|
||||
GLboolean haveAccumBuffer;
|
||||
GLboolean haveDepthBuffer;
|
||||
GLboolean haveStencilBuffer;
|
||||
|
||||
/* The number of bits present in various buffers */
|
||||
GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
|
||||
GLint depthBits;
|
||||
GLint stencilBits;
|
||||
GLint indexBits;
|
||||
GLint redBits, greenBits, blueBits, alphaBits;
|
||||
GLuint redMask, greenMask, blueMask, alphaMask;
|
||||
|
||||
GLuint multiSampleSize; /* Number of samples per pixel (0 if no ms) */
|
||||
|
||||
GLuint nMultiSampleBuffers; /* Number of availble ms buffers */
|
||||
GLint maxAuxBuffers;
|
||||
|
||||
/* frame buffer level */
|
||||
GLint level;
|
||||
|
||||
/* color ranges (for SGI_color_range) */
|
||||
GLboolean extendedRange;
|
||||
GLdouble minRed, maxRed;
|
||||
GLdouble minGreen, maxGreen;
|
||||
GLdouble minBlue, maxBlue;
|
||||
GLdouble minAlpha, maxAlpha;
|
||||
};
|
||||
|
||||
#define __GLX_TOTAL_FBCONFIG_PROPS 35
|
||||
|
||||
#endif /* !__GLX_glxint_h__ */
|
|
@ -0,0 +1,54 @@
|
|||
#ifndef _GLX_glxmd_h_
|
||||
#define _GLX_glxmd_h_
|
||||
|
||||
|
||||
/*
|
||||
* SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
|
||||
* Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
|
||||
*
|
||||
* 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 including the dates of first publication and
|
||||
* either this permission notice or a reference to
|
||||
* http://oss.sgi.com/projects/FreeB/
|
||||
* 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
|
||||
* SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc.
|
||||
* shall not be used in advertising or otherwise to promote the sale, use or
|
||||
* other dealings in this Software without prior written authorization from
|
||||
* Silicon Graphics, Inc.
|
||||
*/
|
||||
|
||||
/*
|
||||
** Machine dependent declarations.
|
||||
*/
|
||||
|
||||
/*
|
||||
** Define floating point wire types. These are in IEEE format on the wire.
|
||||
*/
|
||||
typedef float FLOAT32;
|
||||
typedef double FLOAT64;
|
||||
|
||||
/*
|
||||
** Like B32, but this is used to store floats in a request.
|
||||
**
|
||||
** NOTE: Machines that have a native 32-bit IEEE float can define this as
|
||||
** nothing. Machines that don't might mimic the float with an integer,
|
||||
** and then define this to :32.
|
||||
*/
|
||||
#define F32
|
||||
|
||||
#endif /* _GLX_glxmd_h_ */
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,316 @@
|
|||
#ifndef __GLX_glxtokens_h__
|
||||
#define __GLX_glxtokens_h__
|
||||
|
||||
/*
|
||||
* SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
|
||||
* Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
|
||||
*
|
||||
* 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 including the dates of first publication and
|
||||
* either this permission notice or a reference to
|
||||
* http://oss.sgi.com/projects/FreeB/
|
||||
* 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
|
||||
* SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc.
|
||||
* shall not be used in advertising or otherwise to promote the sale, use or
|
||||
* other dealings in this Software without prior written authorization from
|
||||
* Silicon Graphics, Inc.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define GLX_VERSION_1_1 1
|
||||
#define GLX_VERSION_1_2 1
|
||||
#define GLX_VERSION_1_3 1
|
||||
#define GLX_VERSION_1_4 1
|
||||
|
||||
/*
|
||||
** Visual Config Attributes (glXGetConfig, glXGetFBConfigAttrib)
|
||||
*/
|
||||
#define GLX_USE_GL 1 /* support GLX rendering */
|
||||
#define GLX_BUFFER_SIZE 2 /* depth of the color buffer */
|
||||
#define GLX_LEVEL 3 /* level in plane stacking */
|
||||
#define GLX_RGBA 4 /* true if RGBA mode */
|
||||
#define GLX_DOUBLEBUFFER 5 /* double buffering supported */
|
||||
#define GLX_STEREO 6 /* stereo buffering supported */
|
||||
#define GLX_AUX_BUFFERS 7 /* number of aux buffers */
|
||||
#define GLX_RED_SIZE 8 /* number of red component bits */
|
||||
#define GLX_GREEN_SIZE 9 /* number of green component bits */
|
||||
#define GLX_BLUE_SIZE 10 /* number of blue component bits */
|
||||
#define GLX_ALPHA_SIZE 11 /* number of alpha component bits */
|
||||
#define GLX_DEPTH_SIZE 12 /* number of depth bits */
|
||||
#define GLX_STENCIL_SIZE 13 /* number of stencil bits */
|
||||
#define GLX_ACCUM_RED_SIZE 14 /* number of red accum bits */
|
||||
#define GLX_ACCUM_GREEN_SIZE 15 /* number of green accum bits */
|
||||
#define GLX_ACCUM_BLUE_SIZE 16 /* number of blue accum bits */
|
||||
#define GLX_ACCUM_ALPHA_SIZE 17 /* number of alpha accum bits */
|
||||
/*
|
||||
** FBConfig-specific attributes
|
||||
*/
|
||||
#define GLX_X_VISUAL_TYPE 0x22
|
||||
#define GLX_CONFIG_CAVEAT 0x20 /* Like visual_info VISUAL_CAVEAT_EXT */
|
||||
#define GLX_TRANSPARENT_TYPE 0x23
|
||||
#define GLX_TRANSPARENT_INDEX_VALUE 0x24
|
||||
#define GLX_TRANSPARENT_RED_VALUE 0x25
|
||||
#define GLX_TRANSPARENT_GREEN_VALUE 0x26
|
||||
#define GLX_TRANSPARENT_BLUE_VALUE 0x27
|
||||
#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
|
||||
#define GLX_DRAWABLE_TYPE 0x8010
|
||||
#define GLX_RENDER_TYPE 0x8011
|
||||
#define GLX_X_RENDERABLE 0x8012
|
||||
#define GLX_FBCONFIG_ID 0x8013
|
||||
#define GLX_MAX_PBUFFER_WIDTH 0x8016
|
||||
#define GLX_MAX_PBUFFER_HEIGHT 0x8017
|
||||
#define GLX_MAX_PBUFFER_PIXELS 0x8018
|
||||
#define GLX_VISUAL_ID 0x800B
|
||||
|
||||
/* FBConfigSGIX Attributes */
|
||||
#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
|
||||
#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
|
||||
|
||||
/*
|
||||
** Error return values from glXGetConfig. Success is indicated by
|
||||
** a value of 0.
|
||||
*/
|
||||
#define GLX_BAD_SCREEN 1 /* screen # is bad */
|
||||
#define GLX_BAD_ATTRIBUTE 2 /* attribute to get is bad */
|
||||
#define GLX_NO_EXTENSION 3 /* no glx extension on server */
|
||||
#define GLX_BAD_VISUAL 4 /* visual # not known by GLX */
|
||||
#define GLX_BAD_CONTEXT 5 /* returned only by import_context EXT? */
|
||||
#define GLX_BAD_VALUE 6 /* returned only by glXSwapIntervalSGI? */
|
||||
#define GLX_BAD_ENUM 7 /* unused? */
|
||||
|
||||
/* FBConfig attribute values */
|
||||
|
||||
/*
|
||||
** Generic "don't care" value for glX ChooseFBConfig attributes (except
|
||||
** GLX_LEVEL)
|
||||
*/
|
||||
#define GLX_DONT_CARE 0xFFFFFFFF
|
||||
|
||||
/* GLX_RENDER_TYPE bits */
|
||||
#define GLX_RGBA_BIT 0x00000001
|
||||
#define GLX_COLOR_INDEX_BIT 0x00000002
|
||||
#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
|
||||
#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
|
||||
|
||||
/* GLX_DRAWABLE_TYPE bits */
|
||||
#define GLX_WINDOW_BIT 0x00000001
|
||||
#define GLX_PIXMAP_BIT 0x00000002
|
||||
#define GLX_PBUFFER_BIT 0x00000004
|
||||
|
||||
/* GLX_CONFIG_CAVEAT attribute values */
|
||||
#define GLX_NONE 0x8000
|
||||
#define GLX_SLOW_CONFIG 0x8001
|
||||
#define GLX_NON_CONFORMANT_CONFIG 0x800D
|
||||
|
||||
/* GLX_X_VISUAL_TYPE attribute values */
|
||||
#define GLX_TRUE_COLOR 0x8002
|
||||
#define GLX_DIRECT_COLOR 0x8003
|
||||
#define GLX_PSEUDO_COLOR 0x8004
|
||||
#define GLX_STATIC_COLOR 0x8005
|
||||
#define GLX_GRAY_SCALE 0x8006
|
||||
#define GLX_STATIC_GRAY 0x8007
|
||||
|
||||
/* GLX_TRANSPARENT_TYPE attribute values */
|
||||
/* #define GLX_NONE 0x8000 */
|
||||
#define GLX_TRANSPARENT_RGB 0x8008
|
||||
#define GLX_TRANSPARENT_INDEX 0x8009
|
||||
|
||||
/* glXCreateGLXPbuffer attributes */
|
||||
#define GLX_PRESERVED_CONTENTS 0x801B
|
||||
#define GLX_LARGEST_PBUFFER 0x801C
|
||||
#define GLX_PBUFFER_HEIGHT 0x8040 /* New for GLX 1.3 */
|
||||
#define GLX_PBUFFER_WIDTH 0x8041 /* New for GLX 1.3 */
|
||||
|
||||
/* glXQueryGLXPBuffer attributes */
|
||||
#define GLX_WIDTH 0x801D
|
||||
#define GLX_HEIGHT 0x801E
|
||||
#define GLX_EVENT_MASK 0x801F
|
||||
|
||||
/* glXCreateNewContext render_type attribute values */
|
||||
#define GLX_RGBA_TYPE 0x8014
|
||||
#define GLX_COLOR_INDEX_TYPE 0x8015
|
||||
|
||||
/* glXQueryContext attributes */
|
||||
/* #define GLX_FBCONFIG_ID 0x8013 */
|
||||
/* #define GLX_RENDER_TYPE 0x8011 */
|
||||
#define GLX_SCREEN 0x800C
|
||||
|
||||
/* glXSelectEvent event mask bits */
|
||||
#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
|
||||
#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000
|
||||
|
||||
/* GLXPbufferClobberEvent event_type values */
|
||||
#define GLX_DAMAGED 0x8020
|
||||
#define GLX_SAVED 0x8021
|
||||
#define GLX_EXCHANGE_COMPLETE_INTEL 0x8180
|
||||
#define GLX_BLIT_COMPLETE_INTEL 0x8181
|
||||
#define GLX_FLIP_COMPLETE_INTEL 0x8182
|
||||
|
||||
/* GLXPbufferClobberEvent draw_type values */
|
||||
#define GLX_WINDOW 0x8022
|
||||
#define GLX_PBUFFER 0x8023
|
||||
|
||||
/* GLXPbufferClobberEvent buffer_mask bits */
|
||||
#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
|
||||
#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
|
||||
#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
|
||||
#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
|
||||
#define GLX_AUX_BUFFERS_BIT 0x00000010
|
||||
#define GLX_DEPTH_BUFFER_BIT 0x00000020
|
||||
#define GLX_STENCIL_BUFFER_BIT 0x00000040
|
||||
#define GLX_ACCUM_BUFFER_BIT 0x00000080
|
||||
|
||||
/*
|
||||
** Extension return values from glXGetConfig. These are also
|
||||
** accepted as parameter values for glXChooseVisual.
|
||||
*/
|
||||
|
||||
#define GLX_X_VISUAL_TYPE_EXT 0x22 /* visual_info extension type */
|
||||
#define GLX_TRANSPARENT_TYPE_EXT 0x23 /* visual_info extension */
|
||||
#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 /* visual_info extension */
|
||||
#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 /* visual_info extension */
|
||||
#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 /* visual_info extension */
|
||||
#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 /* visual_info extension */
|
||||
#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 /* visual_info extension */
|
||||
|
||||
/* Property values for visual_type */
|
||||
#define GLX_TRUE_COLOR_EXT 0x8002
|
||||
#define GLX_DIRECT_COLOR_EXT 0x8003
|
||||
#define GLX_PSEUDO_COLOR_EXT 0x8004
|
||||
#define GLX_STATIC_COLOR_EXT 0x8005
|
||||
#define GLX_GRAY_SCALE_EXT 0x8006
|
||||
#define GLX_STATIC_GRAY_EXT 0x8007
|
||||
|
||||
/* Property values for transparent pixel */
|
||||
#define GLX_NONE_EXT 0x8000
|
||||
#define GLX_TRANSPARENT_RGB_EXT 0x8008
|
||||
#define GLX_TRANSPARENT_INDEX_EXT 0x8009
|
||||
|
||||
/* Property values for visual_rating */
|
||||
#define GLX_VISUAL_CAVEAT_EXT 0x20 /* visual_rating extension type */
|
||||
#define GLX_SLOW_VISUAL_EXT 0x8001
|
||||
#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
|
||||
|
||||
/* Property values for swap method (GLX_OML_swap_method) */
|
||||
#define GLX_SWAP_METHOD_OML 0x8060
|
||||
#define GLX_SWAP_EXCHANGE_OML 0x8061
|
||||
#define GLX_SWAP_COPY_OML 0x8062
|
||||
#define GLX_SWAP_UNDEFINED_OML 0x8063
|
||||
|
||||
/* Property values for multi-sampling */
|
||||
#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028 /* visuals grouped by select priority */
|
||||
|
||||
/*
|
||||
** Names for attributes to glXGetClientString.
|
||||
*/
|
||||
#define GLX_VENDOR 0x1
|
||||
#define GLX_VERSION 0x2
|
||||
#define GLX_EXTENSIONS 0x3
|
||||
|
||||
/*
|
||||
** Names for attributes to glXQueryContextInfoEXT.
|
||||
*/
|
||||
#define GLX_SHARE_CONTEXT_EXT 0x800A /* id of share context */
|
||||
#define GLX_VISUAL_ID_EXT 0x800B /* id of context's visual */
|
||||
#define GLX_SCREEN_EXT 0x800C /* screen number */
|
||||
|
||||
/*
|
||||
** GLX_EXT_texture_from_pixmap
|
||||
*/
|
||||
#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
|
||||
#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
|
||||
#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
|
||||
#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
|
||||
#define GLX_Y_INVERTED_EXT 0x20D4
|
||||
|
||||
#define GLX_TEXTURE_FORMAT_EXT 0x20D5
|
||||
#define GLX_TEXTURE_TARGET_EXT 0x20D6
|
||||
#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
|
||||
|
||||
#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
|
||||
#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
|
||||
#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
|
||||
|
||||
#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
|
||||
#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
|
||||
#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
|
||||
|
||||
#define GLX_TEXTURE_1D_EXT 0x20DB
|
||||
#define GLX_TEXTURE_2D_EXT 0x20DC
|
||||
#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
|
||||
|
||||
#define GLX_FRONT_LEFT_EXT 0x20DE
|
||||
#define GLX_FRONT_RIGHT_EXT 0x20DF
|
||||
#define GLX_BACK_LEFT_EXT 0x20E0
|
||||
#define GLX_BACK_RIGHT_EXT 0x20E1
|
||||
#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
|
||||
#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
|
||||
#define GLX_AUX0_EXT 0x20E2
|
||||
#define GLX_AUX1_EXT 0x20E3
|
||||
#define GLX_AUX2_EXT 0x20E4
|
||||
#define GLX_AUX3_EXT 0x20E5
|
||||
#define GLX_AUX4_EXT 0x20E6
|
||||
#define GLX_AUX5_EXT 0x20E7
|
||||
#define GLX_AUX6_EXT 0x20E8
|
||||
#define GLX_AUX7_EXT 0x20E9
|
||||
#define GLX_AUX8_EXT 0x20EA
|
||||
#define GLX_AUX9_EXT 0x20EB
|
||||
|
||||
/*
|
||||
* GLX 1.4 and later:
|
||||
*/
|
||||
#define GLX_SAMPLE_BUFFERS_SGIS 100000
|
||||
#define GLX_SAMPLES_SGIS 100001
|
||||
|
||||
/*
|
||||
* GLX_EXT_framebuffer_SRGB
|
||||
*/
|
||||
#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
|
||||
|
||||
/*
|
||||
* GLX_ARB_create_context
|
||||
* GLX_ARB_create_context_profile
|
||||
* GLX_EXT_create_context_es2_profile
|
||||
*/
|
||||
#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
||||
#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
|
||||
#define GLX_CONTEXT_FLAGS_ARB 0x2094
|
||||
#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126
|
||||
|
||||
#define GLX_CONTEXT_DEBUG_BIT_ARB 0x0001
|
||||
#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
|
||||
|
||||
#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x0001
|
||||
#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x0002
|
||||
#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x0004
|
||||
|
||||
/*
|
||||
* GLX_ARB_create_context_robustness
|
||||
*/
|
||||
#define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x0004
|
||||
#define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
|
||||
#define GLX_NO_RESET_NOTIFICATION_ARB 0x8261
|
||||
#define GLX_LOSE_CONTEXT_ON_RESET_ARB 0x8252
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !__GLX_glxtokens_h__ */
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,181 @@
|
|||
#ifndef __gl_core_h_
|
||||
#define __gl_core_h_
|
||||
|
||||
/*
|
||||
* SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
|
||||
* Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
|
||||
*
|
||||
* 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 including the dates of first publication and
|
||||
* either this permission notice or a reference to
|
||||
* http://oss.sgi.com/projects/FreeB/
|
||||
* 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
|
||||
* SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc.
|
||||
* shall not be used in advertising or otherwise to promote the sale, use or
|
||||
* other dealings in this Software without prior written authorization from
|
||||
* Silicon Graphics, Inc.
|
||||
*/
|
||||
|
||||
#if !defined(_WIN32_WCE)
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#define GL_CORE_SGI 1
|
||||
#define GL_CORE_MESA 2
|
||||
#define GL_CORE_APPLE 4
|
||||
#define GL_CORE_WINDOWS 8
|
||||
|
||||
typedef struct __GLcontextRec __GLcontext;
|
||||
|
||||
/*
|
||||
** This file defines the interface between the GL core and the surrounding
|
||||
** "operating system" that supports it (currently the GLX or WGL extensions).
|
||||
**
|
||||
** Members (data and function pointers) are documented as imported or
|
||||
** exported according to how they are used by the core rendering functions.
|
||||
** Imported members are initialized by the "operating system" and used by
|
||||
** the core functions. Exported members are initialized by the core functions
|
||||
** and used by the "operating system".
|
||||
*/
|
||||
|
||||
/**
|
||||
* Mode and limit information for a context. This information is
|
||||
* kept around in the context so that values can be used during
|
||||
* command execution, and for returning information about the
|
||||
* context to the application.
|
||||
*
|
||||
* Instances of this structure are shared by the driver and the loader. To
|
||||
* maintain binary compatability, new fields \b must be added only to the
|
||||
* end of the structure.
|
||||
*
|
||||
* \sa _gl_context_modes_create
|
||||
*/
|
||||
typedef struct __GLcontextModesRec {
|
||||
struct __GLcontextModesRec * next;
|
||||
|
||||
GLboolean rgbMode;
|
||||
GLboolean floatMode;
|
||||
GLboolean colorIndexMode;
|
||||
GLuint doubleBufferMode;
|
||||
GLuint stereoMode;
|
||||
|
||||
GLboolean haveAccumBuffer;
|
||||
GLboolean haveDepthBuffer;
|
||||
GLboolean haveStencilBuffer;
|
||||
|
||||
GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */
|
||||
GLuint redMask, greenMask, blueMask, alphaMask;
|
||||
GLint rgbBits; /* total bits for rgb */
|
||||
GLint indexBits; /* total bits for colorindex */
|
||||
|
||||
GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
|
||||
GLint depthBits;
|
||||
GLint stencilBits;
|
||||
|
||||
GLint numAuxBuffers;
|
||||
|
||||
GLint level;
|
||||
|
||||
GLint pixmapMode;
|
||||
|
||||
/* GLX */
|
||||
GLint visualID;
|
||||
GLint visualType; /**< One of the GLX X visual types. (i.e.,
|
||||
* \c GLX_TRUE_COLOR, etc.)
|
||||
*/
|
||||
|
||||
/* EXT_visual_rating / GLX 1.2 */
|
||||
GLint visualRating;
|
||||
|
||||
/* EXT_visual_info / GLX 1.2 */
|
||||
GLint transparentPixel;
|
||||
/* colors are floats scaled to ints */
|
||||
GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha;
|
||||
GLint transparentIndex;
|
||||
|
||||
/* ARB_multisample / SGIS_multisample */
|
||||
GLint sampleBuffers;
|
||||
GLint samples;
|
||||
|
||||
/* SGIX_fbconfig / GLX 1.3 */
|
||||
GLint drawableType;
|
||||
GLint renderType;
|
||||
GLint xRenderable;
|
||||
GLint fbconfigID;
|
||||
|
||||
/* SGIX_pbuffer / GLX 1.3 */
|
||||
GLint maxPbufferWidth;
|
||||
GLint maxPbufferHeight;
|
||||
GLint maxPbufferPixels;
|
||||
GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */
|
||||
GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */
|
||||
|
||||
/* SGIX_visual_select_group */
|
||||
GLint visualSelectGroup;
|
||||
|
||||
/* OML_swap_method */
|
||||
GLint swapMethod;
|
||||
|
||||
GLint screen;
|
||||
|
||||
/* EXT_texture_from_pixmap */
|
||||
GLint bindToTextureRgb;
|
||||
GLint bindToTextureRgba;
|
||||
GLint bindToMipmapTexture;
|
||||
GLint bindToTextureTargets;
|
||||
GLint yInverted;
|
||||
} __GLcontextModes;
|
||||
|
||||
/* Several fields of __GLcontextModes can take these as values. Since
|
||||
* GLX header files may not be available everywhere they need to be used,
|
||||
* redefine them here.
|
||||
*/
|
||||
#define GLX_NONE 0x8000
|
||||
#define GLX_SLOW_CONFIG 0x8001
|
||||
#define GLX_TRUE_COLOR 0x8002
|
||||
#define GLX_DIRECT_COLOR 0x8003
|
||||
#define GLX_PSEUDO_COLOR 0x8004
|
||||
#define GLX_STATIC_COLOR 0x8005
|
||||
#define GLX_GRAY_SCALE 0x8006
|
||||
#define GLX_STATIC_GRAY 0x8007
|
||||
#define GLX_TRANSPARENT_RGB 0x8008
|
||||
#define GLX_TRANSPARENT_INDEX 0x8009
|
||||
#define GLX_NON_CONFORMANT_CONFIG 0x800D
|
||||
#define GLX_SWAP_EXCHANGE_OML 0x8061
|
||||
#define GLX_SWAP_COPY_OML 0x8062
|
||||
#define GLX_SWAP_UNDEFINED_OML 0x8063
|
||||
|
||||
#define GLX_DONT_CARE 0xFFFFFFFF
|
||||
|
||||
#define GLX_RGBA_BIT 0x00000001
|
||||
#define GLX_COLOR_INDEX_BIT 0x00000002
|
||||
#define GLX_WINDOW_BIT 0x00000001
|
||||
#define GLX_PIXMAP_BIT 0x00000002
|
||||
#define GLX_PBUFFER_BIT 0x00000004
|
||||
|
||||
#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
|
||||
#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
|
||||
#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
|
||||
#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
|
||||
#define GLX_Y_INVERTED_EXT 0x20D4
|
||||
|
||||
#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
|
||||
#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
|
||||
#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
|
||||
|
||||
#endif /* __gl_core_h_ */
|
|
@ -0,0 +1,292 @@
|
|||
#ifndef __khrplatform_h_
|
||||
#define __khrplatform_h_
|
||||
|
||||
/*
|
||||
** Copyright (c) 2008-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE 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 OR COPYRIGHT HOLDERS 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
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
/* Khronos platform-specific types and definitions.
|
||||
*
|
||||
* The master copy of khrplatform.h is maintained in the Khronos EGL
|
||||
* Registry repository at https://github.com/KhronosGroup/EGL-Registry
|
||||
* The last semantic modification to khrplatform.h was at commit ID:
|
||||
* 67a3e0864c2d75ea5287b9f3d2eb74a745936692
|
||||
*
|
||||
* Adopters may modify this file to suit their platform. Adopters are
|
||||
* encouraged to submit platform specific modifications to the Khronos
|
||||
* group so that they can be included in future versions of this file.
|
||||
* Please submit changes by filing pull requests or issues on
|
||||
* the EGL Registry repository linked above.
|
||||
*
|
||||
*
|
||||
* See the Implementer's Guidelines for information about where this file
|
||||
* should be located on your system and for more details of its use:
|
||||
* http://www.khronos.org/registry/implementers_guide.pdf
|
||||
*
|
||||
* This file should be included as
|
||||
* #include <KHR/khrplatform.h>
|
||||
* by Khronos client API header files that use its types and defines.
|
||||
*
|
||||
* The types in khrplatform.h should only be used to define API-specific types.
|
||||
*
|
||||
* Types defined in khrplatform.h:
|
||||
* khronos_int8_t signed 8 bit
|
||||
* khronos_uint8_t unsigned 8 bit
|
||||
* khronos_int16_t signed 16 bit
|
||||
* khronos_uint16_t unsigned 16 bit
|
||||
* khronos_int32_t signed 32 bit
|
||||
* khronos_uint32_t unsigned 32 bit
|
||||
* khronos_int64_t signed 64 bit
|
||||
* khronos_uint64_t unsigned 64 bit
|
||||
* khronos_intptr_t signed same number of bits as a pointer
|
||||
* khronos_uintptr_t unsigned same number of bits as a pointer
|
||||
* khronos_ssize_t signed size
|
||||
* khronos_usize_t unsigned size
|
||||
* khronos_float_t signed 32 bit floating point
|
||||
* khronos_time_ns_t unsigned 64 bit time in nanoseconds
|
||||
* khronos_utime_nanoseconds_t unsigned time interval or absolute time in
|
||||
* nanoseconds
|
||||
* khronos_stime_nanoseconds_t signed time interval in nanoseconds
|
||||
* khronos_boolean_enum_t enumerated boolean type. This should
|
||||
* only be used as a base type when a client API's boolean type is
|
||||
* an enum. Client APIs which use an integer or other type for
|
||||
* booleans cannot use this as the base type for their boolean.
|
||||
*
|
||||
* Tokens defined in khrplatform.h:
|
||||
*
|
||||
* KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
|
||||
*
|
||||
* KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
|
||||
* KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
|
||||
*
|
||||
* Calling convention macros defined in this file:
|
||||
* KHRONOS_APICALL
|
||||
* KHRONOS_APIENTRY
|
||||
* KHRONOS_APIATTRIBUTES
|
||||
*
|
||||
* These may be used in function prototypes as:
|
||||
*
|
||||
* KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
|
||||
* int arg1,
|
||||
* int arg2) KHRONOS_APIATTRIBUTES;
|
||||
*/
|
||||
|
||||
#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC)
|
||||
# define KHRONOS_STATIC 1
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Definition of KHRONOS_APICALL
|
||||
*-------------------------------------------------------------------------
|
||||
* This precedes the return type of the function in the function prototype.
|
||||
*/
|
||||
#if defined(KHRONOS_STATIC)
|
||||
/* If the preprocessor constant KHRONOS_STATIC is defined, make the
|
||||
* header compatible with static linking. */
|
||||
# define KHRONOS_APICALL
|
||||
#elif defined(_WIN32)
|
||||
# define KHRONOS_APICALL __declspec(dllimport)
|
||||
#elif defined (__SYMBIAN32__)
|
||||
# define KHRONOS_APICALL IMPORT_C
|
||||
#elif (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303) \
|
||||
|| (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
|
||||
/* KHRONOS_APIATTRIBUTES is not used by the client API headers yet */
|
||||
# define KHRONOS_APICALL __attribute__((visibility("default")))
|
||||
#else
|
||||
# define KHRONOS_APICALL
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Definition of KHRONOS_APIENTRY
|
||||
*-------------------------------------------------------------------------
|
||||
* This follows the return type of the function and precedes the function
|
||||
* name in the function prototype.
|
||||
*/
|
||||
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(KHRONOS_STATIC)
|
||||
/* Win32 but not WinCE */
|
||||
# define KHRONOS_APIENTRY __stdcall
|
||||
#else
|
||||
# define KHRONOS_APIENTRY
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Definition of KHRONOS_APIATTRIBUTES
|
||||
*-------------------------------------------------------------------------
|
||||
* This follows the closing parenthesis of the function prototype arguments.
|
||||
*/
|
||||
#if defined (__ARMCC_2__)
|
||||
#define KHRONOS_APIATTRIBUTES __softfp
|
||||
#else
|
||||
#define KHRONOS_APIATTRIBUTES
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* basic type definitions
|
||||
*-----------------------------------------------------------------------*/
|
||||
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
|
||||
|
||||
|
||||
/*
|
||||
* Using <stdint.h>
|
||||
*/
|
||||
#include <stdint.h>
|
||||
typedef int32_t khronos_int32_t;
|
||||
typedef uint32_t khronos_uint32_t;
|
||||
typedef int64_t khronos_int64_t;
|
||||
typedef uint64_t khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif defined(__VMS ) || defined(__sgi)
|
||||
|
||||
/*
|
||||
* Using <inttypes.h>
|
||||
*/
|
||||
#include <inttypes.h>
|
||||
typedef int32_t khronos_int32_t;
|
||||
typedef uint32_t khronos_uint32_t;
|
||||
typedef int64_t khronos_int64_t;
|
||||
typedef uint64_t khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
|
||||
|
||||
/*
|
||||
* Win32
|
||||
*/
|
||||
typedef __int32 khronos_int32_t;
|
||||
typedef unsigned __int32 khronos_uint32_t;
|
||||
typedef __int64 khronos_int64_t;
|
||||
typedef unsigned __int64 khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif defined(__sun__) || defined(__digital__)
|
||||
|
||||
/*
|
||||
* Sun or Digital
|
||||
*/
|
||||
typedef int khronos_int32_t;
|
||||
typedef unsigned int khronos_uint32_t;
|
||||
#if defined(__arch64__) || defined(_LP64)
|
||||
typedef long int khronos_int64_t;
|
||||
typedef unsigned long int khronos_uint64_t;
|
||||
#else
|
||||
typedef long long int khronos_int64_t;
|
||||
typedef unsigned long long int khronos_uint64_t;
|
||||
#endif /* __arch64__ */
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif 0
|
||||
|
||||
/*
|
||||
* Hypothetical platform with no float or int64 support
|
||||
*/
|
||||
typedef int khronos_int32_t;
|
||||
typedef unsigned int khronos_uint32_t;
|
||||
#define KHRONOS_SUPPORT_INT64 0
|
||||
#define KHRONOS_SUPPORT_FLOAT 0
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
* Generic fallback
|
||||
*/
|
||||
#include <stdint.h>
|
||||
typedef int32_t khronos_int32_t;
|
||||
typedef uint32_t khronos_uint32_t;
|
||||
typedef int64_t khronos_int64_t;
|
||||
typedef uint64_t khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Types that are (so far) the same on all platforms
|
||||
*/
|
||||
typedef signed char khronos_int8_t;
|
||||
typedef unsigned char khronos_uint8_t;
|
||||
typedef signed short int khronos_int16_t;
|
||||
typedef unsigned short int khronos_uint16_t;
|
||||
|
||||
/*
|
||||
* Types that differ between LLP64 and LP64 architectures - in LLP64,
|
||||
* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
|
||||
* to be the only LLP64 architecture in current use.
|
||||
*/
|
||||
#ifdef _WIN64
|
||||
typedef signed long long int khronos_intptr_t;
|
||||
typedef unsigned long long int khronos_uintptr_t;
|
||||
typedef signed long long int khronos_ssize_t;
|
||||
typedef unsigned long long int khronos_usize_t;
|
||||
#else
|
||||
typedef signed long int khronos_intptr_t;
|
||||
typedef unsigned long int khronos_uintptr_t;
|
||||
typedef signed long int khronos_ssize_t;
|
||||
typedef unsigned long int khronos_usize_t;
|
||||
#endif
|
||||
|
||||
#if KHRONOS_SUPPORT_FLOAT
|
||||
/*
|
||||
* Float type
|
||||
*/
|
||||
typedef float khronos_float_t;
|
||||
#endif
|
||||
|
||||
#if KHRONOS_SUPPORT_INT64
|
||||
/* Time types
|
||||
*
|
||||
* These types can be used to represent a time interval in nanoseconds or
|
||||
* an absolute Unadjusted System Time. Unadjusted System Time is the number
|
||||
* of nanoseconds since some arbitrary system event (e.g. since the last
|
||||
* time the system booted). The Unadjusted System Time is an unsigned
|
||||
* 64 bit value that wraps back to 0 every 584 years. Time intervals
|
||||
* may be either signed or unsigned.
|
||||
*/
|
||||
typedef khronos_uint64_t khronos_utime_nanoseconds_t;
|
||||
typedef khronos_int64_t khronos_stime_nanoseconds_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Dummy value used to pad enum types to 32 bits.
|
||||
*/
|
||||
#ifndef KHRONOS_MAX_ENUM
|
||||
#define KHRONOS_MAX_ENUM 0x7FFFFFFF
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Enumerated boolean type
|
||||
*
|
||||
* Values other than zero should be considered to be true. Therefore
|
||||
* comparisons should not be made against KHRONOS_TRUE.
|
||||
*/
|
||||
typedef enum {
|
||||
KHRONOS_FALSE = 0,
|
||||
KHRONOS_TRUE = 1,
|
||||
KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
|
||||
} khronos_boolean_enum_t;
|
||||
|
||||
#endif /* __khrplatform_h_ */
|
|
@ -0,0 +1,65 @@
|
|||
/***********************************************************
|
||||
|
||||
Copyright 1988, 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 1988 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.
|
||||
|
||||
******************************************************************/
|
||||
|
||||
/*
|
||||
* DEC private keysyms
|
||||
* (29th bit set)
|
||||
*/
|
||||
|
||||
/* two-key compose sequence initiators, chosen to map to Latin1 characters */
|
||||
|
||||
#define DXK_ring_accent 0x1000FEB0
|
||||
#define DXK_circumflex_accent 0x1000FE5E
|
||||
#define DXK_cedilla_accent 0x1000FE2C
|
||||
#define DXK_acute_accent 0x1000FE27
|
||||
#define DXK_grave_accent 0x1000FE60
|
||||
#define DXK_tilde 0x1000FE7E
|
||||
#define DXK_diaeresis 0x1000FE22
|
||||
|
||||
/* special keysym for LK2** "Remove" key on editing keypad */
|
||||
|
||||
#define DXK_Remove 0x1000FF00 /* Remove */
|
|
@ -0,0 +1,164 @@
|
|||
/*
|
||||
|
||||
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 names of Hewlett Packard
|
||||
or 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.
|
||||
|
||||
HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD
|
||||
TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. Hewlett-Packard shall not be liable for errors
|
||||
contained herein or direct, indirect, special, incidental or
|
||||
consequential damages in connection with the furnishing,
|
||||
performance, or use of this material.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _HPKEYSYM_H
|
||||
|
||||
#define _HPKEYSYM_H
|
||||
|
||||
#define hpXK_ClearLine 0x1000FF6F
|
||||
#define hpXK_InsertLine 0x1000FF70
|
||||
#define hpXK_DeleteLine 0x1000FF71
|
||||
#define hpXK_InsertChar 0x1000FF72
|
||||
#define hpXK_DeleteChar 0x1000FF73
|
||||
#define hpXK_BackTab 0x1000FF74
|
||||
#define hpXK_KP_BackTab 0x1000FF75
|
||||
#define hpXK_Modelock1 0x1000FF48
|
||||
#define hpXK_Modelock2 0x1000FF49
|
||||
#define hpXK_Reset 0x1000FF6C
|
||||
#define hpXK_System 0x1000FF6D
|
||||
#define hpXK_User 0x1000FF6E
|
||||
#define hpXK_mute_acute 0x100000A8
|
||||
#define hpXK_mute_grave 0x100000A9
|
||||
#define hpXK_mute_asciicircum 0x100000AA
|
||||
#define hpXK_mute_diaeresis 0x100000AB
|
||||
#define hpXK_mute_asciitilde 0x100000AC
|
||||
#define hpXK_lira 0x100000AF
|
||||
#define hpXK_guilder 0x100000BE
|
||||
#define hpXK_Ydiaeresis 0x100000EE
|
||||
#define hpXK_IO 0x100000EE
|
||||
#define hpXK_longminus 0x100000F6
|
||||
#define hpXK_block 0x100000FC
|
||||
|
||||
|
||||
#ifndef _OSF_Keysyms
|
||||
#define _OSF_Keysyms
|
||||
|
||||
#define osfXK_Copy 0x1004FF02
|
||||
#define osfXK_Cut 0x1004FF03
|
||||
#define osfXK_Paste 0x1004FF04
|
||||
#define osfXK_BackTab 0x1004FF07
|
||||
#define osfXK_BackSpace 0x1004FF08
|
||||
#define osfXK_Clear 0x1004FF0B
|
||||
#define osfXK_Escape 0x1004FF1B
|
||||
#define osfXK_AddMode 0x1004FF31
|
||||
#define osfXK_PrimaryPaste 0x1004FF32
|
||||
#define osfXK_QuickPaste 0x1004FF33
|
||||
#define osfXK_PageLeft 0x1004FF40
|
||||
#define osfXK_PageUp 0x1004FF41
|
||||
#define osfXK_PageDown 0x1004FF42
|
||||
#define osfXK_PageRight 0x1004FF43
|
||||
#define osfXK_Activate 0x1004FF44
|
||||
#define osfXK_MenuBar 0x1004FF45
|
||||
#define osfXK_Left 0x1004FF51
|
||||
#define osfXK_Up 0x1004FF52
|
||||
#define osfXK_Right 0x1004FF53
|
||||
#define osfXK_Down 0x1004FF54
|
||||
#define osfXK_EndLine 0x1004FF57
|
||||
#define osfXK_BeginLine 0x1004FF58
|
||||
#define osfXK_EndData 0x1004FF59
|
||||
#define osfXK_BeginData 0x1004FF5A
|
||||
#define osfXK_PrevMenu 0x1004FF5B
|
||||
#define osfXK_NextMenu 0x1004FF5C
|
||||
#define osfXK_PrevField 0x1004FF5D
|
||||
#define osfXK_NextField 0x1004FF5E
|
||||
#define osfXK_Select 0x1004FF60
|
||||
#define osfXK_Insert 0x1004FF63
|
||||
#define osfXK_Undo 0x1004FF65
|
||||
#define osfXK_Menu 0x1004FF67
|
||||
#define osfXK_Cancel 0x1004FF69
|
||||
#define osfXK_Help 0x1004FF6A
|
||||
#define osfXK_SelectAll 0x1004FF71
|
||||
#define osfXK_DeselectAll 0x1004FF72
|
||||
#define osfXK_Reselect 0x1004FF73
|
||||
#define osfXK_Extend 0x1004FF74
|
||||
#define osfXK_Restore 0x1004FF78
|
||||
#define osfXK_Delete 0x1004FFFF
|
||||
|
||||
#endif /* _OSF_Keysyms */
|
||||
|
||||
|
||||
/**************************************************************
|
||||
* The use of the following macros is deprecated.
|
||||
* They are listed below only for backwards compatibility.
|
||||
*/
|
||||
#define XK_Reset 0x1000FF6C
|
||||
#define XK_System 0x1000FF6D
|
||||
#define XK_User 0x1000FF6E
|
||||
#define XK_ClearLine 0x1000FF6F
|
||||
#define XK_InsertLine 0x1000FF70
|
||||
#define XK_DeleteLine 0x1000FF71
|
||||
#define XK_InsertChar 0x1000FF72
|
||||
#define XK_DeleteChar 0x1000FF73
|
||||
#define XK_BackTab 0x1000FF74
|
||||
#define XK_KP_BackTab 0x1000FF75
|
||||
#define XK_Ext16bit_L 0x1000FF76
|
||||
#define XK_Ext16bit_R 0x1000FF77
|
||||
#define XK_mute_acute 0x100000a8
|
||||
#define XK_mute_grave 0x100000a9
|
||||
#define XK_mute_asciicircum 0x100000aa
|
||||
#define XK_mute_diaeresis 0x100000ab
|
||||
#define XK_mute_asciitilde 0x100000ac
|
||||
#define XK_lira 0x100000af
|
||||
#define XK_guilder 0x100000be
|
||||
#ifndef XK_Ydiaeresis
|
||||
#define XK_Ydiaeresis 0x100000ee
|
||||
#endif
|
||||
#define XK_IO 0x100000ee
|
||||
#define XK_longminus 0x100000f6
|
||||
#define XK_block 0x100000fc
|
||||
|
||||
#endif /* _HPKEYSYM_H */
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
#ifndef _X11_IMUTIL_H_
|
||||
#define _X11_IMUTIL_H_
|
||||
|
||||
extern int
|
||||
_XGetScanlinePad(
|
||||
Display *dpy,
|
||||
int depth);
|
||||
|
||||
extern int
|
||||
_XGetBitsPerPixel(
|
||||
Display *dpy,
|
||||
int depth);
|
||||
|
||||
extern int
|
||||
_XSetImage(
|
||||
XImage *srcimg,
|
||||
register XImage *dstimg,
|
||||
register int x,
|
||||
register int y);
|
||||
|
||||
extern int
|
||||
_XReverse_Bytes(
|
||||
register unsigned char *bpt,
|
||||
register int nb);
|
||||
extern void
|
||||
_XInitImageFuncPtrs(
|
||||
register XImage *image);
|
||||
|
||||
#endif /* _X11_IMUTIL_H_ */
|
|
@ -0,0 +1,106 @@
|
|||
/*
|
||||
* Copyright (c) 1991, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* 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 (including the next
|
||||
* paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
|
||||
*/
|
||||
/************************************************************
|
||||
|
||||
Copyright 1991, 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.
|
||||
|
||||
***********************************************************/
|
||||
|
||||
/*
|
||||
* Floating Accent
|
||||
*/
|
||||
|
||||
#define SunXK_FA_Grave 0x1005FF00
|
||||
#define SunXK_FA_Circum 0x1005FF01
|
||||
#define SunXK_FA_Tilde 0x1005FF02
|
||||
#define SunXK_FA_Acute 0x1005FF03
|
||||
#define SunXK_FA_Diaeresis 0x1005FF04
|
||||
#define SunXK_FA_Cedilla 0x1005FF05
|
||||
|
||||
/*
|
||||
* Miscellaneous Functions
|
||||
*/
|
||||
|
||||
#define SunXK_F36 0x1005FF10 /* Labeled F11 */
|
||||
#define SunXK_F37 0x1005FF11 /* Labeled F12 */
|
||||
|
||||
#define SunXK_Sys_Req 0x1005FF60
|
||||
#define SunXK_Print_Screen 0x0000FF61 /* Same as XK_Print */
|
||||
|
||||
/*
|
||||
* International & Multi-Key Character Composition
|
||||
*/
|
||||
|
||||
#define SunXK_Compose 0x0000FF20 /* Same as XK_Multi_key */
|
||||
#define SunXK_AltGraph 0x0000FF7E /* Same as XK_Mode_switch */
|
||||
|
||||
/*
|
||||
* Cursor Control
|
||||
*/
|
||||
|
||||
#define SunXK_PageUp 0x0000FF55 /* Same as XK_Prior */
|
||||
#define SunXK_PageDown 0x0000FF56 /* Same as XK_Next */
|
||||
|
||||
/*
|
||||
* Open Look Functions
|
||||
*/
|
||||
|
||||
#define SunXK_Undo 0x0000FF65 /* Same as XK_Undo */
|
||||
#define SunXK_Again 0x0000FF66 /* Same as XK_Redo */
|
||||
#define SunXK_Find 0x0000FF68 /* Same as XK_Find */
|
||||
#define SunXK_Stop 0x0000FF69 /* Same as XK_Cancel */
|
||||
#define SunXK_Props 0x1005FF70
|
||||
#define SunXK_Front 0x1005FF71
|
||||
#define SunXK_Copy 0x1005FF72
|
||||
#define SunXK_Open 0x1005FF73
|
||||
#define SunXK_Paste 0x1005FF74
|
||||
#define SunXK_Cut 0x1005FF75
|
||||
|
||||
#define SunXK_PowerSwitch 0x1005FF76
|
||||
#define SunXK_AudioLowerVolume 0x1005FF77
|
||||
#define SunXK_AudioMute 0x1005FF78
|
||||
#define SunXK_AudioRaiseVolume 0x1005FF79
|
||||
#define SunXK_VideoDegauss 0x1005FF7A
|
||||
#define SunXK_VideoLowerBrightness 0x1005FF7B
|
||||
#define SunXK_VideoRaiseBrightness 0x1005FF7C
|
||||
#define SunXK_PowerSwitchShift 0x1005FF7D
|
|
@ -0,0 +1,717 @@
|
|||
/* 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
|
||||
|
||||
/* Circulation request */
|
||||
|
||||
#define PlaceOnTop 0
|
||||
#define PlaceOnBottom 1
|
||||
|
||||
/* protocol families */
|
||||
|
||||
#define FamilyInternet 0 /* IPv4 */
|
||||
#define FamilyDECnet 1
|
||||
#define FamilyChaos 2
|
||||
#define FamilyInternet6 6 /* IPv6 */
|
||||
|
||||
/* authentication families not tied to a specific protocol */
|
||||
#define FamilyServerInterpreted 5
|
||||
|
||||
/* Property notification */
|
||||
|
||||
#define PropertyNewValue 0
|
||||
#define PropertyDelete 1
|
||||
|
||||
/* Color Map notification */
|
||||
|
||||
#define ColormapUninstalled 0
|
||||
#define ColormapInstalled 1
|
||||
|
||||
/* 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)
|
||||
|
||||
/* ConfigureWindow structure */
|
||||
|
||||
#define CWX (1<<0)
|
||||
#define CWY (1<<1)
|
||||
#define CWWidth (1<<2)
|
||||
#define CWHeight (1<<3)
|
||||
#define CWBorderWidth (1<<4)
|
||||
#define CWSibling (1<<5)
|
||||
#define CWStackMode (1<<6)
|
||||
|
||||
|
||||
/* Bit Gravity */
|
||||
|
||||
#define ForgetGravity 0
|
||||
#define NorthWestGravity 1
|
||||
#define NorthGravity 2
|
||||
#define NorthEastGravity 3
|
||||
#define WestGravity 4
|
||||
#define CenterGravity 5
|
||||
#define EastGravity 6
|
||||
#define SouthWestGravity 7
|
||||
#define SouthGravity 8
|
||||
#define SouthEastGravity 9
|
||||
#define StaticGravity 10
|
||||
|
||||
/* Window gravity + bit gravity above */
|
||||
|
||||
#define UnmapGravity 0
|
||||
|
||||
/* Used in CreateWindow for backing-store hint */
|
||||
|
||||
#define NotUseful 0
|
||||
#define WhenMapped 1
|
||||
#define Always 2
|
||||
|
||||
/* Used in GetWindowAttributes reply */
|
||||
|
||||
#define IsUnmapped 0
|
||||
#define IsUnviewable 1
|
||||
#define IsViewable 2
|
||||
|
||||
/* Used in ChangeSaveSet */
|
||||
|
||||
#define SetModeInsert 0
|
||||
#define SetModeDelete 1
|
||||
|
||||
/* Used in ChangeCloseDownMode */
|
||||
|
||||
#define DestroyAll 0
|
||||
#define RetainPermanent 1
|
||||
#define RetainTemporary 2
|
||||
|
||||
/* Window stacking method (in configureWindow) */
|
||||
|
||||
#define Above 0
|
||||
#define Below 1
|
||||
#define TopIf 2
|
||||
#define BottomIf 3
|
||||
#define Opposite 4
|
||||
|
||||
/* Circulation direction */
|
||||
|
||||
#define RaiseLowest 0
|
||||
#define LowerHighest 1
|
||||
|
||||
/* Property modes */
|
||||
|
||||
#define PropModeReplace 0
|
||||
#define PropModePrepend 1
|
||||
#define PropModeAppend 2
|
||||
|
||||
/*****************************************************************
|
||||
* GRAPHICS DEFINITIONS
|
||||
*****************************************************************/
|
||||
|
||||
/* graphics functions, as in GC.alu */
|
||||
|
||||
#define GXclear 0x0 /* 0 */
|
||||
#define GXand 0x1 /* src AND dst */
|
||||
#define GXandReverse 0x2 /* src AND NOT dst */
|
||||
#define GXcopy 0x3 /* src */
|
||||
#define GXandInverted 0x4 /* NOT src AND dst */
|
||||
#define GXnoop 0x5 /* dst */
|
||||
#define GXxor 0x6 /* src XOR dst */
|
||||
#define GXor 0x7 /* src OR dst */
|
||||
#define GXnor 0x8 /* NOT src AND NOT dst */
|
||||
#define GXequiv 0x9 /* NOT src XOR dst */
|
||||
#define GXinvert 0xa /* NOT dst */
|
||||
#define GXorReverse 0xb /* src OR NOT dst */
|
||||
#define GXcopyInverted 0xc /* NOT src */
|
||||
#define GXorInverted 0xd /* NOT src OR dst */
|
||||
#define GXnand 0xe /* NOT src OR NOT dst */
|
||||
#define GXset 0xf /* 1 */
|
||||
|
||||
/* LineStyle */
|
||||
|
||||
#define LineSolid 0
|
||||
#define LineOnOffDash 1
|
||||
#define LineDoubleDash 2
|
||||
|
||||
/* capStyle */
|
||||
|
||||
#define CapNotLast 0
|
||||
#define CapButt 1
|
||||
#define CapRound 2
|
||||
#define CapProjecting 3
|
||||
|
||||
/* joinStyle */
|
||||
|
||||
#define JoinMiter 0
|
||||
#define JoinRound 1
|
||||
#define JoinBevel 2
|
||||
|
||||
/* fillStyle */
|
||||
|
||||
#define FillSolid 0
|
||||
#define FillTiled 1
|
||||
#define FillStippled 2
|
||||
#define FillOpaqueStippled 3
|
||||
|
||||
/* fillRule */
|
||||
|
||||
#define EvenOddRule 0
|
||||
#define WindingRule 1
|
||||
|
||||
/* subwindow mode */
|
||||
|
||||
#define ClipByChildren 0
|
||||
#define IncludeInferiors 1
|
||||
|
||||
/* SetClipRectangles ordering */
|
||||
|
||||
#define Unsorted 0
|
||||
#define YSorted 1
|
||||
#define YXSorted 2
|
||||
#define YXBanded 3
|
||||
|
||||
/* CoordinateMode for drawing routines */
|
||||
|
||||
#define CoordModeOrigin 0 /* relative to the origin */
|
||||
#define CoordModePrevious 1 /* relative to previous point */
|
||||
|
||||
/* Polygon shapes */
|
||||
|
||||
#define Complex 0 /* paths may intersect */
|
||||
#define Nonconvex 1 /* no paths intersect, but not convex */
|
||||
#define Convex 2 /* wholly convex */
|
||||
|
||||
/* Arc modes for PolyFillArc */
|
||||
|
||||
#define ArcChord 0 /* join endpoints of arc */
|
||||
#define ArcPieSlice 1 /* join endpoints to center of arc */
|
||||
|
||||
/* GC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into
|
||||
GC.stateChanges */
|
||||
|
||||
#define GCFunction (1L<<0)
|
||||
#define GCPlaneMask (1L<<1)
|
||||
#define GCForeground (1L<<2)
|
||||
#define GCBackground (1L<<3)
|
||||
#define GCLineWidth (1L<<4)
|
||||
#define GCLineStyle (1L<<5)
|
||||
#define GCCapStyle (1L<<6)
|
||||
#define GCJoinStyle (1L<<7)
|
||||
#define GCFillStyle (1L<<8)
|
||||
#define GCFillRule (1L<<9)
|
||||
#define GCTile (1L<<10)
|
||||
#define GCStipple (1L<<11)
|
||||
#define GCTileStipXOrigin (1L<<12)
|
||||
#define GCTileStipYOrigin (1L<<13)
|
||||
#define GCFont (1L<<14)
|
||||
#define GCSubwindowMode (1L<<15)
|
||||
#define GCGraphicsExposures (1L<<16)
|
||||
#define GCClipXOrigin (1L<<17)
|
||||
#define GCClipYOrigin (1L<<18)
|
||||
#define GCClipMask (1L<<19)
|
||||
#define GCDashOffset (1L<<20)
|
||||
#define GCDashList (1L<<21)
|
||||
#define GCArcMode (1L<<22)
|
||||
|
||||
#define GCLastBit 22
|
||||
/*****************************************************************
|
||||
* FONTS
|
||||
*****************************************************************/
|
||||
|
||||
/* used in QueryFont -- draw direction */
|
||||
|
||||
#define FontLeftToRight 0
|
||||
#define FontRightToLeft 1
|
||||
|
||||
#define FontChange 255
|
||||
|
||||
/*****************************************************************
|
||||
* 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 AutoRepeatModeOff 0
|
||||
#define AutoRepeatModeOn 1
|
||||
#define AutoRepeatModeDefault 2
|
||||
|
||||
#define LedModeOff 0
|
||||
#define LedModeOn 1
|
||||
|
||||
/* masks for ChangeKeyboardControl */
|
||||
|
||||
#define KBKeyClickPercent (1L<<0)
|
||||
#define KBBellPercent (1L<<1)
|
||||
#define KBBellPitch (1L<<2)
|
||||
#define KBBellDuration (1L<<3)
|
||||
#define KBLed (1L<<4)
|
||||
#define KBLedMode (1L<<5)
|
||||
#define KBKey (1L<<6)
|
||||
#define KBAutoRepeatMode (1L<<7)
|
||||
|
||||
#define MappingSuccess 0
|
||||
#define MappingBusy 1
|
||||
#define MappingFailed 2
|
||||
|
||||
#define MappingModifier 0
|
||||
#define MappingKeyboard 1
|
||||
#define MappingPointer 2
|
||||
|
||||
/*****************************************************************
|
||||
* SCREEN SAVER STUFF
|
||||
*****************************************************************/
|
||||
|
||||
#define DontPreferBlanking 0
|
||||
#define PreferBlanking 1
|
||||
#define DefaultBlanking 2
|
||||
|
||||
#define DisableScreenSaver 0
|
||||
#define DisableScreenInterval 0
|
||||
|
||||
#define DontAllowExposures 0
|
||||
#define AllowExposures 1
|
||||
#define DefaultExposures 2
|
||||
|
||||
/* for ForceScreenSaver */
|
||||
|
||||
#define ScreenSaverReset 0
|
||||
#define ScreenSaverActive 1
|
||||
|
||||
/*****************************************************************
|
||||
* HOSTS AND CONNECTIONS
|
||||
*****************************************************************/
|
||||
|
||||
/* for ChangeHosts */
|
||||
|
||||
#define HostInsert 0
|
||||
#define HostDelete 1
|
||||
|
||||
/* for ChangeAccessControl */
|
||||
|
||||
#define EnableAccess 1
|
||||
#define DisableAccess 0
|
||||
|
||||
/* 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 */
|
|
@ -0,0 +1,227 @@
|
|||
/*
|
||||
* XFree86 vendor specific keysyms.
|
||||
*
|
||||
* The XFree86 keysym range is 0x10080001 - 0x1008FFFF.
|
||||
*
|
||||
* X.Org will not be adding to the XF86 set of keysyms, though they have
|
||||
* been adopted and are considered a "standard" part of X keysym definitions.
|
||||
* XFree86 never properly commented these keysyms, so we have done our
|
||||
* best to explain the semantic meaning of these keys.
|
||||
*
|
||||
* XFree86 has removed their mail archives of the period, that might have
|
||||
* shed more light on some of these definitions. Until/unless we resurrect
|
||||
* these archives, these are from memory and usage.
|
||||
*/
|
||||
|
||||
/*
|
||||
* ModeLock
|
||||
*
|
||||
* This one is old, and not really used any more since XKB offers this
|
||||
* functionality.
|
||||
*/
|
||||
|
||||
#define XF86XK_ModeLock 0x1008FF01 /* Mode Switch Lock */
|
||||
|
||||
/* Backlight controls. */
|
||||
#define XF86XK_MonBrightnessUp 0x1008FF02 /* Monitor/panel brightness */
|
||||
#define XF86XK_MonBrightnessDown 0x1008FF03 /* Monitor/panel brightness */
|
||||
#define XF86XK_KbdLightOnOff 0x1008FF04 /* Keyboards may be lit */
|
||||
#define XF86XK_KbdBrightnessUp 0x1008FF05 /* Keyboards may be lit */
|
||||
#define XF86XK_KbdBrightnessDown 0x1008FF06 /* Keyboards may be lit */
|
||||
|
||||
/*
|
||||
* Keys found on some "Internet" keyboards.
|
||||
*/
|
||||
#define XF86XK_Standby 0x1008FF10 /* System into standby mode */
|
||||
#define XF86XK_AudioLowerVolume 0x1008FF11 /* Volume control down */
|
||||
#define XF86XK_AudioMute 0x1008FF12 /* Mute sound from the system */
|
||||
#define XF86XK_AudioRaiseVolume 0x1008FF13 /* Volume control up */
|
||||
#define XF86XK_AudioPlay 0x1008FF14 /* Start playing of audio > */
|
||||
#define XF86XK_AudioStop 0x1008FF15 /* Stop playing audio */
|
||||
#define XF86XK_AudioPrev 0x1008FF16 /* Previous track */
|
||||
#define XF86XK_AudioNext 0x1008FF17 /* Next track */
|
||||
#define XF86XK_HomePage 0x1008FF18 /* Display user's home page */
|
||||
#define XF86XK_Mail 0x1008FF19 /* Invoke user's mail program */
|
||||
#define XF86XK_Start 0x1008FF1A /* Start application */
|
||||
#define XF86XK_Search 0x1008FF1B /* Search */
|
||||
#define XF86XK_AudioRecord 0x1008FF1C /* Record audio application */
|
||||
|
||||
/* These are sometimes found on PDA's (e.g. Palm, PocketPC or elsewhere) */
|
||||
#define XF86XK_Calculator 0x1008FF1D /* Invoke calculator program */
|
||||
#define XF86XK_Memo 0x1008FF1E /* Invoke Memo taking program */
|
||||
#define XF86XK_ToDoList 0x1008FF1F /* Invoke To Do List program */
|
||||
#define XF86XK_Calendar 0x1008FF20 /* Invoke Calendar program */
|
||||
#define XF86XK_PowerDown 0x1008FF21 /* Deep sleep the system */
|
||||
#define XF86XK_ContrastAdjust 0x1008FF22 /* Adjust screen contrast */
|
||||
#define XF86XK_RockerUp 0x1008FF23 /* Rocker switches exist up */
|
||||
#define XF86XK_RockerDown 0x1008FF24 /* and down */
|
||||
#define XF86XK_RockerEnter 0x1008FF25 /* and let you press them */
|
||||
|
||||
/* Some more "Internet" keyboard symbols */
|
||||
#define XF86XK_Back 0x1008FF26 /* Like back on a browser */
|
||||
#define XF86XK_Forward 0x1008FF27 /* Like forward on a browser */
|
||||
#define XF86XK_Stop 0x1008FF28 /* Stop current operation */
|
||||
#define XF86XK_Refresh 0x1008FF29 /* Refresh the page */
|
||||
#define XF86XK_PowerOff 0x1008FF2A /* Power off system entirely */
|
||||
#define XF86XK_WakeUp 0x1008FF2B /* Wake up system from sleep */
|
||||
#define XF86XK_Eject 0x1008FF2C /* Eject device (e.g. DVD) */
|
||||
#define XF86XK_ScreenSaver 0x1008FF2D /* Invoke screensaver */
|
||||
#define XF86XK_WWW 0x1008FF2E /* Invoke web browser */
|
||||
#define XF86XK_Sleep 0x1008FF2F /* Put system to sleep */
|
||||
#define XF86XK_Favorites 0x1008FF30 /* Show favorite locations */
|
||||
#define XF86XK_AudioPause 0x1008FF31 /* Pause audio playing */
|
||||
#define XF86XK_AudioMedia 0x1008FF32 /* Launch media collection app */
|
||||
#define XF86XK_MyComputer 0x1008FF33 /* Display "My Computer" window */
|
||||
#define XF86XK_VendorHome 0x1008FF34 /* Display vendor home web site */
|
||||
#define XF86XK_LightBulb 0x1008FF35 /* Light bulb keys exist */
|
||||
#define XF86XK_Shop 0x1008FF36 /* Display shopping web site */
|
||||
#define XF86XK_History 0x1008FF37 /* Show history of web surfing */
|
||||
#define XF86XK_OpenURL 0x1008FF38 /* Open selected URL */
|
||||
#define XF86XK_AddFavorite 0x1008FF39 /* Add URL to favorites list */
|
||||
#define XF86XK_HotLinks 0x1008FF3A /* Show "hot" links */
|
||||
#define XF86XK_BrightnessAdjust 0x1008FF3B /* Invoke brightness adj. UI */
|
||||
#define XF86XK_Finance 0x1008FF3C /* Display financial site */
|
||||
#define XF86XK_Community 0x1008FF3D /* Display user's community */
|
||||
#define XF86XK_AudioRewind 0x1008FF3E /* "rewind" audio track */
|
||||
#define XF86XK_BackForward 0x1008FF3F /* ??? */
|
||||
#define XF86XK_Launch0 0x1008FF40 /* Launch Application */
|
||||
#define XF86XK_Launch1 0x1008FF41 /* Launch Application */
|
||||
#define XF86XK_Launch2 0x1008FF42 /* Launch Application */
|
||||
#define XF86XK_Launch3 0x1008FF43 /* Launch Application */
|
||||
#define XF86XK_Launch4 0x1008FF44 /* Launch Application */
|
||||
#define XF86XK_Launch5 0x1008FF45 /* Launch Application */
|
||||
#define XF86XK_Launch6 0x1008FF46 /* Launch Application */
|
||||
#define XF86XK_Launch7 0x1008FF47 /* Launch Application */
|
||||
#define XF86XK_Launch8 0x1008FF48 /* Launch Application */
|
||||
#define XF86XK_Launch9 0x1008FF49 /* Launch Application */
|
||||
#define XF86XK_LaunchA 0x1008FF4A /* Launch Application */
|
||||
#define XF86XK_LaunchB 0x1008FF4B /* Launch Application */
|
||||
#define XF86XK_LaunchC 0x1008FF4C /* Launch Application */
|
||||
#define XF86XK_LaunchD 0x1008FF4D /* Launch Application */
|
||||
#define XF86XK_LaunchE 0x1008FF4E /* Launch Application */
|
||||
#define XF86XK_LaunchF 0x1008FF4F /* Launch Application */
|
||||
|
||||
#define XF86XK_ApplicationLeft 0x1008FF50 /* switch to application, left */
|
||||
#define XF86XK_ApplicationRight 0x1008FF51 /* switch to application, right*/
|
||||
#define XF86XK_Book 0x1008FF52 /* Launch bookreader */
|
||||
#define XF86XK_CD 0x1008FF53 /* Launch CD/DVD player */
|
||||
#define XF86XK_Calculater 0x1008FF54 /* Launch Calculater */
|
||||
#define XF86XK_Clear 0x1008FF55 /* Clear window, screen */
|
||||
#define XF86XK_Close 0x1008FF56 /* Close window */
|
||||
#define XF86XK_Copy 0x1008FF57 /* Copy selection */
|
||||
#define XF86XK_Cut 0x1008FF58 /* Cut selection */
|
||||
#define XF86XK_Display 0x1008FF59 /* Output switch key */
|
||||
#define XF86XK_DOS 0x1008FF5A /* Launch DOS (emulation) */
|
||||
#define XF86XK_Documents 0x1008FF5B /* Open documents window */
|
||||
#define XF86XK_Excel 0x1008FF5C /* Launch spread sheet */
|
||||
#define XF86XK_Explorer 0x1008FF5D /* Launch file explorer */
|
||||
#define XF86XK_Game 0x1008FF5E /* Launch game */
|
||||
#define XF86XK_Go 0x1008FF5F /* Go to URL */
|
||||
#define XF86XK_iTouch 0x1008FF60 /* Logitch iTouch- don't use */
|
||||
#define XF86XK_LogOff 0x1008FF61 /* Log off system */
|
||||
#define XF86XK_Market 0x1008FF62 /* ?? */
|
||||
#define XF86XK_Meeting 0x1008FF63 /* enter meeting in calendar */
|
||||
#define XF86XK_MenuKB 0x1008FF65 /* distingush keyboard from PB */
|
||||
#define XF86XK_MenuPB 0x1008FF66 /* distinuish PB from keyboard */
|
||||
#define XF86XK_MySites 0x1008FF67 /* Favourites */
|
||||
#define XF86XK_New 0x1008FF68 /* New (folder, document... */
|
||||
#define XF86XK_News 0x1008FF69 /* News */
|
||||
#define XF86XK_OfficeHome 0x1008FF6A /* Office home (old Staroffice)*/
|
||||
#define XF86XK_Open 0x1008FF6B /* Open */
|
||||
#define XF86XK_Option 0x1008FF6C /* ?? */
|
||||
#define XF86XK_Paste 0x1008FF6D /* Paste */
|
||||
#define XF86XK_Phone 0x1008FF6E /* Launch phone; dial number */
|
||||
#define XF86XK_Q 0x1008FF70 /* Compaq's Q - don't use */
|
||||
#define XF86XK_Reply 0x1008FF72 /* Reply e.g., mail */
|
||||
#define XF86XK_Reload 0x1008FF73 /* Reload web page, file, etc. */
|
||||
#define XF86XK_RotateWindows 0x1008FF74 /* Rotate windows e.g. xrandr */
|
||||
#define XF86XK_RotationPB 0x1008FF75 /* don't use */
|
||||
#define XF86XK_RotationKB 0x1008FF76 /* don't use */
|
||||
#define XF86XK_Save 0x1008FF77 /* Save (file, document, state */
|
||||
#define XF86XK_ScrollUp 0x1008FF78 /* Scroll window/contents up */
|
||||
#define XF86XK_ScrollDown 0x1008FF79 /* Scrool window/contentd down */
|
||||
#define XF86XK_ScrollClick 0x1008FF7A /* Use XKB mousekeys instead */
|
||||
#define XF86XK_Send 0x1008FF7B /* Send mail, file, object */
|
||||
#define XF86XK_Spell 0x1008FF7C /* Spell checker */
|
||||
#define XF86XK_SplitScreen 0x1008FF7D /* Split window or screen */
|
||||
#define XF86XK_Support 0x1008FF7E /* Get support (??) */
|
||||
#define XF86XK_TaskPane 0x1008FF7F /* Show tasks */
|
||||
#define XF86XK_Terminal 0x1008FF80 /* Launch terminal emulator */
|
||||
#define XF86XK_Tools 0x1008FF81 /* toolbox of desktop/app. */
|
||||
#define XF86XK_Travel 0x1008FF82 /* ?? */
|
||||
#define XF86XK_UserPB 0x1008FF84 /* ?? */
|
||||
#define XF86XK_User1KB 0x1008FF85 /* ?? */
|
||||
#define XF86XK_User2KB 0x1008FF86 /* ?? */
|
||||
#define XF86XK_Video 0x1008FF87 /* Launch video player */
|
||||
#define XF86XK_WheelButton 0x1008FF88 /* button from a mouse wheel */
|
||||
#define XF86XK_Word 0x1008FF89 /* Launch word processor */
|
||||
#define XF86XK_Xfer 0x1008FF8A
|
||||
#define XF86XK_ZoomIn 0x1008FF8B /* zoom in view, map, etc. */
|
||||
#define XF86XK_ZoomOut 0x1008FF8C /* zoom out view, map, etc. */
|
||||
|
||||
#define XF86XK_Away 0x1008FF8D /* mark yourself as away */
|
||||
#define XF86XK_Messenger 0x1008FF8E /* as in instant messaging */
|
||||
#define XF86XK_WebCam 0x1008FF8F /* Launch web camera app. */
|
||||
#define XF86XK_MailForward 0x1008FF90 /* Forward in mail */
|
||||
#define XF86XK_Pictures 0x1008FF91 /* Show pictures */
|
||||
#define XF86XK_Music 0x1008FF92 /* Launch music application */
|
||||
|
||||
#define XF86XK_Battery 0x1008FF93 /* Display battery information */
|
||||
#define XF86XK_Bluetooth 0x1008FF94 /* Enable/disable Bluetooth */
|
||||
#define XF86XK_WLAN 0x1008FF95 /* Enable/disable WLAN */
|
||||
#define XF86XK_UWB 0x1008FF96 /* Enable/disable UWB */
|
||||
|
||||
#define XF86XK_AudioForward 0x1008FF97 /* fast-forward audio track */
|
||||
#define XF86XK_AudioRepeat 0x1008FF98 /* toggle repeat mode */
|
||||
#define XF86XK_AudioRandomPlay 0x1008FF99 /* toggle shuffle mode */
|
||||
#define XF86XK_Subtitle 0x1008FF9A /* cycle through subtitle */
|
||||
#define XF86XK_AudioCycleTrack 0x1008FF9B /* cycle through audio tracks */
|
||||
#define XF86XK_CycleAngle 0x1008FF9C /* cycle through angles */
|
||||
#define XF86XK_FrameBack 0x1008FF9D /* video: go one frame back */
|
||||
#define XF86XK_FrameForward 0x1008FF9E /* video: go one frame forward */
|
||||
#define XF86XK_Time 0x1008FF9F /* display, or shows an entry for time seeking */
|
||||
#define XF86XK_Select 0x1008FFA0 /* Select button on joypads and remotes */
|
||||
#define XF86XK_View 0x1008FFA1 /* Show a view options/properties */
|
||||
#define XF86XK_TopMenu 0x1008FFA2 /* Go to a top-level menu in a video */
|
||||
|
||||
#define XF86XK_Red 0x1008FFA3 /* Red button */
|
||||
#define XF86XK_Green 0x1008FFA4 /* Green button */
|
||||
#define XF86XK_Yellow 0x1008FFA5 /* Yellow button */
|
||||
#define XF86XK_Blue 0x1008FFA6 /* Blue button */
|
||||
|
||||
#define XF86XK_Suspend 0x1008FFA7 /* Sleep to RAM */
|
||||
#define XF86XK_Hibernate 0x1008FFA8 /* Sleep to disk */
|
||||
#define XF86XK_TouchpadToggle 0x1008FFA9 /* Toggle between touchpad/trackstick */
|
||||
#define XF86XK_TouchpadOn 0x1008FFB0 /* The touchpad got switched on */
|
||||
#define XF86XK_TouchpadOff 0x1008FFB1 /* The touchpad got switched off */
|
||||
|
||||
#define XF86XK_AudioMicMute 0x1008FFB2 /* Mute the Mic from the system */
|
||||
|
||||
#define XF86XK_Keyboard 0x1008FFB3 /* User defined keyboard related action */
|
||||
|
||||
#define XF86XK_WWAN 0x1008FFB4 /* Toggle WWAN (LTE, UMTS, etc.) radio */
|
||||
#define XF86XK_RFKill 0x1008FFB5 /* Toggle radios on/off */
|
||||
|
||||
#define XF86XK_AudioPreset 0x1008FFB6 /* Select equalizer preset, e.g. theatre-mode */
|
||||
|
||||
/* Keys for special action keys (hot keys) */
|
||||
/* Virtual terminals on some operating systems */
|
||||
#define XF86XK_Switch_VT_1 0x1008FE01
|
||||
#define XF86XK_Switch_VT_2 0x1008FE02
|
||||
#define XF86XK_Switch_VT_3 0x1008FE03
|
||||
#define XF86XK_Switch_VT_4 0x1008FE04
|
||||
#define XF86XK_Switch_VT_5 0x1008FE05
|
||||
#define XF86XK_Switch_VT_6 0x1008FE06
|
||||
#define XF86XK_Switch_VT_7 0x1008FE07
|
||||
#define XF86XK_Switch_VT_8 0x1008FE08
|
||||
#define XF86XK_Switch_VT_9 0x1008FE09
|
||||
#define XF86XK_Switch_VT_10 0x1008FE0A
|
||||
#define XF86XK_Switch_VT_11 0x1008FE0B
|
||||
#define XF86XK_Switch_VT_12 0x1008FE0C
|
||||
|
||||
#define XF86XK_Ungrab 0x1008FE20 /* force ungrab */
|
||||
#define XF86XK_ClearGrab 0x1008FE21 /* kill application with grab */
|
||||
#define XF86XK_Next_VMode 0x1008FE22 /* next video mode available */
|
||||
#define XF86XK_Prev_VMode 0x1008FE23 /* prev. video mode available */
|
||||
#define XF86XK_LogWindowTree 0x1008FE24 /* print window tree to log */
|
||||
#define XF86XK_LogGrabInfo 0x1008FE25 /* print all active grabs to log */
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,113 @@
|
|||
/*
|
||||
|
||||
Copyright 1985, 1986, 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.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* XWDFile.h MIT Project Athena, X Window system window raster
|
||||
* image dumper, dump file format header file.
|
||||
*
|
||||
* Author: Tony Della Fera, DEC
|
||||
* 27-Jun-85
|
||||
*
|
||||
* Modifier: William F. Wyatt, SAO
|
||||
* 18-Nov-86 - version 6 for saving/restoring color maps
|
||||
*/
|
||||
|
||||
#ifndef XWDFILE_H
|
||||
#define XWDFILE_H
|
||||
|
||||
#include <X11/Xmd.h>
|
||||
|
||||
#define XWD_FILE_VERSION 7
|
||||
#define sz_XWDheader 100
|
||||
#define sz_XWDColor 12
|
||||
|
||||
typedef CARD32 xwdval; /* for old broken programs */
|
||||
|
||||
/* Values in the file are most significant byte first. */
|
||||
|
||||
typedef struct _xwd_file_header {
|
||||
/* header_size = SIZEOF(XWDheader) + length of null-terminated
|
||||
* window name. */
|
||||
CARD32 header_size B32;
|
||||
|
||||
CARD32 file_version B32; /* = XWD_FILE_VERSION above */
|
||||
CARD32 pixmap_format B32; /* ZPixmap or XYPixmap */
|
||||
CARD32 pixmap_depth B32; /* Pixmap depth */
|
||||
CARD32 pixmap_width B32; /* Pixmap width */
|
||||
CARD32 pixmap_height B32; /* Pixmap height */
|
||||
CARD32 xoffset B32; /* Bitmap x offset, normally 0 */
|
||||
CARD32 byte_order B32; /* of image data: MSBFirst, LSBFirst */
|
||||
|
||||
/* bitmap_unit applies to bitmaps (depth 1 format XY) only.
|
||||
* It is the number of bits that each scanline is padded to. */
|
||||
CARD32 bitmap_unit B32;
|
||||
|
||||
CARD32 bitmap_bit_order B32; /* bitmaps only: MSBFirst, LSBFirst */
|
||||
|
||||
/* bitmap_pad applies to pixmaps (non-bitmaps) only.
|
||||
* It is the number of bits that each scanline is padded to. */
|
||||
CARD32 bitmap_pad B32;
|
||||
|
||||
CARD32 bits_per_pixel B32; /* Bits per pixel */
|
||||
|
||||
/* bytes_per_line is pixmap_width padded to bitmap_unit (bitmaps)
|
||||
* or bitmap_pad (pixmaps). It is the delta (in bytes) to get
|
||||
* to the same x position on an adjacent row. */
|
||||
CARD32 bytes_per_line B32;
|
||||
CARD32 visual_class B32; /* Class of colormap */
|
||||
CARD32 red_mask B32; /* Z red mask */
|
||||
CARD32 green_mask B32; /* Z green mask */
|
||||
CARD32 blue_mask B32; /* Z blue mask */
|
||||
CARD32 bits_per_rgb B32; /* Log2 of distinct color values */
|
||||
CARD32 colormap_entries B32; /* Number of entries in colormap; not used? */
|
||||
CARD32 ncolors B32; /* Number of XWDColor structures */
|
||||
CARD32 window_width B32; /* Window width */
|
||||
CARD32 window_height B32; /* Window height */
|
||||
CARD32 window_x B32; /* Window upper left X coordinate */
|
||||
CARD32 window_y B32; /* Window upper left Y coordinate */
|
||||
CARD32 window_bdrwidth B32; /* Window border width */
|
||||
} XWDFileHeader;
|
||||
|
||||
/* Null-terminated window name follows the above structure. */
|
||||
|
||||
/* Next comes XWDColor structures, at offset XWDFileHeader.header_size in
|
||||
* the file. XWDFileHeader.ncolors tells how many XWDColor structures
|
||||
* there are.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
CARD32 pixel B32;
|
||||
CARD16 red B16;
|
||||
CARD16 green B16;
|
||||
CARD16 blue B16;
|
||||
CARD8 flags;
|
||||
CARD8 pad;
|
||||
} XWDColor;
|
||||
|
||||
/* Last comes the image data in the format described by XWDFileHeader. */
|
||||
|
||||
#endif /* XWDFILE_H */
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
/*
|
||||
|
||||
Copyright 1995, 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.
|
||||
|
||||
*/
|
||||
/*
|
||||
* The purpose of this header is to define the macros ALLOCATE_LOCAL and
|
||||
* DEALLOCATE_LOCAL appropriately for the platform being compiled on.
|
||||
* These macros are used to make fast, function-local memory allocations.
|
||||
* Their characteristics are as follows:
|
||||
*
|
||||
* void *ALLOCATE_LOCAL(int size)
|
||||
* Returns a pointer to size bytes of memory, or NULL if the allocation
|
||||
* failed. The memory must be freed with DEALLOCATE_LOCAL before the
|
||||
* function that made the allocation returns. You should not ask for
|
||||
* large blocks of memory with this function, since on many platforms
|
||||
* the memory comes from the stack, which may have limited size.
|
||||
*
|
||||
* void DEALLOCATE_LOCAL(void *)
|
||||
* Frees the memory allocated by ALLOCATE_LOCAL. Omission of this
|
||||
* step may be harmless on some platforms, but will result in
|
||||
* memory leaks or worse on others.
|
||||
*
|
||||
* Before including this file, you should define two macros,
|
||||
* ALLOCATE_LOCAL_FALLBACK and DEALLOCATE_LOCAL_FALLBACK, that have the
|
||||
* same characteristics as ALLOCATE_LOCAL and DEALLOCATE_LOCAL. The
|
||||
* header uses the fallbacks if it doesn't know a "better" way to define
|
||||
* ALLOCATE_LOCAL and DEALLOCATE_LOCAL. Typical usage would be:
|
||||
*
|
||||
* #define ALLOCATE_LOCAL_FALLBACK(_size) malloc(_size)
|
||||
* #define DEALLOCATE_LOCAL_FALLBACK(_ptr) free(_ptr)
|
||||
* #include "Xalloca.h"
|
||||
*/
|
||||
|
||||
#ifndef XALLOCA_H
|
||||
#define XALLOCA_H 1
|
||||
|
||||
#ifndef INCLUDE_ALLOCA_H
|
||||
/* Need to add more here to match Imake *.cf's */
|
||||
# if defined(HAVE_ALLOCA_H) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||
# define INCLUDE_ALLOCA_H
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
#endif
|
||||
|
||||
#ifndef NO_ALLOCA
|
||||
/*
|
||||
* os-dependent definition of local allocation and deallocation
|
||||
* If you want something other than (DE)ALLOCATE_LOCAL_FALLBACK
|
||||
* for ALLOCATE/DEALLOCATE_LOCAL then you add that in here.
|
||||
*/
|
||||
|
||||
|
||||
# ifdef __GNUC__
|
||||
# ifndef alloca
|
||||
# define alloca __builtin_alloca
|
||||
# endif /* !alloca */
|
||||
# define ALLOCATE_LOCAL(size) alloca((int)(size))
|
||||
# else /* ! __GNUC__ */
|
||||
|
||||
/*
|
||||
* warning: old mips alloca (pre 2.10) is unusable, new one is built in
|
||||
* Test is easy, the new one is named __builtin_alloca and comes
|
||||
* from alloca.h which #defines alloca.
|
||||
*/
|
||||
# if defined(__sun) || defined(alloca)
|
||||
/*
|
||||
* Some System V boxes extract alloca.o from /lib/libPW.a; if you
|
||||
* decide that you don't want to use alloca, you might want to fix it here.
|
||||
*/
|
||||
/* alloca might be a macro taking one arg (hi, Sun!), so give it one. */
|
||||
# if !defined(__cplusplus)
|
||||
# define __Xnullarg /* as nothing */
|
||||
extern void *alloca(__Xnullarg);
|
||||
# endif
|
||||
# define ALLOCATE_LOCAL(size) alloca((int)(size))
|
||||
# endif /* who does alloca */
|
||||
# endif /* __GNUC__ */
|
||||
|
||||
#endif /* NO_ALLOCA */
|
||||
|
||||
#if !defined(ALLOCATE_LOCAL)
|
||||
# if defined(ALLOCATE_LOCAL_FALLBACK) && defined(DEALLOCATE_LOCAL_FALLBACK)
|
||||
# define ALLOCATE_LOCAL(_size) ALLOCATE_LOCAL_FALLBACK(_size)
|
||||
# define DEALLOCATE_LOCAL(_ptr) DEALLOCATE_LOCAL_FALLBACK(_ptr)
|
||||
# else /* no fallbacks supplied; error */
|
||||
# define ALLOCATE_LOCAL(_size) ALLOCATE_LOCAL_FALLBACK undefined!
|
||||
# define DEALLOCATE_LOCAL(_ptr) DEALLOCATE_LOCAL_FALLBACK undefined!
|
||||
# endif /* defined(ALLOCATE_LOCAL_FALLBACK && DEALLOCATE_LOCAL_FALLBACK) */
|
||||
#else
|
||||
# if !defined(DEALLOCATE_LOCAL)
|
||||
# define DEALLOCATE_LOCAL(_ptr) do {} while(0)
|
||||
# endif
|
||||
#endif /* defined(ALLOCATE_LOCAL) */
|
||||
|
||||
#endif /* XALLOCA_H */
|
|
@ -0,0 +1,94 @@
|
|||
#ifndef _XARCH_H_
|
||||
# define _XARCH_H_
|
||||
|
||||
/*
|
||||
* Copyright 1997 Metro Link Incorporated
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
* 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, and that the names of the above listed copyright holder(s)
|
||||
* not be used in advertising or publicity pertaining to distribution of
|
||||
* the software without specific, written prior permission. The above listed
|
||||
* copyright holder(s) make(s) no representations about the suitability of
|
||||
* this software for any purpose. It is provided "as is" without express or
|
||||
* implied warranty.
|
||||
*
|
||||
* THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD
|
||||
* TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Determine the machine's byte order.
|
||||
*/
|
||||
|
||||
/* See if it is set in the imake config first */
|
||||
# ifdef X_BYTE_ORDER
|
||||
|
||||
# define X_BIG_ENDIAN 4321
|
||||
# define X_LITTLE_ENDIAN 1234
|
||||
|
||||
# else
|
||||
|
||||
# if defined(SVR4) || defined(__SVR4)
|
||||
# include <sys/types.h>
|
||||
# include <sys/byteorder.h>
|
||||
# elif defined(CSRG_BASED)
|
||||
# if defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
# include <sys/types.h>
|
||||
# endif
|
||||
# include <machine/endian.h>
|
||||
# elif defined(linux)
|
||||
# if defined __STRICT_ANSI__
|
||||
# undef __STRICT_ANSI__
|
||||
# include <endian.h>
|
||||
# define __STRICT_ANSI__
|
||||
# else
|
||||
# include <endian.h>
|
||||
# endif
|
||||
/* 'endian.h' might have been included before 'Xarch.h' */
|
||||
# if !defined(LITTLE_ENDIAN) && defined(__LITTLE_ENDIAN)
|
||||
# define LITTLE_ENDIAN __LITTLE_ENDIAN
|
||||
# endif
|
||||
# if !defined(BIG_ENDIAN) && defined(__BIG_ENDIAN)
|
||||
# define BIG_ENDIAN __BIG_ENDIAN
|
||||
# endif
|
||||
# if !defined(PDP_ENDIAN) && defined(__PDP_ENDIAN)
|
||||
# define PDP_ENDIAN __PDP_ENDIAN
|
||||
# endif
|
||||
# if !defined(BYTE_ORDER) && defined(__BYTE_ORDER)
|
||||
# define BYTE_ORDER __BYTE_ORDER
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef BYTE_ORDER
|
||||
# define LITTLE_ENDIAN 1234
|
||||
# define BIG_ENDIAN 4321
|
||||
|
||||
# if defined(__sun) && defined(__SVR4)
|
||||
# include <sys/isa_defs.h>
|
||||
# ifdef _LITTLE_ENDIAN
|
||||
# define BYTE_ORDER LITTLE_ENDIAN
|
||||
# endif
|
||||
# ifdef _BIG_ENDIAN
|
||||
# define BYTE_ORDER BIG_ENDIAN
|
||||
# endif
|
||||
# endif /* sun */
|
||||
# endif /* BYTE_ORDER */
|
||||
|
||||
# define X_BYTE_ORDER BYTE_ORDER
|
||||
# define X_BIG_ENDIAN BIG_ENDIAN
|
||||
# define X_LITTLE_ENDIAN LITTLE_ENDIAN
|
||||
|
||||
# endif /* not in imake config */
|
||||
|
||||
#endif /* _XARCH_H_ */
|
|
@ -0,0 +1,79 @@
|
|||
#ifndef XATOM_H
|
||||
#define XATOM_H 1
|
||||
|
||||
/* THIS IS A GENERATED FILE
|
||||
*
|
||||
* Do not change! Changing this file implies a protocol change!
|
||||
*/
|
||||
|
||||
#define XA_PRIMARY ((Atom) 1)
|
||||
#define XA_SECONDARY ((Atom) 2)
|
||||
#define XA_ARC ((Atom) 3)
|
||||
#define XA_ATOM ((Atom) 4)
|
||||
#define XA_BITMAP ((Atom) 5)
|
||||
#define XA_CARDINAL ((Atom) 6)
|
||||
#define XA_COLORMAP ((Atom) 7)
|
||||
#define XA_CURSOR ((Atom) 8)
|
||||
#define XA_CUT_BUFFER0 ((Atom) 9)
|
||||
#define XA_CUT_BUFFER1 ((Atom) 10)
|
||||
#define XA_CUT_BUFFER2 ((Atom) 11)
|
||||
#define XA_CUT_BUFFER3 ((Atom) 12)
|
||||
#define XA_CUT_BUFFER4 ((Atom) 13)
|
||||
#define XA_CUT_BUFFER5 ((Atom) 14)
|
||||
#define XA_CUT_BUFFER6 ((Atom) 15)
|
||||
#define XA_CUT_BUFFER7 ((Atom) 16)
|
||||
#define XA_DRAWABLE ((Atom) 17)
|
||||
#define XA_FONT ((Atom) 18)
|
||||
#define XA_INTEGER ((Atom) 19)
|
||||
#define XA_PIXMAP ((Atom) 20)
|
||||
#define XA_POINT ((Atom) 21)
|
||||
#define XA_RECTANGLE ((Atom) 22)
|
||||
#define XA_RESOURCE_MANAGER ((Atom) 23)
|
||||
#define XA_RGB_COLOR_MAP ((Atom) 24)
|
||||
#define XA_RGB_BEST_MAP ((Atom) 25)
|
||||
#define XA_RGB_BLUE_MAP ((Atom) 26)
|
||||
#define XA_RGB_DEFAULT_MAP ((Atom) 27)
|
||||
#define XA_RGB_GRAY_MAP ((Atom) 28)
|
||||
#define XA_RGB_GREEN_MAP ((Atom) 29)
|
||||
#define XA_RGB_RED_MAP ((Atom) 30)
|
||||
#define XA_STRING ((Atom) 31)
|
||||
#define XA_VISUALID ((Atom) 32)
|
||||
#define XA_WINDOW ((Atom) 33)
|
||||
#define XA_WM_COMMAND ((Atom) 34)
|
||||
#define XA_WM_HINTS ((Atom) 35)
|
||||
#define XA_WM_CLIENT_MACHINE ((Atom) 36)
|
||||
#define XA_WM_ICON_NAME ((Atom) 37)
|
||||
#define XA_WM_ICON_SIZE ((Atom) 38)
|
||||
#define XA_WM_NAME ((Atom) 39)
|
||||
#define XA_WM_NORMAL_HINTS ((Atom) 40)
|
||||
#define XA_WM_SIZE_HINTS ((Atom) 41)
|
||||
#define XA_WM_ZOOM_HINTS ((Atom) 42)
|
||||
#define XA_MIN_SPACE ((Atom) 43)
|
||||
#define XA_NORM_SPACE ((Atom) 44)
|
||||
#define XA_MAX_SPACE ((Atom) 45)
|
||||
#define XA_END_SPACE ((Atom) 46)
|
||||
#define XA_SUPERSCRIPT_X ((Atom) 47)
|
||||
#define XA_SUPERSCRIPT_Y ((Atom) 48)
|
||||
#define XA_SUBSCRIPT_X ((Atom) 49)
|
||||
#define XA_SUBSCRIPT_Y ((Atom) 50)
|
||||
#define XA_UNDERLINE_POSITION ((Atom) 51)
|
||||
#define XA_UNDERLINE_THICKNESS ((Atom) 52)
|
||||
#define XA_STRIKEOUT_ASCENT ((Atom) 53)
|
||||
#define XA_STRIKEOUT_DESCENT ((Atom) 54)
|
||||
#define XA_ITALIC_ANGLE ((Atom) 55)
|
||||
#define XA_X_HEIGHT ((Atom) 56)
|
||||
#define XA_QUAD_WIDTH ((Atom) 57)
|
||||
#define XA_WEIGHT ((Atom) 58)
|
||||
#define XA_POINT_SIZE ((Atom) 59)
|
||||
#define XA_RESOLUTION ((Atom) 60)
|
||||
#define XA_COPYRIGHT ((Atom) 61)
|
||||
#define XA_NOTICE ((Atom) 62)
|
||||
#define XA_FONT_NAME ((Atom) 63)
|
||||
#define XA_FAMILY_NAME ((Atom) 64)
|
||||
#define XA_FULL_NAME ((Atom) 65)
|
||||
#define XA_CAP_HEIGHT ((Atom) 66)
|
||||
#define XA_WM_CLASS ((Atom) 67)
|
||||
#define XA_WM_TRANSIENT_FOR ((Atom) 68)
|
||||
|
||||
#define XA_LAST_PREDEFINED ((Atom) 68)
|
||||
#endif /* XATOM_H */
|
|
@ -0,0 +1,149 @@
|
|||
/*
|
||||
|
||||
Copyright 1988, 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.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _Xauth_h
|
||||
#define _Xauth_h
|
||||
|
||||
/* struct xauth is full of implicit padding to properly align the pointers
|
||||
after the length fields. We can't clean that up without breaking ABI,
|
||||
so tell clang not to bother complaining about it. */
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wpadded"
|
||||
#endif
|
||||
|
||||
typedef struct xauth {
|
||||
unsigned short family;
|
||||
unsigned short address_length;
|
||||
char *address;
|
||||
unsigned short number_length;
|
||||
char *number;
|
||||
unsigned short name_length;
|
||||
char *name;
|
||||
unsigned short data_length;
|
||||
char *data;
|
||||
} Xauth;
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#ifndef _XAUTH_STRUCT_ONLY
|
||||
|
||||
# include <X11/Xfuncproto.h>
|
||||
# include <X11/Xfuncs.h>
|
||||
|
||||
# include <stdio.h>
|
||||
|
||||
# define FamilyLocal (256) /* not part of X standard (i.e. X.h) */
|
||||
# define FamilyWild (65535)
|
||||
# define FamilyNetname (254) /* not part of X standard */
|
||||
# define FamilyKrb5Principal (253) /* Kerberos 5 principal name */
|
||||
# define FamilyLocalHost (252) /* for local non-net authentication */
|
||||
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
char *XauFileName(void);
|
||||
|
||||
Xauth *XauReadAuth(
|
||||
FILE* /* auth_file */
|
||||
);
|
||||
|
||||
int XauLockAuth(
|
||||
_Xconst char* /* file_name */,
|
||||
int /* retries */,
|
||||
int /* timeout */,
|
||||
long /* dead */
|
||||
);
|
||||
|
||||
int XauUnlockAuth(
|
||||
_Xconst char* /* file_name */
|
||||
);
|
||||
|
||||
int XauWriteAuth(
|
||||
FILE* /* auth_file */,
|
||||
Xauth* /* auth */
|
||||
);
|
||||
|
||||
Xauth *XauGetAuthByAddr(
|
||||
#if NeedWidePrototypes
|
||||
unsigned int /* family */,
|
||||
unsigned int /* address_length */,
|
||||
#else
|
||||
unsigned short /* family */,
|
||||
unsigned short /* address_length */,
|
||||
#endif
|
||||
_Xconst char* /* address */,
|
||||
#if NeedWidePrototypes
|
||||
unsigned int /* number_length */,
|
||||
#else
|
||||
unsigned short /* number_length */,
|
||||
#endif
|
||||
_Xconst char* /* number */,
|
||||
#if NeedWidePrototypes
|
||||
unsigned int /* name_length */,
|
||||
#else
|
||||
unsigned short /* name_length */,
|
||||
#endif
|
||||
_Xconst char* /* name */
|
||||
);
|
||||
|
||||
Xauth *XauGetBestAuthByAddr(
|
||||
#if NeedWidePrototypes
|
||||
unsigned int /* family */,
|
||||
unsigned int /* address_length */,
|
||||
#else
|
||||
unsigned short /* family */,
|
||||
unsigned short /* address_length */,
|
||||
#endif
|
||||
_Xconst char* /* address */,
|
||||
#if NeedWidePrototypes
|
||||
unsigned int /* number_length */,
|
||||
#else
|
||||
unsigned short /* number_length */,
|
||||
#endif
|
||||
_Xconst char* /* number */,
|
||||
int /* types_length */,
|
||||
char** /* type_names */,
|
||||
_Xconst int* /* type_lengths */
|
||||
);
|
||||
|
||||
void XauDisposeAuth(
|
||||
Xauth* /* auth */
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
/* Return values from XauLockAuth */
|
||||
|
||||
# define LOCK_SUCCESS 0 /* lock succeeded */
|
||||
# define LOCK_ERROR 1 /* lock unexpectely failed, check errno */
|
||||
# define LOCK_TIMEOUT 2 /* lock failed, timeouts expired */
|
||||
|
||||
#endif /* _XAUTH_STRUCT_ONLY */
|
||||
|
||||
#endif /* _Xauth_h */
|
|
@ -0,0 +1,815 @@
|
|||
|
||||
/*
|
||||
* Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc.
|
||||
* All Rights Reserved
|
||||
*
|
||||
* This file is a component of an X Window System-specific implementation
|
||||
* of Xcms based on the TekColor Color Management System. Permission is
|
||||
* hereby granted to use, copy, modify, sell, and otherwise distribute this
|
||||
* software and its documentation for any purpose and without fee, provided
|
||||
* that this copyright, permission, and disclaimer notice is reproduced in
|
||||
* all copies of this software and in supporting documentation. TekColor
|
||||
* is a trademark of Tektronix, Inc.
|
||||
*
|
||||
* Tektronix makes no representation about the suitability of this software
|
||||
* for any purpose. It is provided "as is" and with all faults.
|
||||
*
|
||||
* TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE,
|
||||
* INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX 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 THE PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* DESCRIPTION
|
||||
* Public include file for X Color Management System
|
||||
*/
|
||||
#ifndef _X11_XCMS_H_
|
||||
#define _X11_XCMS_H_
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
/* The Xcms 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
|
||||
complaining about it. */
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wpadded"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XCMS Status Values
|
||||
*/
|
||||
#define XcmsFailure 0
|
||||
#define XcmsSuccess 1
|
||||
#define XcmsSuccessWithCompression 2
|
||||
|
||||
/*
|
||||
* Color Space Format ID's
|
||||
* Color Space ID's are of XcmsColorFormat type.
|
||||
*
|
||||
* bit 31
|
||||
* 0 == Device-Independent
|
||||
* 1 == Device-Dependent
|
||||
*
|
||||
* bit 30:
|
||||
* 0 == Registered with X Consortium
|
||||
* 1 == Unregistered
|
||||
*/
|
||||
#define XcmsUndefinedFormat (XcmsColorFormat)0x00000000
|
||||
#define XcmsCIEXYZFormat (XcmsColorFormat)0x00000001
|
||||
#define XcmsCIEuvYFormat (XcmsColorFormat)0x00000002
|
||||
#define XcmsCIExyYFormat (XcmsColorFormat)0x00000003
|
||||
#define XcmsCIELabFormat (XcmsColorFormat)0x00000004
|
||||
#define XcmsCIELuvFormat (XcmsColorFormat)0x00000005
|
||||
#define XcmsTekHVCFormat (XcmsColorFormat)0x00000006
|
||||
#define XcmsRGBFormat (XcmsColorFormat)0x80000000
|
||||
#define XcmsRGBiFormat (XcmsColorFormat)0x80000001
|
||||
|
||||
/*
|
||||
* State of XcmsPerScrnInfo
|
||||
*/
|
||||
#define XcmsInitNone 0x00 /* no initialization attempted */
|
||||
#define XcmsInitSuccess 0x01 /* initialization successful */
|
||||
#define XcmsInitFailure 0xff /* failure, use defaults */
|
||||
|
||||
#define DisplayOfCCC(ccc) ((ccc)->dpy)
|
||||
#define ScreenNumberOfCCC(ccc) ((ccc)->screenNumber)
|
||||
#define VisualOfCCC(ccc) ((ccc)->visual)
|
||||
#define ClientWhitePointOfCCC(ccc) (&(ccc)->clientWhitePt)
|
||||
#define ScreenWhitePointOfCCC(ccc) (&(ccc)->pPerScrnInfo->screenWhitePt)
|
||||
#define FunctionSetOfCCC(ccc) ((ccc)->pPerScrnInfo->functionSet)
|
||||
|
||||
typedef unsigned long XcmsColorFormat; /* Color Space Format ID */
|
||||
|
||||
typedef double XcmsFloat;
|
||||
|
||||
/*
|
||||
* Device RGB
|
||||
*/
|
||||
typedef struct {
|
||||
unsigned short red; /* scaled from 0x0000 to 0xffff */
|
||||
unsigned short green; /* scaled from 0x0000 to 0xffff */
|
||||
unsigned short blue; /* scaled from 0x0000 to 0xffff */
|
||||
} XcmsRGB;
|
||||
|
||||
/*
|
||||
* RGB Intensity
|
||||
*/
|
||||
typedef struct {
|
||||
XcmsFloat red; /* 0.0 - 1.0 */
|
||||
XcmsFloat green; /* 0.0 - 1.0 */
|
||||
XcmsFloat blue; /* 0.0 - 1.0 */
|
||||
} XcmsRGBi;
|
||||
|
||||
/*
|
||||
* CIE XYZ
|
||||
*/
|
||||
typedef struct {
|
||||
XcmsFloat X;
|
||||
XcmsFloat Y;
|
||||
XcmsFloat Z;
|
||||
} XcmsCIEXYZ;
|
||||
|
||||
/*
|
||||
* CIE u'v'Y
|
||||
*/
|
||||
typedef struct {
|
||||
XcmsFloat u_prime; /* 0.0 - 1.0 */
|
||||
XcmsFloat v_prime; /* 0.0 - 1.0 */
|
||||
XcmsFloat Y; /* 0.0 - 1.0 */
|
||||
} XcmsCIEuvY;
|
||||
|
||||
/*
|
||||
* CIE xyY
|
||||
*/
|
||||
typedef struct {
|
||||
XcmsFloat x; /* 0.0 - 1.0 */
|
||||
XcmsFloat y; /* 0.0 - 1.0 */
|
||||
XcmsFloat Y; /* 0.0 - 1.0 */
|
||||
} XcmsCIExyY;
|
||||
|
||||
/*
|
||||
* CIE L*a*b*
|
||||
*/
|
||||
typedef struct {
|
||||
XcmsFloat L_star; /* 0.0 - 100.0 */
|
||||
XcmsFloat a_star;
|
||||
XcmsFloat b_star;
|
||||
} XcmsCIELab;
|
||||
|
||||
/*
|
||||
* CIE L*u*v*
|
||||
*/
|
||||
typedef struct {
|
||||
XcmsFloat L_star; /* 0.0 - 100.0 */
|
||||
XcmsFloat u_star;
|
||||
XcmsFloat v_star;
|
||||
} XcmsCIELuv;
|
||||
|
||||
/*
|
||||
* TekHVC
|
||||
*/
|
||||
typedef struct {
|
||||
XcmsFloat H; /* 0.0 - 360.0 */
|
||||
XcmsFloat V; /* 0.0 - 100.0 */
|
||||
XcmsFloat C; /* 0.0 - 100.0 */
|
||||
} XcmsTekHVC;
|
||||
|
||||
/*
|
||||
* PAD
|
||||
*/
|
||||
typedef struct {
|
||||
XcmsFloat pad0;
|
||||
XcmsFloat pad1;
|
||||
XcmsFloat pad2;
|
||||
XcmsFloat pad3;
|
||||
} XcmsPad;
|
||||
|
||||
|
||||
/*
|
||||
* XCMS Color Structure
|
||||
*/
|
||||
typedef struct {
|
||||
union {
|
||||
XcmsRGB RGB;
|
||||
XcmsRGBi RGBi;
|
||||
XcmsCIEXYZ CIEXYZ;
|
||||
XcmsCIEuvY CIEuvY;
|
||||
XcmsCIExyY CIExyY;
|
||||
XcmsCIELab CIELab;
|
||||
XcmsCIELuv CIELuv;
|
||||
XcmsTekHVC TekHVC;
|
||||
XcmsPad Pad;
|
||||
} spec; /* the color specification */
|
||||
unsigned long pixel; /* pixel value (as needed) */
|
||||
XcmsColorFormat format; /* the specification format */
|
||||
} XcmsColor;
|
||||
|
||||
|
||||
/*
|
||||
* XCMS Per Screen related data
|
||||
*/
|
||||
|
||||
typedef struct _XcmsPerScrnInfo {
|
||||
XcmsColor screenWhitePt; /* Screen White point */
|
||||
XPointer functionSet; /* pointer to Screen Color Characterization */
|
||||
/* Function Set structure */
|
||||
XPointer screenData; /* pointer to corresponding Screen Color*/
|
||||
/* Characterization Data */
|
||||
unsigned char state; /* XcmsInitNone, XcmsInitSuccess, XcmsInitFailure */
|
||||
char pad[3];
|
||||
} XcmsPerScrnInfo;
|
||||
|
||||
typedef struct _XcmsCCC *XcmsCCC;
|
||||
|
||||
typedef Status (*XcmsCompressionProc)( /* Gamut Compression Proc */
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
unsigned int /* index */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
typedef Status (*XcmsWhiteAdjustProc)( /* White Point Adjust Proc */
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* initial_white_point*/,
|
||||
XcmsColor* /* target_white_point*/,
|
||||
XcmsColorFormat /* target_format */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
/*
|
||||
* XCMS Color Conversion Context
|
||||
*/
|
||||
typedef struct _XcmsCCC {
|
||||
Display *dpy; /* X Display */
|
||||
int screenNumber; /* X screen number */
|
||||
Visual *visual; /* X Visual */
|
||||
XcmsColor clientWhitePt; /* Client White Point */
|
||||
XcmsCompressionProc gamutCompProc; /* Gamut Compression Function */
|
||||
XPointer gamutCompClientData; /* Gamut Comp Func Client Data */
|
||||
XcmsWhiteAdjustProc whitePtAdjProc; /* White Point Adjustment Function */
|
||||
XPointer whitePtAdjClientData; /* White Pt Adj Func Client Data */
|
||||
XcmsPerScrnInfo *pPerScrnInfo; /* pointer to per screen information */
|
||||
/* associated with the above display */
|
||||
/* screenNumber */
|
||||
} XcmsCCCRec;
|
||||
|
||||
typedef Status (*XcmsScreenInitProc)( /* Screen Initialization Proc */
|
||||
Display* /* dpy */,
|
||||
int /* screen_number */,
|
||||
XcmsPerScrnInfo* /* screen_info */
|
||||
);
|
||||
|
||||
typedef void (*XcmsScreenFreeProc)(
|
||||
XPointer /* screenData */
|
||||
);
|
||||
|
||||
/*
|
||||
* Function List Pointer -- pointer to an array of function pointers.
|
||||
* The end of list is indicated by a NULL pointer.
|
||||
*/
|
||||
/*
|
||||
* XXX: The use of the XcmsConversionProc type is broken. The
|
||||
* device-independent colour conversion code uses it as:
|
||||
|
||||
typedef Status (*XcmsConversionProc)(XcmsCCC, XcmsColor *, XcmsColor *,
|
||||
unsigned int);
|
||||
|
||||
* while the device-dependent code uses it as:
|
||||
|
||||
typedef Status (*XcmsConversionProc)(XcmsCCC, XcmsColor *, unsigned int,
|
||||
Bool *);
|
||||
|
||||
* Until this is reworked, it's probably best to leave it unprotoized.
|
||||
* The code works regardless.
|
||||
*/
|
||||
typedef Status (*XcmsDDConversionProc)( /* using device-dependent version */
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* pcolors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
Bool* /* pCompressed */
|
||||
);
|
||||
|
||||
typedef Status (*XcmsDIConversionProc)( /* using device-independent version */
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* white_point */,
|
||||
XcmsColor* /* pcolors_in_out */,
|
||||
unsigned int /* ncolors */
|
||||
);
|
||||
|
||||
typedef XcmsDIConversionProc XcmsConversionProc;
|
||||
typedef XcmsConversionProc *XcmsFuncListPtr;
|
||||
|
||||
typedef int (*XcmsParseStringProc)( /* Color String Parsing Proc */
|
||||
char* /* color_string */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
/*
|
||||
* Color Space -- per Color Space related data (Device-Independent
|
||||
* or Device-Dependent)
|
||||
*/
|
||||
typedef struct _XcmsColorSpace {
|
||||
const char *prefix; /* Prefix of string format. */
|
||||
XcmsColorFormat id; /* Format ID number. */
|
||||
XcmsParseStringProc parseString;
|
||||
/* String format parsing function */
|
||||
XcmsFuncListPtr to_CIEXYZ; /* Pointer to an array of function */
|
||||
/* pointers such that when the */
|
||||
/* functions are executed in sequence */
|
||||
/* will convert a XcmsColor structure */
|
||||
/* from this color space to CIEXYZ */
|
||||
/* space. */
|
||||
XcmsFuncListPtr from_CIEXYZ;/* Pointer to an array of function */
|
||||
/* pointers such that when the */
|
||||
/* functions are executed in sequence */
|
||||
/* will convert a XcmsColor structure */
|
||||
/* from CIEXYZ space to this color */
|
||||
/* space. */
|
||||
int inverse_flag; /* If 1, indicates that for 0 <= i < n */
|
||||
/* where n is the number of function */
|
||||
/* pointers in the lists to_CIEXYZ */
|
||||
/* and from_CIEXYZ; for each function */
|
||||
/* to_CIEXYZ[i] its inverse function */
|
||||
/* is from_CIEXYZ[n - i]. */
|
||||
|
||||
} XcmsColorSpace;
|
||||
|
||||
/*
|
||||
* Screen Color Characterization Function Set -- per device class
|
||||
* color space conversion functions.
|
||||
*/
|
||||
typedef struct _XcmsFunctionSet {
|
||||
XcmsColorSpace **DDColorSpaces;
|
||||
/* Pointer to an array of pointers to */
|
||||
/* Device-DEPENDENT color spaces */
|
||||
/* understood by this SCCFuncSet. */
|
||||
XcmsScreenInitProc screenInitProc;
|
||||
/* Screen initialization function that */
|
||||
/* reads Screen Color Characterization*/
|
||||
/* Data off properties on the screen's*/
|
||||
/* root window. */
|
||||
XcmsScreenFreeProc screenFreeProc;
|
||||
/* Function that frees the SCCData */
|
||||
/* structures. */
|
||||
} XcmsFunctionSet;
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
extern Status XcmsAddColorSpace (
|
||||
XcmsColorSpace* /* pColorSpace */
|
||||
);
|
||||
|
||||
extern Status XcmsAddFunctionSet (
|
||||
XcmsFunctionSet* /* functionSet */
|
||||
);
|
||||
|
||||
extern Status XcmsAllocColor (
|
||||
Display* /* dpy */,
|
||||
Colormap /* colormap */,
|
||||
XcmsColor* /* color_in_out */,
|
||||
XcmsColorFormat /* result_format */
|
||||
);
|
||||
|
||||
extern Status XcmsAllocNamedColor (
|
||||
Display* /* dpy */,
|
||||
Colormap /* colormap */,
|
||||
_Xconst char* /* color_string */,
|
||||
XcmsColor* /* color_scrn_return */,
|
||||
XcmsColor* /* color_exact_return */,
|
||||
XcmsColorFormat /* result_format */
|
||||
);
|
||||
|
||||
extern XcmsCCC XcmsCCCOfColormap (
|
||||
Display* /* dpy */,
|
||||
Colormap /* colormap */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELabClipab(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
unsigned int /* index */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELabClipL(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
unsigned int /* index */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELabClipLab(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
unsigned int /* index */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELabQueryMaxC (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue_angle */,
|
||||
XcmsFloat /* L_star */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELabQueryMaxL (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue_angle */,
|
||||
XcmsFloat /* chroma */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELabQueryMaxLC (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue_angle */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELabQueryMinL (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue_angle */,
|
||||
XcmsFloat /* chroma */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELabToCIEXYZ (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* white_point */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELabWhiteShiftColors(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* initial_white_point*/,
|
||||
XcmsColor* /* target_white_point*/,
|
||||
XcmsColorFormat /* target_format */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELuvClipL(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
unsigned int /* index */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELuvClipLuv(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
unsigned int /* index */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELuvClipuv(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
unsigned int /* index */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELuvQueryMaxC (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue_angle */,
|
||||
XcmsFloat /* L_star */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELuvQueryMaxL (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue_angle */,
|
||||
XcmsFloat /* chroma */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELuvQueryMaxLC (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue_angle */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELuvQueryMinL (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue_angle */,
|
||||
XcmsFloat /* chroma */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELuvToCIEuvY (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* white_point */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */
|
||||
);
|
||||
|
||||
extern Status XcmsCIELuvWhiteShiftColors(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* initial_white_point*/,
|
||||
XcmsColor* /* target_white_point*/,
|
||||
XcmsColorFormat /* target_format */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIEXYZToCIELab (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* white_point */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */
|
||||
);
|
||||
|
||||
extern Status XcmsCIEXYZToCIEuvY (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* white_point */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */
|
||||
);
|
||||
|
||||
extern Status XcmsCIEXYZToCIExyY (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* white_point */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */
|
||||
);
|
||||
|
||||
extern Status XcmsCIEXYZToRGBi (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsCIEuvYToCIELuv (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* white_point */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */
|
||||
);
|
||||
|
||||
extern Status XcmsCIEuvYToCIEXYZ (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* white_point */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */
|
||||
);
|
||||
|
||||
extern Status XcmsCIEuvYToTekHVC (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* white_point */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */
|
||||
);
|
||||
|
||||
extern Status XcmsCIExyYToCIEXYZ (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* white_point */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */
|
||||
);
|
||||
|
||||
extern XcmsColor *XcmsClientWhitePointOfCCC (
|
||||
XcmsCCC /* ccc */
|
||||
);
|
||||
|
||||
extern Status XcmsConvertColors (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colorArry_in_out */,
|
||||
unsigned int /* nColors */,
|
||||
XcmsColorFormat /* targetFormat */,
|
||||
Bool* /* compArry_return */
|
||||
);
|
||||
|
||||
extern XcmsCCC XcmsCreateCCC (
|
||||
Display* /* dpy */,
|
||||
int /* screenNumber */,
|
||||
Visual* /* visual */,
|
||||
XcmsColor* /* clientWhitePt */,
|
||||
XcmsCompressionProc /* gamutCompProc */,
|
||||
XPointer /* gamutCompClientData */,
|
||||
XcmsWhiteAdjustProc /* whitePtAdjProc */,
|
||||
XPointer /* whitePtAdjClientData */
|
||||
);
|
||||
|
||||
extern XcmsCCC XcmsDefaultCCC (
|
||||
Display* /* dpy */,
|
||||
int /* screenNumber */
|
||||
);
|
||||
|
||||
extern Display *XcmsDisplayOfCCC (
|
||||
XcmsCCC /* ccc */
|
||||
);
|
||||
|
||||
extern XcmsColorFormat XcmsFormatOfPrefix (
|
||||
char* /* prefix */
|
||||
);
|
||||
|
||||
extern void XcmsFreeCCC (
|
||||
XcmsCCC /* ccc */
|
||||
);
|
||||
|
||||
extern Status XcmsLookupColor (
|
||||
Display* /* dpy */,
|
||||
Colormap /* colormap */,
|
||||
_Xconst char* /* color_string */,
|
||||
XcmsColor* /* pColor_exact_in_out */,
|
||||
XcmsColor* /* pColor_scrn_in_out */,
|
||||
XcmsColorFormat /* result_format */
|
||||
);
|
||||
|
||||
extern char *XcmsPrefixOfFormat (
|
||||
XcmsColorFormat /* id */
|
||||
);
|
||||
|
||||
extern Status XcmsQueryBlack (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColorFormat /* target_format */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsQueryBlue (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColorFormat /* target_format */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsQueryColor (
|
||||
Display* /* dpy */,
|
||||
Colormap /* colormap */,
|
||||
XcmsColor* /* pColor_in_out */,
|
||||
XcmsColorFormat /* result_format */
|
||||
);
|
||||
|
||||
extern Status XcmsQueryColors (
|
||||
Display* /* dpy */,
|
||||
Colormap /* colormap */,
|
||||
XcmsColor* /* colorArry_in_out */,
|
||||
unsigned int /* nColors */,
|
||||
XcmsColorFormat /* result_format */
|
||||
);
|
||||
|
||||
extern Status XcmsQueryGreen (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColorFormat /* target_format */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsQueryRed (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColorFormat /* target_format */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsQueryWhite (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColorFormat /* target_format */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsRGBiToCIEXYZ (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsRGBiToRGB (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsRGBToRGBi (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern int XcmsScreenNumberOfCCC (
|
||||
XcmsCCC /* ccc */
|
||||
);
|
||||
|
||||
extern XcmsColor *XcmsScreenWhitePointOfCCC (
|
||||
XcmsCCC /* ccc */
|
||||
);
|
||||
|
||||
extern XcmsCCC XcmsSetCCCOfColormap(
|
||||
Display* /* dpy */,
|
||||
Colormap /* colormap */,
|
||||
XcmsCCC /* ccc */
|
||||
);
|
||||
|
||||
extern XcmsCompressionProc XcmsSetCompressionProc (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsCompressionProc /* compression_proc */,
|
||||
XPointer /* client_data */
|
||||
);
|
||||
|
||||
extern XcmsWhiteAdjustProc XcmsSetWhiteAdjustProc (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsWhiteAdjustProc /* white_adjust_proc */,
|
||||
XPointer /* client_data */
|
||||
);
|
||||
|
||||
extern Status XcmsSetWhitePoint (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* color */
|
||||
);
|
||||
|
||||
extern Status XcmsStoreColor (
|
||||
Display* /* dpy */,
|
||||
Colormap /* colormap */,
|
||||
XcmsColor* /* pColor_in */
|
||||
);
|
||||
|
||||
extern Status XcmsStoreColors (
|
||||
Display* /* dpy */,
|
||||
Colormap /* colormap */,
|
||||
XcmsColor* /* colorArry_in */,
|
||||
unsigned int /* nColors */,
|
||||
Bool* /* compArry_return */
|
||||
);
|
||||
|
||||
extern Status XcmsTekHVCClipC(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
unsigned int /* index */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsTekHVCClipV(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
unsigned int /* index */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsTekHVCClipVC(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
unsigned int /* index */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Status XcmsTekHVCQueryMaxC (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue */,
|
||||
XcmsFloat /* value */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsTekHVCQueryMaxV (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue */,
|
||||
XcmsFloat /* chroma */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsTekHVCQueryMaxVC (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsTekHVCQueryMaxVSamples (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue */,
|
||||
XcmsColor* /* colors_return */,
|
||||
unsigned int /* nsamples */
|
||||
);
|
||||
|
||||
extern Status XcmsTekHVCQueryMinV (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsFloat /* hue */,
|
||||
XcmsFloat /* chroma */,
|
||||
XcmsColor* /* color_return */
|
||||
);
|
||||
|
||||
extern Status XcmsTekHVCToCIEuvY (
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* white_point */,
|
||||
XcmsColor* /* colors */,
|
||||
unsigned int /* ncolors */
|
||||
);
|
||||
|
||||
extern Status XcmsTekHVCWhiteShiftColors(
|
||||
XcmsCCC /* ccc */,
|
||||
XcmsColor* /* initial_white_point*/,
|
||||
XcmsColor* /* target_white_point*/,
|
||||
XcmsColorFormat /* target_format */,
|
||||
XcmsColor* /* colors_in_out */,
|
||||
unsigned int /* ncolors */,
|
||||
Bool* /* compression_flags_return */
|
||||
);
|
||||
|
||||
extern Visual *XcmsVisualOfCCC (
|
||||
XcmsCCC /* ccc */
|
||||
);
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _X11_XCMS_H_ */
|
|
@ -0,0 +1,500 @@
|
|||
/* include/X11/Xcursor/Xcursor.h. Generated from Xcursor.h.in by configure. */
|
||||
/*
|
||||
* Copyright © 2002 Keith Packard
|
||||
*
|
||||
* 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, and that the name of Keith Packard not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. Keith Packard makes no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL KEITH PACKARD 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.
|
||||
*/
|
||||
|
||||
#ifndef _XCURSOR_H_
|
||||
#define _XCURSOR_H_
|
||||
#include <stdio.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
typedef int XcursorBool;
|
||||
typedef unsigned int XcursorUInt;
|
||||
|
||||
typedef XcursorUInt XcursorDim;
|
||||
typedef XcursorUInt XcursorPixel;
|
||||
|
||||
#define XcursorTrue 1
|
||||
#define XcursorFalse 0
|
||||
|
||||
/*
|
||||
* Cursor files start with a header. The header
|
||||
* contains a magic number, a version number and a
|
||||
* table of contents which has type and offset information
|
||||
* for the remaining tables in the file.
|
||||
*
|
||||
* File minor versions increment for compatible changes
|
||||
* File major versions increment for incompatible changes (never, we hope)
|
||||
*
|
||||
* Chunks of the same type are always upward compatible. Incompatible
|
||||
* changes are made with new chunk types; the old data can remain under
|
||||
* the old type. Upward compatible changes can add header data as the
|
||||
* header lengths are specified in the file.
|
||||
*
|
||||
* File:
|
||||
* FileHeader
|
||||
* LISTofChunk
|
||||
*
|
||||
* FileHeader:
|
||||
* CARD32 magic magic number
|
||||
* CARD32 header bytes in file header
|
||||
* CARD32 version file version
|
||||
* CARD32 ntoc number of toc entries
|
||||
* LISTofFileToc toc table of contents
|
||||
*
|
||||
* FileToc:
|
||||
* CARD32 type entry type
|
||||
* CARD32 subtype entry subtype (size for images)
|
||||
* CARD32 position absolute file position
|
||||
*/
|
||||
|
||||
#define XCURSOR_MAGIC 0x72756358 /* "Xcur" LSBFirst */
|
||||
|
||||
/*
|
||||
* Current Xcursor version number. Will be substituted by configure
|
||||
* from the version in the libXcursor configure.ac file.
|
||||
*/
|
||||
|
||||
#define XCURSOR_LIB_MAJOR 1
|
||||
#define XCURSOR_LIB_MINOR 1
|
||||
#define XCURSOR_LIB_REVISION 15
|
||||
#define XCURSOR_LIB_VERSION ((XCURSOR_LIB_MAJOR * 10000) + \
|
||||
(XCURSOR_LIB_MINOR * 100) + \
|
||||
(XCURSOR_LIB_REVISION))
|
||||
|
||||
/*
|
||||
* This version number is stored in cursor files; changes to the
|
||||
* file format require updating this version number
|
||||
*/
|
||||
#define XCURSOR_FILE_MAJOR 1
|
||||
#define XCURSOR_FILE_MINOR 0
|
||||
#define XCURSOR_FILE_VERSION ((XCURSOR_FILE_MAJOR << 16) | (XCURSOR_FILE_MINOR))
|
||||
#define XCURSOR_FILE_HEADER_LEN (4 * 4)
|
||||
#define XCURSOR_FILE_TOC_LEN (3 * 4)
|
||||
|
||||
typedef struct _XcursorFileToc {
|
||||
XcursorUInt type; /* chunk type */
|
||||
XcursorUInt subtype; /* subtype (size for images) */
|
||||
XcursorUInt position; /* absolute position in file */
|
||||
} XcursorFileToc;
|
||||
|
||||
typedef struct _XcursorFileHeader {
|
||||
XcursorUInt magic; /* magic number */
|
||||
XcursorUInt header; /* byte length of header */
|
||||
XcursorUInt version; /* file version number */
|
||||
XcursorUInt ntoc; /* number of toc entries */
|
||||
XcursorFileToc *tocs; /* table of contents */
|
||||
} XcursorFileHeader;
|
||||
|
||||
/*
|
||||
* The rest of the file is a list of chunks, each tagged by type
|
||||
* and version.
|
||||
*
|
||||
* Chunk:
|
||||
* ChunkHeader
|
||||
* <extra type-specific header fields>
|
||||
* <type-specific data>
|
||||
*
|
||||
* ChunkHeader:
|
||||
* CARD32 header bytes in chunk header + type header
|
||||
* CARD32 type chunk type
|
||||
* CARD32 subtype chunk subtype
|
||||
* CARD32 version chunk type version
|
||||
*/
|
||||
|
||||
#define XCURSOR_CHUNK_HEADER_LEN (4 * 4)
|
||||
|
||||
typedef struct _XcursorChunkHeader {
|
||||
XcursorUInt header; /* bytes in chunk header */
|
||||
XcursorUInt type; /* chunk type */
|
||||
XcursorUInt subtype; /* chunk subtype (size for images) */
|
||||
XcursorUInt version; /* version of this type */
|
||||
} XcursorChunkHeader;
|
||||
|
||||
/*
|
||||
* Here's a list of the known chunk types
|
||||
*/
|
||||
|
||||
/*
|
||||
* Comments consist of a 4-byte length field followed by
|
||||
* UTF-8 encoded text
|
||||
*
|
||||
* Comment:
|
||||
* ChunkHeader header chunk header
|
||||
* CARD32 length bytes in text
|
||||
* LISTofCARD8 text UTF-8 encoded text
|
||||
*/
|
||||
|
||||
#define XCURSOR_COMMENT_TYPE 0xfffe0001
|
||||
#define XCURSOR_COMMENT_VERSION 1
|
||||
#define XCURSOR_COMMENT_HEADER_LEN (XCURSOR_CHUNK_HEADER_LEN + (1 *4))
|
||||
#define XCURSOR_COMMENT_COPYRIGHT 1
|
||||
#define XCURSOR_COMMENT_LICENSE 2
|
||||
#define XCURSOR_COMMENT_OTHER 3
|
||||
#define XCURSOR_COMMENT_MAX_LEN 0x100000
|
||||
|
||||
typedef struct _XcursorComment {
|
||||
XcursorUInt version;
|
||||
XcursorUInt comment_type;
|
||||
char *comment;
|
||||
} XcursorComment;
|
||||
|
||||
/*
|
||||
* Each cursor image occupies a separate image chunk.
|
||||
* The length of the image header follows the chunk header
|
||||
* so that future versions can extend the header without
|
||||
* breaking older applications
|
||||
*
|
||||
* Image:
|
||||
* ChunkHeader header chunk header
|
||||
* CARD32 width actual width
|
||||
* CARD32 height actual height
|
||||
* CARD32 xhot hot spot x
|
||||
* CARD32 yhot hot spot y
|
||||
* CARD32 delay animation delay
|
||||
* LISTofCARD32 pixels ARGB pixels
|
||||
*/
|
||||
|
||||
#define XCURSOR_IMAGE_TYPE 0xfffd0002
|
||||
#define XCURSOR_IMAGE_VERSION 1
|
||||
#define XCURSOR_IMAGE_HEADER_LEN (XCURSOR_CHUNK_HEADER_LEN + (5*4))
|
||||
#define XCURSOR_IMAGE_MAX_SIZE 0x7fff /* 32767x32767 max cursor size */
|
||||
|
||||
typedef struct _XcursorImage {
|
||||
XcursorUInt version; /* version of the image data */
|
||||
XcursorDim size; /* nominal size for matching */
|
||||
XcursorDim width; /* actual width */
|
||||
XcursorDim height; /* actual height */
|
||||
XcursorDim xhot; /* hot spot x (must be inside image) */
|
||||
XcursorDim yhot; /* hot spot y (must be inside image) */
|
||||
XcursorUInt delay; /* animation delay to next frame (ms) */
|
||||
XcursorPixel *pixels; /* pointer to pixels */
|
||||
} XcursorImage;
|
||||
|
||||
/*
|
||||
* Other data structures exposed by the library API
|
||||
*/
|
||||
typedef struct _XcursorImages {
|
||||
int nimage; /* number of images */
|
||||
XcursorImage **images; /* array of XcursorImage pointers */
|
||||
char *name; /* name used to load images */
|
||||
} XcursorImages;
|
||||
|
||||
typedef struct _XcursorCursors {
|
||||
Display *dpy; /* Display holding cursors */
|
||||
int ref; /* reference count */
|
||||
int ncursor; /* number of cursors */
|
||||
Cursor *cursors; /* array of cursors */
|
||||
} XcursorCursors;
|
||||
|
||||
typedef struct _XcursorAnimate {
|
||||
XcursorCursors *cursors; /* list of cursors to use */
|
||||
int sequence; /* which cursor is next */
|
||||
} XcursorAnimate;
|
||||
|
||||
typedef struct _XcursorFile XcursorFile;
|
||||
|
||||
struct _XcursorFile {
|
||||
void *closure;
|
||||
int (*read) (XcursorFile *file, unsigned char *buf, int len);
|
||||
int (*write) (XcursorFile *file, unsigned char *buf, int len);
|
||||
int (*seek) (XcursorFile *file, long offset, int whence);
|
||||
};
|
||||
|
||||
typedef struct _XcursorComments {
|
||||
int ncomment; /* number of comments */
|
||||
XcursorComment **comments; /* array of XcursorComment pointers */
|
||||
} XcursorComments;
|
||||
|
||||
#define XCURSOR_CORE_THEME "core"
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
/*
|
||||
* Manage Image objects
|
||||
*/
|
||||
XcursorImage *
|
||||
XcursorImageCreate (int width, int height);
|
||||
|
||||
void
|
||||
XcursorImageDestroy (XcursorImage *image);
|
||||
|
||||
/*
|
||||
* Manage Images objects
|
||||
*/
|
||||
XcursorImages *
|
||||
XcursorImagesCreate (int size);
|
||||
|
||||
void
|
||||
XcursorImagesDestroy (XcursorImages *images);
|
||||
|
||||
void
|
||||
XcursorImagesSetName (XcursorImages *images, const char *name);
|
||||
|
||||
/*
|
||||
* Manage Cursor objects
|
||||
*/
|
||||
XcursorCursors *
|
||||
XcursorCursorsCreate (Display *dpy, int size);
|
||||
|
||||
void
|
||||
XcursorCursorsDestroy (XcursorCursors *cursors);
|
||||
|
||||
/*
|
||||
* Manage Animate objects
|
||||
*/
|
||||
XcursorAnimate *
|
||||
XcursorAnimateCreate (XcursorCursors *cursors);
|
||||
|
||||
void
|
||||
XcursorAnimateDestroy (XcursorAnimate *animate);
|
||||
|
||||
Cursor
|
||||
XcursorAnimateNext (XcursorAnimate *animate);
|
||||
|
||||
/*
|
||||
* Manage Comment objects
|
||||
*/
|
||||
XcursorComment *
|
||||
XcursorCommentCreate (XcursorUInt comment_type, int length);
|
||||
|
||||
void
|
||||
XcursorCommentDestroy (XcursorComment *comment);
|
||||
|
||||
XcursorComments *
|
||||
XcursorCommentsCreate (int size);
|
||||
|
||||
void
|
||||
XcursorCommentsDestroy (XcursorComments *comments);
|
||||
|
||||
/*
|
||||
* XcursorFile/Image APIs
|
||||
*/
|
||||
XcursorImage *
|
||||
XcursorXcFileLoadImage (XcursorFile *file, int size);
|
||||
|
||||
XcursorImages *
|
||||
XcursorXcFileLoadImages (XcursorFile *file, int size);
|
||||
|
||||
XcursorImages *
|
||||
XcursorXcFileLoadAllImages (XcursorFile *file);
|
||||
|
||||
XcursorBool
|
||||
XcursorXcFileLoad (XcursorFile *file,
|
||||
XcursorComments **commentsp,
|
||||
XcursorImages **imagesp);
|
||||
|
||||
XcursorBool
|
||||
XcursorXcFileSave (XcursorFile *file,
|
||||
const XcursorComments *comments,
|
||||
const XcursorImages *images);
|
||||
|
||||
/*
|
||||
* FILE/Image APIs
|
||||
*/
|
||||
XcursorImage *
|
||||
XcursorFileLoadImage (FILE *file, int size);
|
||||
|
||||
XcursorImages *
|
||||
XcursorFileLoadImages (FILE *file, int size);
|
||||
|
||||
XcursorImages *
|
||||
XcursorFileLoadAllImages (FILE *file);
|
||||
|
||||
XcursorBool
|
||||
XcursorFileLoad (FILE *file,
|
||||
XcursorComments **commentsp,
|
||||
XcursorImages **imagesp);
|
||||
|
||||
XcursorBool
|
||||
XcursorFileSaveImages (FILE *file, const XcursorImages *images);
|
||||
|
||||
XcursorBool
|
||||
XcursorFileSave (FILE * file,
|
||||
const XcursorComments *comments,
|
||||
const XcursorImages *images);
|
||||
|
||||
/*
|
||||
* Filename/Image APIs
|
||||
*/
|
||||
XcursorImage *
|
||||
XcursorFilenameLoadImage (const char *filename, int size);
|
||||
|
||||
XcursorImages *
|
||||
XcursorFilenameLoadImages (const char *filename, int size);
|
||||
|
||||
XcursorImages *
|
||||
XcursorFilenameLoadAllImages (const char *filename);
|
||||
|
||||
XcursorBool
|
||||
XcursorFilenameLoad (const char *file,
|
||||
XcursorComments **commentsp,
|
||||
XcursorImages **imagesp);
|
||||
|
||||
XcursorBool
|
||||
XcursorFilenameSaveImages (const char *filename, const XcursorImages *images);
|
||||
|
||||
XcursorBool
|
||||
XcursorFilenameSave (const char *file,
|
||||
const XcursorComments *comments,
|
||||
const XcursorImages *images);
|
||||
|
||||
/*
|
||||
* Library/Image APIs
|
||||
*/
|
||||
XcursorImage *
|
||||
XcursorLibraryLoadImage (const char *library, const char *theme, int size);
|
||||
|
||||
XcursorImages *
|
||||
XcursorLibraryLoadImages (const char *library, const char *theme, int size);
|
||||
|
||||
/*
|
||||
* Library/shape API
|
||||
*/
|
||||
|
||||
const char *
|
||||
XcursorLibraryPath (void);
|
||||
|
||||
int
|
||||
XcursorLibraryShape (const char *library);
|
||||
|
||||
/*
|
||||
* Image/Cursor APIs
|
||||
*/
|
||||
|
||||
Cursor
|
||||
XcursorImageLoadCursor (Display *dpy, const XcursorImage *image);
|
||||
|
||||
XcursorCursors *
|
||||
XcursorImagesLoadCursors (Display *dpy, const XcursorImages *images);
|
||||
|
||||
Cursor
|
||||
XcursorImagesLoadCursor (Display *dpy, const XcursorImages *images);
|
||||
|
||||
/*
|
||||
* Filename/Cursor APIs
|
||||
*/
|
||||
Cursor
|
||||
XcursorFilenameLoadCursor (Display *dpy, const char *file);
|
||||
|
||||
XcursorCursors *
|
||||
XcursorFilenameLoadCursors (Display *dpy, const char *file);
|
||||
|
||||
/*
|
||||
* Library/Cursor APIs
|
||||
*/
|
||||
Cursor
|
||||
XcursorLibraryLoadCursor (Display *dpy, const char *file);
|
||||
|
||||
XcursorCursors *
|
||||
XcursorLibraryLoadCursors (Display *dpy, const char *file);
|
||||
|
||||
/*
|
||||
* Shape/Image APIs
|
||||
*/
|
||||
|
||||
XcursorImage *
|
||||
XcursorShapeLoadImage (unsigned int shape, const char *theme, int size);
|
||||
|
||||
XcursorImages *
|
||||
XcursorShapeLoadImages (unsigned int shape, const char *theme, int size);
|
||||
|
||||
/*
|
||||
* Shape/Cursor APIs
|
||||
*/
|
||||
Cursor
|
||||
XcursorShapeLoadCursor (Display *dpy, unsigned int shape);
|
||||
|
||||
XcursorCursors *
|
||||
XcursorShapeLoadCursors (Display *dpy, unsigned int shape);
|
||||
|
||||
/*
|
||||
* This is the function called by Xlib when attempting to
|
||||
* load cursors from XCreateGlyphCursor. The interface must
|
||||
* not change as Xlib loads 'libXcursor.so' instead of
|
||||
* a specific major version
|
||||
*/
|
||||
Cursor
|
||||
XcursorTryShapeCursor (Display *dpy,
|
||||
Font source_font,
|
||||
Font mask_font,
|
||||
unsigned int source_char,
|
||||
unsigned int mask_char,
|
||||
XColor _Xconst *foreground,
|
||||
XColor _Xconst *background);
|
||||
|
||||
void
|
||||
XcursorNoticeCreateBitmap (Display *dpy,
|
||||
Pixmap pid,
|
||||
unsigned int width,
|
||||
unsigned int height);
|
||||
|
||||
void
|
||||
XcursorNoticePutBitmap (Display *dpy,
|
||||
Drawable draw,
|
||||
XImage *image);
|
||||
|
||||
Cursor
|
||||
XcursorTryShapeBitmapCursor (Display *dpy,
|
||||
Pixmap source,
|
||||
Pixmap mask,
|
||||
XColor *foreground,
|
||||
XColor *background,
|
||||
unsigned int x,
|
||||
unsigned int y);
|
||||
|
||||
#define XCURSOR_BITMAP_HASH_SIZE 16
|
||||
|
||||
void
|
||||
XcursorImageHash (XImage *image,
|
||||
unsigned char hash[XCURSOR_BITMAP_HASH_SIZE]);
|
||||
|
||||
/*
|
||||
* Display information APIs
|
||||
*/
|
||||
XcursorBool
|
||||
XcursorSupportsARGB (Display *dpy);
|
||||
|
||||
XcursorBool
|
||||
XcursorSupportsAnim (Display *dpy);
|
||||
|
||||
XcursorBool
|
||||
XcursorSetDefaultSize (Display *dpy, int size);
|
||||
|
||||
int
|
||||
XcursorGetDefaultSize (Display *dpy);
|
||||
|
||||
XcursorBool
|
||||
XcursorSetTheme (Display *dpy, const char *theme);
|
||||
|
||||
char *
|
||||
XcursorGetTheme (Display *dpy);
|
||||
|
||||
XcursorBool
|
||||
XcursorGetThemeCore (Display *dpy);
|
||||
|
||||
XcursorBool
|
||||
XcursorSetThemeCore (Display *dpy, XcursorBool theme_core);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif
|
|
@ -0,0 +1,108 @@
|
|||
/***********************************************************
|
||||
|
||||
Copyright (c) 1999 The XFree86 Project Inc.
|
||||
|
||||
All Rights Reserved.
|
||||
|
||||
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 XFree86 Project
|
||||
Inc. 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 XFree86 Project Inc..
|
||||
|
||||
*/
|
||||
|
||||
/**
|
||||
** Types definitions shared between server and clients
|
||||
**/
|
||||
|
||||
#ifndef _XDEFS_H
|
||||
#define _XDEFS_H
|
||||
|
||||
#ifdef _XSERVER64
|
||||
#include <X11/Xmd.h>
|
||||
#endif
|
||||
|
||||
#ifndef _XTYPEDEF_ATOM
|
||||
# define _XTYPEDEF_ATOM
|
||||
# ifndef _XSERVER64
|
||||
typedef unsigned long Atom;
|
||||
# else
|
||||
typedef CARD32 Atom;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef Bool
|
||||
# ifndef _XTYPEDEF_BOOL
|
||||
# define _XTYPEDEF_BOOL
|
||||
typedef int Bool;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef _XTYPEDEF_POINTER
|
||||
# define _XTYPEDEF_POINTER
|
||||
typedef void *pointer;
|
||||
#endif
|
||||
|
||||
#ifndef _XTYPEDEF_CLIENTPTR
|
||||
typedef struct _Client *ClientPtr;
|
||||
# define _XTYPEDEF_CLIENTPTR
|
||||
#endif
|
||||
|
||||
#ifndef _XTYPEDEF_XID
|
||||
# define _XTYPEDEF_XID
|
||||
# ifndef _XSERVER64
|
||||
typedef unsigned long XID;
|
||||
# else
|
||||
typedef CARD32 XID;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef _XTYPEDEF_MASK
|
||||
# define _XTYPEDEF_MASK
|
||||
# ifndef _XSERVER64
|
||||
typedef unsigned long Mask;
|
||||
# else
|
||||
typedef CARD32 Mask;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef _XTYPEDEF_FONTPTR
|
||||
# define _XTYPEDEF_FONTPTR
|
||||
typedef struct _Font *FontPtr; /* also in fonts/include/font.h */
|
||||
#endif
|
||||
|
||||
#ifndef _XTYPEDEF_FONT
|
||||
# define _XTYPEDEF_FONT
|
||||
typedef XID Font;
|
||||
#endif
|
||||
|
||||
#ifndef _XTYPEDEF_FSID
|
||||
# ifndef _XSERVER64
|
||||
typedef unsigned long FSID;
|
||||
# else
|
||||
typedef CARD32 FSID;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
typedef FSID AccContext;
|
||||
|
||||
/* OS independent time value
|
||||
XXX Should probably go in Xos.h */
|
||||
typedef struct timeval **OSTimePtr;
|
||||
|
||||
|
||||
typedef void (* BlockHandlerProcPtr)(void * /* blockData */,
|
||||
OSTimePtr /* pTimeout */,
|
||||
void * /* pReadmask */);
|
||||
|
||||
#endif
|
|
@ -0,0 +1,181 @@
|
|||
/*
|
||||
* Copyright 1989 Network Computing Devices, Inc., Mountain View, California.
|
||||
*
|
||||
* 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 N.C.D. not be used in advertising or
|
||||
* publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission. N.C.D. makes no representations about the
|
||||
* suitability of this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _XDMCP_H_
|
||||
#define _XDMCP_H_
|
||||
|
||||
#include <X11/Xmd.h>
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
#define XDM_PROTOCOL_VERSION 1
|
||||
#define XDM_UDP_PORT 177
|
||||
|
||||
/* IANA has assigned FF0X:0:0:0:0:0:0:12B as the permanently assigned
|
||||
* multicast addresses for XDMCP, where X in the prefix may be replaced
|
||||
* by any valid scope identifier, such as 1 for Node-Local, 2 for Link-Local,
|
||||
* 5 for Site-Local, and so on. We set the default here to the Link-Local
|
||||
* version to most closely match the old IPv4 subnet broadcast behavior.
|
||||
* Both xdm and X -query allow specifying a different address if a different
|
||||
* scope is defined.
|
||||
*/
|
||||
#define XDM_DEFAULT_MCAST_ADDR6 "ff02:0:0:0:0:0:0:12b"
|
||||
|
||||
#define XDM_MAX_MSGLEN 8192
|
||||
#define XDM_MIN_RTX 2
|
||||
#define XDM_MAX_RTX 32
|
||||
#define XDM_RTX_LIMIT 7
|
||||
#define XDM_KA_RTX_LIMIT 4
|
||||
#define XDM_DEF_DORMANCY (3 * 60) /* 3 minutes */
|
||||
#define XDM_MAX_DORMANCY (24 * 60 * 60) /* 24 hours */
|
||||
|
||||
typedef enum {
|
||||
BROADCAST_QUERY = 1, QUERY, INDIRECT_QUERY, FORWARD_QUERY,
|
||||
WILLING, UNWILLING, REQUEST, ACCEPT, DECLINE, MANAGE, REFUSE,
|
||||
FAILED, KEEPALIVE, ALIVE
|
||||
} xdmOpCode;
|
||||
|
||||
typedef enum {
|
||||
XDM_QUERY, XDM_BROADCAST, XDM_INDIRECT, XDM_COLLECT_QUERY,
|
||||
XDM_COLLECT_BROADCAST_QUERY, XDM_COLLECT_INDIRECT_QUERY,
|
||||
XDM_START_CONNECTION, XDM_AWAIT_REQUEST_RESPONSE,
|
||||
XDM_AWAIT_MANAGE_RESPONSE, XDM_MANAGE, XDM_RUN_SESSION, XDM_OFF,
|
||||
XDM_AWAIT_USER_INPUT, XDM_KEEPALIVE, XDM_AWAIT_ALIVE_RESPONSE,
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
XDM_MULTICAST, XDM_COLLECT_MULTICAST_QUERY,
|
||||
#endif
|
||||
XDM_KEEP_ME_LAST
|
||||
} xdmcp_states;
|
||||
|
||||
#ifdef NOTDEF
|
||||
/* table of hosts */
|
||||
|
||||
#define XDM_MAX_STR_LEN 21
|
||||
#define XDM_MAX_HOSTS 20
|
||||
struct xdm_host_table {
|
||||
struct sockaddr_in sockaddr;
|
||||
char name[XDM_MAX_STR_LEN];
|
||||
char status[XDM_MAX_STR_LEN];
|
||||
};
|
||||
#endif /* NOTDEF */
|
||||
|
||||
typedef CARD8 *CARD8Ptr;
|
||||
typedef CARD16 *CARD16Ptr;
|
||||
typedef CARD32 *CARD32Ptr;
|
||||
|
||||
typedef struct _ARRAY8 {
|
||||
CARD16 length;
|
||||
CARD8Ptr data;
|
||||
} ARRAY8, *ARRAY8Ptr;
|
||||
|
||||
typedef struct _ARRAY16 {
|
||||
CARD8 length;
|
||||
CARD16Ptr data;
|
||||
} ARRAY16, *ARRAY16Ptr;
|
||||
|
||||
typedef struct _ARRAY32 {
|
||||
CARD8 length;
|
||||
CARD32Ptr data;
|
||||
} ARRAY32, *ARRAY32Ptr;
|
||||
|
||||
typedef struct _ARRAYofARRAY8 {
|
||||
CARD8 length;
|
||||
ARRAY8Ptr data;
|
||||
} ARRAYofARRAY8, *ARRAYofARRAY8Ptr;
|
||||
|
||||
typedef struct _XdmcpHeader {
|
||||
CARD16 version, opcode, length;
|
||||
} XdmcpHeader, *XdmcpHeaderPtr;
|
||||
|
||||
typedef struct _XdmcpBuffer {
|
||||
BYTE *data;
|
||||
int size; /* size of buffer pointed by to data */
|
||||
int pointer; /* current index into data */
|
||||
int count; /* bytes read from network into data */
|
||||
} XdmcpBuffer, *XdmcpBufferPtr;
|
||||
|
||||
typedef struct _XdmAuthKey {
|
||||
BYTE data[8];
|
||||
} XdmAuthKeyRec, *XdmAuthKeyPtr;
|
||||
|
||||
|
||||
/* implementation-independent network address structure.
|
||||
Equiv to sockaddr* for sockets. */
|
||||
|
||||
typedef char *XdmcpNetaddr;
|
||||
|
||||
extern int XdmcpWriteARRAY16(XdmcpBufferPtr buffer, const ARRAY16Ptr array);
|
||||
extern int XdmcpWriteARRAY32(XdmcpBufferPtr buffer, const ARRAY32Ptr array);
|
||||
extern int XdmcpWriteARRAY8(XdmcpBufferPtr buffer, const ARRAY8Ptr array);
|
||||
extern int XdmcpWriteARRAYofARRAY8(XdmcpBufferPtr buffer, const ARRAYofARRAY8Ptr array);
|
||||
extern int XdmcpWriteCARD16(XdmcpBufferPtr buffer, unsigned value);
|
||||
extern int XdmcpWriteCARD32(XdmcpBufferPtr buffer, unsigned value);
|
||||
extern int XdmcpWriteCARD8(XdmcpBufferPtr buffer, unsigned value);
|
||||
extern int XdmcpWriteHeader(XdmcpBufferPtr buffer, const XdmcpHeaderPtr header);
|
||||
|
||||
extern int XdmcpFlush(int fd, XdmcpBufferPtr buffer, XdmcpNetaddr to, int tolen);
|
||||
|
||||
extern int XdmcpReadARRAY16(XdmcpBufferPtr buffer, ARRAY16Ptr array);
|
||||
extern int XdmcpReadARRAY32(XdmcpBufferPtr buffer, ARRAY32Ptr array);
|
||||
extern int XdmcpReadARRAY8(XdmcpBufferPtr buffer, ARRAY8Ptr array);
|
||||
extern int XdmcpReadARRAYofARRAY8(XdmcpBufferPtr buffer, ARRAYofARRAY8Ptr array);
|
||||
extern int XdmcpReadCARD16(XdmcpBufferPtr buffer, CARD16Ptr valuep);
|
||||
extern int XdmcpReadCARD32(XdmcpBufferPtr buffer, CARD32Ptr valuep);
|
||||
extern int XdmcpReadCARD8(XdmcpBufferPtr buffer, CARD8Ptr valuep);
|
||||
extern int XdmcpReadHeader(XdmcpBufferPtr buffer, XdmcpHeaderPtr header);
|
||||
|
||||
extern int XdmcpFill(int fd, XdmcpBufferPtr buffer, XdmcpNetaddr from, int *fromlen);
|
||||
|
||||
extern int XdmcpReadRemaining(const XdmcpBufferPtr buffer);
|
||||
|
||||
extern void XdmcpDisposeARRAY8(ARRAY8Ptr array);
|
||||
extern void XdmcpDisposeARRAY16(ARRAY16Ptr array);
|
||||
extern void XdmcpDisposeARRAY32(ARRAY32Ptr array);
|
||||
extern void XdmcpDisposeARRAYofARRAY8(ARRAYofARRAY8Ptr array);
|
||||
|
||||
extern int XdmcpCopyARRAY8(const ARRAY8Ptr src, ARRAY8Ptr dst);
|
||||
|
||||
extern int XdmcpARRAY8Equal(const ARRAY8Ptr array1, const ARRAY8Ptr array2);
|
||||
|
||||
extern void XdmcpGenerateKey (XdmAuthKeyPtr key);
|
||||
extern void XdmcpIncrementKey (XdmAuthKeyPtr key);
|
||||
extern void XdmcpDecrementKey (XdmAuthKeyPtr key);
|
||||
#ifdef HASXDMAUTH
|
||||
extern void XdmcpWrap(unsigned char *input, unsigned char *wrapper, unsigned char *output, int bytes);
|
||||
extern void XdmcpUnwrap(unsigned char *input, unsigned char *wrapper, unsigned char *output, int bytes);
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
extern int XdmcpCompareKeys (const XdmAuthKeyPtr a, const XdmAuthKeyPtr b);
|
||||
|
||||
extern int XdmcpAllocARRAY16 (ARRAY16Ptr array, int length);
|
||||
extern int XdmcpAllocARRAY32 (ARRAY32Ptr array, int length);
|
||||
extern int XdmcpAllocARRAY8 (ARRAY8Ptr array, int length);
|
||||
extern int XdmcpAllocARRAYofARRAY8 (ARRAYofARRAY8Ptr array, int length);
|
||||
|
||||
extern int XdmcpReallocARRAY16 (ARRAY16Ptr array, int length);
|
||||
extern int XdmcpReallocARRAY32 (ARRAY32Ptr array, int length);
|
||||
extern int XdmcpReallocARRAY8 (ARRAY8Ptr array, int length);
|
||||
extern int XdmcpReallocARRAYofARRAY8 (ARRAYofARRAY8Ptr array, int length);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XDMCP_H_ */
|
|
@ -0,0 +1,221 @@
|
|||
/*
|
||||
*
|
||||
Copyright 1989, 1991, 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Definitions to make function prototypes manageable */
|
||||
|
||||
#ifndef _XFUNCPROTO_H_
|
||||
#define _XFUNCPROTO_H_
|
||||
|
||||
#ifndef NeedFunctionPrototypes
|
||||
#define NeedFunctionPrototypes 1
|
||||
#endif /* NeedFunctionPrototypes */
|
||||
|
||||
#ifndef NeedVarargsPrototypes
|
||||
#define NeedVarargsPrototypes 1
|
||||
#endif /* NeedVarargsPrototypes */
|
||||
|
||||
#if NeedFunctionPrototypes
|
||||
|
||||
#ifndef NeedNestedPrototypes
|
||||
#define NeedNestedPrototypes 1
|
||||
#endif /* NeedNestedPrototypes */
|
||||
|
||||
#ifndef _Xconst
|
||||
#define _Xconst const
|
||||
#endif /* _Xconst */
|
||||
|
||||
/* Function prototype configuration (see configure for more info) */
|
||||
#if !defined(NARROWPROTO) && \
|
||||
(defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__))
|
||||
#define NARROWPROTO
|
||||
#endif
|
||||
#ifndef FUNCPROTO
|
||||
#define FUNCPROTO 15
|
||||
#endif
|
||||
|
||||
#ifndef NeedWidePrototypes
|
||||
#ifdef NARROWPROTO
|
||||
#define NeedWidePrototypes 0
|
||||
#else
|
||||
#define NeedWidePrototypes 1 /* default to make interropt. easier */
|
||||
#endif
|
||||
#endif /* NeedWidePrototypes */
|
||||
|
||||
#endif /* NeedFunctionPrototypes */
|
||||
|
||||
#ifndef _XFUNCPROTOBEGIN
|
||||
#if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */
|
||||
#define _XFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */
|
||||
#define _XFUNCPROTOEND }
|
||||
#else
|
||||
#define _XFUNCPROTOBEGIN
|
||||
#define _XFUNCPROTOEND
|
||||
#endif
|
||||
#endif /* _XFUNCPROTOBEGIN */
|
||||
|
||||
/* http://clang.llvm.org/docs/LanguageExtensions.html#has-attribute */
|
||||
#ifndef __has_attribute
|
||||
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
|
||||
#endif
|
||||
#ifndef __has_feature
|
||||
# define __has_feature(x) 0 /* Compatibility with non-clang compilers. */
|
||||
#endif
|
||||
#ifndef __has_extension
|
||||
# define __has_extension(x) 0 /* Compatibility with non-clang compilers. */
|
||||
#endif
|
||||
|
||||
/* Added in X11R6.9, so available in any version of modular xproto */
|
||||
#if __has_attribute(__sentinel__) || (defined(__GNUC__) && (__GNUC__ >= 4))
|
||||
# define _X_SENTINEL(x) __attribute__ ((__sentinel__(x)))
|
||||
#else
|
||||
# define _X_SENTINEL(x)
|
||||
#endif /* GNUC >= 4 */
|
||||
|
||||
/* Added in X11R6.9, so available in any version of modular xproto */
|
||||
#if (__has_attribute(visibility) || (defined(__GNUC__) && (__GNUC__ >= 4))) \
|
||||
&& !defined(__CYGWIN__) && !defined(__MINGW32__)
|
||||
# define _X_EXPORT __attribute__((visibility("default")))
|
||||
# define _X_HIDDEN __attribute__((visibility("hidden")))
|
||||
# define _X_INTERNAL __attribute__((visibility("internal")))
|
||||
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
|
||||
# define _X_EXPORT __global
|
||||
# define _X_HIDDEN __hidden
|
||||
# define _X_INTERNAL __hidden
|
||||
#else /* not gcc >= 4 and not Sun Studio >= 8 */
|
||||
# define _X_EXPORT
|
||||
# define _X_HIDDEN
|
||||
# define _X_INTERNAL
|
||||
#endif /* GNUC >= 4 */
|
||||
|
||||
/* Branch prediction hints for individual conditionals */
|
||||
/* requires xproto >= 7.0.9 */
|
||||
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
|
||||
# define _X_LIKELY(x) __builtin_expect(!!(x), 1)
|
||||
# define _X_UNLIKELY(x) __builtin_expect(!!(x), 0)
|
||||
#else /* not gcc >= 3.3 */
|
||||
# define _X_LIKELY(x) (x)
|
||||
# define _X_UNLIKELY(x) (x)
|
||||
#endif
|
||||
|
||||
/* Bulk branch prediction hints via marking error path functions as "cold" */
|
||||
/* requires xproto >= 7.0.25 */
|
||||
#if __has_attribute(__cold__) || \
|
||||
(defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 403)) /* 4.3+ */
|
||||
# define _X_COLD __attribute__((__cold__))
|
||||
#else
|
||||
# define _X_COLD /* nothing */
|
||||
#endif
|
||||
|
||||
/* Added in X11R6.9, so available in any version of modular xproto */
|
||||
#if __has_attribute(deprecated) \
|
||||
|| (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)) \
|
||||
|| (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5130))
|
||||
# define _X_DEPRECATED __attribute__((deprecated))
|
||||
#else /* not gcc >= 3.1 */
|
||||
# define _X_DEPRECATED
|
||||
#endif
|
||||
|
||||
/* requires xproto >= 7.0.30 */
|
||||
#if __has_extension(attribute_deprecated_with_message) || \
|
||||
(defined(__GNUC__) && ((__GNUC__ >= 5) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5))))
|
||||
# define _X_DEPRECATED_MSG(_msg) __attribute__((deprecated(_msg)))
|
||||
#else
|
||||
# define _X_DEPRECATED_MSG(_msg) _X_DEPRECATED
|
||||
#endif
|
||||
|
||||
/* requires xproto >= 7.0.17 */
|
||||
#if __has_attribute(noreturn) \
|
||||
|| (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \
|
||||
|| (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
|
||||
# define _X_NORETURN __attribute((noreturn))
|
||||
#else
|
||||
# define _X_NORETURN
|
||||
#endif /* GNUC */
|
||||
|
||||
/* Added in X11R6.9, so available in any version of modular xproto */
|
||||
#if __has_attribute(__format__) \
|
||||
|| defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 203)
|
||||
# define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y)))
|
||||
#else /* not gcc >= 2.3 */
|
||||
# define _X_ATTRIBUTE_PRINTF(x,y)
|
||||
#endif
|
||||
|
||||
/* requires xproto >= 7.0.22 - since this uses either gcc or C99 variable
|
||||
argument macros, must be only used inside #ifdef _X_NONNULL guards, as
|
||||
many legacy X clients are compiled in C89 mode still. */
|
||||
#if __has_attribute(nonnull) \
|
||||
&& defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */
|
||||
#define _X_NONNULL(...) __attribute__((nonnull(__VA_ARGS__)))
|
||||
#elif __has_attribute(nonnull) \
|
||||
|| defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
|
||||
#define _X_NONNULL(args...) __attribute__((nonnull(args)))
|
||||
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */
|
||||
#define _X_NONNULL(...) /* */
|
||||
#endif
|
||||
|
||||
/* requires xproto >= 7.0.22 */
|
||||
#if __has_attribute(__unused__) \
|
||||
|| defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)
|
||||
#define _X_UNUSED __attribute__((__unused__))
|
||||
#else
|
||||
#define _X_UNUSED /* */
|
||||
#endif
|
||||
|
||||
/* C99 keyword "inline" or equivalent extensions in pre-C99 compilers */
|
||||
/* requires xproto >= 7.0.9
|
||||
(introduced in 7.0.8 but didn't support all compilers until 7.0.9) */
|
||||
#if defined(inline) /* assume autoconf set it correctly */ || \
|
||||
(defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L)) /* C99 */ || \
|
||||
(defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550))
|
||||
# define _X_INLINE inline
|
||||
#elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */
|
||||
# define _X_INLINE __inline__
|
||||
#else
|
||||
# define _X_INLINE
|
||||
#endif
|
||||
|
||||
/* C99 keyword "restrict" or equivalent extensions in pre-C99 compilers */
|
||||
/* requires xproto >= 7.0.21 */
|
||||
#ifndef _X_RESTRICT_KYWD
|
||||
# if defined(restrict) /* assume autoconf set it correctly */ || \
|
||||
(defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */ \
|
||||
&& !defined(__cplusplus)) /* Workaround g++ issue on Solaris */
|
||||
# define _X_RESTRICT_KYWD restrict
|
||||
# elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */
|
||||
# define _X_RESTRICT_KYWD __restrict__
|
||||
# else
|
||||
# define _X_RESTRICT_KYWD
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* requires xproto >= 7.0.30 */
|
||||
#if __has_attribute(no_sanitize_thread)
|
||||
# define _X_NOTSAN __attribute__((no_sanitize_thread))
|
||||
#else
|
||||
# define _X_NOTSAN
|
||||
#endif
|
||||
|
||||
#endif /* _XFUNCPROTO_H_ */
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
*
|
||||
Copyright 1990, 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _XFUNCS_H_
|
||||
# define _XFUNCS_H_
|
||||
|
||||
# include <X11/Xosdefs.h>
|
||||
|
||||
/* the old Xfuncs.h, for pre-R6 */
|
||||
# if !(defined(XFree86LOADER) && defined(IN_MODULE))
|
||||
|
||||
# ifdef X_USEBFUNCS
|
||||
void bcopy();
|
||||
void bzero();
|
||||
int bcmp();
|
||||
# else
|
||||
# if defined(SYSV) && !defined(__SCO__) && !defined(__sun) && !defined(__UNIXWARE__) && !defined(_AIX)
|
||||
# include <memory.h>
|
||||
void bcopy();
|
||||
# define bzero(b,len) memset(b, 0, len)
|
||||
# define bcmp(b1,b2,len) memcmp(b1, b2, len)
|
||||
# else
|
||||
# include <string.h>
|
||||
# if defined(__SCO__) || defined(__sun) || defined(__UNIXWARE__) || defined(__CYGWIN__) || defined(_AIX) || defined(__APPLE__)
|
||||
# include <strings.h>
|
||||
# endif
|
||||
# define _XFUNCS_H_INCLUDED_STRING_H
|
||||
# endif
|
||||
# endif /* X_USEBFUNCS */
|
||||
|
||||
/* the new Xfuncs.h */
|
||||
|
||||
/* the ANSI C way */
|
||||
# ifndef _XFUNCS_H_INCLUDED_STRING_H
|
||||
# include <string.h>
|
||||
# endif
|
||||
# undef bzero
|
||||
# define bzero(b,len) memset(b,0,len)
|
||||
|
||||
# if defined WIN32 && defined __MINGW32__
|
||||
# define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len))
|
||||
# endif
|
||||
|
||||
# endif /* !(defined(XFree86LOADER) && defined(IN_MODULE)) */
|
||||
|
||||
#endif /* _XFUNCS_H_ */
|
|
@ -0,0 +1,20 @@
|
|||
/* Copyright (C) 2003-2006 Jamey Sharp, Josh Triplett
|
||||
* This file is licensed under the MIT license. See the file COPYING. */
|
||||
|
||||
#ifndef _X11_XLIB_XCB_H_
|
||||
#define _X11_XLIB_XCB_H_
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
xcb_connection_t *XGetXCBConnection(Display *dpy);
|
||||
|
||||
enum XEventQueueOwner { XlibOwnsEventQueue = 0, XCBOwnsEventQueue };
|
||||
void XSetEventQueueOwner(Display *dpy, enum XEventQueueOwner owner);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _X11_XLIB_XCB_H_ */
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,38 @@
|
|||
/* include/X11/XlibConf.h. Generated from XlibConf.h.in by configure. */
|
||||
/*
|
||||
* Copyright © 2005 Keith Packard
|
||||
*
|
||||
* 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, and that the name of Keith Packard not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. Keith Packard makes no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL KEITH PACKARD 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.
|
||||
*/
|
||||
|
||||
#ifndef _XLIBCONF_H_
|
||||
#define _XLIBCONF_H_
|
||||
/*
|
||||
* This header file exports defines necessary to correctly
|
||||
* use Xlibint.h both inside Xlib and by external libraries
|
||||
* such as extensions.
|
||||
*/
|
||||
|
||||
/* Threading support? */
|
||||
#define XTHREADS 1
|
||||
|
||||
/* Use multi-threaded libc functions? */
|
||||
#define XUSE_MTSAFE_API 1
|
||||
|
||||
#endif /* _XLIBCONF_H_ */
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
|
||||
Copyright 1991, 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.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _X11_XLOCALE_H_
|
||||
#define _X11_XLOCALE_H_
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
#include <X11/Xosdefs.h>
|
||||
|
||||
#include <locale.h>
|
||||
|
||||
#endif /* _X11_XLOCALE_H_ */
|
|
@ -0,0 +1,142 @@
|
|||
/***********************************************************
|
||||
|
||||
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.
|
||||
|
||||
******************************************************************/
|
||||
#ifndef XMD_H
|
||||
# define XMD_H 1
|
||||
/*
|
||||
* Xmd.h: MACHINE DEPENDENT DECLARATIONS.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Special per-machine configuration flags.
|
||||
*/
|
||||
# if defined(__sun) && defined(__SVR4)
|
||||
# include <sys/isa_defs.h> /* Solaris: defines _LP64 if necessary */
|
||||
# endif
|
||||
|
||||
# if defined (_LP64) || defined(__LP64__) || \
|
||||
defined(__alpha) || defined(__alpha__) || \
|
||||
defined(__ia64__) || defined(ia64) || \
|
||||
defined(__sparc64__) || \
|
||||
defined(__s390x__) || \
|
||||
defined(__amd64__) || defined(amd64) || \
|
||||
defined(__powerpc64__)
|
||||
# if !defined(__ILP32__) /* amd64-x32 is 32bit */
|
||||
# define LONG64 /* 32/64-bit architecture */
|
||||
# endif /* !__ILP32__ */
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Definition of macro used to set constants for size of network structures;
|
||||
* machines with preprocessors that can't handle all of the sz_ symbols
|
||||
* can define this macro to be sizeof(x) if and only if their compiler doesn't
|
||||
* pad out structures (esp. the xTextElt structure which contains only two
|
||||
* one-byte fields). Network structures should always define sz_symbols.
|
||||
*
|
||||
* The sz_ prefix is used instead of something more descriptive so that the
|
||||
* symbols are no more than 32 characters long (which causes problems for some
|
||||
* compilers and preprocessors).
|
||||
*
|
||||
* The extra indirection is to get macro arguments to expand correctly before
|
||||
* the concatenation, rather than afterward.
|
||||
*/
|
||||
# define _SIZEOF(x) sz_##x
|
||||
# define SIZEOF(x) _SIZEOF(x)
|
||||
|
||||
/*
|
||||
* Bitfield suffixes for the protocol structure elements, if you
|
||||
* need them. Note that bitfields are not guaranteed to be signed
|
||||
* (or even unsigned) according to ANSI C.
|
||||
*/
|
||||
# define B32 /* bitfield not needed on architectures with native 32-bit type */
|
||||
# define B16 /* bitfield not needed on architectures with native 16-bit type */
|
||||
# ifdef LONG64
|
||||
typedef long INT64;
|
||||
typedef int INT32;
|
||||
# else
|
||||
typedef long INT32;
|
||||
# endif
|
||||
typedef short INT16;
|
||||
|
||||
typedef signed char INT8;
|
||||
|
||||
# ifdef LONG64
|
||||
typedef unsigned long CARD64;
|
||||
typedef unsigned int CARD32;
|
||||
# else
|
||||
typedef unsigned long long CARD64;
|
||||
typedef unsigned long CARD32;
|
||||
# endif
|
||||
typedef unsigned short CARD16;
|
||||
typedef unsigned char CARD8;
|
||||
|
||||
typedef CARD32 BITS32;
|
||||
typedef CARD16 BITS16;
|
||||
|
||||
typedef CARD8 BYTE;
|
||||
typedef CARD8 BOOL;
|
||||
|
||||
/*
|
||||
* was definitions for sign-extending bitfields on architectures without
|
||||
* native types smaller than 64-bit, now just backwards compatibility
|
||||
*/
|
||||
# define cvtINT8toInt(val) (val)
|
||||
# define cvtINT16toInt(val) (val)
|
||||
# define cvtINT32toInt(val) (val)
|
||||
# define cvtINT8toShort(val) (val)
|
||||
# define cvtINT16toShort(val) (val)
|
||||
# define cvtINT32toShort(val) (val)
|
||||
# define cvtINT8toLong(val) (val)
|
||||
# define cvtINT16toLong(val) (val)
|
||||
# define cvtINT32toLong(val) (val)
|
||||
|
||||
/*
|
||||
* this version should leave result of type (t *), but that should only be
|
||||
* used when not in MUSTCOPY
|
||||
*/
|
||||
# define NEXTPTR(p,t) (((t *)(p)) + 1)
|
||||
|
||||
#endif /* XMD_H */
|
|
@ -0,0 +1,148 @@
|
|||
/*
|
||||
*
|
||||
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.
|
||||
*
|
||||
* The X Window System is a Trademark of The Open Group.
|
||||
*
|
||||
*/
|
||||
|
||||
/* This is a collection of things to try and minimize system dependencies
|
||||
* in a "significant" number of source files.
|
||||
*/
|
||||
|
||||
#ifndef _XOS_H_
|
||||
# define _XOS_H_
|
||||
|
||||
# include <X11/Xosdefs.h>
|
||||
|
||||
/*
|
||||
* Get major data types (esp. caddr_t)
|
||||
*/
|
||||
|
||||
# include <sys/types.h>
|
||||
|
||||
# if defined(__SCO__) || defined(__UNIXWARE__)
|
||||
# include <stdint.h>
|
||||
# endif
|
||||
|
||||
|
||||
/*
|
||||
* Just about everyone needs the strings routines. We provide both forms here,
|
||||
* index/rindex and strchr/strrchr, so any systems that don't provide them all
|
||||
* need to have #defines here.
|
||||
*
|
||||
* These macros are defined this way, rather than, e.g.:
|
||||
* #defined index(s,c) strchr(s,c)
|
||||
* because someone might be using them as function pointers, and such
|
||||
* a change would break compatibility for anyone who's relying on them
|
||||
* being the way they currently are. So we're stuck with them this way,
|
||||
* which can be really inconvenient. :-(
|
||||
*/
|
||||
|
||||
# include <string.h>
|
||||
# if defined(__SCO__) || defined(__UNIXWARE__) || defined(__sun) || defined(__CYGWIN__) || defined(_AIX) || defined(__APPLE__)
|
||||
# include <strings.h>
|
||||
# else
|
||||
# ifndef index
|
||||
# define index(s,c) (strchr((s),(c)))
|
||||
# endif
|
||||
# ifndef rindex
|
||||
# define rindex(s,c) (strrchr((s),(c)))
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Get open(2) constants
|
||||
*/
|
||||
# if defined(X_NOT_POSIX)
|
||||
# include <fcntl.h>
|
||||
# if defined(USL) || defined(__i386__) && (defined(SYSV) || defined(SVR4))
|
||||
# include <unistd.h>
|
||||
# endif
|
||||
# ifdef WIN32
|
||||
# include <X11/Xw32defs.h>
|
||||
# else
|
||||
# include <sys/file.h>
|
||||
# endif
|
||||
# else /* X_NOT_POSIX */
|
||||
# include <fcntl.h>
|
||||
# include <unistd.h>
|
||||
# endif /* X_NOT_POSIX else */
|
||||
|
||||
/*
|
||||
* Get struct timeval and struct tm
|
||||
*/
|
||||
|
||||
# if defined(_POSIX_SOURCE) && defined(SVR4)
|
||||
/* need to omit _POSIX_SOURCE in order to get what we want in SVR4 */
|
||||
# undef _POSIX_SOURCE
|
||||
# include <sys/time.h>
|
||||
# define _POSIX_SOURCE
|
||||
# elif defined(WIN32)
|
||||
# include <time.h>
|
||||
# if !defined(_WINSOCKAPI_) && !defined(_WILLWINSOCK_) && !defined(_TIMEVAL_DEFINED) && !defined(_STRUCT_TIMEVAL)
|
||||
struct timeval {
|
||||
long tv_sec; /* seconds */
|
||||
long tv_usec; /* and microseconds */
|
||||
};
|
||||
# define _TIMEVAL_DEFINED
|
||||
# endif
|
||||
# include <sys/timeb.h>
|
||||
# define gettimeofday(t) \
|
||||
{ \
|
||||
struct _timeb _gtodtmp; \
|
||||
_ftime (&_gtodtmp); \
|
||||
(t)->tv_sec = _gtodtmp.time; \
|
||||
(t)->tv_usec = _gtodtmp.millitm * 1000; \
|
||||
}
|
||||
# else
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
# endif /* defined(_POSIX_SOURCE) && defined(SVR4) */
|
||||
|
||||
/* define X_GETTIMEOFDAY macro, a portable gettimeofday() */
|
||||
# if defined(_XOPEN_XPG4) || defined(_XOPEN_UNIX) /* _XOPEN_UNIX is XPG4.2 */
|
||||
# define X_GETTIMEOFDAY(t) gettimeofday(t, (struct timezone*)0)
|
||||
# else
|
||||
# if defined(SVR4) || defined(__SVR4) || defined(WIN32)
|
||||
# define X_GETTIMEOFDAY(t) gettimeofday(t)
|
||||
# else
|
||||
# define X_GETTIMEOFDAY(t) gettimeofday(t, (struct timezone*)0)
|
||||
# endif
|
||||
# endif /* XPG4 else */
|
||||
|
||||
|
||||
# ifdef __GNU__
|
||||
# define PATH_MAX 4096
|
||||
# define MAXPATHLEN 4096
|
||||
# define OPEN_MAX 256 /* We define a reasonable limit. */
|
||||
# endif
|
||||
|
||||
/* use POSIX name for signal */
|
||||
# if defined(X_NOT_POSIX) && defined(SYSV) && !defined(SIGCHLD)
|
||||
# define SIGCHLD SIGCLD
|
||||
# endif
|
||||
|
||||
# include <X11/Xarch.h>
|
||||
|
||||
#endif /* _XOS_H_ */
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,116 @@
|
|||
/*
|
||||
* O/S-dependent (mis)feature macro definitions
|
||||
*
|
||||
Copyright 1991, 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.
|
||||
*/
|
||||
|
||||
#ifndef _XOSDEFS_H_
|
||||
# define _XOSDEFS_H_
|
||||
|
||||
/*
|
||||
* X_NOT_POSIX means does not have POSIX header files. Lack of this
|
||||
* symbol does NOT mean that the POSIX environment is the default.
|
||||
* You may still have to define _POSIX_SOURCE to get it.
|
||||
*/
|
||||
|
||||
|
||||
# ifdef _SCO_DS
|
||||
# ifndef __SCO__
|
||||
# define __SCO__
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifdef __i386__
|
||||
# ifdef SYSV
|
||||
# if !defined(__SCO__) && \
|
||||
!defined(__UNIXWARE__) && !defined(__sun)
|
||||
# if !defined(_POSIX_SOURCE)
|
||||
# define X_NOT_POSIX
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifdef __sun
|
||||
/* Imake configs define SVR4 on Solaris, but cc & gcc only define __SVR4
|
||||
* This check allows non-Imake configured programs to build correctly.
|
||||
*/
|
||||
# if defined(__SVR4) && !defined(SVR4)
|
||||
# define SVR4 1
|
||||
# endif
|
||||
# ifdef SVR4
|
||||
/* define this to whatever it needs to be */
|
||||
# define X_POSIX_C_SOURCE 199300L
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifdef WIN32
|
||||
# ifndef _POSIX_
|
||||
# define X_NOT_POSIX
|
||||
# endif
|
||||
# endif
|
||||
|
||||
|
||||
# ifdef __APPLE__
|
||||
# define NULL_NOT_ZERO
|
||||
|
||||
/* Defining any of these will sanitize the namespace to JUST want is defined by
|
||||
* that particular standard. If that happens, we don't get some expected
|
||||
* prototypes, typedefs, etc (like fd_mask). We can define _DARWIN_C_SOURCE to
|
||||
* loosen our belts a tad.
|
||||
*/
|
||||
# if defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE)
|
||||
# ifndef _DARWIN_C_SOURCE
|
||||
# define _DARWIN_C_SOURCE
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
# ifdef __GNU__
|
||||
# ifndef PATH_MAX
|
||||
# define PATH_MAX 4096
|
||||
# endif
|
||||
# ifndef MAXPATHLEN
|
||||
# define MAXPATHLEN 4096
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# if defined(__SCO__) || defined(__UNIXWARE__)
|
||||
# ifndef PATH_MAX
|
||||
# define PATH_MAX 1024
|
||||
# endif
|
||||
# ifndef MAXPATHLEN
|
||||
# define MAXPATHLEN 1024
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) \
|
||||
|| defined(__APPLE__) || defined(__DragonFly__)
|
||||
# ifndef CSRG_BASED
|
||||
# define CSRG_BASED
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif /* _XOSDEFS_H_ */
|
||||
|
|
@ -0,0 +1,230 @@
|
|||
/*
|
||||
|
||||
Copyright 1994, 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 © 2005 Daniel Stone
|
||||
*
|
||||
* 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, and that the name of Daniel Stone not be used in advertising
|
||||
* or publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission. Daniel Stone makes no representations about the
|
||||
* suitability of this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*
|
||||
* DANIEL STONE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
||||
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
||||
* DANIEL STONE 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.
|
||||
*/
|
||||
|
||||
#ifndef _XPOLL_H_
|
||||
#define _XPOLL_H_
|
||||
|
||||
#if !defined(WIN32) || defined(__CYGWIN__)
|
||||
|
||||
#ifndef USE_POLL
|
||||
|
||||
#include <X11/Xos.h>
|
||||
|
||||
#include <sys/select.h> /* Get the FD_* macros. */
|
||||
|
||||
#include <X11/Xmd.h>
|
||||
|
||||
#ifdef CSRG_BASED
|
||||
#include <sys/param.h>
|
||||
# if BSD < 199103
|
||||
typedef long fd_mask;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(FD_SETSIZE) && FD_SETSIZE < 512
|
||||
# define XFD_SETSIZE FD_SETSIZE
|
||||
#else
|
||||
# define XFD_SETSIZE 512
|
||||
# ifndef FD_SETSIZE
|
||||
# define FD_SETSIZE XFD_SETSIZE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef NBBY
|
||||
#define NBBY 8 /* number of bits in a byte */
|
||||
#endif
|
||||
|
||||
#ifndef NFDBITS
|
||||
#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */
|
||||
#endif
|
||||
|
||||
#ifndef howmany
|
||||
#define howmany(x,y) (((x)+((y)-1))/(y))
|
||||
#endif
|
||||
|
||||
#if defined(BSD) && BSD < 198911
|
||||
typedef struct fd_set {
|
||||
fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];
|
||||
} fd_set;
|
||||
#endif
|
||||
|
||||
# define Select(n,r,w,e,t) select(n,(fd_set*)r,(fd_set*)w,(fd_set*)e,(struct timeval*)t)
|
||||
|
||||
#define __X_FDS_BITS __fds_bits
|
||||
|
||||
#ifndef __FDS_BITS
|
||||
# define __FDS_BITS(p) ((p)->__X_FDS_BITS)
|
||||
#endif
|
||||
|
||||
#define __XFDS_BITS(p, n) (__FDS_BITS(p))[n]
|
||||
|
||||
#ifndef FD_SET
|
||||
#define FD_SET(n, p) (__XFDS_BITS(p, ((n)/NFDBITS)) |= ((fd_mask)1 << ((n) % NFDBITS)))
|
||||
#endif
|
||||
#ifndef FD_CLR
|
||||
#define FD_CLR(n, p) (__XFDS_BITS((p), ((n)/NFDBITS)) &= ~((fd_mask)1 << ((n) % NFDBITS)))
|
||||
#endif
|
||||
#ifndef FD_ISSET
|
||||
#define FD_ISSET(n, p) ((__XFDS_BITS((p), ((n)/NFDBITS))) & ((fd_mask)1 << ((n) % NFDBITS)))
|
||||
#endif
|
||||
#ifndef FD_ZERO
|
||||
#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p)))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The howmany(FD_SETSIZE, NFDBITS) computes the number of elements in the
|
||||
* array. before accessing an element in the array we check it exists.
|
||||
* If it does not exist then the compiler discards the code to access it.
|
||||
*/
|
||||
#define XFD_ANYSET(p) \
|
||||
((howmany(FD_SETSIZE, NFDBITS) > 0 && (__XFDS_BITS(p, 0))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 1 && (__XFDS_BITS(p, 1))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 2 && (__XFDS_BITS(p, 2))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 3 && (__XFDS_BITS(p, 3))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 4 && (__XFDS_BITS(p, 4))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 5 && (__XFDS_BITS(p, 5))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 6 && (__XFDS_BITS(p, 6))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 7 && (__XFDS_BITS(p, 7))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 8 && (__XFDS_BITS(p, 8))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 9 && (__XFDS_BITS(p, 9))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 10 && (__XFDS_BITS(p, 10))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 11 && (__XFDS_BITS(p, 11))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 12 && (__XFDS_BITS(p, 12))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 13 && (__XFDS_BITS(p, 13))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 14 && (__XFDS_BITS(p, 14))) || \
|
||||
(howmany(FD_SETSIZE, NFDBITS) > 15 && (__XFDS_BITS(p, 15))))
|
||||
|
||||
|
||||
#define XFD_COPYSET(src,dst) { \
|
||||
int __i__; \
|
||||
for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \
|
||||
__XFDS_BITS((dst), __i__) = __XFDS_BITS((src), __i__); \
|
||||
}
|
||||
#define XFD_ANDSET(dst,b1,b2) { \
|
||||
int __i__; \
|
||||
for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \
|
||||
__XFDS_BITS((dst), __i__) = ((__XFDS_BITS((b1), __i__)) & (__XFDS_BITS((b2), __i__))); \
|
||||
}
|
||||
#define XFD_ORSET(dst,b1,b2) { \
|
||||
int __i__; \
|
||||
for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \
|
||||
__XFDS_BITS((dst), __i__) = ((__XFDS_BITS((b1), __i__)) | (__XFDS_BITS((b2), __i__))); \
|
||||
}
|
||||
#define XFD_UNSET(dst,b1) { \
|
||||
int __i__; \
|
||||
for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \
|
||||
__XFDS_BITS((dst), __i__) &= ~(__XFDS_BITS((b1), __i__)); \
|
||||
}
|
||||
|
||||
#else /* USE_POLL */
|
||||
#include <sys/poll.h>
|
||||
#endif /* USE_POLL */
|
||||
|
||||
#else /* WIN32 */
|
||||
|
||||
#define XFD_SETSIZE 512
|
||||
#ifndef FD_SETSIZE
|
||||
#define FD_SETSIZE XFD_SETSIZE
|
||||
#endif
|
||||
#include <X11/Xwinsock.h>
|
||||
|
||||
#define Select(n,r,w,e,t) select(0,(fd_set*)r,(fd_set*)w,(fd_set*)e,(struct timeval*)t)
|
||||
|
||||
#define XFD_SETCOUNT(p) (((fd_set FAR *)(p))->fd_count)
|
||||
#define XFD_FD(p,i) (((fd_set FAR *)(p))->fd_array[i])
|
||||
#define XFD_ANYSET(p) XFD_SETCOUNT(p)
|
||||
|
||||
#define XFD_COPYSET(src,dst) { \
|
||||
u_int __i; \
|
||||
FD_ZERO(dst); \
|
||||
for (__i = 0; __i < XFD_SETCOUNT(src) ; __i++) { \
|
||||
XFD_FD(dst,__i) = XFD_FD(src,__i); \
|
||||
} \
|
||||
XFD_SETCOUNT(dst) = XFD_SETCOUNT(src); \
|
||||
}
|
||||
|
||||
#define XFD_ANDSET(dst,b1,b2) { \
|
||||
u_int __i; \
|
||||
FD_ZERO(dst); \
|
||||
for (__i = 0; __i < XFD_SETCOUNT(b1) ; __i++) { \
|
||||
if (FD_ISSET(XFD_FD(b1,__i), b2)) \
|
||||
FD_SET(XFD_FD(b1,__i), dst); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define XFD_ORSET(dst,b1,b2) { \
|
||||
u_int __i; \
|
||||
if (dst != b1) XFD_COPYSET(b1,dst); \
|
||||
for (__i = 0; __i < XFD_SETCOUNT(b2) ; __i++) { \
|
||||
if (!FD_ISSET(XFD_FD(b2,__i), dst)) \
|
||||
FD_SET(XFD_FD(b2,__i), dst); \
|
||||
} \
|
||||
}
|
||||
|
||||
/* this one is really sub-optimal */
|
||||
#define XFD_UNSET(dst,b1) { \
|
||||
u_int __i; \
|
||||
for (__i = 0; __i < XFD_SETCOUNT(b1) ; __i++) { \
|
||||
FD_CLR(XFD_FD(b1,__i), dst); \
|
||||
} \
|
||||
}
|
||||
|
||||
/* we have to pay the price of having an array here, unlike with bitmasks
|
||||
calling twice FD_SET with the same fd is not transparent, so be careful */
|
||||
#undef FD_SET
|
||||
#define FD_SET(fd,set) do { \
|
||||
if (XFD_SETCOUNT(set) < FD_SETSIZE && !FD_ISSET(fd,set)) \
|
||||
XFD_FD(set,XFD_SETCOUNT(set)++)=(fd); \
|
||||
} while(0)
|
||||
|
||||
#define getdtablesize() FD_SETSIZE
|
||||
|
||||
#endif /* WIN32 */
|
||||
|
||||
#endif /* _XPOLL_H_ */
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,77 @@
|
|||
#ifndef XPROTOSTRUCTS_H
|
||||
#define XPROTOSTRUCTS_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.
|
||||
|
||||
******************************************************************/
|
||||
#include <X11/Xmd.h>
|
||||
|
||||
/* Used by PolySegment */
|
||||
|
||||
typedef struct _xSegment {
|
||||
INT16 x1 B16, y1 B16, x2 B16, y2 B16;
|
||||
} xSegment;
|
||||
|
||||
/* POINT */
|
||||
|
||||
typedef struct _xPoint {
|
||||
INT16 x B16, y B16;
|
||||
} xPoint;
|
||||
|
||||
typedef struct _xRectangle {
|
||||
INT16 x B16, y B16;
|
||||
CARD16 width B16, height B16;
|
||||
} xRectangle;
|
||||
|
||||
/* ARC */
|
||||
|
||||
typedef struct _xArc {
|
||||
INT16 x B16, y B16;
|
||||
CARD16 width B16, height B16;
|
||||
INT16 angle1 B16, angle2 B16;
|
||||
} xArc;
|
||||
|
||||
#endif /* XPROTOSTRUCTS_H */
|
|
@ -0,0 +1,190 @@
|
|||
/************************************************************************
|
||||
|
||||
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.
|
||||
|
||||
************************************************************************/
|
||||
|
||||
#ifndef _X11_XREGION_H_
|
||||
#define _X11_XREGION_H_
|
||||
|
||||
typedef struct {
|
||||
short x1, x2, y1, y2;
|
||||
} Box, BOX, BoxRec, *BoxPtr;
|
||||
|
||||
typedef struct {
|
||||
short x, y, width, height;
|
||||
}RECTANGLE, RectangleRec, *RectanglePtr;
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
#define MAXSHORT 32767
|
||||
#define MINSHORT -MAXSHORT
|
||||
#ifndef MAX
|
||||
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
||||
#endif
|
||||
#ifndef MIN
|
||||
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* clip region
|
||||
*/
|
||||
|
||||
typedef struct _XRegion {
|
||||
long size;
|
||||
long numRects;
|
||||
BOX *rects;
|
||||
BOX extents;
|
||||
} REGION;
|
||||
|
||||
/* Xutil.h contains the declaration:
|
||||
* typedef struct _XRegion *Region;
|
||||
*/
|
||||
|
||||
/* 1 if two BOXs overlap.
|
||||
* 0 if two BOXs do not overlap.
|
||||
* Remember, x2 and y2 are not in the region
|
||||
*/
|
||||
#define EXTENTCHECK(r1, r2) \
|
||||
((r1)->x2 > (r2)->x1 && \
|
||||
(r1)->x1 < (r2)->x2 && \
|
||||
(r1)->y2 > (r2)->y1 && \
|
||||
(r1)->y1 < (r2)->y2)
|
||||
|
||||
/*
|
||||
* update region extents
|
||||
*/
|
||||
#define EXTENTS(r,idRect){\
|
||||
if((r)->x1 < (idRect)->extents.x1)\
|
||||
(idRect)->extents.x1 = (r)->x1;\
|
||||
if((r)->y1 < (idRect)->extents.y1)\
|
||||
(idRect)->extents.y1 = (r)->y1;\
|
||||
if((r)->x2 > (idRect)->extents.x2)\
|
||||
(idRect)->extents.x2 = (r)->x2;\
|
||||
if((r)->y2 > (idRect)->extents.y2)\
|
||||
(idRect)->extents.y2 = (r)->y2;\
|
||||
}
|
||||
|
||||
/*
|
||||
* Check to see if there is enough memory in the present region.
|
||||
*/
|
||||
#define MEMCHECK(reg, rect, firstrect){\
|
||||
if ((reg)->numRects >= ((reg)->size - 1)){\
|
||||
BoxPtr tmpRect = Xrealloc ((firstrect), \
|
||||
(2 * (sizeof(BOX)) * ((reg)->size))); \
|
||||
if (tmpRect == NULL) \
|
||||
return(0);\
|
||||
(firstrect) = tmpRect; \
|
||||
(reg)->size *= 2;\
|
||||
(rect) = &(firstrect)[(reg)->numRects];\
|
||||
}\
|
||||
}
|
||||
|
||||
/* this routine checks to see if the previous rectangle is the same
|
||||
* or subsumes the new rectangle to add.
|
||||
*/
|
||||
|
||||
#define CHECK_PREVIOUS(Reg, R, Rx1, Ry1, Rx2, Ry2)\
|
||||
(!(((Reg)->numRects > 0)&&\
|
||||
((R-1)->y1 == (Ry1)) &&\
|
||||
((R-1)->y2 == (Ry2)) &&\
|
||||
((R-1)->x1 <= (Rx1)) &&\
|
||||
((R-1)->x2 >= (Rx2))))
|
||||
|
||||
/* add a rectangle to the given Region */
|
||||
#define ADDRECT(reg, r, rx1, ry1, rx2, ry2){\
|
||||
if (((rx1) < (rx2)) && ((ry1) < (ry2)) &&\
|
||||
CHECK_PREVIOUS((reg), (r), (rx1), (ry1), (rx2), (ry2))){\
|
||||
(r)->x1 = (rx1);\
|
||||
(r)->y1 = (ry1);\
|
||||
(r)->x2 = (rx2);\
|
||||
(r)->y2 = (ry2);\
|
||||
EXTENTS((r), (reg));\
|
||||
(reg)->numRects++;\
|
||||
(r)++;\
|
||||
}\
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* add a rectangle to the given Region */
|
||||
#define ADDRECTNOX(reg, r, rx1, ry1, rx2, ry2){\
|
||||
if ((rx1 < rx2) && (ry1 < ry2) &&\
|
||||
CHECK_PREVIOUS((reg), (r), (rx1), (ry1), (rx2), (ry2))){\
|
||||
(r)->x1 = (rx1);\
|
||||
(r)->y1 = (ry1);\
|
||||
(r)->x2 = (rx2);\
|
||||
(r)->y2 = (ry2);\
|
||||
(reg)->numRects++;\
|
||||
(r)++;\
|
||||
}\
|
||||
}
|
||||
|
||||
#define EMPTY_REGION(pReg) pReg->numRects = 0
|
||||
|
||||
#define REGION_NOT_EMPTY(pReg) pReg->numRects
|
||||
|
||||
#define INBOX(r, x, y) \
|
||||
( ( ((r).x2 > x)) && \
|
||||
( ((r).x1 <= x)) && \
|
||||
( ((r).y2 > y)) && \
|
||||
( ((r).y1 <= y)) )
|
||||
|
||||
/*
|
||||
* number of points to buffer before sending them off
|
||||
* to scanlines() : Must be an even number
|
||||
*/
|
||||
#define NUMPTSTOBUFFER 200
|
||||
|
||||
/*
|
||||
* used to allocate buffers for points and link
|
||||
* the buffers together
|
||||
*/
|
||||
typedef struct _POINTBLOCK {
|
||||
XPoint pts[NUMPTSTOBUFFER];
|
||||
struct _POINTBLOCK *next;
|
||||
} POINTBLOCK;
|
||||
|
||||
#endif /* _X11_XREGION_H_ */
|
|
@ -0,0 +1,358 @@
|
|||
|
||||
/***********************************************************
|
||||
|
||||
Copyright 1987, 1988, 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, 1988 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.
|
||||
|
||||
******************************************************************/
|
||||
|
||||
#ifndef _X11_XRESOURCE_H_
|
||||
#define _X11_XRESOURCE_H_
|
||||
|
||||
#ifndef _XP_PRINT_SERVER_
|
||||
#include <X11/Xlib.h>
|
||||
#endif
|
||||
|
||||
/****************************************************************
|
||||
****************************************************************
|
||||
*** ***
|
||||
*** ***
|
||||
*** X Resource Manager Intrinsics ***
|
||||
*** ***
|
||||
*** ***
|
||||
****************************************************************
|
||||
****************************************************************/
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
/****************************************************************
|
||||
*
|
||||
* Memory Management
|
||||
*
|
||||
****************************************************************/
|
||||
|
||||
extern char *Xpermalloc(
|
||||
unsigned int /* size */
|
||||
);
|
||||
|
||||
/****************************************************************
|
||||
*
|
||||
* Quark Management
|
||||
*
|
||||
****************************************************************/
|
||||
|
||||
typedef int XrmQuark, *XrmQuarkList;
|
||||
#define NULLQUARK ((XrmQuark) 0)
|
||||
|
||||
typedef char *XrmString;
|
||||
#define NULLSTRING ((XrmString) 0)
|
||||
|
||||
/* find quark for string, create new quark if none already exists */
|
||||
extern XrmQuark XrmStringToQuark(
|
||||
_Xconst char* /* string */
|
||||
);
|
||||
|
||||
extern XrmQuark XrmPermStringToQuark(
|
||||
_Xconst char* /* string */
|
||||
);
|
||||
|
||||
/* find string for quark */
|
||||
extern XrmString XrmQuarkToString(
|
||||
XrmQuark /* quark */
|
||||
);
|
||||
|
||||
extern XrmQuark XrmUniqueQuark(
|
||||
void
|
||||
);
|
||||
|
||||
#define XrmStringsEqual(a1, a2) (strcmp(a1, a2) == 0)
|
||||
|
||||
|
||||
/****************************************************************
|
||||
*
|
||||
* Conversion of Strings to Lists
|
||||
*
|
||||
****************************************************************/
|
||||
|
||||
typedef enum {XrmBindTightly, XrmBindLoosely} XrmBinding, *XrmBindingList;
|
||||
|
||||
extern void XrmStringToQuarkList(
|
||||
_Xconst char* /* string */,
|
||||
XrmQuarkList /* quarks_return */
|
||||
);
|
||||
|
||||
extern void XrmStringToBindingQuarkList(
|
||||
_Xconst char* /* string */,
|
||||
XrmBindingList /* bindings_return */,
|
||||
XrmQuarkList /* quarks_return */
|
||||
);
|
||||
|
||||
/****************************************************************
|
||||
*
|
||||
* Name and Class lists.
|
||||
*
|
||||
****************************************************************/
|
||||
|
||||
typedef XrmQuark XrmName;
|
||||
typedef XrmQuarkList XrmNameList;
|
||||
#define XrmNameToString(name) XrmQuarkToString(name)
|
||||
#define XrmStringToName(string) XrmStringToQuark(string)
|
||||
#define XrmStringToNameList(str, name) XrmStringToQuarkList(str, name)
|
||||
|
||||
typedef XrmQuark XrmClass;
|
||||
typedef XrmQuarkList XrmClassList;
|
||||
#define XrmClassToString(c_class) XrmQuarkToString(c_class)
|
||||
#define XrmStringToClass(c_class) XrmStringToQuark(c_class)
|
||||
#define XrmStringToClassList(str,c_class) XrmStringToQuarkList(str, c_class)
|
||||
|
||||
|
||||
|
||||
/****************************************************************
|
||||
*
|
||||
* Resource Representation Types and Values
|
||||
*
|
||||
****************************************************************/
|
||||
|
||||
typedef XrmQuark XrmRepresentation;
|
||||
#define XrmStringToRepresentation(string) XrmStringToQuark(string)
|
||||
#define XrmRepresentationToString(type) XrmQuarkToString(type)
|
||||
|
||||
typedef struct {
|
||||
unsigned int size;
|
||||
XPointer addr;
|
||||
} XrmValue, *XrmValuePtr;
|
||||
|
||||
|
||||
/****************************************************************
|
||||
*
|
||||
* Resource Manager Functions
|
||||
*
|
||||
****************************************************************/
|
||||
|
||||
typedef struct _XrmHashBucketRec *XrmHashBucket;
|
||||
typedef XrmHashBucket *XrmHashTable;
|
||||
typedef XrmHashTable XrmSearchList[];
|
||||
typedef struct _XrmHashBucketRec *XrmDatabase;
|
||||
|
||||
|
||||
extern void XrmDestroyDatabase(
|
||||
XrmDatabase /* database */
|
||||
);
|
||||
|
||||
extern void XrmQPutResource(
|
||||
XrmDatabase* /* database */,
|
||||
XrmBindingList /* bindings */,
|
||||
XrmQuarkList /* quarks */,
|
||||
XrmRepresentation /* type */,
|
||||
XrmValue* /* value */
|
||||
);
|
||||
|
||||
extern void XrmPutResource(
|
||||
XrmDatabase* /* database */,
|
||||
_Xconst char* /* specifier */,
|
||||
_Xconst char* /* type */,
|
||||
XrmValue* /* value */
|
||||
);
|
||||
|
||||
extern void XrmQPutStringResource(
|
||||
XrmDatabase* /* database */,
|
||||
XrmBindingList /* bindings */,
|
||||
XrmQuarkList /* quarks */,
|
||||
_Xconst char* /* value */
|
||||
);
|
||||
|
||||
extern void XrmPutStringResource(
|
||||
XrmDatabase* /* database */,
|
||||
_Xconst char* /* specifier */,
|
||||
_Xconst char* /* value */
|
||||
);
|
||||
|
||||
extern void XrmPutLineResource(
|
||||
XrmDatabase* /* database */,
|
||||
_Xconst char* /* line */
|
||||
);
|
||||
|
||||
extern Bool XrmQGetResource(
|
||||
XrmDatabase /* database */,
|
||||
XrmNameList /* quark_name */,
|
||||
XrmClassList /* quark_class */,
|
||||
XrmRepresentation* /* quark_type_return */,
|
||||
XrmValue* /* value_return */
|
||||
);
|
||||
|
||||
extern Bool XrmGetResource(
|
||||
XrmDatabase /* database */,
|
||||
_Xconst char* /* str_name */,
|
||||
_Xconst char* /* str_class */,
|
||||
char** /* str_type_return */,
|
||||
XrmValue* /* value_return */
|
||||
);
|
||||
|
||||
extern Bool XrmQGetSearchList(
|
||||
XrmDatabase /* database */,
|
||||
XrmNameList /* names */,
|
||||
XrmClassList /* classes */,
|
||||
XrmSearchList /* list_return */,
|
||||
int /* list_length */
|
||||
);
|
||||
|
||||
extern Bool XrmQGetSearchResource(
|
||||
XrmSearchList /* list */,
|
||||
XrmName /* name */,
|
||||
XrmClass /* class */,
|
||||
XrmRepresentation* /* type_return */,
|
||||
XrmValue* /* value_return */
|
||||
);
|
||||
|
||||
/****************************************************************
|
||||
*
|
||||
* Resource Database Management
|
||||
*
|
||||
****************************************************************/
|
||||
|
||||
#ifndef _XP_PRINT_SERVER_
|
||||
|
||||
extern void XrmSetDatabase(
|
||||
Display* /* display */,
|
||||
XrmDatabase /* database */
|
||||
);
|
||||
|
||||
extern XrmDatabase XrmGetDatabase(
|
||||
Display* /* display */
|
||||
);
|
||||
|
||||
#endif /* !_XP_PRINT_SERVER_ */
|
||||
|
||||
extern XrmDatabase XrmGetFileDatabase(
|
||||
_Xconst char* /* filename */
|
||||
);
|
||||
|
||||
extern Status XrmCombineFileDatabase(
|
||||
_Xconst char* /* filename */,
|
||||
XrmDatabase* /* target */,
|
||||
Bool /* override */
|
||||
);
|
||||
|
||||
extern XrmDatabase XrmGetStringDatabase(
|
||||
_Xconst char* /* data */ /* null terminated string */
|
||||
);
|
||||
|
||||
extern void XrmPutFileDatabase(
|
||||
XrmDatabase /* database */,
|
||||
_Xconst char* /* filename */
|
||||
);
|
||||
|
||||
extern void XrmMergeDatabases(
|
||||
XrmDatabase /* source_db */,
|
||||
XrmDatabase* /* target_db */
|
||||
);
|
||||
|
||||
extern void XrmCombineDatabase(
|
||||
XrmDatabase /* source_db */,
|
||||
XrmDatabase* /* target_db */,
|
||||
Bool /* override */
|
||||
);
|
||||
|
||||
#define XrmEnumAllLevels 0
|
||||
#define XrmEnumOneLevel 1
|
||||
|
||||
extern Bool XrmEnumerateDatabase(
|
||||
XrmDatabase /* db */,
|
||||
XrmNameList /* name_prefix */,
|
||||
XrmClassList /* class_prefix */,
|
||||
int /* mode */,
|
||||
Bool (*)(
|
||||
XrmDatabase* /* db */,
|
||||
XrmBindingList /* bindings */,
|
||||
XrmQuarkList /* quarks */,
|
||||
XrmRepresentation* /* type */,
|
||||
XrmValue* /* value */,
|
||||
XPointer /* closure */
|
||||
) /* proc */,
|
||||
XPointer /* closure */
|
||||
);
|
||||
|
||||
extern const char *XrmLocaleOfDatabase(
|
||||
XrmDatabase /* database */
|
||||
);
|
||||
|
||||
|
||||
/****************************************************************
|
||||
*
|
||||
* Command line option mapping to resource entries
|
||||
*
|
||||
****************************************************************/
|
||||
|
||||
typedef enum {
|
||||
XrmoptionNoArg, /* Value is specified in OptionDescRec.value */
|
||||
XrmoptionIsArg, /* Value is the option string itself */
|
||||
XrmoptionStickyArg, /* Value is characters immediately following option */
|
||||
XrmoptionSepArg, /* Value is next argument in argv */
|
||||
XrmoptionResArg, /* Resource and value in next argument in argv */
|
||||
XrmoptionSkipArg, /* Ignore this option and the next argument in argv */
|
||||
XrmoptionSkipLine, /* Ignore this option and the rest of argv */
|
||||
XrmoptionSkipNArgs /* Ignore this option and the next
|
||||
OptionDescRes.value arguments in argv */
|
||||
} XrmOptionKind;
|
||||
|
||||
typedef struct {
|
||||
char *option; /* Option abbreviation in argv */
|
||||
char *specifier; /* Resource specifier */
|
||||
XrmOptionKind argKind; /* Which style of option it is */
|
||||
XPointer value; /* Value to provide if XrmoptionNoArg */
|
||||
} XrmOptionDescRec, *XrmOptionDescList;
|
||||
|
||||
|
||||
extern void XrmParseCommand(
|
||||
XrmDatabase* /* database */,
|
||||
XrmOptionDescList /* table */,
|
||||
int /* table_count */,
|
||||
_Xconst char* /* name */,
|
||||
int* /* argc_in_out */,
|
||||
char** /* argv_in_out */
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _X11_XRESOURCE_H_ */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
|
@ -0,0 +1,314 @@
|
|||
/*
|
||||
*
|
||||
Copyright 1993, 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.
|
||||
* *
|
||||
*/
|
||||
|
||||
#ifndef _XTHREADS_H_
|
||||
# define _XTHREADS_H_
|
||||
|
||||
/* Redefine these to XtMalloc/XtFree or whatever you want before including
|
||||
* this header file.
|
||||
*/
|
||||
# ifndef xmalloc
|
||||
# define xmalloc malloc
|
||||
# endif
|
||||
# ifndef xfree
|
||||
# define xfree free
|
||||
# endif
|
||||
|
||||
# ifdef CTHREADS
|
||||
# include <cthreads.h>
|
||||
typedef cthread_t xthread_t;
|
||||
typedef struct condition xcondition_rec;
|
||||
typedef struct mutex xmutex_rec;
|
||||
# define xthread_init() cthread_init()
|
||||
# define xthread_self cthread_self
|
||||
# define xthread_fork(func,closure) cthread_fork(func,closure)
|
||||
# define xthread_yield() cthread_yield()
|
||||
# define xthread_exit(v) cthread_exit(v)
|
||||
# define xthread_set_name(t,str) cthread_set_name(t,str)
|
||||
# define xmutex_init(m) mutex_init(m)
|
||||
# define xmutex_clear(m) mutex_clear(m)
|
||||
# define xmutex_lock(m) mutex_lock(m)
|
||||
# define xmutex_unlock(m) mutex_unlock(m)
|
||||
# define xmutex_set_name(m,str) mutex_set_name(m,str)
|
||||
# define xcondition_init(cv) condition_init(cv)
|
||||
# define xcondition_clear(cv) condition_clear(cv)
|
||||
# define xcondition_wait(cv,m) condition_wait(cv,m)
|
||||
# define xcondition_signal(cv) condition_signal(cv)
|
||||
# define xcondition_broadcast(cv) condition_broadcast(cv)
|
||||
# define xcondition_set_name(cv,str) condition_set_name(cv,str)
|
||||
# else /* !CTHREADS */
|
||||
# if defined(SVR4)
|
||||
# include <thread.h>
|
||||
# include <synch.h>
|
||||
typedef thread_t xthread_t;
|
||||
typedef thread_key_t xthread_key_t;
|
||||
typedef cond_t xcondition_rec;
|
||||
typedef mutex_t xmutex_rec;
|
||||
# if defined(__UNIXWARE__)
|
||||
extern xthread_t (*_x11_thr_self)();
|
||||
# define xthread_self (_x11_thr_self)
|
||||
# else
|
||||
# define xthread_self thr_self
|
||||
# endif
|
||||
# define xthread_fork(func,closure) thr_create(NULL,0,func,closure,THR_NEW_LWP|THR_DETACHED,NULL)
|
||||
# define xthread_yield() thr_yield()
|
||||
# define xthread_exit(v) thr_exit(v)
|
||||
# define xthread_key_create(kp,d) thr_keycreate(kp,d)
|
||||
# ifdef __sun
|
||||
# define xthread_key_delete(k) 0
|
||||
# else
|
||||
# define xthread_key_delete(k) thr_keydelete(k)
|
||||
# endif
|
||||
# define xthread_set_specific(k,v) thr_setspecific(k,v)
|
||||
# define xthread_get_specific(k,vp) thr_getspecific(k,vp)
|
||||
# define xmutex_init(m) mutex_init(m,USYNC_THREAD,0)
|
||||
# define xmutex_clear(m) mutex_destroy(m)
|
||||
# define xmutex_lock(m) mutex_lock(m)
|
||||
# define xmutex_unlock(m) mutex_unlock(m)
|
||||
# define xcondition_init(cv) cond_init(cv,USYNC_THREAD,0)
|
||||
# define xcondition_clear(cv) cond_destroy(cv)
|
||||
# define xcondition_wait(cv,m) cond_wait(cv,m)
|
||||
# define xcondition_signal(cv) cond_signal(cv)
|
||||
# define xcondition_broadcast(cv) cond_broadcast(cv)
|
||||
# else /* !SVR4 */
|
||||
# ifdef WIN32
|
||||
# include <X11/Xwindows.h>
|
||||
typedef DWORD xthread_t;
|
||||
typedef DWORD xthread_key_t;
|
||||
struct _xthread_waiter {
|
||||
HANDLE sem;
|
||||
struct _xthread_waiter *next;
|
||||
};
|
||||
typedef struct {
|
||||
CRITICAL_SECTION cs;
|
||||
struct _xthread_waiter *waiters;
|
||||
} xcondition_rec;
|
||||
typedef CRITICAL_SECTION xmutex_rec;
|
||||
extern void _Xthread_init(void);
|
||||
# define xthread_init() _Xthread_init()
|
||||
# define xthread_self GetCurrentThreadId
|
||||
# define xthread_fork(func,closure) { \
|
||||
DWORD _tmptid; \
|
||||
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)func, (LPVOID)closure, 0, \
|
||||
&_tmptid); \
|
||||
}
|
||||
# define xthread_yield() Sleep(0)
|
||||
# define xthread_exit(v) ExitThread((DWORD)(v))
|
||||
# define xthread_key_create(kp,d) *(kp) = TlsAlloc()
|
||||
# define xthread_key_delete(k) TlsFree(k)
|
||||
# define xthread_set_specific(k,v) TlsSetValue(k,v)
|
||||
# define xthread_get_specific(k,vp) TlsGetValue(k)
|
||||
# define xmutex_init(m) InitializeCriticalSection(m)
|
||||
# define xmutex_clear(m) DeleteCriticalSection(m)
|
||||
# define _XMUTEX_NESTS
|
||||
# define xmutex_lock(m) EnterCriticalSection(m)
|
||||
# define xmutex_unlock(m) LeaveCriticalSection(m)
|
||||
# define xcondition_init(cv) { \
|
||||
InitializeCriticalSection(&(cv)->cs); \
|
||||
(cv)->waiters = NULL; \
|
||||
}
|
||||
# define xcondition_clear(cv) DeleteCriticalSection(&(cv)->cs)
|
||||
extern struct _xthread_waiter *_Xthread_waiter();
|
||||
# define xcondition_wait(cv,m) { \
|
||||
struct _xthread_waiter *_tmpthr = _Xthread_waiter(); \
|
||||
EnterCriticalSection(&(cv)->cs); \
|
||||
_tmpthr->next = (cv)->waiters; \
|
||||
(cv)->waiters = _tmpthr; \
|
||||
LeaveCriticalSection(&(cv)->cs); \
|
||||
LeaveCriticalSection(m); \
|
||||
WaitForSingleObject(_tmpthr->sem, INFINITE); \
|
||||
EnterCriticalSection(m); \
|
||||
}
|
||||
# define xcondition_signal(cv) { \
|
||||
EnterCriticalSection(&(cv)->cs); \
|
||||
if ((cv)->waiters) { \
|
||||
ReleaseSemaphore((cv)->waiters->sem, 1, NULL); \
|
||||
(cv)->waiters = (cv)->waiters->next; \
|
||||
} \
|
||||
LeaveCriticalSection(&(cv)->cs); \
|
||||
}
|
||||
# define xcondition_broadcast(cv) { \
|
||||
struct _xthread_waiter *_tmpthr; \
|
||||
EnterCriticalSection(&(cv)->cs); \
|
||||
for (_tmpthr = (cv)->waiters; _tmpthr; _tmpthr = _tmpthr->next) \
|
||||
ReleaseSemaphore(_tmpthr->sem, 1, NULL); \
|
||||
(cv)->waiters = NULL; \
|
||||
LeaveCriticalSection(&(cv)->cs); \
|
||||
}
|
||||
# else /* !WIN32 */
|
||||
# ifdef USE_TIS_SUPPORT
|
||||
/*
|
||||
* TIS support is intended for thread safe libraries.
|
||||
* This should not be used for general client programming.
|
||||
*/
|
||||
# include <tis.h>
|
||||
typedef pthread_t xthread_t;
|
||||
typedef pthread_key_t xthread_key_t;
|
||||
typedef pthread_cond_t xcondition_rec;
|
||||
typedef pthread_mutex_t xmutex_rec;
|
||||
# define xthread_self tis_self
|
||||
# define xthread_fork(func,closure) { pthread_t _tmpxthr; \
|
||||
pthread_create(&_tmpxthr,NULL,func,closure); }
|
||||
# define xthread_yield() pthread_yield_np()
|
||||
# define xthread_exit(v) pthread_exit(v)
|
||||
# define xthread_key_create(kp,d) tis_key_create(kp,d)
|
||||
# define xthread_key_delete(k) tis_key_delete(k)
|
||||
# define xthread_set_specific(k,v) tis_setspecific(k,v)
|
||||
# define xthread_get_specific(k,vp) *(vp) = tis_getspecific(k)
|
||||
# define XMUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
|
||||
# define xmutex_init(m) tis_mutex_init(m)
|
||||
# define xmutex_clear(m) tis_mutex_destroy(m)
|
||||
# define xmutex_lock(m) tis_mutex_lock(m)
|
||||
# define xmutex_unlock(m) tis_mutex_unlock(m)
|
||||
# define xcondition_init(c) tis_cond_init(c)
|
||||
# define xcondition_clear(c) tis_cond_destroy(c)
|
||||
# define xcondition_wait(c,m) tis_cond_wait(c,m)
|
||||
# define xcondition_signal(c) tis_cond_signal(c)
|
||||
# define xcondition_broadcast(c) tis_cond_broadcast(c)
|
||||
# else
|
||||
# ifdef USE_NBSD_THREADLIB
|
||||
/*
|
||||
* NetBSD threadlib support is intended for thread safe libraries.
|
||||
* This should not be used for general client programming.
|
||||
*/
|
||||
# include <threadlib.h>
|
||||
typedef thr_t xthread_t;
|
||||
typedef thread_key_t xthread_key_t;
|
||||
typedef cond_t xcondition_rec;
|
||||
typedef mutex_t xmutex_rec;
|
||||
# define xthread_self thr_self
|
||||
# define xthread_fork(func,closure) { thr_t _tmpxthr; \
|
||||
/* XXX Create it detached? --thorpej */ \
|
||||
thr_create(&_tmpxthr,NULL,func,closure); }
|
||||
# define xthread_yield() thr_yield()
|
||||
# define xthread_exit(v) thr_exit(v)
|
||||
# define xthread_key_create(kp,d) thr_keycreate(kp,d)
|
||||
# define xthread_key_delete(k) thr_keydelete(k)
|
||||
# define xthread_set_specific(k,v) thr_setspecific(k,v)
|
||||
# define xthread_get_specific(k,vp) *(vp) = thr_getspecific(k)
|
||||
# define XMUTEX_INITIALIZER MUTEX_INITIALIZER
|
||||
# define xmutex_init(m) mutex_init(m, 0)
|
||||
# define xmutex_clear(m) mutex_destroy(m)
|
||||
# define xmutex_lock(m) mutex_lock(m)
|
||||
# define xmutex_unlock(m) mutex_unlock(m)
|
||||
# define xcondition_init(c) cond_init(c, 0, 0)
|
||||
# define xcondition_clear(c) cond_destroy(c)
|
||||
# define xcondition_wait(c,m) cond_wait(c,m)
|
||||
# define xcondition_signal(c) cond_signal(c)
|
||||
# define xcondition_broadcast(c) cond_broadcast(c)
|
||||
# else
|
||||
# include <pthread.h>
|
||||
typedef pthread_t xthread_t;
|
||||
typedef pthread_key_t xthread_key_t;
|
||||
typedef pthread_cond_t xcondition_rec;
|
||||
typedef pthread_mutex_t xmutex_rec;
|
||||
# define xthread_self pthread_self
|
||||
# define xthread_yield() pthread_yield()
|
||||
# define xthread_exit(v) pthread_exit(v)
|
||||
# define xthread_set_specific(k,v) pthread_setspecific(k,v)
|
||||
# define xmutex_clear(m) pthread_mutex_destroy(m)
|
||||
# define xmutex_lock(m) pthread_mutex_lock(m)
|
||||
# define xmutex_unlock(m) pthread_mutex_unlock(m)
|
||||
# ifndef XPRE_STANDARD_API
|
||||
# define xthread_key_create(kp,d) pthread_key_create(kp,d)
|
||||
# define xthread_key_delete(k) pthread_key_delete(k)
|
||||
# define xthread_get_specific(k,vp) *(vp) = pthread_getspecific(k)
|
||||
# define xthread_fork(func,closure) { pthread_t _tmpxthr; \
|
||||
pthread_create(&_tmpxthr,NULL,func,closure); }
|
||||
# define XMUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
|
||||
# define xmutex_init(m) pthread_mutex_init(m, NULL)
|
||||
# define xcondition_init(c) pthread_cond_init(c, NULL)
|
||||
# else /* XPRE_STANDARD_API */
|
||||
# define xthread_key_create(kp,d) pthread_keycreate(kp,d)
|
||||
# define xthread_key_delete(k) 0
|
||||
# define xthread_get_specific(k,vp) pthread_getspecific(k,vp)
|
||||
# define xthread_fork(func,closure) { pthread_t _tmpxthr; \
|
||||
pthread_create(&_tmpxthr,pthread_attr_default,func,closure); }
|
||||
# define xmutex_init(m) pthread_mutex_init(m, pthread_mutexattr_default)
|
||||
# define xcondition_init(c) pthread_cond_init(c, pthread_condattr_default)
|
||||
# endif /* XPRE_STANDARD_API */
|
||||
# define xcondition_clear(c) pthread_cond_destroy(c)
|
||||
# define xcondition_wait(c,m) pthread_cond_wait(c,m)
|
||||
# define xcondition_signal(c) pthread_cond_signal(c)
|
||||
# define xcondition_broadcast(c) pthread_cond_broadcast(c)
|
||||
# if defined(_DECTHREADS_)
|
||||
static xthread_t _X_no_thread_id;
|
||||
# define xthread_have_id(id) !pthread_equal(id, _X_no_thread_id)
|
||||
# define xthread_clear_id(id) id = _X_no_thread_id
|
||||
# define xthread_equal(id1,id2) pthread_equal(id1, id2)
|
||||
# endif /* _DECTHREADS_ */
|
||||
# if defined(__linux__)
|
||||
# define xthread_have_id(id) !pthread_equal(id, 0)
|
||||
# define xthread_clear_id(id) id = 0
|
||||
# define xthread_equal(id1,id2) pthread_equal(id1, id2)
|
||||
# endif /* linux */
|
||||
# if defined(_CMA_VENDOR_) && defined(_CMA__IBM) && (_CMA_VENDOR_ == _CMA__IBM)
|
||||
# ifdef DEBUG /* too much of a hack to enable normally */
|
||||
/* see also cma__obj_set_name() */
|
||||
# define xmutex_set_name(m,str) ((char**)(m)->field1)[5] = (str)
|
||||
# define xcondition_set_name(cv,str) ((char**)(cv)->field1)[5] = (str)
|
||||
# endif /* DEBUG */
|
||||
# endif /* _CMA_VENDOR_ == _CMA__IBM */
|
||||
# endif /* USE_NBSD_THREADLIB */
|
||||
# endif /* USE_TIS_SUPPORT */
|
||||
# endif /* WIN32 */
|
||||
# endif /* SVR4 */
|
||||
# endif /* CTHREADS */
|
||||
typedef xcondition_rec *xcondition_t;
|
||||
typedef xmutex_rec *xmutex_t;
|
||||
# ifndef xcondition_malloc
|
||||
# define xcondition_malloc() (xcondition_t)xmalloc(sizeof(xcondition_rec))
|
||||
# endif
|
||||
# ifndef xcondition_free
|
||||
# define xcondition_free(c) xfree((char *)c)
|
||||
# endif
|
||||
# ifndef xmutex_malloc
|
||||
# define xmutex_malloc() (xmutex_t)xmalloc(sizeof(xmutex_rec))
|
||||
# endif
|
||||
# ifndef xmutex_free
|
||||
# define xmutex_free(m) xfree((char *)m)
|
||||
# endif
|
||||
# ifndef xthread_have_id
|
||||
# define xthread_have_id(id) id
|
||||
# endif
|
||||
# ifndef xthread_clear_id
|
||||
# define xthread_clear_id(id) id = 0
|
||||
# endif
|
||||
# ifndef xthread_equal
|
||||
# define xthread_equal(id1,id2) ((id1) == (id2))
|
||||
# endif
|
||||
/* aids understood by some debuggers */
|
||||
# ifndef xthread_set_name
|
||||
# define xthread_set_name(t,str)
|
||||
# endif
|
||||
# ifndef xmutex_set_name
|
||||
# define xmutex_set_name(m,str)
|
||||
# endif
|
||||
# ifndef xcondition_set_name
|
||||
# define xcondition_set_name(cv,str)
|
||||
# endif
|
||||
|
||||
#endif /* _XTHREADS_H_ */
|
|
@ -0,0 +1,838 @@
|
|||
|
||||
/***********************************************************
|
||||
|
||||
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.
|
||||
|
||||
******************************************************************/
|
||||
|
||||
#ifndef _X11_XUTIL_H_
|
||||
#define _X11_XUTIL_H_
|
||||
|
||||
/* You must include <X11/Xlib.h> before including this file */
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/keysym.h>
|
||||
|
||||
/* 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
|
||||
complaining about it. */
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wpadded"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Bitmask returned by XParseGeometry(). Each bit tells if the corresponding
|
||||
* value (x, y, width, height) was found in the parsed string.
|
||||
*/
|
||||
#define NoValue 0x0000
|
||||
#define XValue 0x0001
|
||||
#define YValue 0x0002
|
||||
#define WidthValue 0x0004
|
||||
#define HeightValue 0x0008
|
||||
#define AllValues 0x000F
|
||||
#define XNegative 0x0010
|
||||
#define YNegative 0x0020
|
||||
|
||||
/*
|
||||
* new version containing base_width, base_height, and win_gravity fields;
|
||||
* used with WM_NORMAL_HINTS.
|
||||
*/
|
||||
typedef struct {
|
||||
long flags; /* marks which fields in this structure are defined */
|
||||
int x, y; /* obsolete for new window mgrs, but clients */
|
||||
int width, height; /* should set so old wm's don't mess up */
|
||||
int min_width, min_height;
|
||||
int max_width, max_height;
|
||||
int width_inc, height_inc;
|
||||
struct {
|
||||
int x; /* numerator */
|
||||
int y; /* denominator */
|
||||
} min_aspect, max_aspect;
|
||||
int base_width, base_height; /* added by ICCCM version 1 */
|
||||
int win_gravity; /* added by ICCCM version 1 */
|
||||
} XSizeHints;
|
||||
|
||||
/*
|
||||
* The next block of definitions are for window manager properties that
|
||||
* clients and applications use for communication.
|
||||
*/
|
||||
|
||||
/* flags argument in size hints */
|
||||
#define USPosition (1L << 0) /* user specified x, y */
|
||||
#define USSize (1L << 1) /* user specified width, height */
|
||||
|
||||
#define PPosition (1L << 2) /* program specified position */
|
||||
#define PSize (1L << 3) /* program specified size */
|
||||
#define PMinSize (1L << 4) /* program specified minimum size */
|
||||
#define PMaxSize (1L << 5) /* program specified maximum size */
|
||||
#define PResizeInc (1L << 6) /* program specified resize increments */
|
||||
#define PAspect (1L << 7) /* program specified min and max aspect ratios */
|
||||
#define PBaseSize (1L << 8) /* program specified base for incrementing */
|
||||
#define PWinGravity (1L << 9) /* program specified window gravity */
|
||||
|
||||
/* obsolete */
|
||||
#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 */
|
||||
|
||||
|
||||
/*
|
||||
* new structure for manipulating TEXT properties; used with WM_NAME,
|
||||
* WM_ICON_NAME, WM_CLIENT_MACHINE, and WM_COMMAND.
|
||||
*/
|
||||
typedef struct {
|
||||
unsigned char *value; /* same as Property routines */
|
||||
Atom encoding; /* prop type */
|
||||
int format; /* prop data format: 8, 16, or 32 */
|
||||
unsigned long nitems; /* number of data items in value */
|
||||
} XTextProperty;
|
||||
|
||||
#define XNoMemory -1
|
||||
#define XLocaleNotSupported -2
|
||||
#define XConverterNotFound -3
|
||||
|
||||
typedef enum {
|
||||
XStringStyle, /* STRING */
|
||||
XCompoundTextStyle, /* COMPOUND_TEXT */
|
||||
XTextStyle, /* text in owner's encoding (current locale)*/
|
||||
XStdICCTextStyle, /* STRING, else COMPOUND_TEXT */
|
||||
/* The following is an XFree86 extension, introduced in November 2000 */
|
||||
XUTF8StringStyle /* UTF8_STRING */
|
||||
} XICCEncodingStyle;
|
||||
|
||||
typedef struct {
|
||||
int min_width, min_height;
|
||||
int max_width, max_height;
|
||||
int width_inc, height_inc;
|
||||
} XIconSize;
|
||||
|
||||
typedef struct {
|
||||
char *res_name;
|
||||
char *res_class;
|
||||
} XClassHint;
|
||||
|
||||
#ifdef XUTIL_DEFINE_FUNCTIONS
|
||||
extern int XDestroyImage(
|
||||
XImage *ximage);
|
||||
extern unsigned long XGetPixel(
|
||||
XImage *ximage,
|
||||
int x, int y);
|
||||
extern int XPutPixel(
|
||||
XImage *ximage,
|
||||
int x, int y,
|
||||
unsigned long pixel);
|
||||
extern XImage *XSubImage(
|
||||
XImage *ximage,
|
||||
int x, int y,
|
||||
unsigned int width, unsigned int height);
|
||||
extern int XAddPixel(
|
||||
XImage *ximage,
|
||||
long value);
|
||||
#else
|
||||
/*
|
||||
* These macros are used to give some sugar to the image routines so that
|
||||
* naive people are more comfortable with them.
|
||||
*/
|
||||
#define XDestroyImage(ximage) \
|
||||
((*((ximage)->f.destroy_image))((ximage)))
|
||||
#define XGetPixel(ximage, x, y) \
|
||||
((*((ximage)->f.get_pixel))((ximage), (x), (y)))
|
||||
#define XPutPixel(ximage, x, y, pixel) \
|
||||
((*((ximage)->f.put_pixel))((ximage), (x), (y), (pixel)))
|
||||
#define XSubImage(ximage, x, y, width, height) \
|
||||
((*((ximage)->f.sub_image))((ximage), (x), (y), (width), (height)))
|
||||
#define XAddPixel(ximage, value) \
|
||||
((*((ximage)->f.add_pixel))((ximage), (value)))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Compose sequence status structure, used in calling XLookupString.
|
||||
*/
|
||||
typedef struct _XComposeStatus {
|
||||
XPointer compose_ptr; /* state table pointer */
|
||||
int chars_matched; /* match state */
|
||||
} XComposeStatus;
|
||||
|
||||
/*
|
||||
* Keysym macros, used on Keysyms to test for classes of symbols
|
||||
*/
|
||||
#define IsKeypadKey(keysym) \
|
||||
(((KeySym)(keysym) >= XK_KP_Space) && ((KeySym)(keysym) <= XK_KP_Equal))
|
||||
|
||||
#define IsPrivateKeypadKey(keysym) \
|
||||
(((KeySym)(keysym) >= 0x11000000) && ((KeySym)(keysym) <= 0x1100FFFF))
|
||||
|
||||
#define IsCursorKey(keysym) \
|
||||
(((KeySym)(keysym) >= XK_Home) && ((KeySym)(keysym) < XK_Select))
|
||||
|
||||
#define IsPFKey(keysym) \
|
||||
(((KeySym)(keysym) >= XK_KP_F1) && ((KeySym)(keysym) <= XK_KP_F4))
|
||||
|
||||
#define IsFunctionKey(keysym) \
|
||||
(((KeySym)(keysym) >= XK_F1) && ((KeySym)(keysym) <= XK_F35))
|
||||
|
||||
#define IsMiscFunctionKey(keysym) \
|
||||
(((KeySym)(keysym) >= XK_Select) && ((KeySym)(keysym) <= XK_Break))
|
||||
|
||||
#ifdef XK_XKB_KEYS
|
||||
#define IsModifierKey(keysym) \
|
||||
((((KeySym)(keysym) >= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \
|
||||
|| (((KeySym)(keysym) >= XK_ISO_Lock) && \
|
||||
((KeySym)(keysym) <= XK_ISO_Level5_Lock)) \
|
||||
|| ((KeySym)(keysym) == XK_Mode_switch) \
|
||||
|| ((KeySym)(keysym) == XK_Num_Lock))
|
||||
#else
|
||||
#define IsModifierKey(keysym) \
|
||||
((((KeySym)(keysym) >= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \
|
||||
|| ((KeySym)(keysym) == XK_Mode_switch) \
|
||||
|| ((KeySym)(keysym) == XK_Num_Lock))
|
||||
#endif
|
||||
/*
|
||||
* opaque reference to Region data type
|
||||
*/
|
||||
typedef struct _XRegion *Region;
|
||||
|
||||
/* Return values from XRectInRegion() */
|
||||
|
||||
#define RectangleOut 0
|
||||
#define RectangleIn 1
|
||||
#define RectanglePart 2
|
||||
|
||||
|
||||
/*
|
||||
* Information used by the visual utility routines to find desired visual
|
||||
* type from the many visuals a display may support.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
Visual *visual;
|
||||
VisualID visualid;
|
||||
int screen;
|
||||
int depth;
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
int c_class; /* C++ */
|
||||
#else
|
||||
int class;
|
||||
#endif
|
||||
unsigned long red_mask;
|
||||
unsigned long green_mask;
|
||||
unsigned long blue_mask;
|
||||
int colormap_size;
|
||||
int bits_per_rgb;
|
||||
} XVisualInfo;
|
||||
|
||||
#define VisualNoMask 0x0
|
||||
#define VisualIDMask 0x1
|
||||
#define VisualScreenMask 0x2
|
||||
#define VisualDepthMask 0x4
|
||||
#define VisualClassMask 0x8
|
||||
#define VisualRedMaskMask 0x10
|
||||
#define VisualGreenMaskMask 0x20
|
||||
#define VisualBlueMaskMask 0x40
|
||||
#define VisualColormapSizeMask 0x80
|
||||
#define VisualBitsPerRGBMask 0x100
|
||||
#define VisualAllMask 0x1FF
|
||||
|
||||
/*
|
||||
* This defines a window manager property that clients may use to
|
||||
* share standard color maps of type RGB_COLOR_MAP:
|
||||
*/
|
||||
typedef struct {
|
||||
Colormap colormap;
|
||||
unsigned long red_max;
|
||||
unsigned long red_mult;
|
||||
unsigned long green_max;
|
||||
unsigned long green_mult;
|
||||
unsigned long blue_max;
|
||||
unsigned long blue_mult;
|
||||
unsigned long base_pixel;
|
||||
VisualID visualid; /* added by ICCCM version 1 */
|
||||
XID killid; /* added by ICCCM version 1 */
|
||||
} XStandardColormap;
|
||||
|
||||
#define ReleaseByFreeingColormap ((XID) 1L) /* for killid field above */
|
||||
|
||||
|
||||
/*
|
||||
* return codes for XReadBitmapFile and XWriteBitmapFile
|
||||
*/
|
||||
#define BitmapSuccess 0
|
||||
#define BitmapOpenFailed 1
|
||||
#define BitmapFileInvalid 2
|
||||
#define BitmapNoMemory 3
|
||||
|
||||
/****************************************************************
|
||||
*
|
||||
* Context Management
|
||||
*
|
||||
****************************************************************/
|
||||
|
||||
|
||||
/* Associative lookup table return codes */
|
||||
|
||||
#define XCSUCCESS 0 /* No error. */
|
||||
#define XCNOMEM 1 /* Out of memory */
|
||||
#define XCNOENT 2 /* No entry in table */
|
||||
|
||||
typedef int XContext;
|
||||
|
||||
#define XUniqueContext() ((XContext) XrmUniqueQuark())
|
||||
#define XStringToContext(string) ((XContext) XrmStringToQuark(string))
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
/* The following declarations are alphabetized. */
|
||||
|
||||
extern XClassHint *XAllocClassHint (
|
||||
void
|
||||
);
|
||||
|
||||
extern XIconSize *XAllocIconSize (
|
||||
void
|
||||
);
|
||||
|
||||
extern XSizeHints *XAllocSizeHints (
|
||||
void
|
||||
);
|
||||
|
||||
extern XStandardColormap *XAllocStandardColormap (
|
||||
void
|
||||
);
|
||||
|
||||
extern XWMHints *XAllocWMHints (
|
||||
void
|
||||
);
|
||||
|
||||
extern int XClipBox(
|
||||
Region /* r */,
|
||||
XRectangle* /* rect_return */
|
||||
);
|
||||
|
||||
extern Region XCreateRegion(
|
||||
void
|
||||
);
|
||||
|
||||
extern const char *XDefaultString (void);
|
||||
|
||||
extern int XDeleteContext(
|
||||
Display* /* display */,
|
||||
XID /* rid */,
|
||||
XContext /* context */
|
||||
);
|
||||
|
||||
extern int XDestroyRegion(
|
||||
Region /* r */
|
||||
);
|
||||
|
||||
extern int XEmptyRegion(
|
||||
Region /* r */
|
||||
);
|
||||
|
||||
extern int XEqualRegion(
|
||||
Region /* r1 */,
|
||||
Region /* r2 */
|
||||
);
|
||||
|
||||
extern int XFindContext(
|
||||
Display* /* display */,
|
||||
XID /* rid */,
|
||||
XContext /* context */,
|
||||
XPointer* /* data_return */
|
||||
);
|
||||
|
||||
extern Status XGetClassHint(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XClassHint* /* class_hints_return */
|
||||
);
|
||||
|
||||
extern Status XGetIconSizes(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XIconSize** /* size_list_return */,
|
||||
int* /* count_return */
|
||||
);
|
||||
|
||||
extern Status XGetNormalHints(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XSizeHints* /* hints_return */
|
||||
);
|
||||
|
||||
extern Status XGetRGBColormaps(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XStandardColormap** /* stdcmap_return */,
|
||||
int* /* count_return */,
|
||||
Atom /* property */
|
||||
);
|
||||
|
||||
extern Status XGetSizeHints(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XSizeHints* /* hints_return */,
|
||||
Atom /* property */
|
||||
);
|
||||
|
||||
extern Status XGetStandardColormap(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XStandardColormap* /* colormap_return */,
|
||||
Atom /* property */
|
||||
);
|
||||
|
||||
extern Status XGetTextProperty(
|
||||
Display* /* display */,
|
||||
Window /* window */,
|
||||
XTextProperty* /* text_prop_return */,
|
||||
Atom /* property */
|
||||
);
|
||||
|
||||
extern XVisualInfo *XGetVisualInfo(
|
||||
Display* /* display */,
|
||||
long /* vinfo_mask */,
|
||||
XVisualInfo* /* vinfo_template */,
|
||||
int* /* nitems_return */
|
||||
);
|
||||
|
||||
extern Status XGetWMClientMachine(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XTextProperty* /* text_prop_return */
|
||||
);
|
||||
|
||||
extern XWMHints *XGetWMHints(
|
||||
Display* /* display */,
|
||||
Window /* w */
|
||||
);
|
||||
|
||||
extern Status XGetWMIconName(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XTextProperty* /* text_prop_return */
|
||||
);
|
||||
|
||||
extern Status XGetWMName(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XTextProperty* /* text_prop_return */
|
||||
);
|
||||
|
||||
extern Status XGetWMNormalHints(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XSizeHints* /* hints_return */,
|
||||
long* /* supplied_return */
|
||||
);
|
||||
|
||||
extern Status XGetWMSizeHints(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XSizeHints* /* hints_return */,
|
||||
long* /* supplied_return */,
|
||||
Atom /* property */
|
||||
);
|
||||
|
||||
extern Status XGetZoomHints(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XSizeHints* /* zhints_return */
|
||||
);
|
||||
|
||||
extern int XIntersectRegion(
|
||||
Region /* sra */,
|
||||
Region /* srb */,
|
||||
Region /* dr_return */
|
||||
);
|
||||
|
||||
extern void XConvertCase(
|
||||
KeySym /* sym */,
|
||||
KeySym* /* lower */,
|
||||
KeySym* /* upper */
|
||||
);
|
||||
|
||||
extern int XLookupString(
|
||||
XKeyEvent* /* event_struct */,
|
||||
char* /* buffer_return */,
|
||||
int /* bytes_buffer */,
|
||||
KeySym* /* keysym_return */,
|
||||
XComposeStatus* /* status_in_out */
|
||||
);
|
||||
|
||||
extern Status XMatchVisualInfo(
|
||||
Display* /* display */,
|
||||
int /* screen */,
|
||||
int /* depth */,
|
||||
int /* class */,
|
||||
XVisualInfo* /* vinfo_return */
|
||||
);
|
||||
|
||||
extern int XOffsetRegion(
|
||||
Region /* r */,
|
||||
int /* dx */,
|
||||
int /* dy */
|
||||
);
|
||||
|
||||
extern Bool XPointInRegion(
|
||||
Region /* r */,
|
||||
int /* x */,
|
||||
int /* y */
|
||||
);
|
||||
|
||||
extern Region XPolygonRegion(
|
||||
XPoint* /* points */,
|
||||
int /* n */,
|
||||
int /* fill_rule */
|
||||
);
|
||||
|
||||
extern int XRectInRegion(
|
||||
Region /* r */,
|
||||
int /* x */,
|
||||
int /* y */,
|
||||
unsigned int /* width */,
|
||||
unsigned int /* height */
|
||||
);
|
||||
|
||||
extern int XSaveContext(
|
||||
Display* /* display */,
|
||||
XID /* rid */,
|
||||
XContext /* context */,
|
||||
_Xconst char* /* data */
|
||||
);
|
||||
|
||||
extern int XSetClassHint(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XClassHint* /* class_hints */
|
||||
);
|
||||
|
||||
extern int XSetIconSizes(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XIconSize* /* size_list */,
|
||||
int /* count */
|
||||
);
|
||||
|
||||
extern int XSetNormalHints(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XSizeHints* /* hints */
|
||||
);
|
||||
|
||||
extern void XSetRGBColormaps(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XStandardColormap* /* stdcmaps */,
|
||||
int /* count */,
|
||||
Atom /* property */
|
||||
);
|
||||
|
||||
extern int XSetSizeHints(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XSizeHints* /* hints */,
|
||||
Atom /* property */
|
||||
);
|
||||
|
||||
extern int XSetStandardProperties(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
_Xconst char* /* window_name */,
|
||||
_Xconst char* /* icon_name */,
|
||||
Pixmap /* icon_pixmap */,
|
||||
char** /* argv */,
|
||||
int /* argc */,
|
||||
XSizeHints* /* hints */
|
||||
);
|
||||
|
||||
extern void XSetTextProperty(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XTextProperty* /* text_prop */,
|
||||
Atom /* property */
|
||||
);
|
||||
|
||||
extern void XSetWMClientMachine(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XTextProperty* /* text_prop */
|
||||
);
|
||||
|
||||
extern int XSetWMHints(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XWMHints* /* wm_hints */
|
||||
);
|
||||
|
||||
extern void XSetWMIconName(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XTextProperty* /* text_prop */
|
||||
);
|
||||
|
||||
extern void XSetWMName(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XTextProperty* /* text_prop */
|
||||
);
|
||||
|
||||
extern void XSetWMNormalHints(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XSizeHints* /* hints */
|
||||
);
|
||||
|
||||
extern void XSetWMProperties(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XTextProperty* /* window_name */,
|
||||
XTextProperty* /* icon_name */,
|
||||
char** /* argv */,
|
||||
int /* argc */,
|
||||
XSizeHints* /* normal_hints */,
|
||||
XWMHints* /* wm_hints */,
|
||||
XClassHint* /* class_hints */
|
||||
);
|
||||
|
||||
extern void XmbSetWMProperties(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
_Xconst char* /* window_name */,
|
||||
_Xconst char* /* icon_name */,
|
||||
char** /* argv */,
|
||||
int /* argc */,
|
||||
XSizeHints* /* normal_hints */,
|
||||
XWMHints* /* wm_hints */,
|
||||
XClassHint* /* class_hints */
|
||||
);
|
||||
|
||||
extern void Xutf8SetWMProperties(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
_Xconst char* /* window_name */,
|
||||
_Xconst char* /* icon_name */,
|
||||
char** /* argv */,
|
||||
int /* argc */,
|
||||
XSizeHints* /* normal_hints */,
|
||||
XWMHints* /* wm_hints */,
|
||||
XClassHint* /* class_hints */
|
||||
);
|
||||
|
||||
extern void XSetWMSizeHints(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XSizeHints* /* hints */,
|
||||
Atom /* property */
|
||||
);
|
||||
|
||||
extern int XSetRegion(
|
||||
Display* /* display */,
|
||||
GC /* gc */,
|
||||
Region /* r */
|
||||
);
|
||||
|
||||
extern void XSetStandardColormap(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XStandardColormap* /* colormap */,
|
||||
Atom /* property */
|
||||
);
|
||||
|
||||
extern int XSetZoomHints(
|
||||
Display* /* display */,
|
||||
Window /* w */,
|
||||
XSizeHints* /* zhints */
|
||||
);
|
||||
|
||||
extern int XShrinkRegion(
|
||||
Region /* r */,
|
||||
int /* dx */,
|
||||
int /* dy */
|
||||
);
|
||||
|
||||
extern Status XStringListToTextProperty(
|
||||
char** /* list */,
|
||||
int /* count */,
|
||||
XTextProperty* /* text_prop_return */
|
||||
);
|
||||
|
||||
extern int XSubtractRegion(
|
||||
Region /* sra */,
|
||||
Region /* srb */,
|
||||
Region /* dr_return */
|
||||
);
|
||||
|
||||
extern int XmbTextListToTextProperty(
|
||||
Display* display,
|
||||
char** list,
|
||||
int count,
|
||||
XICCEncodingStyle style,
|
||||
XTextProperty* text_prop_return
|
||||
);
|
||||
|
||||
extern int XwcTextListToTextProperty(
|
||||
Display* display,
|
||||
wchar_t** list,
|
||||
int count,
|
||||
XICCEncodingStyle style,
|
||||
XTextProperty* text_prop_return
|
||||
);
|
||||
|
||||
extern int Xutf8TextListToTextProperty(
|
||||
Display* display,
|
||||
char** list,
|
||||
int count,
|
||||
XICCEncodingStyle style,
|
||||
XTextProperty* text_prop_return
|
||||
);
|
||||
|
||||
extern void XwcFreeStringList(
|
||||
wchar_t** list
|
||||
);
|
||||
|
||||
extern Status XTextPropertyToStringList(
|
||||
XTextProperty* /* text_prop */,
|
||||
char*** /* list_return */,
|
||||
int* /* count_return */
|
||||
);
|
||||
|
||||
extern int XmbTextPropertyToTextList(
|
||||
Display* display,
|
||||
const XTextProperty* text_prop,
|
||||
char*** list_return,
|
||||
int* count_return
|
||||
);
|
||||
|
||||
extern int XwcTextPropertyToTextList(
|
||||
Display* display,
|
||||
const XTextProperty* text_prop,
|
||||
wchar_t*** list_return,
|
||||
int* count_return
|
||||
);
|
||||
|
||||
extern int Xutf8TextPropertyToTextList(
|
||||
Display* display,
|
||||
const XTextProperty* text_prop,
|
||||
char*** list_return,
|
||||
int* count_return
|
||||
);
|
||||
|
||||
extern int XUnionRectWithRegion(
|
||||
XRectangle* /* rectangle */,
|
||||
Region /* src_region */,
|
||||
Region /* dest_region_return */
|
||||
);
|
||||
|
||||
extern int XUnionRegion(
|
||||
Region /* sra */,
|
||||
Region /* srb */,
|
||||
Region /* dr_return */
|
||||
);
|
||||
|
||||
extern int XWMGeometry(
|
||||
Display* /* display */,
|
||||
int /* screen_number */,
|
||||
_Xconst char* /* user_geometry */,
|
||||
_Xconst char* /* default_geometry */,
|
||||
unsigned int /* border_width */,
|
||||
XSizeHints* /* hints */,
|
||||
int* /* x_return */,
|
||||
int* /* y_return */,
|
||||
int* /* width_return */,
|
||||
int* /* height_return */,
|
||||
int* /* gravity_return */
|
||||
);
|
||||
|
||||
extern int XXorRegion(
|
||||
Region /* sra */,
|
||||
Region /* srb */,
|
||||
Region /* dr_return */
|
||||
);
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _X11_XUTIL_H_ */
|
|
@ -0,0 +1,79 @@
|
|||
#ifndef _XW32DEFS_H
|
||||
# define _XW32DEFS_H
|
||||
|
||||
# ifdef __GNUC__ /* mingw is more close to unix than msvc */
|
||||
# if !defined(__daddr_t_defined)
|
||||
typedef char *caddr_t;
|
||||
# endif
|
||||
# define lstat stat
|
||||
|
||||
# else
|
||||
typedef char *caddr_t;
|
||||
|
||||
# define access _access
|
||||
# define alloca _alloca
|
||||
# define chdir _chdir
|
||||
# define chmod _chmod
|
||||
# define close _close
|
||||
# define creat _creat
|
||||
# define dup _dup
|
||||
# define dup2 _dup2
|
||||
# define environ _environ
|
||||
# define execl _execl
|
||||
# define execle _execle
|
||||
# define execlp _execlp
|
||||
# define execlpe _execlpe
|
||||
# define execv _execv
|
||||
# define execve _execve
|
||||
# define execvp _execvp
|
||||
# define execvpe _execvpe
|
||||
# define fdopen _fdopen
|
||||
# define fileno _fileno
|
||||
# define fstat _fstat
|
||||
# define getcwd _getcwd
|
||||
# define getpid _getpid
|
||||
# define hypot _hypot
|
||||
# define isascii __isascii
|
||||
# define isatty _isatty
|
||||
# define lseek _lseek
|
||||
# define mkdir _mkdir
|
||||
# define mktemp _mktemp
|
||||
# define open _open
|
||||
# define putenv _putenv
|
||||
# define read _read
|
||||
# define rmdir _rmdir
|
||||
# define sleep(x) Sleep((x) * 1000)
|
||||
# define stat _stat
|
||||
# define sys_errlist _sys_errlist
|
||||
# define sys_nerr _sys_nerr
|
||||
# define umask _umask
|
||||
# define unlink _unlink
|
||||
# define write _write
|
||||
# define random rand
|
||||
# define srandom srand
|
||||
|
||||
# define O_RDONLY _O_RDONLY
|
||||
# define O_WRONLY _O_WRONLY
|
||||
# define O_RDWR _O_RDWR
|
||||
# define O_APPEND _O_APPEND
|
||||
# define O_CREAT _O_CREAT
|
||||
# define O_TRUNC _O_TRUNC
|
||||
# define O_EXCL _O_EXCL
|
||||
# define O_TEXT _O_TEXT
|
||||
# define O_BINARY _O_BINARY
|
||||
# define O_RAW _O_BINARY
|
||||
|
||||
# define S_IFMT _S_IFMT
|
||||
# define S_IFDIR _S_IFDIR
|
||||
# define S_IFCHR _S_IFCHR
|
||||
# define S_IFREG _S_IFREG
|
||||
# define S_IREAD _S_IREAD
|
||||
# define S_IWRITE _S_IWRITE
|
||||
# define S_IEXEC _S_IEXEC
|
||||
|
||||
# define F_OK 0
|
||||
# define X_OK 1
|
||||
# define W_OK 2
|
||||
# define R_OK 4
|
||||
# endif /* __GNUC__ */
|
||||
#endif
|
|
@ -0,0 +1,114 @@
|
|||
/*
|
||||
|
||||
Copyright 1996, 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 MERCHANTABIL-
|
||||
ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABIL-
|
||||
ITY, 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.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* This header file has the sole purpose of allowing the inclusion of
|
||||
* windows.h without getting any name conflicts with X headers code, by
|
||||
* renaming or disabling the conflicting definitions from windows.h
|
||||
*/
|
||||
|
||||
/*
|
||||
* Mingw.org versions of the Windows API headers actually avoid
|
||||
* making the conflicting definitions if XFree86Server is defined, so we
|
||||
* need to remember if that was defined and undefine it during including
|
||||
* windows.h (so the conflicting definitions get wrapped correctly), and
|
||||
* then redefine it afterwards. (This was never the correct thing to
|
||||
* do as it's no help at all to X11 clients which also need to use the
|
||||
* Win32 API)
|
||||
*/
|
||||
#undef _XFree86Server
|
||||
#ifdef XFree86Server
|
||||
# define _XFree86Server
|
||||
# undef XFree86Server
|
||||
#endif
|
||||
|
||||
/*
|
||||
* There doesn't seem to be a good way to wrap the min/max macros from
|
||||
* windows.h, so we simply avoid defining them completely, allowing any
|
||||
* pre-existing definition to stand.
|
||||
*
|
||||
*/
|
||||
#define NOMINMAX
|
||||
|
||||
/*
|
||||
* mingw-w64 headers define BOOL as a typedef, protecting against macros
|
||||
* mingw.org headers define BOOL in terms of WINBOOL
|
||||
* ... so try to come up with something which works with both :-)
|
||||
*/
|
||||
#define _NO_BOOL_TYPEDEF
|
||||
#define BOOL WINBOOL
|
||||
#define INT32 wINT32
|
||||
#ifdef __x86_64__
|
||||
#define INT64 wINT64
|
||||
#define LONG64 wLONG64
|
||||
#endif
|
||||
#undef Status
|
||||
#define Status wStatus
|
||||
#define ATOM wATOM
|
||||
#define BYTE wBYTE
|
||||
#define FreeResource wFreeResource
|
||||
#include <windows.h>
|
||||
#undef NOMINMAX
|
||||
#undef Status
|
||||
#define Status int
|
||||
#undef BYTE
|
||||
#undef BOOL
|
||||
#undef INT32
|
||||
#undef INT64
|
||||
#undef LONG64
|
||||
#undef ATOM
|
||||
#undef FreeResource
|
||||
#undef CreateWindowA
|
||||
|
||||
/*
|
||||
* Older version of this header used to name the windows API bool type wBOOL,
|
||||
* rather than more standard name WINBOOL
|
||||
*/
|
||||
#define wBOOL WINBOOL
|
||||
|
||||
#ifdef RESOURCE_H
|
||||
# undef RT_FONT
|
||||
# undef RT_CURSOR
|
||||
# define RT_FONT ((RESTYPE)4)
|
||||
# define RT_CURSOR ((RESTYPE)5)
|
||||
#endif
|
||||
|
||||
#ifndef __CYGWIN__
|
||||
#define sleep(x) Sleep((x) * 1000)
|
||||
#endif
|
||||
|
||||
#if defined(WIN32) && (!defined(PATH_MAX) || PATH_MAX < 1024)
|
||||
# undef PATH_MAX
|
||||
# define PATH_MAX 1024
|
||||
#endif
|
||||
|
||||
#ifdef _XFree86Server
|
||||
# define XFree86Server
|
||||
# undef _XFree86Server
|
||||
#endif
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
|
||||
Copyright 1996, 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 MERCHANTABIL-
|
||||
ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABIL-
|
||||
ITY, 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.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* This header file has for sole purpose to allow to include winsock.h
|
||||
* without getting any name conflicts with our code.
|
||||
* Conflicts come from the fact that including winsock.h actually pulls
|
||||
* in the whole Windows API...
|
||||
*/
|
||||
|
||||
#undef _XFree86Server
|
||||
#ifdef XFree86Server
|
||||
# define _XFree86Server
|
||||
# undef XFree86Server
|
||||
#endif
|
||||
|
||||
/*
|
||||
* mingw-w64 headers define BOOL as a typedef, protecting against macros
|
||||
* mingw.org headers define BOOL in terms of WINBOOL
|
||||
* ... so try to come up with something which works with both :-)
|
||||
*/
|
||||
#define _NO_BOOL_TYPEDEF
|
||||
#define BOOL WINBOOL
|
||||
#define INT32 wINT32
|
||||
#undef Status
|
||||
#define Status wStatus
|
||||
#define ATOM wATOM
|
||||
#define BYTE wBYTE
|
||||
#define FreeResource wFreeResource
|
||||
#include <winsock2.h>
|
||||
#undef Status
|
||||
#define Status int
|
||||
#undef BYTE
|
||||
#undef BOOL
|
||||
#undef INT32
|
||||
#undef ATOM
|
||||
#undef FreeResource
|
||||
#undef CreateWindowA
|
||||
#undef RT_FONT
|
||||
#undef RT_CURSOR
|
||||
|
||||
/*
|
||||
* Older version of this header used to name the windows API bool type wBOOL,
|
||||
* rather than more standard name WINBOOL
|
||||
*/
|
||||
#define wBOOL WINBOOL
|
||||
|
||||
#ifdef _XFree86Server
|
||||
# define XFree86Server
|
||||
# undef _XFree86Server
|
||||
#endif
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
/******************************************************************
|
||||
Copyright 1987 by Apollo Computer Inc., Chelmsford, Massachusetts.
|
||||
Copyright 1989 by Hewlett-Packard Company.
|
||||
|
||||
All Rights Reserved
|
||||
|
||||
Permission to use, duplicate, change, and distribute this software and
|
||||
its documentation for any purpose and without fee is granted, provided
|
||||
that the above copyright notice appear in such copy and that this
|
||||
copyright notice appear in all supporting documentation, and that the
|
||||
names of Apollo Computer Inc., the Hewlett-Packard Company, or the X
|
||||
Consortium not be used in advertising or publicity pertaining to
|
||||
distribution of the software without written prior permission.
|
||||
|
||||
HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD
|
||||
TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. Hewlett-Packard shall not be liable for errors
|
||||
contained herein or direct, indirect, special, incidental or
|
||||
consequential damages in connection with the furnishing,
|
||||
performance, or use of this material.
|
||||
|
||||
This software is not subject to any license of the American
|
||||
Telephone and Telegraph Company or of the Regents of the
|
||||
University of California.
|
||||
******************************************************************/
|
||||
|
||||
#define apXK_LineDel 0x1000FF00
|
||||
#define apXK_CharDel 0x1000FF01
|
||||
#define apXK_Copy 0x1000FF02
|
||||
#define apXK_Cut 0x1000FF03
|
||||
#define apXK_Paste 0x1000FF04
|
||||
#define apXK_Move 0x1000FF05
|
||||
#define apXK_Grow 0x1000FF06
|
||||
#define apXK_Cmd 0x1000FF07
|
||||
#define apXK_Shell 0x1000FF08
|
||||
#define apXK_LeftBar 0x1000FF09
|
||||
#define apXK_RightBar 0x1000FF0A
|
||||
#define apXK_LeftBox 0x1000FF0B
|
||||
#define apXK_RightBox 0x1000FF0C
|
||||
#define apXK_UpBox 0x1000FF0D
|
||||
#define apXK_DownBox 0x1000FF0E
|
||||
#define apXK_Pop 0x1000FF0F
|
||||
#define apXK_Read 0x1000FF10
|
||||
#define apXK_Edit 0x1000FF11
|
||||
#define apXK_Save 0x1000FF12
|
||||
#define apXK_Exit 0x1000FF13
|
||||
#define apXK_Repeat 0x1000FF14
|
||||
|
||||
#define apXK_KP_parenleft 0x1000FFA8
|
||||
#define apXK_KP_parenright 0x1000FFA9
|
|
@ -0,0 +1,111 @@
|
|||
/*
|
||||
|
||||
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.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _X11_CURSORFONT_H_
|
||||
#define _X11_CURSORFONT_H_
|
||||
|
||||
#define XC_num_glyphs 154
|
||||
#define XC_X_cursor 0
|
||||
#define XC_arrow 2
|
||||
#define XC_based_arrow_down 4
|
||||
#define XC_based_arrow_up 6
|
||||
#define XC_boat 8
|
||||
#define XC_bogosity 10
|
||||
#define XC_bottom_left_corner 12
|
||||
#define XC_bottom_right_corner 14
|
||||
#define XC_bottom_side 16
|
||||
#define XC_bottom_tee 18
|
||||
#define XC_box_spiral 20
|
||||
#define XC_center_ptr 22
|
||||
#define XC_circle 24
|
||||
#define XC_clock 26
|
||||
#define XC_coffee_mug 28
|
||||
#define XC_cross 30
|
||||
#define XC_cross_reverse 32
|
||||
#define XC_crosshair 34
|
||||
#define XC_diamond_cross 36
|
||||
#define XC_dot 38
|
||||
#define XC_dotbox 40
|
||||
#define XC_double_arrow 42
|
||||
#define XC_draft_large 44
|
||||
#define XC_draft_small 46
|
||||
#define XC_draped_box 48
|
||||
#define XC_exchange 50
|
||||
#define XC_fleur 52
|
||||
#define XC_gobbler 54
|
||||
#define XC_gumby 56
|
||||
#define XC_hand1 58
|
||||
#define XC_hand2 60
|
||||
#define XC_heart 62
|
||||
#define XC_icon 64
|
||||
#define XC_iron_cross 66
|
||||
#define XC_left_ptr 68
|
||||
#define XC_left_side 70
|
||||
#define XC_left_tee 72
|
||||
#define XC_leftbutton 74
|
||||
#define XC_ll_angle 76
|
||||
#define XC_lr_angle 78
|
||||
#define XC_man 80
|
||||
#define XC_middlebutton 82
|
||||
#define XC_mouse 84
|
||||
#define XC_pencil 86
|
||||
#define XC_pirate 88
|
||||
#define XC_plus 90
|
||||
#define XC_question_arrow 92
|
||||
#define XC_right_ptr 94
|
||||
#define XC_right_side 96
|
||||
#define XC_right_tee 98
|
||||
#define XC_rightbutton 100
|
||||
#define XC_rtl_logo 102
|
||||
#define XC_sailboat 104
|
||||
#define XC_sb_down_arrow 106
|
||||
#define XC_sb_h_double_arrow 108
|
||||
#define XC_sb_left_arrow 110
|
||||
#define XC_sb_right_arrow 112
|
||||
#define XC_sb_up_arrow 114
|
||||
#define XC_sb_v_double_arrow 116
|
||||
#define XC_shuttle 118
|
||||
#define XC_sizing 120
|
||||
#define XC_spider 122
|
||||
#define XC_spraycan 124
|
||||
#define XC_star 126
|
||||
#define XC_target 128
|
||||
#define XC_tcross 130
|
||||
#define XC_top_left_arrow 132
|
||||
#define XC_top_left_corner 134
|
||||
#define XC_top_right_corner 136
|
||||
#define XC_top_side 138
|
||||
#define XC_top_tee 140
|
||||
#define XC_trek 142
|
||||
#define XC_ul_angle 144
|
||||
#define XC_umbrella 146
|
||||
#define XC_ur_angle 148
|
||||
#define XC_watch 150
|
||||
#define XC_xterm 152
|
||||
|
||||
#endif /* _X11_CURSORFONT_H_ */
|
|
@ -0,0 +1,65 @@
|
|||
/**************************************************************************
|
||||
|
||||
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
|
||||
Copyright 2000 VA Linux Systems, Inc.
|
||||
All Rights Reserved.
|
||||
|
||||
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, sub license, 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 (including the
|
||||
next paragraph) 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 NON-INFRINGEMENT.
|
||||
IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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.
|
||||
|
||||
**************************************************************************/
|
||||
|
||||
/**
|
||||
* \file xf86dri.h
|
||||
* Protocol numbers and function prototypes for DRI X protocol.
|
||||
*
|
||||
* \author Kevin E. Martin <martin@valinux.com>
|
||||
* \author Jens Owen <jens@tungstengraphics.com>
|
||||
* \author Rickard E. (Rik) Faith <faith@valinux.com>
|
||||
*/
|
||||
|
||||
#ifndef _XF86DRI_H_
|
||||
#define _XF86DRI_H_
|
||||
|
||||
#include <xf86drm.h>
|
||||
|
||||
#define X_XF86DRIQueryVersion 0
|
||||
#define X_XF86DRIQueryDirectRenderingCapable 1
|
||||
#define X_XF86DRIOpenConnection 2
|
||||
#define X_XF86DRICloseConnection 3
|
||||
#define X_XF86DRIGetClientDriverName 4
|
||||
#define X_XF86DRICreateContext 5
|
||||
#define X_XF86DRIDestroyContext 6
|
||||
#define X_XF86DRICreateDrawable 7
|
||||
#define X_XF86DRIDestroyDrawable 8
|
||||
#define X_XF86DRIGetDrawableInfo 9
|
||||
#define X_XF86DRIGetDeviceInfo 10
|
||||
#define X_XF86DRIAuthConnection 11
|
||||
#define X_XF86DRIOpenFullScreen 12 /* Deprecated */
|
||||
#define X_XF86DRICloseFullScreen 13 /* Deprecated */
|
||||
|
||||
#define XF86DRINumberEvents 0
|
||||
|
||||
#define XF86DRIClientNotLocal 0
|
||||
#define XF86DRIOperationNotSupported 1
|
||||
#define XF86DRINumberErrors (XF86DRIOperationNotSupported + 1)
|
||||
|
||||
#endif /* _XF86DRI_H_ */
|
||||
|
|
@ -0,0 +1,342 @@
|
|||
/**************************************************************************
|
||||
|
||||
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
|
||||
Copyright 2000 VA Linux Systems, Inc.
|
||||
All Rights Reserved.
|
||||
|
||||
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, sub license, 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 (including the
|
||||
next paragraph) 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 NON-INFRINGEMENT.
|
||||
IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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.
|
||||
|
||||
**************************************************************************/
|
||||
|
||||
/*
|
||||
* Authors:
|
||||
* Kevin E. Martin <martin@valinux.com>
|
||||
* Jens Owen <jens@tungstengraphics.com>
|
||||
* Rickard E. (Rik) Faith <faith@valinux.com>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _XF86DRISTR_H_
|
||||
#define _XF86DRISTR_H_
|
||||
|
||||
#include "xf86dri.h"
|
||||
|
||||
#define XF86DRINAME "XFree86-DRI"
|
||||
|
||||
/* The DRI version number. This was originally set to be the same of the
|
||||
* XFree86 version number. However, this version is really indepedent of
|
||||
* the XFree86 version.
|
||||
*
|
||||
* Version History:
|
||||
* 4.0.0: Original
|
||||
* 4.0.1: Patch to bump clipstamp when windows are destroyed, 28 May 02
|
||||
* 4.1.0: Add transition from single to multi in DRMInfo rec, 24 Jun 02
|
||||
*/
|
||||
#define XF86DRI_MAJOR_VERSION 4
|
||||
#define XF86DRI_MINOR_VERSION 1
|
||||
#define XF86DRI_PATCH_VERSION 0
|
||||
|
||||
typedef struct _XF86DRIQueryVersion {
|
||||
CARD8 reqType; /* always DRIReqCode */
|
||||
CARD8 driReqType; /* always X_DRIQueryVersion */
|
||||
CARD16 length B16;
|
||||
} xXF86DRIQueryVersionReq;
|
||||
#define sz_xXF86DRIQueryVersionReq 4
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BOOL pad1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD16 majorVersion B16; /* major version of DRI protocol */
|
||||
CARD16 minorVersion B16; /* minor version of DRI protocol */
|
||||
CARD32 patchVersion B32; /* patch version of DRI protocol */
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
} xXF86DRIQueryVersionReply;
|
||||
#define sz_xXF86DRIQueryVersionReply 32
|
||||
|
||||
typedef struct _XF86DRIQueryDirectRenderingCapable {
|
||||
CARD8 reqType; /* always DRIReqCode */
|
||||
CARD8 driReqType; /* X_DRIQueryDirectRenderingCapable */
|
||||
CARD16 length B16;
|
||||
CARD32 screen B32;
|
||||
} xXF86DRIQueryDirectRenderingCapableReq;
|
||||
#define sz_xXF86DRIQueryDirectRenderingCapableReq 8
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BOOL pad1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
BOOL isCapable;
|
||||
BOOL pad2;
|
||||
BOOL pad3;
|
||||
BOOL pad4;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
CARD32 pad7 B32;
|
||||
CARD32 pad8 B32;
|
||||
CARD32 pad9 B32;
|
||||
} xXF86DRIQueryDirectRenderingCapableReply;
|
||||
#define sz_xXF86DRIQueryDirectRenderingCapableReply 32
|
||||
|
||||
typedef struct _XF86DRIOpenConnection {
|
||||
CARD8 reqType; /* always DRIReqCode */
|
||||
CARD8 driReqType; /* always X_DRIOpenConnection */
|
||||
CARD16 length B16;
|
||||
CARD32 screen B32;
|
||||
} xXF86DRIOpenConnectionReq;
|
||||
#define sz_xXF86DRIOpenConnectionReq 8
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BOOL pad1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 hSAREALow B32;
|
||||
CARD32 hSAREAHigh B32;
|
||||
CARD32 busIdStringLength B32;
|
||||
CARD32 pad6 B32;
|
||||
CARD32 pad7 B32;
|
||||
CARD32 pad8 B32;
|
||||
} xXF86DRIOpenConnectionReply;
|
||||
#define sz_xXF86DRIOpenConnectionReply 32
|
||||
|
||||
typedef struct _XF86DRIAuthConnection {
|
||||
CARD8 reqType; /* always DRIReqCode */
|
||||
CARD8 driReqType; /* always X_DRICloseConnection */
|
||||
CARD16 length B16;
|
||||
CARD32 screen B32;
|
||||
CARD32 magic B32;
|
||||
} xXF86DRIAuthConnectionReq;
|
||||
#define sz_xXF86DRIAuthConnectionReq 12
|
||||
|
||||
typedef struct {
|
||||
BYTE type;
|
||||
BOOL pad1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 authenticated B32;
|
||||
CARD32 pad2 B32;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
} xXF86DRIAuthConnectionReply;
|
||||
#define zx_xXF86DRIAuthConnectionReply 32
|
||||
|
||||
typedef struct _XF86DRICloseConnection {
|
||||
CARD8 reqType; /* always DRIReqCode */
|
||||
CARD8 driReqType; /* always X_DRICloseConnection */
|
||||
CARD16 length B16;
|
||||
CARD32 screen B32;
|
||||
} xXF86DRICloseConnectionReq;
|
||||
#define sz_xXF86DRICloseConnectionReq 8
|
||||
|
||||
typedef struct _XF86DRIGetClientDriverName {
|
||||
CARD8 reqType; /* always DRIReqCode */
|
||||
CARD8 driReqType; /* always X_DRIGetClientDriverName */
|
||||
CARD16 length B16;
|
||||
CARD32 screen B32;
|
||||
} xXF86DRIGetClientDriverNameReq;
|
||||
#define sz_xXF86DRIGetClientDriverNameReq 8
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BOOL pad1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 ddxDriverMajorVersion B32;
|
||||
CARD32 ddxDriverMinorVersion B32;
|
||||
CARD32 ddxDriverPatchVersion B32;
|
||||
CARD32 clientDriverNameLength B32;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
} xXF86DRIGetClientDriverNameReply;
|
||||
#define sz_xXF86DRIGetClientDriverNameReply 32
|
||||
|
||||
typedef struct _XF86DRICreateContext {
|
||||
CARD8 reqType; /* always DRIReqCode */
|
||||
CARD8 driReqType; /* always X_DRICreateContext */
|
||||
CARD16 length B16;
|
||||
CARD32 screen B32;
|
||||
CARD32 visual B32;
|
||||
CARD32 context B32;
|
||||
} xXF86DRICreateContextReq;
|
||||
#define sz_xXF86DRICreateContextReq 16
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BOOL pad1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 hHWContext B32;
|
||||
CARD32 pad2 B32;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
} xXF86DRICreateContextReply;
|
||||
#define sz_xXF86DRICreateContextReply 32
|
||||
|
||||
typedef struct _XF86DRIDestroyContext {
|
||||
CARD8 reqType; /* always DRIReqCode */
|
||||
CARD8 driReqType; /* always X_DRIDestroyContext */
|
||||
CARD16 length B16;
|
||||
CARD32 screen B32;
|
||||
CARD32 context B32;
|
||||
} xXF86DRIDestroyContextReq;
|
||||
#define sz_xXF86DRIDestroyContextReq 12
|
||||
|
||||
typedef struct _XF86DRICreateDrawable {
|
||||
CARD8 reqType; /* always DRIReqCode */
|
||||
CARD8 driReqType; /* always X_DRICreateDrawable */
|
||||
CARD16 length B16;
|
||||
CARD32 screen B32;
|
||||
CARD32 drawable B32;
|
||||
} xXF86DRICreateDrawableReq;
|
||||
#define sz_xXF86DRICreateDrawableReq 12
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BOOL pad1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 hHWDrawable B32;
|
||||
CARD32 pad2 B32;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
} xXF86DRICreateDrawableReply;
|
||||
#define sz_xXF86DRICreateDrawableReply 32
|
||||
|
||||
typedef struct _XF86DRIDestroyDrawable {
|
||||
CARD8 reqType; /* always DRIReqCode */
|
||||
CARD8 driReqType; /* always X_DRIDestroyDrawable */
|
||||
CARD16 length B16;
|
||||
CARD32 screen B32;
|
||||
CARD32 drawable B32;
|
||||
} xXF86DRIDestroyDrawableReq;
|
||||
#define sz_xXF86DRIDestroyDrawableReq 12
|
||||
|
||||
typedef struct _XF86DRIGetDrawableInfo {
|
||||
CARD8 reqType; /* always DRIReqCode */
|
||||
CARD8 driReqType; /* always X_DRIGetDrawableInfo */
|
||||
CARD16 length B16;
|
||||
CARD32 screen B32;
|
||||
CARD32 drawable B32;
|
||||
} xXF86DRIGetDrawableInfoReq;
|
||||
#define sz_xXF86DRIGetDrawableInfoReq 12
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BOOL pad1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 drawableTableIndex B32;
|
||||
CARD32 drawableTableStamp B32;
|
||||
INT16 drawableX B16;
|
||||
INT16 drawableY B16;
|
||||
INT16 drawableWidth B16;
|
||||
INT16 drawableHeight B16;
|
||||
CARD32 numClipRects B32;
|
||||
INT16 backX B16;
|
||||
INT16 backY B16;
|
||||
CARD32 numBackClipRects B32;
|
||||
} xXF86DRIGetDrawableInfoReply;
|
||||
|
||||
#define sz_xXF86DRIGetDrawableInfoReply 36
|
||||
|
||||
|
||||
typedef struct _XF86DRIGetDeviceInfo {
|
||||
CARD8 reqType; /* always DRIReqCode */
|
||||
CARD8 driReqType; /* always X_DRIGetDeviceInfo */
|
||||
CARD16 length B16;
|
||||
CARD32 screen B32;
|
||||
} xXF86DRIGetDeviceInfoReq;
|
||||
#define sz_xXF86DRIGetDeviceInfoReq 8
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BOOL pad1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 hFrameBufferLow B32;
|
||||
CARD32 hFrameBufferHigh B32;
|
||||
CARD32 framebufferOrigin B32;
|
||||
CARD32 framebufferSize B32;
|
||||
CARD32 framebufferStride B32;
|
||||
CARD32 devPrivateSize B32;
|
||||
} xXF86DRIGetDeviceInfoReply;
|
||||
#define sz_xXF86DRIGetDeviceInfoReply 32
|
||||
|
||||
typedef struct _XF86DRIOpenFullScreen {
|
||||
CARD8 reqType; /* always DRIReqCode */
|
||||
CARD8 driReqType; /* always X_DRIOpenFullScreen */
|
||||
CARD16 length B16;
|
||||
CARD32 screen B32;
|
||||
CARD32 drawable B32;
|
||||
} xXF86DRIOpenFullScreenReq;
|
||||
#define sz_xXF86DRIOpenFullScreenReq 12
|
||||
|
||||
typedef struct {
|
||||
BYTE type;
|
||||
BOOL pad1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 isFullScreen B32;
|
||||
CARD32 pad2 B32;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
} xXF86DRIOpenFullScreenReply;
|
||||
#define sz_xXF86DRIOpenFullScreenReply 32
|
||||
|
||||
typedef struct _XF86DRICloseFullScreen {
|
||||
CARD8 reqType; /* always DRIReqCode */
|
||||
CARD8 driReqType; /* always X_DRICloseFullScreen */
|
||||
CARD16 length B16;
|
||||
CARD32 screen B32;
|
||||
CARD32 drawable B32;
|
||||
} xXF86DRICloseFullScreenReq;
|
||||
#define sz_xXF86DRICloseFullScreenReq 12
|
||||
|
||||
typedef struct {
|
||||
BYTE type;
|
||||
BOOL pad1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 pad2 B32;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
CARD32 pad7 B32;
|
||||
} xXF86DRICloseFullScreenReply;
|
||||
#define sz_xXF86DRICloseFullScreenReply 32
|
||||
|
||||
|
||||
#endif /* _XF86DRISTR_H_ */
|
|
@ -0,0 +1,3 @@
|
|||
#warning "xf86dristr.h is obsolete and may be removed in the future."
|
||||
#warning "include <X11/dri/xf86driproto.h> for the protocol defines."
|
||||
#include <X11/dri/xf86driproto.h>
|
|
@ -0,0 +1,36 @@
|
|||
/************************************************************
|
||||
Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc.
|
||||
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 Silicon Graphics not be
|
||||
used in advertising or publicity pertaining to distribution
|
||||
of the software without specific prior written permission.
|
||||
Silicon Graphics makes no representation about the suitability
|
||||
of this software for any purpose. It is provided "as is"
|
||||
without any express or implied warranty.
|
||||
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
|
||||
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
|
||||
GRAPHICS 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.
|
||||
********************************************************/
|
||||
|
||||
#ifndef _EVI_H_
|
||||
#define _EVI_H_
|
||||
|
||||
#define XEVI_TRANSPARENCY_NONE 0
|
||||
#define XEVI_TRANSPARENCY_PIXEL 1
|
||||
#define XEVI_TRANSPARENCY_MASK 2
|
||||
|
||||
#define EVINAME "Extended-Visual-Information"
|
||||
|
||||
#define XEVI_MAJOR_VERSION 1 /* current version numbers */
|
||||
#define XEVI_MINOR_VERSION 0
|
||||
|
||||
#endif
|
|
@ -0,0 +1,96 @@
|
|||
/************************************************************
|
||||
Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc.
|
||||
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 Silicon Graphics not be
|
||||
used in advertising or publicity pertaining to distribution
|
||||
of the software without specific prior written permission.
|
||||
Silicon Graphics makes no representation about the suitability
|
||||
of this software for any purpose. It is provided "as is"
|
||||
without any express or implied warranty.
|
||||
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
|
||||
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
|
||||
GRAPHICS 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.
|
||||
********************************************************/
|
||||
|
||||
#ifndef _EVIPROTO_H_
|
||||
#define _EVIPROTO_H_
|
||||
|
||||
#include <X11/extensions/EVI.h>
|
||||
|
||||
#define X_EVIQueryVersion 0
|
||||
#define X_EVIGetVisualInfo 1
|
||||
|
||||
#define VisualID CARD32
|
||||
|
||||
typedef CARD32 VisualID32;
|
||||
#define sz_VisualID32 4
|
||||
|
||||
typedef struct _xExtendedVisualInfo {
|
||||
VisualID core_visual_id B32;
|
||||
INT8 screen;
|
||||
INT8 level;
|
||||
CARD8 transparency_type;
|
||||
CARD8 pad0;
|
||||
CARD32 transparency_value B32;
|
||||
CARD8 min_hw_colormaps;
|
||||
CARD8 max_hw_colormaps;
|
||||
CARD16 num_colormap_conflicts B16;
|
||||
} xExtendedVisualInfo;
|
||||
#define sz_xExtendedVisualInfo 16
|
||||
|
||||
typedef struct _XEVIQueryVersion {
|
||||
CARD8 reqType; /* always XEVIReqCode */
|
||||
CARD8 xeviReqType; /* always X_EVIQueryVersion */
|
||||
CARD16 length B16;
|
||||
} xEVIQueryVersionReq;
|
||||
#define sz_xEVIQueryVersionReq 4
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
CARD8 unused;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD16 majorVersion B16; /* major version of EVI protocol */
|
||||
CARD16 minorVersion B16; /* minor version of EVI protocol */
|
||||
CARD32 pad0 B32;
|
||||
CARD32 pad1 B32;
|
||||
CARD32 pad2 B32;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
} xEVIQueryVersionReply;
|
||||
#define sz_xEVIQueryVersionReply 32
|
||||
|
||||
typedef struct _XEVIGetVisualInfoReq {
|
||||
CARD8 reqType; /* always XEVIReqCode */
|
||||
CARD8 xeviReqType; /* always X_EVIGetVisualInfo */
|
||||
CARD16 length B16;
|
||||
CARD32 n_visual B32;
|
||||
} xEVIGetVisualInfoReq;
|
||||
#define sz_xEVIGetVisualInfoReq 8
|
||||
|
||||
typedef struct _XEVIGetVisualInfoReply {
|
||||
BYTE type; /* X_Reply */
|
||||
CARD8 unused;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 n_info B32;
|
||||
CARD32 n_conflicts B32;
|
||||
CARD32 pad0 B32;
|
||||
CARD32 pad1 B32;
|
||||
CARD32 pad2 B32;
|
||||
CARD32 pad3 B32;
|
||||
} xEVIGetVisualInfoReply;
|
||||
#define sz_xEVIGetVisualInfoReply 32
|
||||
|
||||
#undef VisualID
|
||||
|
||||
#endif /* _EVIPROTO_H_ */
|
|
@ -0,0 +1,54 @@
|
|||
/************************************************************
|
||||
|
||||
Copyright 1989, 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.
|
||||
|
||||
********************************************************/
|
||||
|
||||
/* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */
|
||||
|
||||
#ifndef _XMITMISC_H_
|
||||
#define _XMITMISC_H_
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
#include <X11/extensions/mitmiscconst.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
Bool XMITMiscQueryExtension(
|
||||
Display* /* dpy */,
|
||||
int* /* event_basep */,
|
||||
int* /* error_basep */
|
||||
);
|
||||
|
||||
Status XMITMiscSetBugMode(
|
||||
Display* /* dpy */,
|
||||
Bool /* onOff */
|
||||
);
|
||||
|
||||
Bool XMITMiscGetBugMode(
|
||||
Display* /* dpy */
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif
|
|
@ -0,0 +1,61 @@
|
|||
/************************************************************
|
||||
Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc.
|
||||
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 Silicon Graphics not be
|
||||
used in advertising or publicity pertaining to distribution
|
||||
of the software without specific prior written permission.
|
||||
Silicon Graphics makes no representation about the suitability
|
||||
of this software for any purpose. It is provided "as is"
|
||||
without any express or implied warranty.
|
||||
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
|
||||
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
|
||||
GRAPHICS 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.
|
||||
********************************************************/
|
||||
|
||||
#ifndef _XEVI_H_
|
||||
#define _XEVI_H_
|
||||
#include <X11/Xfuncproto.h>
|
||||
#include <X11/extensions/EVI.h>
|
||||
|
||||
typedef struct {
|
||||
VisualID core_visual_id;
|
||||
int screen;
|
||||
int level;
|
||||
unsigned int transparency_type;
|
||||
unsigned int transparency_value;
|
||||
unsigned int min_hw_colormaps;
|
||||
unsigned int max_hw_colormaps;
|
||||
unsigned int num_colormap_conflicts;
|
||||
VisualID* colormap_conflicts;
|
||||
} ExtendedVisualInfo;
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
Bool XeviQueryExtension(
|
||||
Display* /* dpy */
|
||||
);
|
||||
Status XeviQueryVersion(
|
||||
Display* /* dpy */,
|
||||
int* /* majorVersion */,
|
||||
int* /* minorVersion */
|
||||
);
|
||||
Status XeviGetVisualInfo(
|
||||
Display* /* dpy */,
|
||||
VisualID* /* visual_query */,
|
||||
int /* nVisual_query */,
|
||||
ExtendedVisualInfo** /* extendedVisualInfo_return */,
|
||||
int* /* nInfo_return */
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif
|
|
@ -0,0 +1,308 @@
|
|||
/************************************************************
|
||||
|
||||
Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California.
|
||||
|
||||
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 Hewlett-Packard not be
|
||||
used in advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
||||
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
||||
HEWLETT-PACKARD 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.
|
||||
|
||||
********************************************************/
|
||||
|
||||
/* Definitions used by the server, library and client */
|
||||
|
||||
#ifndef _XI_H_
|
||||
#define _XI_H_
|
||||
|
||||
#define sz_xGetExtensionVersionReq 8
|
||||
#define sz_xGetExtensionVersionReply 32
|
||||
#define sz_xListInputDevicesReq 4
|
||||
#define sz_xListInputDevicesReply 32
|
||||
#define sz_xOpenDeviceReq 8
|
||||
#define sz_xOpenDeviceReply 32
|
||||
#define sz_xCloseDeviceReq 8
|
||||
#define sz_xSetDeviceModeReq 8
|
||||
#define sz_xSetDeviceModeReply 32
|
||||
#define sz_xSelectExtensionEventReq 12
|
||||
#define sz_xGetSelectedExtensionEventsReq 8
|
||||
#define sz_xGetSelectedExtensionEventsReply 32
|
||||
#define sz_xChangeDeviceDontPropagateListReq 12
|
||||
#define sz_xGetDeviceDontPropagateListReq 8
|
||||
#define sz_xGetDeviceDontPropagateListReply 32
|
||||
#define sz_xGetDeviceMotionEventsReq 16
|
||||
#define sz_xGetDeviceMotionEventsReply 32
|
||||
#define sz_xChangeKeyboardDeviceReq 8
|
||||
#define sz_xChangeKeyboardDeviceReply 32
|
||||
#define sz_xChangePointerDeviceReq 8
|
||||
#define sz_xChangePointerDeviceReply 32
|
||||
#define sz_xGrabDeviceReq 20
|
||||
#define sz_xGrabDeviceReply 32
|
||||
#define sz_xUngrabDeviceReq 12
|
||||
#define sz_xGrabDeviceKeyReq 20
|
||||
#define sz_xGrabDeviceKeyReply 32
|
||||
#define sz_xUngrabDeviceKeyReq 16
|
||||
#define sz_xGrabDeviceButtonReq 20
|
||||
#define sz_xGrabDeviceButtonReply 32
|
||||
#define sz_xUngrabDeviceButtonReq 16
|
||||
#define sz_xAllowDeviceEventsReq 12
|
||||
#define sz_xGetDeviceFocusReq 8
|
||||
#define sz_xGetDeviceFocusReply 32
|
||||
#define sz_xSetDeviceFocusReq 16
|
||||
#define sz_xGetFeedbackControlReq 8
|
||||
#define sz_xGetFeedbackControlReply 32
|
||||
#define sz_xChangeFeedbackControlReq 12
|
||||
#define sz_xGetDeviceKeyMappingReq 8
|
||||
#define sz_xGetDeviceKeyMappingReply 32
|
||||
#define sz_xChangeDeviceKeyMappingReq 8
|
||||
#define sz_xGetDeviceModifierMappingReq 8
|
||||
#define sz_xSetDeviceModifierMappingReq 8
|
||||
#define sz_xSetDeviceModifierMappingReply 32
|
||||
#define sz_xGetDeviceButtonMappingReq 8
|
||||
#define sz_xGetDeviceButtonMappingReply 32
|
||||
#define sz_xSetDeviceButtonMappingReq 8
|
||||
#define sz_xSetDeviceButtonMappingReply 32
|
||||
#define sz_xQueryDeviceStateReq 8
|
||||
#define sz_xQueryDeviceStateReply 32
|
||||
#define sz_xSendExtensionEventReq 16
|
||||
#define sz_xDeviceBellReq 8
|
||||
#define sz_xSetDeviceValuatorsReq 8
|
||||
#define sz_xSetDeviceValuatorsReply 32
|
||||
#define sz_xGetDeviceControlReq 8
|
||||
#define sz_xGetDeviceControlReply 32
|
||||
#define sz_xChangeDeviceControlReq 8
|
||||
#define sz_xChangeDeviceControlReply 32
|
||||
#define sz_xListDevicePropertiesReq 8
|
||||
#define sz_xListDevicePropertiesReply 32
|
||||
#define sz_xChangeDevicePropertyReq 20
|
||||
#define sz_xDeleteDevicePropertyReq 12
|
||||
#define sz_xGetDevicePropertyReq 24
|
||||
#define sz_xGetDevicePropertyReply 32
|
||||
|
||||
#define INAME "XInputExtension"
|
||||
|
||||
#define XI_KEYBOARD "KEYBOARD"
|
||||
#define XI_MOUSE "MOUSE"
|
||||
#define XI_TABLET "TABLET"
|
||||
#define XI_TOUCHSCREEN "TOUCHSCREEN"
|
||||
#define XI_TOUCHPAD "TOUCHPAD"
|
||||
#define XI_BARCODE "BARCODE"
|
||||
#define XI_BUTTONBOX "BUTTONBOX"
|
||||
#define XI_KNOB_BOX "KNOB_BOX"
|
||||
#define XI_ONE_KNOB "ONE_KNOB"
|
||||
#define XI_NINE_KNOB "NINE_KNOB"
|
||||
#define XI_TRACKBALL "TRACKBALL"
|
||||
#define XI_QUADRATURE "QUADRATURE"
|
||||
#define XI_ID_MODULE "ID_MODULE"
|
||||
#define XI_SPACEBALL "SPACEBALL"
|
||||
#define XI_DATAGLOVE "DATAGLOVE"
|
||||
#define XI_EYETRACKER "EYETRACKER"
|
||||
#define XI_CURSORKEYS "CURSORKEYS"
|
||||
#define XI_FOOTMOUSE "FOOTMOUSE"
|
||||
#define XI_JOYSTICK "JOYSTICK"
|
||||
|
||||
/* Indices into the versions[] array (XExtInt.c). Used as a index to
|
||||
* retrieve the minimum version of XI from _XiCheckExtInit */
|
||||
#define Dont_Check 0
|
||||
#define XInput_Initial_Release 1
|
||||
#define XInput_Add_XDeviceBell 2
|
||||
#define XInput_Add_XSetDeviceValuators 3
|
||||
#define XInput_Add_XChangeDeviceControl 4
|
||||
#define XInput_Add_DevicePresenceNotify 5
|
||||
#define XInput_Add_DeviceProperties 6
|
||||
/* DO NOT ADD TO HERE -> XI2 */
|
||||
|
||||
#define XI_Absent 0
|
||||
#define XI_Present 1
|
||||
|
||||
#define XI_Initial_Release_Major 1
|
||||
#define XI_Initial_Release_Minor 0
|
||||
|
||||
#define XI_Add_XDeviceBell_Major 1
|
||||
#define XI_Add_XDeviceBell_Minor 1
|
||||
|
||||
#define XI_Add_XSetDeviceValuators_Major 1
|
||||
#define XI_Add_XSetDeviceValuators_Minor 2
|
||||
|
||||
#define XI_Add_XChangeDeviceControl_Major 1
|
||||
#define XI_Add_XChangeDeviceControl_Minor 3
|
||||
|
||||
#define XI_Add_DevicePresenceNotify_Major 1
|
||||
#define XI_Add_DevicePresenceNotify_Minor 4
|
||||
|
||||
#define XI_Add_DeviceProperties_Major 1
|
||||
#define XI_Add_DeviceProperties_Minor 5
|
||||
|
||||
#define DEVICE_RESOLUTION 1
|
||||
#define DEVICE_ABS_CALIB 2
|
||||
#define DEVICE_CORE 3
|
||||
#define DEVICE_ENABLE 4
|
||||
#define DEVICE_ABS_AREA 5
|
||||
|
||||
#define NoSuchExtension 1
|
||||
|
||||
#define COUNT 0
|
||||
#define CREATE 1
|
||||
|
||||
#define NewPointer 0
|
||||
#define NewKeyboard 1
|
||||
|
||||
#define XPOINTER 0
|
||||
#define XKEYBOARD 1
|
||||
|
||||
#define UseXKeyboard 0xFF
|
||||
|
||||
#define IsXPointer 0
|
||||
#define IsXKeyboard 1
|
||||
#define IsXExtensionDevice 2
|
||||
#define IsXExtensionKeyboard 3
|
||||
#define IsXExtensionPointer 4
|
||||
|
||||
#define AsyncThisDevice 0
|
||||
#define SyncThisDevice 1
|
||||
#define ReplayThisDevice 2
|
||||
#define AsyncOtherDevices 3
|
||||
#define AsyncAll 4
|
||||
#define SyncAll 5
|
||||
|
||||
#define FollowKeyboard 3
|
||||
#ifndef RevertToFollowKeyboard
|
||||
#define RevertToFollowKeyboard 3
|
||||
#endif
|
||||
|
||||
#define DvAccelNum (1L << 0)
|
||||
#define DvAccelDenom (1L << 1)
|
||||
#define DvThreshold (1L << 2)
|
||||
|
||||
#define DvKeyClickPercent (1L<<0)
|
||||
#define DvPercent (1L<<1)
|
||||
#define DvPitch (1L<<2)
|
||||
#define DvDuration (1L<<3)
|
||||
#define DvLed (1L<<4)
|
||||
#define DvLedMode (1L<<5)
|
||||
#define DvKey (1L<<6)
|
||||
#define DvAutoRepeatMode (1L<<7)
|
||||
|
||||
#define DvString (1L << 0)
|
||||
|
||||
#define DvInteger (1L << 0)
|
||||
|
||||
#define DeviceMode (1L << 0)
|
||||
#define Relative 0
|
||||
#define Absolute 1
|
||||
|
||||
#define ProximityState (1L << 1)
|
||||
#define InProximity (0L << 1)
|
||||
#define OutOfProximity (1L << 1)
|
||||
|
||||
#define AddToList 0
|
||||
#define DeleteFromList 1
|
||||
|
||||
#define KeyClass 0
|
||||
#define ButtonClass 1
|
||||
#define ValuatorClass 2
|
||||
#define FeedbackClass 3
|
||||
#define ProximityClass 4
|
||||
#define FocusClass 5
|
||||
#define OtherClass 6
|
||||
#define AttachClass 7
|
||||
|
||||
#define KbdFeedbackClass 0
|
||||
#define PtrFeedbackClass 1
|
||||
#define StringFeedbackClass 2
|
||||
#define IntegerFeedbackClass 3
|
||||
#define LedFeedbackClass 4
|
||||
#define BellFeedbackClass 5
|
||||
|
||||
#define _devicePointerMotionHint 0
|
||||
#define _deviceButton1Motion 1
|
||||
#define _deviceButton2Motion 2
|
||||
#define _deviceButton3Motion 3
|
||||
#define _deviceButton4Motion 4
|
||||
#define _deviceButton5Motion 5
|
||||
#define _deviceButtonMotion 6
|
||||
#define _deviceButtonGrab 7
|
||||
#define _deviceOwnerGrabButton 8
|
||||
#define _noExtensionEvent 9
|
||||
|
||||
#define _devicePresence 0
|
||||
|
||||
#define _deviceEnter 0
|
||||
#define _deviceLeave 1
|
||||
|
||||
/* Device presence notify states */
|
||||
#define DeviceAdded 0
|
||||
#define DeviceRemoved 1
|
||||
#define DeviceEnabled 2
|
||||
#define DeviceDisabled 3
|
||||
#define DeviceUnrecoverable 4
|
||||
#define DeviceControlChanged 5
|
||||
|
||||
/* XI Errors */
|
||||
#define XI_BadDevice 0
|
||||
#define XI_BadEvent 1
|
||||
#define XI_BadMode 2
|
||||
#define XI_DeviceBusy 3
|
||||
#define XI_BadClass 4
|
||||
|
||||
/*
|
||||
* Make XEventClass be a CARD32 for 64 bit servers. Don't affect client
|
||||
* definition of XEventClass since that would be a library interface change.
|
||||
* See the top of X.h for more _XSERVER64 magic.
|
||||
*
|
||||
* But, don't actually use the CARD32 type. We can't get it defined here
|
||||
* without polluting the namespace.
|
||||
*/
|
||||
#ifdef _XSERVER64
|
||||
typedef unsigned int XEventClass;
|
||||
#else
|
||||
typedef unsigned long XEventClass;
|
||||
#endif
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* Extension version structure.
|
||||
*
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
int present;
|
||||
short major_version;
|
||||
short minor_version;
|
||||
} XExtensionVersion;
|
||||
|
||||
#endif /* _XI_H_ */
|
|
@ -0,0 +1,245 @@
|
|||
/*
|
||||
* Copyright © 2009 Red Hat, Inc.
|
||||
*
|
||||
* 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 (including the next
|
||||
* paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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 _XI2_H_
|
||||
#define _XI2_H_
|
||||
|
||||
#define XInput_2_0 7
|
||||
/* DO NOT ADD TO THIS LIST. These are libXi-specific defines.
|
||||
See commit libXi-1.4.2-21-ge8531dd */
|
||||
|
||||
#define XI_2_Major 2
|
||||
#define XI_2_Minor 3
|
||||
|
||||
/* Property event flags */
|
||||
#define XIPropertyDeleted 0
|
||||
#define XIPropertyCreated 1
|
||||
#define XIPropertyModified 2
|
||||
|
||||
/* Property modes */
|
||||
#define XIPropModeReplace 0
|
||||
#define XIPropModePrepend 1
|
||||
#define XIPropModeAppend 2
|
||||
|
||||
/* Special property type used for XIGetProperty */
|
||||
#define XIAnyPropertyType 0L
|
||||
|
||||
/* Enter/Leave and Focus In/Out modes */
|
||||
#define XINotifyNormal 0
|
||||
#define XINotifyGrab 1
|
||||
#define XINotifyUngrab 2
|
||||
#define XINotifyWhileGrabbed 3
|
||||
#define XINotifyPassiveGrab 4
|
||||
#define XINotifyPassiveUngrab 5
|
||||
|
||||
/* Enter/Leave and focus In/out detail */
|
||||
#define XINotifyAncestor 0
|
||||
#define XINotifyVirtual 1
|
||||
#define XINotifyInferior 2
|
||||
#define XINotifyNonlinear 3
|
||||
#define XINotifyNonlinearVirtual 4
|
||||
#define XINotifyPointer 5
|
||||
#define XINotifyPointerRoot 6
|
||||
#define XINotifyDetailNone 7
|
||||
|
||||
/* Grab modes */
|
||||
#define XIGrabModeSync 0
|
||||
#define XIGrabModeAsync 1
|
||||
#define XIGrabModeTouch 2
|
||||
|
||||
/* Grab reply status codes */
|
||||
#define XIGrabSuccess 0
|
||||
#define XIAlreadyGrabbed 1
|
||||
#define XIGrabInvalidTime 2
|
||||
#define XIGrabNotViewable 3
|
||||
#define XIGrabFrozen 4
|
||||
|
||||
/* Grab owner events values */
|
||||
#define XIOwnerEvents True
|
||||
#define XINoOwnerEvents False
|
||||
|
||||
/* Passive grab types */
|
||||
#define XIGrabtypeButton 0
|
||||
#define XIGrabtypeKeycode 1
|
||||
#define XIGrabtypeEnter 2
|
||||
#define XIGrabtypeFocusIn 3
|
||||
#define XIGrabtypeTouchBegin 4
|
||||
|
||||
/* Passive grab modifier */
|
||||
#define XIAnyModifier (1U << 31)
|
||||
#define XIAnyButton 0
|
||||
#define XIAnyKeycode 0
|
||||
|
||||
/* XIAllowEvents event-modes */
|
||||
#define XIAsyncDevice 0
|
||||
#define XISyncDevice 1
|
||||
#define XIReplayDevice 2
|
||||
#define XIAsyncPairedDevice 3
|
||||
#define XIAsyncPair 4
|
||||
#define XISyncPair 5
|
||||
#define XIAcceptTouch 6
|
||||
#define XIRejectTouch 7
|
||||
|
||||
/* DeviceChangedEvent change reasons */
|
||||
#define XISlaveSwitch 1
|
||||
#define XIDeviceChange 2
|
||||
|
||||
/* Hierarchy flags */
|
||||
#define XIMasterAdded (1 << 0)
|
||||
#define XIMasterRemoved (1 << 1)
|
||||
#define XISlaveAdded (1 << 2)
|
||||
#define XISlaveRemoved (1 << 3)
|
||||
#define XISlaveAttached (1 << 4)
|
||||
#define XISlaveDetached (1 << 5)
|
||||
#define XIDeviceEnabled (1 << 6)
|
||||
#define XIDeviceDisabled (1 << 7)
|
||||
|
||||
/* ChangeHierarchy constants */
|
||||
#define XIAddMaster 1
|
||||
#define XIRemoveMaster 2
|
||||
#define XIAttachSlave 3
|
||||
#define XIDetachSlave 4
|
||||
|
||||
#define XIAttachToMaster 1
|
||||
#define XIFloating 2
|
||||
|
||||
/* Valuator modes */
|
||||
#define XIModeRelative 0
|
||||
#define XIModeAbsolute 1
|
||||
|
||||
/* Device types */
|
||||
#define XIMasterPointer 1
|
||||
#define XIMasterKeyboard 2
|
||||
#define XISlavePointer 3
|
||||
#define XISlaveKeyboard 4
|
||||
#define XIFloatingSlave 5
|
||||
|
||||
/* Device classes: classes that are not identical to Xi 1.x classes must be
|
||||
* numbered starting from 8. */
|
||||
#define XIKeyClass 0
|
||||
#define XIButtonClass 1
|
||||
#define XIValuatorClass 2
|
||||
#define XIScrollClass 3
|
||||
#define XITouchClass 8
|
||||
|
||||
/* Scroll class types */
|
||||
#define XIScrollTypeVertical 1
|
||||
#define XIScrollTypeHorizontal 2
|
||||
|
||||
/* Scroll class flags */
|
||||
#define XIScrollFlagNoEmulation (1 << 0)
|
||||
#define XIScrollFlagPreferred (1 << 1)
|
||||
|
||||
/* Device event flags (common) */
|
||||
/* Device event flags (key events only) */
|
||||
#define XIKeyRepeat (1 << 16)
|
||||
/* Device event flags (pointer events only) */
|
||||
#define XIPointerEmulated (1 << 16)
|
||||
/* Device event flags (touch events only) */
|
||||
#define XITouchPendingEnd (1 << 16)
|
||||
#define XITouchEmulatingPointer (1 << 17)
|
||||
|
||||
/* Barrier event flags */
|
||||
#define XIBarrierPointerReleased (1 << 0)
|
||||
#define XIBarrierDeviceIsGrabbed (1 << 1)
|
||||
|
||||
|
||||
/* Touch modes */
|
||||
#define XIDirectTouch 1
|
||||
#define XIDependentTouch 2
|
||||
|
||||
/* XI2 event mask macros */
|
||||
#define XISetMask(ptr, event) (((unsigned char*)(ptr))[(event)>>3] |= (1 << ((event) & 7)))
|
||||
#define XIClearMask(ptr, event) (((unsigned char*)(ptr))[(event)>>3] &= ~(1 << ((event) & 7)))
|
||||
#define XIMaskIsSet(ptr, event) (((unsigned char*)(ptr))[(event)>>3] & (1 << ((event) & 7)))
|
||||
#define XIMaskLen(event) (((event) >> 3) + 1)
|
||||
|
||||
/* Fake device ID's for event selection */
|
||||
#define XIAllDevices 0
|
||||
#define XIAllMasterDevices 1
|
||||
|
||||
/* Event types */
|
||||
#define XI_DeviceChanged 1
|
||||
#define XI_KeyPress 2
|
||||
#define XI_KeyRelease 3
|
||||
#define XI_ButtonPress 4
|
||||
#define XI_ButtonRelease 5
|
||||
#define XI_Motion 6
|
||||
#define XI_Enter 7
|
||||
#define XI_Leave 8
|
||||
#define XI_FocusIn 9
|
||||
#define XI_FocusOut 10
|
||||
#define XI_HierarchyChanged 11
|
||||
#define XI_PropertyEvent 12
|
||||
#define XI_RawKeyPress 13
|
||||
#define XI_RawKeyRelease 14
|
||||
#define XI_RawButtonPress 15
|
||||
#define XI_RawButtonRelease 16
|
||||
#define XI_RawMotion 17
|
||||
#define XI_TouchBegin 18 /* XI 2.2 */
|
||||
#define XI_TouchUpdate 19
|
||||
#define XI_TouchEnd 20
|
||||
#define XI_TouchOwnership 21
|
||||
#define XI_RawTouchBegin 22
|
||||
#define XI_RawTouchUpdate 23
|
||||
#define XI_RawTouchEnd 24
|
||||
#define XI_BarrierHit 25 /* XI 2.3 */
|
||||
#define XI_BarrierLeave 26
|
||||
#define XI_LASTEVENT XI_BarrierLeave
|
||||
/* NOTE: XI2LASTEVENT in xserver/include/inputstr.h must be the same value
|
||||
* as XI_LASTEVENT if the server is supposed to handle masks etc. for this
|
||||
* type of event. */
|
||||
|
||||
/* Event masks.
|
||||
* Note: the protocol spec defines a mask to be of (1 << type). Clients are
|
||||
* free to create masks by bitshifting instead of using these defines.
|
||||
*/
|
||||
#define XI_DeviceChangedMask (1 << XI_DeviceChanged)
|
||||
#define XI_KeyPressMask (1 << XI_KeyPress)
|
||||
#define XI_KeyReleaseMask (1 << XI_KeyRelease)
|
||||
#define XI_ButtonPressMask (1 << XI_ButtonPress)
|
||||
#define XI_ButtonReleaseMask (1 << XI_ButtonRelease)
|
||||
#define XI_MotionMask (1 << XI_Motion)
|
||||
#define XI_EnterMask (1 << XI_Enter)
|
||||
#define XI_LeaveMask (1 << XI_Leave)
|
||||
#define XI_FocusInMask (1 << XI_FocusIn)
|
||||
#define XI_FocusOutMask (1 << XI_FocusOut)
|
||||
#define XI_HierarchyChangedMask (1 << XI_HierarchyChanged)
|
||||
#define XI_PropertyEventMask (1 << XI_PropertyEvent)
|
||||
#define XI_RawKeyPressMask (1 << XI_RawKeyPress)
|
||||
#define XI_RawKeyReleaseMask (1 << XI_RawKeyRelease)
|
||||
#define XI_RawButtonPressMask (1 << XI_RawButtonPress)
|
||||
#define XI_RawButtonReleaseMask (1 << XI_RawButtonRelease)
|
||||
#define XI_RawMotionMask (1 << XI_RawMotion)
|
||||
#define XI_TouchBeginMask (1 << XI_TouchBegin)
|
||||
#define XI_TouchEndMask (1 << XI_TouchEnd)
|
||||
#define XI_TouchOwnershipChangedMask (1 << XI_TouchOwnership)
|
||||
#define XI_TouchUpdateMask (1 << XI_TouchUpdate)
|
||||
#define XI_RawTouchBeginMask (1 << XI_RawTouchBegin)
|
||||
#define XI_RawTouchEndMask (1 << XI_RawTouchEnd)
|
||||
#define XI_RawTouchUpdateMask (1 << XI_RawTouchUpdate)
|
||||
#define XI_BarrierHitMask (1 << XI_BarrierHit)
|
||||
#define XI_BarrierLeaveMask (1 << XI_BarrierLeave)
|
||||
|
||||
#endif /* _XI2_H_ */
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,657 @@
|
|||
/*
|
||||
* Copyright © 2009 Red Hat, Inc.
|
||||
*
|
||||
* 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 (including the next
|
||||
* paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Definitions used by the library and client */
|
||||
|
||||
#ifndef _XINPUT2_H_
|
||||
#define _XINPUT2_H_
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/XI2.h>
|
||||
#include <X11/extensions/Xge.h>
|
||||
#include <X11/extensions/Xfixes.h> /* PointerBarrier */
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
*/
|
||||
typedef struct {
|
||||
int type;
|
||||
char* name;
|
||||
Bool send_core;
|
||||
Bool enable;
|
||||
} XIAddMasterInfo;
|
||||
|
||||
typedef struct {
|
||||
int type;
|
||||
int deviceid;
|
||||
int return_mode; /* AttachToMaster, Floating */
|
||||
int return_pointer;
|
||||
int return_keyboard;
|
||||
} XIRemoveMasterInfo;
|
||||
|
||||
typedef struct {
|
||||
int type;
|
||||
int deviceid;
|
||||
int new_master;
|
||||
} XIAttachSlaveInfo;
|
||||
|
||||
typedef struct {
|
||||
int type;
|
||||
int deviceid;
|
||||
} XIDetachSlaveInfo;
|
||||
|
||||
typedef union {
|
||||
int type; /* must be first element */
|
||||
XIAddMasterInfo add;
|
||||
XIRemoveMasterInfo remove;
|
||||
XIAttachSlaveInfo attach;
|
||||
XIDetachSlaveInfo detach;
|
||||
} XIAnyHierarchyChangeInfo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int base;
|
||||
int latched;
|
||||
int locked;
|
||||
int effective;
|
||||
} XIModifierState;
|
||||
|
||||
typedef XIModifierState XIGroupState;
|
||||
|
||||
typedef struct {
|
||||
int mask_len;
|
||||
unsigned char *mask;
|
||||
} XIButtonState;
|
||||
|
||||
typedef struct {
|
||||
int mask_len;
|
||||
unsigned char *mask;
|
||||
double *values;
|
||||
} XIValuatorState;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int deviceid;
|
||||
int mask_len;
|
||||
unsigned char* mask;
|
||||
} XIEventMask;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int type;
|
||||
int sourceid;
|
||||
} XIAnyClassInfo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int type;
|
||||
int sourceid;
|
||||
int num_buttons;
|
||||
Atom *labels;
|
||||
XIButtonState state;
|
||||
} XIButtonClassInfo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int type;
|
||||
int sourceid;
|
||||
int num_keycodes;
|
||||
int *keycodes;
|
||||
} XIKeyClassInfo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int type;
|
||||
int sourceid;
|
||||
int number;
|
||||
Atom label;
|
||||
double min;
|
||||
double max;
|
||||
double value;
|
||||
int resolution;
|
||||
int mode;
|
||||
} XIValuatorClassInfo;
|
||||
|
||||
/* new in XI 2.1 */
|
||||
typedef struct
|
||||
{
|
||||
int type;
|
||||
int sourceid;
|
||||
int number;
|
||||
int scroll_type;
|
||||
double increment;
|
||||
int flags;
|
||||
} XIScrollClassInfo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int type;
|
||||
int sourceid;
|
||||
int mode;
|
||||
int num_touches;
|
||||
} XITouchClassInfo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int deviceid;
|
||||
char *name;
|
||||
int use;
|
||||
int attachment;
|
||||
Bool enabled;
|
||||
int num_classes;
|
||||
XIAnyClassInfo **classes;
|
||||
} XIDeviceInfo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int modifiers;
|
||||
int status;
|
||||
} XIGrabModifiers;
|
||||
|
||||
typedef unsigned int BarrierEventID;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int deviceid;
|
||||
PointerBarrier barrier;
|
||||
BarrierEventID eventid;
|
||||
} XIBarrierReleasePointerInfo;
|
||||
|
||||
/**
|
||||
* Generic XI2 event. All XI2 events have the same header.
|
||||
*/
|
||||
typedef struct {
|
||||
int type; /* GenericEvent */
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came from a SendEvent request */
|
||||
Display *display; /* Display the event was read from */
|
||||
int extension; /* XI extension offset */
|
||||
int evtype;
|
||||
Time time;
|
||||
} XIEvent;
|
||||
|
||||
|
||||
typedef struct {
|
||||
int deviceid;
|
||||
int attachment;
|
||||
int use;
|
||||
Bool enabled;
|
||||
int flags;
|
||||
} XIHierarchyInfo;
|
||||
|
||||
/*
|
||||
* Notifies the client that the device hierarchy has been changed. The client
|
||||
* is expected to re-query the server for the device hierarchy.
|
||||
*/
|
||||
typedef struct {
|
||||
int type; /* GenericEvent */
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came from a SendEvent request */
|
||||
Display *display; /* Display the event was read from */
|
||||
int extension; /* XI extension offset */
|
||||
int evtype; /* XI_HierarchyChanged */
|
||||
Time time;
|
||||
int flags;
|
||||
int num_info;
|
||||
XIHierarchyInfo *info;
|
||||
} XIHierarchyEvent;
|
||||
|
||||
/*
|
||||
* Notifies the client that the classes have been changed. This happens when
|
||||
* the slave device that sends through the master changes.
|
||||
*/
|
||||
typedef struct {
|
||||
int type; /* GenericEvent */
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came from a SendEvent request */
|
||||
Display *display; /* Display the event was read from */
|
||||
int extension; /* XI extension offset */
|
||||
int evtype; /* XI_DeviceChanged */
|
||||
Time time;
|
||||
int deviceid; /* id of the device that changed */
|
||||
int sourceid; /* Source for the new classes. */
|
||||
int reason; /* Reason for the change */
|
||||
int num_classes;
|
||||
XIAnyClassInfo **classes; /* same as in XIDeviceInfo */
|
||||
} XIDeviceChangedEvent;
|
||||
|
||||
typedef struct {
|
||||
int type; /* GenericEvent */
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came from a SendEvent request */
|
||||
Display *display; /* Display the event was read from */
|
||||
int extension; /* XI extension offset */
|
||||
int evtype;
|
||||
Time time;
|
||||
int deviceid;
|
||||
int sourceid;
|
||||
int detail;
|
||||
Window root;
|
||||
Window event;
|
||||
Window child;
|
||||
double root_x;
|
||||
double root_y;
|
||||
double event_x;
|
||||
double event_y;
|
||||
int flags;
|
||||
XIButtonState buttons;
|
||||
XIValuatorState valuators;
|
||||
XIModifierState mods;
|
||||
XIGroupState group;
|
||||
} XIDeviceEvent;
|
||||
|
||||
typedef struct {
|
||||
int type; /* GenericEvent */
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came from a SendEvent request */
|
||||
Display *display; /* Display the event was read from */
|
||||
int extension; /* XI extension offset */
|
||||
int evtype; /* XI_RawKeyPress, XI_RawKeyRelease, etc. */
|
||||
Time time;
|
||||
int deviceid;
|
||||
int sourceid; /* Bug: Always 0. https://bugs.freedesktop.org//show_bug.cgi?id=34240 */
|
||||
int detail;
|
||||
int flags;
|
||||
XIValuatorState valuators;
|
||||
double *raw_values;
|
||||
} XIRawEvent;
|
||||
|
||||
typedef struct {
|
||||
int type; /* GenericEvent */
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came from a SendEvent request */
|
||||
Display *display; /* Display the event was read from */
|
||||
int extension; /* XI extension offset */
|
||||
int evtype;
|
||||
Time time;
|
||||
int deviceid;
|
||||
int sourceid;
|
||||
int detail;
|
||||
Window root;
|
||||
Window event;
|
||||
Window child;
|
||||
double root_x;
|
||||
double root_y;
|
||||
double event_x;
|
||||
double event_y;
|
||||
int mode;
|
||||
Bool focus;
|
||||
Bool same_screen;
|
||||
XIButtonState buttons;
|
||||
XIModifierState mods;
|
||||
XIGroupState group;
|
||||
} XIEnterEvent;
|
||||
|
||||
typedef XIEnterEvent XILeaveEvent;
|
||||
typedef XIEnterEvent XIFocusInEvent;
|
||||
typedef XIEnterEvent XIFocusOutEvent;
|
||||
|
||||
typedef struct {
|
||||
int type; /* GenericEvent */
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came from a SendEvent request */
|
||||
Display *display; /* Display the event was read from */
|
||||
int extension; /* XI extension offset */
|
||||
int evtype; /* XI_PropertyEvent */
|
||||
Time time;
|
||||
int deviceid; /* id of the device that changed */
|
||||
Atom property;
|
||||
int what;
|
||||
} XIPropertyEvent;
|
||||
|
||||
typedef struct {
|
||||
int type; /* GenericEvent */
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came from a SendEvent request */
|
||||
Display *display; /* Display the event was read from */
|
||||
int extension; /* XI extension offset */
|
||||
int evtype;
|
||||
Time time;
|
||||
int deviceid;
|
||||
int sourceid;
|
||||
unsigned int touchid;
|
||||
Window root;
|
||||
Window event;
|
||||
Window child;
|
||||
int flags;
|
||||
} XITouchOwnershipEvent;
|
||||
|
||||
typedef struct {
|
||||
int type; /* GenericEvent */
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came from a SendEvent request */
|
||||
Display *display; /* Display the event was read from */
|
||||
int extension; /* XI extension offset */
|
||||
int evtype;
|
||||
Time time;
|
||||
int deviceid;
|
||||
int sourceid;
|
||||
Window event;
|
||||
Window root;
|
||||
double root_x;
|
||||
double root_y;
|
||||
double dx;
|
||||
double dy;
|
||||
int dtime;
|
||||
int flags;
|
||||
PointerBarrier barrier;
|
||||
BarrierEventID eventid;
|
||||
} XIBarrierEvent;
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
extern Bool XIQueryPointer(
|
||||
Display* display,
|
||||
int deviceid,
|
||||
Window win,
|
||||
Window* root,
|
||||
Window* child,
|
||||
double* root_x,
|
||||
double* root_y,
|
||||
double* win_x,
|
||||
double* win_y,
|
||||
XIButtonState *buttons,
|
||||
XIModifierState *mods,
|
||||
XIGroupState *group
|
||||
);
|
||||
|
||||
extern Bool XIWarpPointer(
|
||||
Display* display,
|
||||
int deviceid,
|
||||
Window src_win,
|
||||
Window dst_win,
|
||||
double src_x,
|
||||
double src_y,
|
||||
unsigned int src_width,
|
||||
unsigned int src_height,
|
||||
double dst_x,
|
||||
double dst_y
|
||||
);
|
||||
|
||||
extern Status XIDefineCursor(
|
||||
Display* display,
|
||||
int deviceid,
|
||||
Window win,
|
||||
Cursor cursor
|
||||
);
|
||||
|
||||
extern Status XIUndefineCursor(
|
||||
Display* display,
|
||||
int deviceid,
|
||||
Window win
|
||||
);
|
||||
|
||||
extern Status XIChangeHierarchy(
|
||||
Display* display,
|
||||
XIAnyHierarchyChangeInfo* changes,
|
||||
int num_changes
|
||||
);
|
||||
|
||||
extern Status XISetClientPointer(
|
||||
Display* dpy,
|
||||
Window win,
|
||||
int deviceid
|
||||
);
|
||||
|
||||
extern Bool XIGetClientPointer(
|
||||
Display* dpy,
|
||||
Window win,
|
||||
int* deviceid
|
||||
);
|
||||
|
||||
extern int XISelectEvents(
|
||||
Display* dpy,
|
||||
Window win,
|
||||
XIEventMask *masks,
|
||||
int num_masks
|
||||
);
|
||||
|
||||
extern XIEventMask *XIGetSelectedEvents(
|
||||
Display* dpy,
|
||||
Window win,
|
||||
int *num_masks_return
|
||||
);
|
||||
|
||||
extern Status XIQueryVersion(
|
||||
Display* dpy,
|
||||
int* major_version_inout,
|
||||
int* minor_version_inout
|
||||
);
|
||||
|
||||
extern XIDeviceInfo* XIQueryDevice(
|
||||
Display* dpy,
|
||||
int deviceid,
|
||||
int* ndevices_return
|
||||
);
|
||||
|
||||
extern Status XISetFocus(
|
||||
Display* dpy,
|
||||
int deviceid,
|
||||
Window focus,
|
||||
Time time
|
||||
);
|
||||
|
||||
extern Status XIGetFocus(
|
||||
Display* dpy,
|
||||
int deviceid,
|
||||
Window *focus_return);
|
||||
|
||||
extern Status XIGrabDevice(
|
||||
Display* dpy,
|
||||
int deviceid,
|
||||
Window grab_window,
|
||||
Time time,
|
||||
Cursor cursor,
|
||||
int grab_mode,
|
||||
int paired_device_mode,
|
||||
Bool owner_events,
|
||||
XIEventMask *mask
|
||||
);
|
||||
|
||||
extern Status XIUngrabDevice(
|
||||
Display* dpy,
|
||||
int deviceid,
|
||||
Time time
|
||||
);
|
||||
|
||||
extern Status XIAllowEvents(
|
||||
Display* display,
|
||||
int deviceid,
|
||||
int event_mode,
|
||||
Time time
|
||||
);
|
||||
|
||||
extern Status XIAllowTouchEvents(
|
||||
Display* display,
|
||||
int deviceid,
|
||||
unsigned int touchid,
|
||||
Window grab_window,
|
||||
int event_mode
|
||||
);
|
||||
|
||||
extern int XIGrabButton(
|
||||
Display* display,
|
||||
int deviceid,
|
||||
int button,
|
||||
Window grab_window,
|
||||
Cursor cursor,
|
||||
int grab_mode,
|
||||
int paired_device_mode,
|
||||
int owner_events,
|
||||
XIEventMask *mask,
|
||||
int num_modifiers,
|
||||
XIGrabModifiers *modifiers_inout
|
||||
);
|
||||
|
||||
extern int XIGrabKeycode(
|
||||
Display* display,
|
||||
int deviceid,
|
||||
int keycode,
|
||||
Window grab_window,
|
||||
int grab_mode,
|
||||
int paired_device_mode,
|
||||
int owner_events,
|
||||
XIEventMask *mask,
|
||||
int num_modifiers,
|
||||
XIGrabModifiers *modifiers_inout
|
||||
);
|
||||
|
||||
extern int XIGrabEnter(
|
||||
Display* display,
|
||||
int deviceid,
|
||||
Window grab_window,
|
||||
Cursor cursor,
|
||||
int grab_mode,
|
||||
int paired_device_mode,
|
||||
int owner_events,
|
||||
XIEventMask *mask,
|
||||
int num_modifiers,
|
||||
XIGrabModifiers *modifiers_inout
|
||||
);
|
||||
|
||||
extern int XIGrabFocusIn(
|
||||
Display* display,
|
||||
int deviceid,
|
||||
Window grab_window,
|
||||
int grab_mode,
|
||||
int paired_device_mode,
|
||||
int owner_events,
|
||||
XIEventMask *mask,
|
||||
int num_modifiers,
|
||||
XIGrabModifiers *modifiers_inout
|
||||
);
|
||||
|
||||
extern int XIGrabTouchBegin(
|
||||
Display* display,
|
||||
int deviceid,
|
||||
Window grab_window,
|
||||
int owner_events,
|
||||
XIEventMask *mask,
|
||||
int num_modifiers,
|
||||
XIGrabModifiers *modifiers_inout
|
||||
);
|
||||
|
||||
extern Status XIUngrabButton(
|
||||
Display* display,
|
||||
int deviceid,
|
||||
int button,
|
||||
Window grab_window,
|
||||
int num_modifiers,
|
||||
XIGrabModifiers *modifiers
|
||||
);
|
||||
|
||||
extern Status XIUngrabKeycode(
|
||||
Display* display,
|
||||
int deviceid,
|
||||
int keycode,
|
||||
Window grab_window,
|
||||
int num_modifiers,
|
||||
XIGrabModifiers *modifiers
|
||||
);
|
||||
|
||||
extern Status XIUngrabEnter(
|
||||
Display* display,
|
||||
int deviceid,
|
||||
Window grab_window,
|
||||
int num_modifiers,
|
||||
XIGrabModifiers *modifiers
|
||||
);
|
||||
|
||||
extern Status XIUngrabFocusIn(
|
||||
Display* display,
|
||||
int deviceid,
|
||||
Window grab_window,
|
||||
int num_modifiers,
|
||||
XIGrabModifiers *modifiers
|
||||
);
|
||||
|
||||
extern Status XIUngrabTouchBegin(
|
||||
Display* display,
|
||||
int deviceid,
|
||||
Window grab_window,
|
||||
int num_modifiers,
|
||||
XIGrabModifiers *modifiers
|
||||
);
|
||||
|
||||
extern Atom *XIListProperties(
|
||||
Display* display,
|
||||
int deviceid,
|
||||
int *num_props_return
|
||||
);
|
||||
|
||||
extern void XIChangeProperty(
|
||||
Display* display,
|
||||
int deviceid,
|
||||
Atom property,
|
||||
Atom type,
|
||||
int format,
|
||||
int mode,
|
||||
unsigned char *data,
|
||||
int num_items
|
||||
);
|
||||
|
||||
extern void
|
||||
XIDeleteProperty(
|
||||
Display* display,
|
||||
int deviceid,
|
||||
Atom property
|
||||
);
|
||||
|
||||
extern Status
|
||||
XIGetProperty(
|
||||
Display* display,
|
||||
int deviceid,
|
||||
Atom property,
|
||||
long offset,
|
||||
long length,
|
||||
Bool delete_property,
|
||||
Atom type,
|
||||
Atom *type_return,
|
||||
int *format_return,
|
||||
unsigned long *num_items_return,
|
||||
unsigned long *bytes_after_return,
|
||||
unsigned char **data
|
||||
);
|
||||
|
||||
extern void
|
||||
XIBarrierReleasePointers(
|
||||
Display* display,
|
||||
XIBarrierReleasePointerInfo *barriers,
|
||||
int num_barriers
|
||||
);
|
||||
|
||||
extern void
|
||||
XIBarrierReleasePointer(
|
||||
Display* display,
|
||||
int deviceid,
|
||||
PointerBarrier barrier,
|
||||
BarrierEventID eventid
|
||||
);
|
||||
|
||||
extern void XIFreeDeviceInfo(XIDeviceInfo *info);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* XINPUT2_H */
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,786 @@
|
|||
/************************************************************
|
||||
Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
|
||||
|
||||
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 Silicon Graphics not be
|
||||
used in advertising or publicity pertaining to distribution
|
||||
of the software without specific prior written permission.
|
||||
Silicon Graphics makes no representation about the suitability
|
||||
of this software for any purpose. It is provided "as is"
|
||||
without any express or implied warranty.
|
||||
|
||||
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
|
||||
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
|
||||
GRAPHICS 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.
|
||||
|
||||
********************************************************/
|
||||
|
||||
#ifndef _XKB_H_
|
||||
#define _XKB_H_
|
||||
|
||||
/*
|
||||
* XKB request codes, used in:
|
||||
* - xkbReqType field of all requests
|
||||
* - requestMinor field of some events
|
||||
*/
|
||||
#define X_kbUseExtension 0
|
||||
#define X_kbSelectEvents 1
|
||||
#define X_kbBell 3
|
||||
#define X_kbGetState 4
|
||||
#define X_kbLatchLockState 5
|
||||
#define X_kbGetControls 6
|
||||
#define X_kbSetControls 7
|
||||
#define X_kbGetMap 8
|
||||
#define X_kbSetMap 9
|
||||
#define X_kbGetCompatMap 10
|
||||
#define X_kbSetCompatMap 11
|
||||
#define X_kbGetIndicatorState 12
|
||||
#define X_kbGetIndicatorMap 13
|
||||
#define X_kbSetIndicatorMap 14
|
||||
#define X_kbGetNamedIndicator 15
|
||||
#define X_kbSetNamedIndicator 16
|
||||
#define X_kbGetNames 17
|
||||
#define X_kbSetNames 18
|
||||
#define X_kbGetGeometry 19
|
||||
#define X_kbSetGeometry 20
|
||||
#define X_kbPerClientFlags 21
|
||||
#define X_kbListComponents 22
|
||||
#define X_kbGetKbdByName 23
|
||||
#define X_kbGetDeviceInfo 24
|
||||
#define X_kbSetDeviceInfo 25
|
||||
#define X_kbSetDebuggingFlags 101
|
||||
|
||||
/*
|
||||
* In the X sense, XKB reports only one event.
|
||||
* The type field of all XKB events is XkbEventCode
|
||||
*/
|
||||
#define XkbEventCode 0
|
||||
#define XkbNumberEvents (XkbEventCode+1)
|
||||
|
||||
/*
|
||||
* XKB has a minor event code so it can use one X event code for
|
||||
* multiple purposes.
|
||||
* - reported in the xkbType field of all XKB events.
|
||||
* - XkbSelectEventDetails: Indicates the event for which event details
|
||||
* are being changed
|
||||
*/
|
||||
#define XkbNewKeyboardNotify 0
|
||||
#define XkbMapNotify 1
|
||||
#define XkbStateNotify 2
|
||||
#define XkbControlsNotify 3
|
||||
#define XkbIndicatorStateNotify 4
|
||||
#define XkbIndicatorMapNotify 5
|
||||
#define XkbNamesNotify 6
|
||||
#define XkbCompatMapNotify 7
|
||||
#define XkbBellNotify 8
|
||||
#define XkbActionMessage 9
|
||||
#define XkbAccessXNotify 10
|
||||
#define XkbExtensionDeviceNotify 11
|
||||
|
||||
/*
|
||||
* Event Mask:
|
||||
* - XkbSelectEvents: Specifies event interest.
|
||||
*/
|
||||
#define XkbNewKeyboardNotifyMask (1L << 0)
|
||||
#define XkbMapNotifyMask (1L << 1)
|
||||
#define XkbStateNotifyMask (1L << 2)
|
||||
#define XkbControlsNotifyMask (1L << 3)
|
||||
#define XkbIndicatorStateNotifyMask (1L << 4)
|
||||
#define XkbIndicatorMapNotifyMask (1L << 5)
|
||||
#define XkbNamesNotifyMask (1L << 6)
|
||||
#define XkbCompatMapNotifyMask (1L << 7)
|
||||
#define XkbBellNotifyMask (1L << 8)
|
||||
#define XkbActionMessageMask (1L << 9)
|
||||
#define XkbAccessXNotifyMask (1L << 10)
|
||||
#define XkbExtensionDeviceNotifyMask (1L << 11)
|
||||
#define XkbAllEventsMask (0xFFF)
|
||||
|
||||
/*
|
||||
* NewKeyboardNotify event details:
|
||||
*/
|
||||
#define XkbNKN_KeycodesMask (1L << 0)
|
||||
#define XkbNKN_GeometryMask (1L << 1)
|
||||
#define XkbNKN_DeviceIDMask (1L << 2)
|
||||
#define XkbAllNewKeyboardEventsMask (0x7)
|
||||
|
||||
/*
|
||||
* AccessXNotify event types:
|
||||
* - The 'what' field of AccessXNotify events reports the
|
||||
* reason that the event was generated.
|
||||
*/
|
||||
#define XkbAXN_SKPress 0
|
||||
#define XkbAXN_SKAccept 1
|
||||
#define XkbAXN_SKReject 2
|
||||
#define XkbAXN_SKRelease 3
|
||||
#define XkbAXN_BKAccept 4
|
||||
#define XkbAXN_BKReject 5
|
||||
#define XkbAXN_AXKWarning 6
|
||||
|
||||
/*
|
||||
* AccessXNotify details:
|
||||
* - Used as an event detail mask to limit the conditions under which
|
||||
* AccessXNotify events are reported
|
||||
*/
|
||||
#define XkbAXN_SKPressMask (1L << 0)
|
||||
#define XkbAXN_SKAcceptMask (1L << 1)
|
||||
#define XkbAXN_SKRejectMask (1L << 2)
|
||||
#define XkbAXN_SKReleaseMask (1L << 3)
|
||||
#define XkbAXN_BKAcceptMask (1L << 4)
|
||||
#define XkbAXN_BKRejectMask (1L << 5)
|
||||
#define XkbAXN_AXKWarningMask (1L << 6)
|
||||
#define XkbAllAccessXEventsMask (0x7f)
|
||||
|
||||
/*
|
||||
* Miscellaneous event details:
|
||||
* - event detail masks for assorted events that don't reall
|
||||
* have any details.
|
||||
*/
|
||||
#define XkbAllStateEventsMask XkbAllStateComponentsMask
|
||||
#define XkbAllMapEventsMask XkbAllMapComponentsMask
|
||||
#define XkbAllControlEventsMask XkbAllControlsMask
|
||||
#define XkbAllIndicatorEventsMask XkbAllIndicatorsMask
|
||||
#define XkbAllNameEventsMask XkbAllNamesMask
|
||||
#define XkbAllCompatMapEventsMask XkbAllCompatMask
|
||||
#define XkbAllBellEventsMask (1L << 0)
|
||||
#define XkbAllActionMessagesMask (1L << 0)
|
||||
|
||||
/*
|
||||
* XKB reports one error: BadKeyboard
|
||||
* A further reason for the error is encoded into to most significant
|
||||
* byte of the resourceID for the error:
|
||||
* XkbErr_BadDevice - the device in question was not found
|
||||
* XkbErr_BadClass - the device was found but it doesn't belong to
|
||||
* the appropriate class.
|
||||
* XkbErr_BadId - the device was found and belongs to the right
|
||||
* class, but not feedback with a matching id was
|
||||
* found.
|
||||
* The low byte of the resourceID for this error contains the device
|
||||
* id, class specifier or feedback id that failed.
|
||||
*/
|
||||
#define XkbKeyboard 0
|
||||
#define XkbNumberErrors 1
|
||||
|
||||
#define XkbErr_BadDevice 0xff
|
||||
#define XkbErr_BadClass 0xfe
|
||||
#define XkbErr_BadId 0xfd
|
||||
|
||||
/*
|
||||
* Keyboard Components Mask:
|
||||
* - Specifies the components that follow a GetKeyboardByNameReply
|
||||
*/
|
||||
#define XkbClientMapMask (1L << 0)
|
||||
#define XkbServerMapMask (1L << 1)
|
||||
#define XkbCompatMapMask (1L << 2)
|
||||
#define XkbIndicatorMapMask (1L << 3)
|
||||
#define XkbNamesMask (1L << 4)
|
||||
#define XkbGeometryMask (1L << 5)
|
||||
#define XkbControlsMask (1L << 6)
|
||||
#define XkbAllComponentsMask (0x7f)
|
||||
|
||||
/*
|
||||
* State detail mask:
|
||||
* - The 'changed' field of StateNotify events reports which of
|
||||
* the keyboard state components have changed.
|
||||
* - Used as an event detail mask to limit the conditions under
|
||||
* which StateNotify events are reported.
|
||||
*/
|
||||
#define XkbModifierStateMask (1L << 0)
|
||||
#define XkbModifierBaseMask (1L << 1)
|
||||
#define XkbModifierLatchMask (1L << 2)
|
||||
#define XkbModifierLockMask (1L << 3)
|
||||
#define XkbGroupStateMask (1L << 4)
|
||||
#define XkbGroupBaseMask (1L << 5)
|
||||
#define XkbGroupLatchMask (1L << 6)
|
||||
#define XkbGroupLockMask (1L << 7)
|
||||
#define XkbCompatStateMask (1L << 8)
|
||||
#define XkbGrabModsMask (1L << 9)
|
||||
#define XkbCompatGrabModsMask (1L << 10)
|
||||
#define XkbLookupModsMask (1L << 11)
|
||||
#define XkbCompatLookupModsMask (1L << 12)
|
||||
#define XkbPointerButtonMask (1L << 13)
|
||||
#define XkbAllStateComponentsMask (0x3fff)
|
||||
|
||||
/*
|
||||
* Controls detail masks:
|
||||
* The controls specified in XkbAllControlsMask:
|
||||
* - The 'changed' field of ControlsNotify events reports which of
|
||||
* the keyboard controls have changed.
|
||||
* - The 'changeControls' field of the SetControls request specifies
|
||||
* the controls for which values are to be changed.
|
||||
* - Used as an event detail mask to limit the conditions under
|
||||
* which ControlsNotify events are reported.
|
||||
*
|
||||
* The controls specified in the XkbAllBooleanCtrlsMask:
|
||||
* - The 'enabledControls' field of ControlsNotify events reports the
|
||||
* current status of the boolean controls.
|
||||
* - The 'enabledControlsChanges' field of ControlsNotify events reports
|
||||
* any boolean controls that have been turned on or off.
|
||||
* - The 'affectEnabledControls' and 'enabledControls' fields of the
|
||||
* kbSetControls request change the set of enabled controls.
|
||||
* - The 'accessXTimeoutMask' and 'accessXTimeoutValues' fields of
|
||||
* an XkbControlsRec specify the controls to be changed if the keyboard
|
||||
* times out and the values to which they should be changed.
|
||||
* - The 'autoCtrls' and 'autoCtrlsValues' fields of the PerClientFlags
|
||||
* request specifies the specify the controls to be reset when the
|
||||
* client exits and the values to which they should be reset.
|
||||
* - The 'ctrls' field of an indicator map specifies the controls
|
||||
* that drive the indicator.
|
||||
* - Specifies the boolean controls affected by the SetControls and
|
||||
* LockControls key actions.
|
||||
*/
|
||||
#define XkbRepeatKeysMask (1L << 0)
|
||||
#define XkbSlowKeysMask (1L << 1)
|
||||
#define XkbBounceKeysMask (1L << 2)
|
||||
#define XkbStickyKeysMask (1L << 3)
|
||||
#define XkbMouseKeysMask (1L << 4)
|
||||
#define XkbMouseKeysAccelMask (1L << 5)
|
||||
#define XkbAccessXKeysMask (1L << 6)
|
||||
#define XkbAccessXTimeoutMask (1L << 7)
|
||||
#define XkbAccessXFeedbackMask (1L << 8)
|
||||
#define XkbAudibleBellMask (1L << 9)
|
||||
#define XkbOverlay1Mask (1L << 10)
|
||||
#define XkbOverlay2Mask (1L << 11)
|
||||
#define XkbIgnoreGroupLockMask (1L << 12)
|
||||
#define XkbGroupsWrapMask (1L << 27)
|
||||
#define XkbInternalModsMask (1L << 28)
|
||||
#define XkbIgnoreLockModsMask (1L << 29)
|
||||
#define XkbPerKeyRepeatMask (1L << 30)
|
||||
#define XkbControlsEnabledMask (1L << 31)
|
||||
|
||||
#define XkbAccessXOptionsMask (XkbStickyKeysMask|XkbAccessXFeedbackMask)
|
||||
|
||||
#define XkbAllBooleanCtrlsMask (0x00001FFF)
|
||||
#define XkbAllControlsMask (0xF8001FFF)
|
||||
#define XkbAllControlEventsMask XkbAllControlsMask
|
||||
|
||||
/*
|
||||
* AccessX Options Mask
|
||||
* - The 'accessXOptions' field of an XkbControlsRec specifies the
|
||||
* AccessX options that are currently in effect.
|
||||
* - The 'accessXTimeoutOptionsMask' and 'accessXTimeoutOptionsValues'
|
||||
* fields of an XkbControlsRec specify the Access X options to be
|
||||
* changed if the keyboard times out and the values to which they
|
||||
* should be changed.
|
||||
*/
|
||||
#define XkbAX_SKPressFBMask (1L << 0)
|
||||
#define XkbAX_SKAcceptFBMask (1L << 1)
|
||||
#define XkbAX_FeatureFBMask (1L << 2)
|
||||
#define XkbAX_SlowWarnFBMask (1L << 3)
|
||||
#define XkbAX_IndicatorFBMask (1L << 4)
|
||||
#define XkbAX_StickyKeysFBMask (1L << 5)
|
||||
#define XkbAX_TwoKeysMask (1L << 6)
|
||||
#define XkbAX_LatchToLockMask (1L << 7)
|
||||
#define XkbAX_SKReleaseFBMask (1L << 8)
|
||||
#define XkbAX_SKRejectFBMask (1L << 9)
|
||||
#define XkbAX_BKRejectFBMask (1L << 10)
|
||||
#define XkbAX_DumbBellFBMask (1L << 11)
|
||||
#define XkbAX_FBOptionsMask (0xF3F)
|
||||
#define XkbAX_SKOptionsMask (0x0C0)
|
||||
#define XkbAX_AllOptionsMask (0xFFF)
|
||||
|
||||
/*
|
||||
* XkbUseCoreKbd is used to specify the core keyboard without having
|
||||
* to look up its X input extension identifier.
|
||||
* XkbUseCorePtr is used to specify the core pointer without having
|
||||
* to look up its X input extension identifier.
|
||||
* XkbDfltXIClass is used to specify "don't care" any place that the
|
||||
* XKB protocol is looking for an X Input Extension
|
||||
* device class.
|
||||
* XkbDfltXIId is used to specify "don't care" any place that the
|
||||
* XKB protocol is looking for an X Input Extension
|
||||
* feedback identifier.
|
||||
* XkbAllXIClasses is used to get information about all device indicators,
|
||||
* whether they're part of the indicator feedback class
|
||||
* or the keyboard feedback class.
|
||||
* XkbAllXIIds is used to get information about all device indicator
|
||||
* feedbacks without having to list them.
|
||||
* XkbXINone is used to indicate that no class or id has been specified.
|
||||
* XkbLegalXILedClass(c) True if 'c' specifies a legal class with LEDs
|
||||
* XkbLegalXIBellClass(c) True if 'c' specifies a legal class with bells
|
||||
* XkbExplicitXIDevice(d) True if 'd' explicitly specifies a device
|
||||
* XkbExplicitXIClass(c) True if 'c' explicitly specifies a device class
|
||||
* XkbExplicitXIId(c) True if 'i' explicitly specifies a device id
|
||||
* XkbSingleXIClass(c) True if 'c' specifies exactly one device class,
|
||||
* including the default.
|
||||
* XkbSingleXIId(i) True if 'i' specifies exactly one device
|
||||
* identifier, including the default.
|
||||
*/
|
||||
#define XkbUseCoreKbd 0x0100
|
||||
#define XkbUseCorePtr 0x0200
|
||||
#define XkbDfltXIClass 0x0300
|
||||
#define XkbDfltXIId 0x0400
|
||||
#define XkbAllXIClasses 0x0500
|
||||
#define XkbAllXIIds 0x0600
|
||||
#define XkbXINone 0xff00
|
||||
|
||||
#define XkbLegalXILedClass(c) (((c)==KbdFeedbackClass)||\
|
||||
((c)==LedFeedbackClass)||\
|
||||
((c)==XkbDfltXIClass)||\
|
||||
((c)==XkbAllXIClasses))
|
||||
#define XkbLegalXIBellClass(c) (((c)==KbdFeedbackClass)||\
|
||||
((c)==BellFeedbackClass)||\
|
||||
((c)==XkbDfltXIClass)||\
|
||||
((c)==XkbAllXIClasses))
|
||||
#define XkbExplicitXIDevice(c) (((c)&(~0xff))==0)
|
||||
#define XkbExplicitXIClass(c) (((c)&(~0xff))==0)
|
||||
#define XkbExplicitXIId(c) (((c)&(~0xff))==0)
|
||||
#define XkbSingleXIClass(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIClass))
|
||||
#define XkbSingleXIId(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIId))
|
||||
|
||||
#define XkbNoModifier 0xff
|
||||
#define XkbNoShiftLevel 0xff
|
||||
#define XkbNoShape 0xff
|
||||
#define XkbNoIndicator 0xff
|
||||
|
||||
#define XkbNoModifierMask 0
|
||||
#define XkbAllModifiersMask 0xff
|
||||
#define XkbAllVirtualModsMask 0xffff
|
||||
|
||||
#define XkbNumKbdGroups 4
|
||||
#define XkbMaxKbdGroup (XkbNumKbdGroups-1)
|
||||
|
||||
#define XkbMaxMouseKeysBtn 4
|
||||
|
||||
/*
|
||||
* Group Index and Mask:
|
||||
* - Indices into the kt_index array of a key type.
|
||||
* - Mask specifies types to be changed for XkbChangeTypesOfKey
|
||||
*/
|
||||
#define XkbGroup1Index 0
|
||||
#define XkbGroup2Index 1
|
||||
#define XkbGroup3Index 2
|
||||
#define XkbGroup4Index 3
|
||||
#define XkbAnyGroup 254
|
||||
#define XkbAllGroups 255
|
||||
|
||||
#define XkbGroup1Mask (1<<0)
|
||||
#define XkbGroup2Mask (1<<1)
|
||||
#define XkbGroup3Mask (1<<2)
|
||||
#define XkbGroup4Mask (1<<3)
|
||||
#define XkbAnyGroupMask (1<<7)
|
||||
#define XkbAllGroupsMask (0xf)
|
||||
|
||||
/*
|
||||
* BuildCoreState: Given a keyboard group and a modifier state,
|
||||
* construct the value to be reported an event.
|
||||
* GroupForCoreState: Given the state reported in an event,
|
||||
* determine the keyboard group.
|
||||
* IsLegalGroup: Returns TRUE if 'g' is a valid group index.
|
||||
*/
|
||||
#define XkbBuildCoreState(m,g) ((((g)&0x3)<<13)|((m)&0xff))
|
||||
#define XkbGroupForCoreState(s) (((s)>>13)&0x3)
|
||||
#define XkbIsLegalGroup(g) (((g)>=0)&&((g)<XkbNumKbdGroups))
|
||||
|
||||
/*
|
||||
* GroupsWrap values:
|
||||
* - The 'groupsWrap' field of an XkbControlsRec specifies the
|
||||
* treatment of out of range groups.
|
||||
* - Bits 6 and 7 of the group info field of a key symbol map
|
||||
* specify the interpretation of out of range groups for the
|
||||
* corresponding key.
|
||||
*/
|
||||
#define XkbWrapIntoRange (0x00)
|
||||
#define XkbClampIntoRange (0x40)
|
||||
#define XkbRedirectIntoRange (0x80)
|
||||
|
||||
/*
|
||||
* Action flags: Reported in the 'flags' field of most key actions.
|
||||
* Interpretation depends on the type of the action; not all actions
|
||||
* accept all flags.
|
||||
*
|
||||
* Option Used for Actions
|
||||
* ------ ----------------
|
||||
* ClearLocks SetMods, LatchMods, SetGroup, LatchGroup
|
||||
* LatchToLock SetMods, LatchMods, SetGroup, LatchGroup
|
||||
* LockNoLock LockMods, ISOLock, LockPtrBtn, LockDeviceBtn
|
||||
* LockNoUnlock LockMods, ISOLock, LockPtrBtn, LockDeviceBtn
|
||||
* UseModMapMods SetMods, LatchMods, LockMods, ISOLock
|
||||
* GroupAbsolute SetGroup, LatchGroup, LockGroup, ISOLock
|
||||
* UseDfltButton PtrBtn, LockPtrBtn
|
||||
* NoAcceleration MovePtr
|
||||
* MoveAbsoluteX MovePtr
|
||||
* MoveAbsoluteY MovePtr
|
||||
* ISODfltIsGroup ISOLock
|
||||
* ISONoAffectMods ISOLock
|
||||
* ISONoAffectGroup ISOLock
|
||||
* ISONoAffectPtr ISOLock
|
||||
* ISONoAffectCtrls ISOLock
|
||||
* MessageOnPress ActionMessage
|
||||
* MessageOnRelease ActionMessage
|
||||
* MessageGenKeyEvent ActionMessage
|
||||
* AffectDfltBtn SetPtrDflt
|
||||
* DfltBtnAbsolute SetPtrDflt
|
||||
* SwitchApplication SwitchScreen
|
||||
* SwitchAbsolute SwitchScreen
|
||||
*/
|
||||
|
||||
#define XkbSA_ClearLocks (1L << 0)
|
||||
#define XkbSA_LatchToLock (1L << 1)
|
||||
|
||||
#define XkbSA_LockNoLock (1L << 0)
|
||||
#define XkbSA_LockNoUnlock (1L << 1)
|
||||
|
||||
#define XkbSA_UseModMapMods (1L << 2)
|
||||
|
||||
#define XkbSA_GroupAbsolute (1L << 2)
|
||||
#define XkbSA_UseDfltButton 0
|
||||
|
||||
#define XkbSA_NoAcceleration (1L << 0)
|
||||
#define XkbSA_MoveAbsoluteX (1L << 1)
|
||||
#define XkbSA_MoveAbsoluteY (1L << 2)
|
||||
|
||||
#define XkbSA_ISODfltIsGroup (1L << 7)
|
||||
#define XkbSA_ISONoAffectMods (1L << 6)
|
||||
#define XkbSA_ISONoAffectGroup (1L << 5)
|
||||
#define XkbSA_ISONoAffectPtr (1L << 4)
|
||||
#define XkbSA_ISONoAffectCtrls (1L << 3)
|
||||
#define XkbSA_ISOAffectMask (0x78)
|
||||
|
||||
#define XkbSA_MessageOnPress (1L << 0)
|
||||
#define XkbSA_MessageOnRelease (1L << 1)
|
||||
#define XkbSA_MessageGenKeyEvent (1L << 2)
|
||||
|
||||
#define XkbSA_AffectDfltBtn 1
|
||||
#define XkbSA_DfltBtnAbsolute (1L << 2)
|
||||
|
||||
#define XkbSA_SwitchApplication (1L << 0)
|
||||
#define XkbSA_SwitchAbsolute (1L << 2)
|
||||
|
||||
/*
|
||||
* The following values apply to the SA_DeviceValuator
|
||||
* action only. Valuator operations specify the action
|
||||
* to be taken. Values specified in the action are
|
||||
* multiplied by 2^scale before they are applied.
|
||||
*/
|
||||
#define XkbSA_IgnoreVal (0x00)
|
||||
#define XkbSA_SetValMin (0x10)
|
||||
#define XkbSA_SetValCenter (0x20)
|
||||
#define XkbSA_SetValMax (0x30)
|
||||
#define XkbSA_SetValRelative (0x40)
|
||||
#define XkbSA_SetValAbsolute (0x50)
|
||||
#define XkbSA_ValOpMask (0x70)
|
||||
#define XkbSA_ValScaleMask (0x07)
|
||||
#define XkbSA_ValOp(a) ((a)&XkbSA_ValOpMask)
|
||||
#define XkbSA_ValScale(a) ((a)&XkbSA_ValScaleMask)
|
||||
|
||||
/*
|
||||
* Action types: specifies the type of a key action. Reported in the
|
||||
* type field of all key actions.
|
||||
*/
|
||||
#define XkbSA_NoAction 0x00
|
||||
#define XkbSA_SetMods 0x01
|
||||
#define XkbSA_LatchMods 0x02
|
||||
#define XkbSA_LockMods 0x03
|
||||
#define XkbSA_SetGroup 0x04
|
||||
#define XkbSA_LatchGroup 0x05
|
||||
#define XkbSA_LockGroup 0x06
|
||||
#define XkbSA_MovePtr 0x07
|
||||
#define XkbSA_PtrBtn 0x08
|
||||
#define XkbSA_LockPtrBtn 0x09
|
||||
#define XkbSA_SetPtrDflt 0x0a
|
||||
#define XkbSA_ISOLock 0x0b
|
||||
#define XkbSA_Terminate 0x0c
|
||||
#define XkbSA_SwitchScreen 0x0d
|
||||
#define XkbSA_SetControls 0x0e
|
||||
#define XkbSA_LockControls 0x0f
|
||||
#define XkbSA_ActionMessage 0x10
|
||||
#define XkbSA_RedirectKey 0x11
|
||||
#define XkbSA_DeviceBtn 0x12
|
||||
#define XkbSA_LockDeviceBtn 0x13
|
||||
#define XkbSA_DeviceValuator 0x14
|
||||
#define XkbSA_LastAction XkbSA_DeviceValuator
|
||||
#define XkbSA_NumActions (XkbSA_LastAction+1)
|
||||
|
||||
#define XkbSA_XFree86Private 0x86
|
||||
|
||||
/*
|
||||
* Specifies the key actions that clear latched groups or modifiers.
|
||||
*/
|
||||
#define XkbSA_BreakLatch \
|
||||
((1<<XkbSA_NoAction)|(1<<XkbSA_PtrBtn)|(1<<XkbSA_LockPtrBtn)|\
|
||||
(1<<XkbSA_Terminate)|(1<<XkbSA_SwitchScreen)|(1<<XkbSA_SetControls)|\
|
||||
(1<<XkbSA_LockControls)|(1<<XkbSA_ActionMessage)|\
|
||||
(1<<XkbSA_RedirectKey)|(1<<XkbSA_DeviceBtn)|(1<<XkbSA_LockDeviceBtn))
|
||||
|
||||
/*
|
||||
* Macros to classify key actions
|
||||
*/
|
||||
#define XkbIsModAction(a) (((a)->type>=Xkb_SASetMods)&&((a)->type<=XkbSA_LockMods))
|
||||
#define XkbIsGroupAction(a) (((a)->type>=XkbSA_SetGroup)&&((a)->type<=XkbSA_LockGroup))
|
||||
#define XkbIsPtrAction(a) (((a)->type>=XkbSA_MovePtr)&&((a)->type<=XkbSA_SetPtrDflt))
|
||||
|
||||
|
||||
/*
|
||||
* Key Behavior Qualifier:
|
||||
* KB_Permanent indicates that the behavior describes an unalterable
|
||||
* characteristic of the keyboard, not an XKB software-simulation of
|
||||
* the listed behavior.
|
||||
* Key Behavior Types:
|
||||
* Specifies the behavior of the underlying key.
|
||||
*/
|
||||
#define XkbKB_Permanent 0x80
|
||||
#define XkbKB_OpMask 0x7f
|
||||
|
||||
#define XkbKB_Default 0x00
|
||||
#define XkbKB_Lock 0x01
|
||||
#define XkbKB_RadioGroup 0x02
|
||||
#define XkbKB_Overlay1 0x03
|
||||
#define XkbKB_Overlay2 0x04
|
||||
|
||||
#define XkbKB_RGAllowNone 0x80
|
||||
|
||||
/*
|
||||
* Various macros which describe the range of legal keycodes.
|
||||
*/
|
||||
#define XkbMinLegalKeyCode 8
|
||||
#define XkbMaxLegalKeyCode 255
|
||||
#define XkbMaxKeyCount (XkbMaxLegalKeyCode-XkbMinLegalKeyCode+1)
|
||||
#define XkbPerKeyBitArraySize ((XkbMaxLegalKeyCode+1)/8)
|
||||
/* Seems kinda silly to check that an unsigned char is <= 255... */
|
||||
#define XkbIsLegalKeycode(k) ((k)>=XkbMinLegalKeyCode)
|
||||
|
||||
/*
|
||||
* Assorted constants and limits.
|
||||
*/
|
||||
#define XkbNumModifiers 8
|
||||
#define XkbNumVirtualMods 16
|
||||
#define XkbNumIndicators 32
|
||||
#define XkbAllIndicatorsMask (0xffffffff)
|
||||
#define XkbMaxRadioGroups 32
|
||||
#define XkbAllRadioGroupsMask (0xffffffff)
|
||||
#define XkbMaxShiftLevel 63
|
||||
#define XkbMaxSymsPerKey (XkbMaxShiftLevel*XkbNumKbdGroups)
|
||||
#define XkbRGMaxMembers 12
|
||||
#define XkbActionMessageLength 6
|
||||
#define XkbKeyNameLength 4
|
||||
#define XkbMaxRedirectCount 8
|
||||
|
||||
#define XkbGeomPtsPerMM 10
|
||||
#define XkbGeomMaxColors 32
|
||||
#define XkbGeomMaxLabelColors 3
|
||||
#define XkbGeomMaxPriority 255
|
||||
|
||||
/*
|
||||
* Key Type index and mask for the four standard key types.
|
||||
*/
|
||||
#define XkbOneLevelIndex 0
|
||||
#define XkbTwoLevelIndex 1
|
||||
#define XkbAlphabeticIndex 2
|
||||
#define XkbKeypadIndex 3
|
||||
#define XkbLastRequiredType XkbKeypadIndex
|
||||
#define XkbNumRequiredTypes (XkbLastRequiredType+1)
|
||||
#define XkbMaxKeyTypes 255
|
||||
|
||||
#define XkbOneLevelMask (1<<0)
|
||||
#define XkbTwoLevelMask (1<<1)
|
||||
#define XkbAlphabeticMask (1<<2)
|
||||
#define XkbKeypadMask (1<<3)
|
||||
#define XkbAllRequiredTypes (0xf)
|
||||
|
||||
#define XkbShiftLevel(n) ((n)-1)
|
||||
#define XkbShiftLevelMask(n) (1<<((n)-1))
|
||||
|
||||
/*
|
||||
* Extension name and version information
|
||||
*/
|
||||
#define XkbName "XKEYBOARD"
|
||||
#define XkbMajorVersion 1
|
||||
#define XkbMinorVersion 0
|
||||
|
||||
/*
|
||||
* Explicit map components:
|
||||
* - Used in the 'explicit' field of an XkbServerMap. Specifies
|
||||
* the keyboard components that should _not_ be updated automatically
|
||||
* in response to core protocol keyboard mapping requests.
|
||||
*/
|
||||
#define XkbExplicitKeyTypesMask (0x0f)
|
||||
#define XkbExplicitKeyType1Mask (1<<0)
|
||||
#define XkbExplicitKeyType2Mask (1<<1)
|
||||
#define XkbExplicitKeyType3Mask (1<<2)
|
||||
#define XkbExplicitKeyType4Mask (1<<3)
|
||||
#define XkbExplicitInterpretMask (1<<4)
|
||||
#define XkbExplicitAutoRepeatMask (1<<5)
|
||||
#define XkbExplicitBehaviorMask (1<<6)
|
||||
#define XkbExplicitVModMapMask (1<<7)
|
||||
#define XkbAllExplicitMask (0xff)
|
||||
|
||||
/*
|
||||
* Map components masks:
|
||||
* Those in AllMapComponentsMask:
|
||||
* - Specifies the individual fields to be loaded or changed for the
|
||||
* GetMap and SetMap requests.
|
||||
* Those in ClientInfoMask:
|
||||
* - Specifies the components to be allocated by XkbAllocClientMap.
|
||||
* Those in ServerInfoMask:
|
||||
* - Specifies the components to be allocated by XkbAllocServerMap.
|
||||
*/
|
||||
#define XkbKeyTypesMask (1<<0)
|
||||
#define XkbKeySymsMask (1<<1)
|
||||
#define XkbModifierMapMask (1<<2)
|
||||
#define XkbExplicitComponentsMask (1<<3)
|
||||
#define XkbKeyActionsMask (1<<4)
|
||||
#define XkbKeyBehaviorsMask (1<<5)
|
||||
#define XkbVirtualModsMask (1<<6)
|
||||
#define XkbVirtualModMapMask (1<<7)
|
||||
|
||||
#define XkbAllClientInfoMask (XkbKeyTypesMask|XkbKeySymsMask|XkbModifierMapMask)
|
||||
#define XkbAllServerInfoMask (XkbExplicitComponentsMask|XkbKeyActionsMask|XkbKeyBehaviorsMask|XkbVirtualModsMask|XkbVirtualModMapMask)
|
||||
#define XkbAllMapComponentsMask (XkbAllClientInfoMask|XkbAllServerInfoMask)
|
||||
|
||||
/*
|
||||
* Symbol interpretations flags:
|
||||
* - Used in the flags field of a symbol interpretation
|
||||
*/
|
||||
#define XkbSI_AutoRepeat (1<<0)
|
||||
#define XkbSI_LockingKey (1<<1)
|
||||
|
||||
/*
|
||||
* Symbol interpretations match specification:
|
||||
* - Used in the match field of a symbol interpretation to specify
|
||||
* the conditions under which an interpretation is used.
|
||||
*/
|
||||
#define XkbSI_LevelOneOnly (0x80)
|
||||
#define XkbSI_OpMask (0x7f)
|
||||
#define XkbSI_NoneOf (0)
|
||||
#define XkbSI_AnyOfOrNone (1)
|
||||
#define XkbSI_AnyOf (2)
|
||||
#define XkbSI_AllOf (3)
|
||||
#define XkbSI_Exactly (4)
|
||||
|
||||
/*
|
||||
* Indicator map flags:
|
||||
* - Used in the flags field of an indicator map to indicate the
|
||||
* conditions under which and indicator can be changed and the
|
||||
* effects of changing the indicator.
|
||||
*/
|
||||
#define XkbIM_NoExplicit (1L << 7)
|
||||
#define XkbIM_NoAutomatic (1L << 6)
|
||||
#define XkbIM_LEDDrivesKB (1L << 5)
|
||||
|
||||
/*
|
||||
* Indicator map component specifications:
|
||||
* - Used by the 'which_groups' and 'which_mods' fields of an indicator
|
||||
* map to specify which keyboard components should be used to drive
|
||||
* the indicator.
|
||||
*/
|
||||
#define XkbIM_UseBase (1L << 0)
|
||||
#define XkbIM_UseLatched (1L << 1)
|
||||
#define XkbIM_UseLocked (1L << 2)
|
||||
#define XkbIM_UseEffective (1L << 3)
|
||||
#define XkbIM_UseCompat (1L << 4)
|
||||
|
||||
#define XkbIM_UseNone 0
|
||||
#define XkbIM_UseAnyGroup (XkbIM_UseBase|XkbIM_UseLatched|XkbIM_UseLocked\
|
||||
|XkbIM_UseEffective)
|
||||
#define XkbIM_UseAnyMods (XkbIM_UseAnyGroup|XkbIM_UseCompat)
|
||||
|
||||
/*
|
||||
* Compatibility Map Compontents:
|
||||
* - Specifies the components to be allocated in XkbAllocCompatMap.
|
||||
*/
|
||||
#define XkbSymInterpMask (1<<0)
|
||||
#define XkbGroupCompatMask (1<<1)
|
||||
#define XkbAllCompatMask (0x3)
|
||||
|
||||
/*
|
||||
* Names component mask:
|
||||
* - Specifies the names to be loaded or changed for the GetNames and
|
||||
* SetNames requests.
|
||||
* - Specifies the names that have changed in a NamesNotify event.
|
||||
* - Specifies the names components to be allocated by XkbAllocNames.
|
||||
*/
|
||||
#define XkbKeycodesNameMask (1<<0)
|
||||
#define XkbGeometryNameMask (1<<1)
|
||||
#define XkbSymbolsNameMask (1<<2)
|
||||
#define XkbPhysSymbolsNameMask (1<<3)
|
||||
#define XkbTypesNameMask (1<<4)
|
||||
#define XkbCompatNameMask (1<<5)
|
||||
#define XkbKeyTypeNamesMask (1<<6)
|
||||
#define XkbKTLevelNamesMask (1<<7)
|
||||
#define XkbIndicatorNamesMask (1<<8)
|
||||
#define XkbKeyNamesMask (1<<9)
|
||||
#define XkbKeyAliasesMask (1<<10)
|
||||
#define XkbVirtualModNamesMask (1<<11)
|
||||
#define XkbGroupNamesMask (1<<12)
|
||||
#define XkbRGNamesMask (1<<13)
|
||||
#define XkbComponentNamesMask (0x3f)
|
||||
#define XkbAllNamesMask (0x3fff)
|
||||
|
||||
/*
|
||||
* GetByName components:
|
||||
* - Specifies desired or necessary components to GetKbdByName request.
|
||||
* - Reports the components that were found in a GetKbdByNameReply
|
||||
*/
|
||||
#define XkbGBN_TypesMask (1L << 0)
|
||||
#define XkbGBN_CompatMapMask (1L << 1)
|
||||
#define XkbGBN_ClientSymbolsMask (1L << 2)
|
||||
#define XkbGBN_ServerSymbolsMask (1L << 3)
|
||||
#define XkbGBN_SymbolsMask (XkbGBN_ClientSymbolsMask|XkbGBN_ServerSymbolsMask)
|
||||
#define XkbGBN_IndicatorMapMask (1L << 4)
|
||||
#define XkbGBN_KeyNamesMask (1L << 5)
|
||||
#define XkbGBN_GeometryMask (1L << 6)
|
||||
#define XkbGBN_OtherNamesMask (1L << 7)
|
||||
#define XkbGBN_AllComponentsMask (0xff)
|
||||
|
||||
/*
|
||||
* ListComponents flags
|
||||
*/
|
||||
#define XkbLC_Hidden (1L << 0)
|
||||
#define XkbLC_Default (1L << 1)
|
||||
#define XkbLC_Partial (1L << 2)
|
||||
|
||||
#define XkbLC_AlphanumericKeys (1L << 8)
|
||||
#define XkbLC_ModifierKeys (1L << 9)
|
||||
#define XkbLC_KeypadKeys (1L << 10)
|
||||
#define XkbLC_FunctionKeys (1L << 11)
|
||||
#define XkbLC_AlternateGroup (1L << 12)
|
||||
|
||||
/*
|
||||
* X Input Extension Interactions
|
||||
* - Specifies the possible interactions between XKB and the X input
|
||||
* extension
|
||||
* - Used to request (XkbGetDeviceInfo) or change (XKbSetDeviceInfo)
|
||||
* XKB information about an extension device.
|
||||
* - Reports the list of supported optional features in the reply to
|
||||
* XkbGetDeviceInfo or in an XkbExtensionDeviceNotify event.
|
||||
* XkbXI_UnsupportedFeature is reported in XkbExtensionDeviceNotify
|
||||
* events to indicate an attempt to use an unsupported feature.
|
||||
*/
|
||||
#define XkbXI_KeyboardsMask (1L << 0)
|
||||
#define XkbXI_ButtonActionsMask (1L << 1)
|
||||
#define XkbXI_IndicatorNamesMask (1L << 2)
|
||||
#define XkbXI_IndicatorMapsMask (1L << 3)
|
||||
#define XkbXI_IndicatorStateMask (1L << 4)
|
||||
#define XkbXI_UnsupportedFeatureMask (1L << 15)
|
||||
#define XkbXI_AllFeaturesMask (0x001f)
|
||||
#define XkbXI_AllDeviceFeaturesMask (0x001e)
|
||||
|
||||
#define XkbXI_IndicatorsMask (0x001c)
|
||||
#define XkbAllExtensionDeviceEventsMask (0x801f)
|
||||
|
||||
/*
|
||||
* Per-Client Flags:
|
||||
* - Specifies flags to be changed by the PerClientFlags request.
|
||||
*/
|
||||
#define XkbPCF_DetectableAutoRepeatMask (1L << 0)
|
||||
#define XkbPCF_GrabsUseXKBStateMask (1L << 1)
|
||||
#define XkbPCF_AutoResetControlsMask (1L << 2)
|
||||
#define XkbPCF_LookupStateWhenGrabbed (1L << 3)
|
||||
#define XkbPCF_SendEventUsesXKBState (1L << 4)
|
||||
#define XkbPCF_AllFlagsMask (0x1F)
|
||||
|
||||
/*
|
||||
* Debugging flags and controls
|
||||
*/
|
||||
#define XkbDF_DisableLocks (1<<0)
|
||||
|
||||
#endif /* _XKB_H_ */
|
|
@ -0,0 +1,662 @@
|
|||
/************************************************************
|
||||
Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
|
||||
|
||||
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 Silicon Graphics not be
|
||||
used in advertising or publicity pertaining to distribution
|
||||
of the software without specific prior written permission.
|
||||
Silicon Graphics makes no representation about the suitability
|
||||
of this software for any purpose. It is provided "as is"
|
||||
without any express or implied warranty.
|
||||
|
||||
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
|
||||
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
|
||||
GRAPHICS 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.
|
||||
|
||||
********************************************************/
|
||||
|
||||
#ifndef _XKBGEOM_H_
|
||||
#define _XKBGEOM_H_
|
||||
|
||||
#include <X11/extensions/XKBstr.h>
|
||||
|
||||
#ifdef XKB_IN_SERVER
|
||||
#define XkbAddGeomKeyAlias SrvXkbAddGeomKeyAlias
|
||||
#define XkbAddGeomColor SrvXkbAddGeomColor
|
||||
#define XkbAddGeomDoodad SrvXkbAddGeomDoodad
|
||||
#define XkbAddGeomKey SrvXkbAddGeomKey
|
||||
#define XkbAddGeomOutline SrvXkbAddGeomOutline
|
||||
#define XkbAddGeomOverlay SrvXkbAddGeomOverlay
|
||||
#define XkbAddGeomOverlayRow SrvXkbAddGeomOverlayRow
|
||||
#define XkbAddGeomOverlayKey SrvXkbAddGeomOverlayKey
|
||||
#define XkbAddGeomProperty SrvXkbAddGeomProperty
|
||||
#define XkbAddGeomRow SrvXkbAddGeomRow
|
||||
#define XkbAddGeomSection SrvXkbAddGeomSection
|
||||
#define XkbAddGeomShape SrvXkbAddGeomShape
|
||||
#define XkbAllocGeomKeyAliases SrvXkbAllocGeomKeyAliases
|
||||
#define XkbAllocGeomColors SrvXkbAllocGeomColors
|
||||
#define XkbAllocGeomDoodads SrvXkbAllocGeomDoodads
|
||||
#define XkbAllocGeomKeys SrvXkbAllocGeomKeys
|
||||
#define XkbAllocGeomOutlines SrvXkbAllocGeomOutlines
|
||||
#define XkbAllocGeomPoints SrvXkbAllocGeomPoints
|
||||
#define XkbAllocGeomProps SrvXkbAllocGeomProps
|
||||
#define XkbAllocGeomRows SrvXkbAllocGeomRows
|
||||
#define XkbAllocGeomSectionDoodads SrvXkbAllocGeomSectionDoodads
|
||||
#define XkbAllocGeomSections SrvXkbAllocGeomSections
|
||||
#define XkbAllocGeomOverlays SrvXkbAllocGeomOverlays
|
||||
#define XkbAllocGeomOverlayRows SrvXkbAllocGeomOverlayRows
|
||||
#define XkbAllocGeomOverlayKeys SrvXkbAllocGeomOverlayKeys
|
||||
#define XkbAllocGeomShapes SrvXkbAllocGeomShapes
|
||||
#define XkbAllocGeometry SrvXkbAllocGeometry
|
||||
#define XkbFreeGeomKeyAliases SrvXkbFreeGeomKeyAliases
|
||||
#define XkbFreeGeomColors SrvXkbFreeGeomColors
|
||||
#define XkbFreeGeomDoodads SrvXkbFreeGeomDoodads
|
||||
#define XkbFreeGeomProperties SrvXkbFreeGeomProperties
|
||||
#define XkbFreeGeomOverlayKeys SrvXkbFreeGeomOverlayKeys
|
||||
#define XkbFreeGeomOverlayRows SrvXkbFreeGeomOverlayRows
|
||||
#define XkbFreeGeomOverlays SrvXkbFreeGeomOverlays
|
||||
#define XkbFreeGeomKeys SrvXkbFreeGeomKeys
|
||||
#define XkbFreeGeomRows SrvXkbFreeGeomRows
|
||||
#define XkbFreeGeomSections SrvXkbFreeGeomSections
|
||||
#define XkbFreeGeomPoints SrvXkbFreeGeomPoints
|
||||
#define XkbFreeGeomOutlines SrvXkbFreeGeomOutlines
|
||||
#define XkbFreeGeomShapes SrvXkbFreeGeomShapes
|
||||
#define XkbFreeGeometry SrvXkbFreeGeometry
|
||||
#endif
|
||||
|
||||
typedef struct _XkbProperty {
|
||||
char *name;
|
||||
char *value;
|
||||
} XkbPropertyRec,*XkbPropertyPtr;
|
||||
|
||||
typedef struct _XkbColor {
|
||||
unsigned int pixel;
|
||||
char * spec;
|
||||
} XkbColorRec,*XkbColorPtr;
|
||||
|
||||
typedef struct _XkbPoint {
|
||||
short x;
|
||||
short y;
|
||||
} XkbPointRec, *XkbPointPtr;
|
||||
|
||||
typedef struct _XkbBounds {
|
||||
short x1,y1;
|
||||
short x2,y2;
|
||||
} XkbBoundsRec, *XkbBoundsPtr;
|
||||
#define XkbBoundsWidth(b) (((b)->x2)-((b)->x1))
|
||||
#define XkbBoundsHeight(b) (((b)->y2)-((b)->y1))
|
||||
|
||||
/*
|
||||
* In the following structs, this pattern is used for dynamically sized arrays:
|
||||
* foo is an array for which sz_foo entries are allocated & num_foo are used
|
||||
*/
|
||||
|
||||
typedef struct _XkbOutline {
|
||||
unsigned short num_points;
|
||||
unsigned short sz_points;
|
||||
unsigned short corner_radius;
|
||||
XkbPointPtr points;
|
||||
} XkbOutlineRec, *XkbOutlinePtr;
|
||||
|
||||
typedef struct _XkbShape {
|
||||
Atom name;
|
||||
unsigned short num_outlines;
|
||||
unsigned short sz_outlines;
|
||||
XkbOutlinePtr outlines;
|
||||
XkbOutlinePtr approx;
|
||||
XkbOutlinePtr primary;
|
||||
XkbBoundsRec bounds;
|
||||
} XkbShapeRec, *XkbShapePtr;
|
||||
#define XkbOutlineIndex(s,o) ((int)((o)-&(s)->outlines[0]))
|
||||
|
||||
typedef struct _XkbShapeDoodad {
|
||||
Atom name;
|
||||
unsigned char type;
|
||||
unsigned char priority;
|
||||
short top;
|
||||
short left;
|
||||
short angle;
|
||||
unsigned short color_ndx;
|
||||
unsigned short shape_ndx;
|
||||
} XkbShapeDoodadRec, *XkbShapeDoodadPtr;
|
||||
#define XkbShapeDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
|
||||
#define XkbShapeDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
|
||||
#define XkbSetShapeDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
|
||||
#define XkbSetShapeDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0])
|
||||
|
||||
typedef struct _XkbTextDoodad {
|
||||
Atom name;
|
||||
unsigned char type;
|
||||
unsigned char priority;
|
||||
short top;
|
||||
short left;
|
||||
short angle;
|
||||
short width;
|
||||
short height;
|
||||
unsigned short color_ndx;
|
||||
char * text;
|
||||
char * font;
|
||||
} XkbTextDoodadRec, *XkbTextDoodadPtr;
|
||||
#define XkbTextDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
|
||||
#define XkbSetTextDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
|
||||
|
||||
typedef struct _XkbIndicatorDoodad {
|
||||
Atom name;
|
||||
unsigned char type;
|
||||
unsigned char priority;
|
||||
short top;
|
||||
short left;
|
||||
short angle;
|
||||
unsigned short shape_ndx;
|
||||
unsigned short on_color_ndx;
|
||||
unsigned short off_color_ndx;
|
||||
} XkbIndicatorDoodadRec, *XkbIndicatorDoodadPtr;
|
||||
#define XkbIndicatorDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
|
||||
#define XkbIndicatorDoodadOnColor(g,d) (&(g)->colors[(d)->on_color_ndx])
|
||||
#define XkbIndicatorDoodadOffColor(g,d) (&(g)->colors[(d)->off_color_ndx])
|
||||
#define XkbSetIndicatorDoodadOnColor(g,d,c) \
|
||||
((d)->on_color_ndx= (c)-&(g)->colors[0])
|
||||
#define XkbSetIndicatorDoodadOffColor(g,d,c) \
|
||||
((d)->off_color_ndx= (c)-&(g)->colors[0])
|
||||
#define XkbSetIndicatorDoodadShape(g,d,s) \
|
||||
((d)->shape_ndx= (s)-&(g)->shapes[0])
|
||||
|
||||
typedef struct _XkbLogoDoodad {
|
||||
Atom name;
|
||||
unsigned char type;
|
||||
unsigned char priority;
|
||||
short top;
|
||||
short left;
|
||||
short angle;
|
||||
unsigned short color_ndx;
|
||||
unsigned short shape_ndx;
|
||||
char * logo_name;
|
||||
} XkbLogoDoodadRec, *XkbLogoDoodadPtr;
|
||||
#define XkbLogoDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
|
||||
#define XkbLogoDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
|
||||
#define XkbSetLogoDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
|
||||
#define XkbSetLogoDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0])
|
||||
|
||||
typedef struct _XkbAnyDoodad {
|
||||
Atom name;
|
||||
unsigned char type;
|
||||
unsigned char priority;
|
||||
short top;
|
||||
short left;
|
||||
short angle;
|
||||
} XkbAnyDoodadRec, *XkbAnyDoodadPtr;
|
||||
|
||||
typedef union _XkbDoodad {
|
||||
XkbAnyDoodadRec any;
|
||||
XkbShapeDoodadRec shape;
|
||||
XkbTextDoodadRec text;
|
||||
XkbIndicatorDoodadRec indicator;
|
||||
XkbLogoDoodadRec logo;
|
||||
} XkbDoodadRec, *XkbDoodadPtr;
|
||||
|
||||
#define XkbUnknownDoodad 0
|
||||
#define XkbOutlineDoodad 1
|
||||
#define XkbSolidDoodad 2
|
||||
#define XkbTextDoodad 3
|
||||
#define XkbIndicatorDoodad 4
|
||||
#define XkbLogoDoodad 5
|
||||
|
||||
typedef struct _XkbKey {
|
||||
XkbKeyNameRec name;
|
||||
short gap;
|
||||
unsigned char shape_ndx;
|
||||
unsigned char color_ndx;
|
||||
} XkbKeyRec, *XkbKeyPtr;
|
||||
#define XkbKeyShape(g,k) (&(g)->shapes[(k)->shape_ndx])
|
||||
#define XkbKeyColor(g,k) (&(g)->colors[(k)->color_ndx])
|
||||
#define XkbSetKeyShape(g,k,s) ((k)->shape_ndx= (s)-&(g)->shapes[0])
|
||||
#define XkbSetKeyColor(g,k,c) ((k)->color_ndx= (c)-&(g)->colors[0])
|
||||
|
||||
typedef struct _XkbRow {
|
||||
short top;
|
||||
short left;
|
||||
unsigned short num_keys;
|
||||
unsigned short sz_keys;
|
||||
int vertical;
|
||||
XkbKeyPtr keys;
|
||||
XkbBoundsRec bounds;
|
||||
} XkbRowRec, *XkbRowPtr;
|
||||
|
||||
typedef struct _XkbSection {
|
||||
Atom name;
|
||||
unsigned char priority;
|
||||
short top;
|
||||
short left;
|
||||
unsigned short width;
|
||||
unsigned short height;
|
||||
short angle;
|
||||
unsigned short num_rows;
|
||||
unsigned short num_doodads;
|
||||
unsigned short num_overlays;
|
||||
unsigned short sz_rows;
|
||||
unsigned short sz_doodads;
|
||||
unsigned short sz_overlays;
|
||||
XkbRowPtr rows;
|
||||
XkbDoodadPtr doodads;
|
||||
XkbBoundsRec bounds;
|
||||
struct _XkbOverlay *overlays;
|
||||
} XkbSectionRec, *XkbSectionPtr;
|
||||
|
||||
typedef struct _XkbOverlayKey {
|
||||
XkbKeyNameRec over;
|
||||
XkbKeyNameRec under;
|
||||
} XkbOverlayKeyRec,*XkbOverlayKeyPtr;
|
||||
|
||||
typedef struct _XkbOverlayRow {
|
||||
unsigned short row_under;
|
||||
unsigned short num_keys;
|
||||
unsigned short sz_keys;
|
||||
XkbOverlayKeyPtr keys;
|
||||
} XkbOverlayRowRec,*XkbOverlayRowPtr;
|
||||
|
||||
typedef struct _XkbOverlay {
|
||||
Atom name;
|
||||
XkbSectionPtr section_under;
|
||||
unsigned short num_rows;
|
||||
unsigned short sz_rows;
|
||||
XkbOverlayRowPtr rows;
|
||||
XkbBoundsPtr bounds;
|
||||
} XkbOverlayRec,*XkbOverlayPtr;
|
||||
|
||||
typedef struct _XkbGeometry {
|
||||
Atom name;
|
||||
unsigned short width_mm;
|
||||
unsigned short height_mm;
|
||||
char * label_font;
|
||||
XkbColorPtr label_color;
|
||||
XkbColorPtr base_color;
|
||||
unsigned short sz_properties;
|
||||
unsigned short sz_colors;
|
||||
unsigned short sz_shapes;
|
||||
unsigned short sz_sections;
|
||||
unsigned short sz_doodads;
|
||||
unsigned short sz_key_aliases;
|
||||
unsigned short num_properties;
|
||||
unsigned short num_colors;
|
||||
unsigned short num_shapes;
|
||||
unsigned short num_sections;
|
||||
unsigned short num_doodads;
|
||||
unsigned short num_key_aliases;
|
||||
XkbPropertyPtr properties;
|
||||
XkbColorPtr colors;
|
||||
XkbShapePtr shapes;
|
||||
XkbSectionPtr sections;
|
||||
XkbDoodadPtr doodads;
|
||||
XkbKeyAliasPtr key_aliases;
|
||||
} XkbGeometryRec;
|
||||
#define XkbGeomColorIndex(g,c) ((int)((c)-&(g)->colors[0]))
|
||||
|
||||
#define XkbGeomPropertiesMask (1<<0)
|
||||
#define XkbGeomColorsMask (1<<1)
|
||||
#define XkbGeomShapesMask (1<<2)
|
||||
#define XkbGeomSectionsMask (1<<3)
|
||||
#define XkbGeomDoodadsMask (1<<4)
|
||||
#define XkbGeomKeyAliasesMask (1<<5)
|
||||
#define XkbGeomAllMask (0x3f)
|
||||
|
||||
typedef struct _XkbGeometrySizes {
|
||||
unsigned int which;
|
||||
unsigned short num_properties;
|
||||
unsigned short num_colors;
|
||||
unsigned short num_shapes;
|
||||
unsigned short num_sections;
|
||||
unsigned short num_doodads;
|
||||
unsigned short num_key_aliases;
|
||||
} XkbGeometrySizesRec,*XkbGeometrySizesPtr;
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
extern XkbPropertyPtr
|
||||
XkbAddGeomProperty(
|
||||
XkbGeometryPtr /* geom */,
|
||||
char * /* name */,
|
||||
char * /* value */
|
||||
);
|
||||
|
||||
extern XkbKeyAliasPtr
|
||||
XkbAddGeomKeyAlias(
|
||||
XkbGeometryPtr /* geom */,
|
||||
char * /* alias */,
|
||||
char * /* real */
|
||||
);
|
||||
|
||||
extern XkbColorPtr
|
||||
XkbAddGeomColor(
|
||||
XkbGeometryPtr /* geom */,
|
||||
char * /* spec */,
|
||||
unsigned int /* pixel */
|
||||
);
|
||||
|
||||
extern XkbOutlinePtr
|
||||
XkbAddGeomOutline(
|
||||
XkbShapePtr /* shape */,
|
||||
int /* sz_points */
|
||||
);
|
||||
|
||||
extern XkbShapePtr
|
||||
XkbAddGeomShape(
|
||||
XkbGeometryPtr /* geom */,
|
||||
Atom /* name */,
|
||||
int /* sz_outlines */
|
||||
);
|
||||
|
||||
extern XkbKeyPtr
|
||||
XkbAddGeomKey(
|
||||
XkbRowPtr /* row */
|
||||
);
|
||||
|
||||
extern XkbRowPtr
|
||||
XkbAddGeomRow(
|
||||
XkbSectionPtr /* section */,
|
||||
int /* sz_keys */
|
||||
);
|
||||
|
||||
extern XkbSectionPtr
|
||||
XkbAddGeomSection(
|
||||
XkbGeometryPtr /* geom */,
|
||||
Atom /* name */,
|
||||
int /* sz_rows */,
|
||||
int /* sz_doodads */,
|
||||
int /* sz_overlays */
|
||||
);
|
||||
|
||||
extern XkbOverlayPtr
|
||||
XkbAddGeomOverlay(
|
||||
XkbSectionPtr /* section */,
|
||||
Atom /* name */,
|
||||
int /* sz_rows */
|
||||
);
|
||||
|
||||
extern XkbOverlayRowPtr
|
||||
XkbAddGeomOverlayRow(
|
||||
XkbOverlayPtr /* overlay */,
|
||||
int /* row_under */,
|
||||
int /* sz_keys */
|
||||
);
|
||||
|
||||
extern XkbOverlayKeyPtr
|
||||
XkbAddGeomOverlayKey(
|
||||
XkbOverlayPtr /* overlay */,
|
||||
XkbOverlayRowPtr /* row */,
|
||||
char * /* over */,
|
||||
char * /* under */
|
||||
);
|
||||
|
||||
extern XkbDoodadPtr
|
||||
XkbAddGeomDoodad(
|
||||
XkbGeometryPtr /* geom */,
|
||||
XkbSectionPtr /* section */,
|
||||
Atom /* name */
|
||||
);
|
||||
|
||||
|
||||
extern void
|
||||
XkbFreeGeomKeyAliases(
|
||||
XkbGeometryPtr /* geom */,
|
||||
int /* first */,
|
||||
int /* count */,
|
||||
Bool /* freeAll */
|
||||
);
|
||||
|
||||
extern void
|
||||
XkbFreeGeomColors(
|
||||
XkbGeometryPtr /* geom */,
|
||||
int /* first */,
|
||||
int /* count */,
|
||||
Bool /* freeAll */
|
||||
);
|
||||
|
||||
extern void
|
||||
XkbFreeGeomDoodads(
|
||||
XkbDoodadPtr /* doodads */,
|
||||
int /* nDoodads */,
|
||||
Bool /* freeAll */
|
||||
);
|
||||
|
||||
|
||||
extern void
|
||||
XkbFreeGeomProperties(
|
||||
XkbGeometryPtr /* geom */,
|
||||
int /* first */,
|
||||
int /* count */,
|
||||
Bool /* freeAll */
|
||||
);
|
||||
|
||||
extern void
|
||||
XkbFreeGeomOverlayKeys(
|
||||
XkbOverlayRowPtr /* row */,
|
||||
int /* first */,
|
||||
int /* count */,
|
||||
Bool /* freeAll */
|
||||
);
|
||||
|
||||
extern void
|
||||
XkbFreeGeomOverlayRows(
|
||||
XkbOverlayPtr /* overlay */,
|
||||
int /* first */,
|
||||
int /* count */,
|
||||
Bool /* freeAll */
|
||||
);
|
||||
|
||||
extern void
|
||||
XkbFreeGeomOverlays(
|
||||
XkbSectionPtr /* section */,
|
||||
int /* first */,
|
||||
int /* count */,
|
||||
Bool /* freeAll */
|
||||
);
|
||||
|
||||
extern void
|
||||
XkbFreeGeomKeys(
|
||||
XkbRowPtr /* row */,
|
||||
int /* first */,
|
||||
int /* count */,
|
||||
Bool /* freeAll */
|
||||
);
|
||||
|
||||
extern void
|
||||
XkbFreeGeomRows(
|
||||
XkbSectionPtr /* section */,
|
||||
int /* first */,
|
||||
int /* count */,
|
||||
Bool /* freeAll */
|
||||
);
|
||||
|
||||
extern void
|
||||
XkbFreeGeomSections(
|
||||
XkbGeometryPtr /* geom */,
|
||||
int /* first */,
|
||||
int /* count */,
|
||||
Bool /* freeAll */
|
||||
);
|
||||
|
||||
|
||||
extern void
|
||||
XkbFreeGeomPoints(
|
||||
XkbOutlinePtr /* outline */,
|
||||
int /* first */,
|
||||
int /* count */,
|
||||
Bool /* freeAll */
|
||||
);
|
||||
|
||||
extern void
|
||||
XkbFreeGeomOutlines(
|
||||
XkbShapePtr /* shape */,
|
||||
int /* first */,
|
||||
int /* count */,
|
||||
Bool /* freeAll */
|
||||
);
|
||||
|
||||
extern void
|
||||
XkbFreeGeomShapes(
|
||||
XkbGeometryPtr /* geom */,
|
||||
int /* first */,
|
||||
int /* count */,
|
||||
Bool /* freeAll */
|
||||
);
|
||||
|
||||
extern void
|
||||
XkbFreeGeometry(
|
||||
XkbGeometryPtr /* geom */,
|
||||
unsigned int /* which */,
|
||||
Bool /* freeMap */
|
||||
);
|
||||
|
||||
extern Status
|
||||
XkbAllocGeomProps(
|
||||
XkbGeometryPtr /* geom */,
|
||||
int /* nProps */
|
||||
);
|
||||
|
||||
extern Status
|
||||
XkbAllocGeomKeyAliases(
|
||||
XkbGeometryPtr /* geom */,
|
||||
int /* nAliases */
|
||||
);
|
||||
|
||||
extern Status
|
||||
XkbAllocGeomColors(
|
||||
XkbGeometryPtr /* geom */,
|
||||
int /* nColors */
|
||||
);
|
||||
|
||||
extern Status
|
||||
XkbAllocGeomShapes(
|
||||
XkbGeometryPtr /* geom */,
|
||||
int /* nShapes */
|
||||
);
|
||||
|
||||
extern Status
|
||||
XkbAllocGeomSections(
|
||||
XkbGeometryPtr /* geom */,
|
||||
int /* nSections */
|
||||
);
|
||||
|
||||
extern Status
|
||||
XkbAllocGeomOverlays(
|
||||
XkbSectionPtr /* section */,
|
||||
int /* num_needed */
|
||||
);
|
||||
|
||||
extern Status
|
||||
XkbAllocGeomOverlayRows(
|
||||
XkbOverlayPtr /* overlay */,
|
||||
int /* num_needed */
|
||||
);
|
||||
|
||||
extern Status
|
||||
XkbAllocGeomOverlayKeys(
|
||||
XkbOverlayRowPtr /* row */,
|
||||
int /* num_needed */
|
||||
);
|
||||
|
||||
extern Status
|
||||
XkbAllocGeomDoodads(
|
||||
XkbGeometryPtr /* geom */,
|
||||
int /* nDoodads */
|
||||
);
|
||||
|
||||
extern Status
|
||||
XkbAllocGeomSectionDoodads(
|
||||
XkbSectionPtr /* section */,
|
||||
int /* nDoodads */
|
||||
);
|
||||
|
||||
extern Status
|
||||
XkbAllocGeomOutlines(
|
||||
XkbShapePtr /* shape */,
|
||||
int /* nOL */
|
||||
);
|
||||
|
||||
extern Status
|
||||
XkbAllocGeomRows(
|
||||
XkbSectionPtr /* section */,
|
||||
int /* nRows */
|
||||
);
|
||||
|
||||
extern Status
|
||||
XkbAllocGeomPoints(
|
||||
XkbOutlinePtr /* ol */,
|
||||
int /* nPts */
|
||||
);
|
||||
|
||||
extern Status
|
||||
XkbAllocGeomKeys(
|
||||
XkbRowPtr /* row */,
|
||||
int /* nKeys */
|
||||
);
|
||||
|
||||
extern Status
|
||||
XkbAllocGeometry(
|
||||
XkbDescPtr /* xkb */,
|
||||
XkbGeometrySizesPtr /* sizes */
|
||||
);
|
||||
|
||||
extern Status
|
||||
XkbSetGeometry(
|
||||
Display * /* dpy */,
|
||||
unsigned /* deviceSpec */,
|
||||
XkbGeometryPtr /* geom */
|
||||
);
|
||||
|
||||
extern Bool
|
||||
XkbComputeShapeTop(
|
||||
XkbShapePtr /* shape */,
|
||||
XkbBoundsPtr /* bounds */
|
||||
);
|
||||
|
||||
extern Bool
|
||||
XkbComputeShapeBounds(
|
||||
XkbShapePtr /* shape */
|
||||
);
|
||||
|
||||
extern Bool
|
||||
XkbComputeRowBounds(
|
||||
XkbGeometryPtr /* geom */,
|
||||
XkbSectionPtr /* section */,
|
||||
XkbRowPtr /* row */
|
||||
);
|
||||
|
||||
extern Bool
|
||||
XkbComputeSectionBounds(
|
||||
XkbGeometryPtr /* geom */,
|
||||
XkbSectionPtr /* section */
|
||||
);
|
||||
|
||||
extern char *
|
||||
XkbFindOverlayForKey(
|
||||
XkbGeometryPtr /* geom */,
|
||||
XkbSectionPtr /* wanted */,
|
||||
char * /* under */
|
||||
);
|
||||
|
||||
extern Status
|
||||
XkbGetGeometry(
|
||||
Display * /* dpy */,
|
||||
XkbDescPtr /* xkb */
|
||||
);
|
||||
|
||||
extern Status
|
||||
XkbGetNamedGeometry(
|
||||
Display * /* dpy */,
|
||||
XkbDescPtr /* xkb */,
|
||||
Atom /* name */
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XKBSTR_H_ */
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,642 @@
|
|||
/************************************************************
|
||||
Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
|
||||
|
||||
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 Silicon Graphics not be
|
||||
used in advertising or publicity pertaining to distribution
|
||||
of the software without specific prior written permission.
|
||||
Silicon Graphics makes no representation about the suitability
|
||||
of this software for any purpose. It is provided "as is"
|
||||
without any express or implied warranty.
|
||||
|
||||
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
|
||||
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
|
||||
GRAPHICS 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.
|
||||
|
||||
********************************************************/
|
||||
|
||||
#ifndef _XKBSTR_H_
|
||||
#define _XKBSTR_H_
|
||||
|
||||
#include <X11/extensions/XKB.h>
|
||||
|
||||
#define XkbCharToInt(v) ((v)&0x80?(int)((v)|(~0xff)):(int)((v)&0x7f))
|
||||
#define XkbIntTo2Chars(i,h,l) (((h)=((i>>8)&0xff)),((l)=((i)&0xff)))
|
||||
#define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l)))
|
||||
|
||||
/*
|
||||
* The Xkb 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
|
||||
* complaining about it.
|
||||
*/
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wpadded"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Common data structures and access macros
|
||||
*/
|
||||
|
||||
typedef struct _XkbStateRec {
|
||||
unsigned char group;
|
||||
unsigned char locked_group;
|
||||
unsigned short base_group;
|
||||
unsigned short latched_group;
|
||||
unsigned char mods;
|
||||
unsigned char base_mods;
|
||||
unsigned char latched_mods;
|
||||
unsigned char locked_mods;
|
||||
unsigned char compat_state;
|
||||
unsigned char grab_mods;
|
||||
unsigned char compat_grab_mods;
|
||||
unsigned char lookup_mods;
|
||||
unsigned char compat_lookup_mods;
|
||||
unsigned short ptr_buttons;
|
||||
} XkbStateRec,*XkbStatePtr;
|
||||
#define XkbModLocks(s) ((s)->locked_mods)
|
||||
#define XkbStateMods(s) ((s)->base_mods|(s)->latched_mods|XkbModLocks(s))
|
||||
#define XkbGroupLock(s) ((s)->locked_group)
|
||||
#define XkbStateGroup(s) ((s)->base_group+(s)->latched_group+XkbGroupLock(s))
|
||||
#define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group)
|
||||
#define XkbGrabStateFromRec(s) XkbBuildCoreState((s)->grab_mods,(s)->group)
|
||||
|
||||
typedef struct _XkbMods {
|
||||
unsigned char mask; /* effective mods */
|
||||
unsigned char real_mods;
|
||||
unsigned short vmods;
|
||||
} XkbModsRec,*XkbModsPtr;
|
||||
|
||||
typedef struct _XkbKTMapEntry {
|
||||
Bool active;
|
||||
unsigned char level;
|
||||
XkbModsRec mods;
|
||||
} XkbKTMapEntryRec,*XkbKTMapEntryPtr;
|
||||
|
||||
typedef struct _XkbKeyType {
|
||||
XkbModsRec mods;
|
||||
unsigned char num_levels;
|
||||
unsigned char map_count;
|
||||
/* map is an array of map_count XkbKTMapEntryRec structs */
|
||||
XkbKTMapEntryPtr map;
|
||||
/* preserve is an array of map_count XkbModsRec structs */
|
||||
XkbModsPtr preserve;
|
||||
Atom name;
|
||||
/* level_names is an array of num_levels Atoms */
|
||||
Atom * level_names;
|
||||
} XkbKeyTypeRec, *XkbKeyTypePtr;
|
||||
|
||||
#define XkbNumGroups(g) ((g)&0x0f)
|
||||
#define XkbOutOfRangeGroupInfo(g) ((g)&0xf0)
|
||||
#define XkbOutOfRangeGroupAction(g) ((g)&0xc0)
|
||||
#define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4)
|
||||
#define XkbSetGroupInfo(g,w,n) (((w)&0xc0)|(((n)&3)<<4)|((g)&0x0f))
|
||||
#define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f))
|
||||
|
||||
/*
|
||||
* Structures and access macros used primarily by the server
|
||||
*/
|
||||
|
||||
typedef struct _XkbBehavior {
|
||||
unsigned char type;
|
||||
unsigned char data;
|
||||
} XkbBehavior;
|
||||
|
||||
#define XkbAnyActionDataSize 7
|
||||
typedef struct _XkbAnyAction {
|
||||
unsigned char type;
|
||||
unsigned char data[XkbAnyActionDataSize];
|
||||
} XkbAnyAction;
|
||||
|
||||
typedef struct _XkbModAction {
|
||||
unsigned char type;
|
||||
unsigned char flags;
|
||||
unsigned char mask;
|
||||
unsigned char real_mods;
|
||||
unsigned char vmods1;
|
||||
unsigned char vmods2;
|
||||
} XkbModAction;
|
||||
#define XkbModActionVMods(a) \
|
||||
((short)(((a)->vmods1<<8)|((a)->vmods2)))
|
||||
#define XkbSetModActionVMods(a,v) \
|
||||
(((a)->vmods1=(((v)>>8)&0xff)),(a)->vmods2=((v)&0xff))
|
||||
|
||||
typedef struct _XkbGroupAction {
|
||||
unsigned char type;
|
||||
unsigned char flags;
|
||||
char group_XXX;
|
||||
} XkbGroupAction;
|
||||
#define XkbSAGroup(a) (XkbCharToInt((a)->group_XXX))
|
||||
#define XkbSASetGroup(a,g) ((a)->group_XXX=(g))
|
||||
|
||||
typedef struct _XkbISOAction {
|
||||
unsigned char type;
|
||||
unsigned char flags;
|
||||
unsigned char mask;
|
||||
unsigned char real_mods;
|
||||
char group_XXX;
|
||||
unsigned char affect;
|
||||
unsigned char vmods1;
|
||||
unsigned char vmods2;
|
||||
} XkbISOAction;
|
||||
|
||||
typedef struct _XkbPtrAction {
|
||||
unsigned char type;
|
||||
unsigned char flags;
|
||||
unsigned char high_XXX;
|
||||
unsigned char low_XXX;
|
||||
unsigned char high_YYY;
|
||||
unsigned char low_YYY;
|
||||
} XkbPtrAction;
|
||||
#define XkbPtrActionX(a) (Xkb2CharsToInt((a)->high_XXX,(a)->low_XXX))
|
||||
#define XkbPtrActionY(a) (Xkb2CharsToInt((a)->high_YYY,(a)->low_YYY))
|
||||
#define XkbSetPtrActionX(a,x) (XkbIntTo2Chars(x,(a)->high_XXX,(a)->low_XXX))
|
||||
#define XkbSetPtrActionY(a,y) (XkbIntTo2Chars(y,(a)->high_YYY,(a)->low_YYY))
|
||||
|
||||
typedef struct _XkbPtrBtnAction {
|
||||
unsigned char type;
|
||||
unsigned char flags;
|
||||
unsigned char count;
|
||||
unsigned char button;
|
||||
} XkbPtrBtnAction;
|
||||
|
||||
typedef struct _XkbPtrDfltAction {
|
||||
unsigned char type;
|
||||
unsigned char flags;
|
||||
unsigned char affect;
|
||||
char valueXXX;
|
||||
} XkbPtrDfltAction;
|
||||
#define XkbSAPtrDfltValue(a) (XkbCharToInt((a)->valueXXX))
|
||||
#define XkbSASetPtrDfltValue(a,c) ((a)->valueXXX= ((c)&0xff))
|
||||
|
||||
typedef struct _XkbSwitchScreenAction {
|
||||
unsigned char type;
|
||||
unsigned char flags;
|
||||
char screenXXX;
|
||||
} XkbSwitchScreenAction;
|
||||
#define XkbSAScreen(a) (XkbCharToInt((a)->screenXXX))
|
||||
#define XkbSASetScreen(a,s) ((a)->screenXXX= ((s)&0xff))
|
||||
|
||||
typedef struct _XkbCtrlsAction {
|
||||
unsigned char type;
|
||||
unsigned char flags;
|
||||
unsigned char ctrls3;
|
||||
unsigned char ctrls2;
|
||||
unsigned char ctrls1;
|
||||
unsigned char ctrls0;
|
||||
} XkbCtrlsAction;
|
||||
#define XkbActionSetCtrls(a,c) (((a)->ctrls3=(((c)>>24)&0xff)),\
|
||||
((a)->ctrls2=(((c)>>16)&0xff)),\
|
||||
((a)->ctrls1=(((c)>>8)&0xff)),\
|
||||
((a)->ctrls0=((c)&0xff)))
|
||||
#define XkbActionCtrls(a) ((((unsigned int)(a)->ctrls3)<<24)|\
|
||||
(((unsigned int)(a)->ctrls2)<<16)|\
|
||||
(((unsigned int)(a)->ctrls1)<<8)|\
|
||||
((unsigned int)((a)->ctrls0)))
|
||||
|
||||
typedef struct _XkbMessageAction {
|
||||
unsigned char type;
|
||||
unsigned char flags;
|
||||
unsigned char message[6];
|
||||
} XkbMessageAction;
|
||||
|
||||
typedef struct _XkbRedirectKeyAction {
|
||||
unsigned char type;
|
||||
unsigned char new_key;
|
||||
unsigned char mods_mask;
|
||||
unsigned char mods;
|
||||
unsigned char vmods_mask0;
|
||||
unsigned char vmods_mask1;
|
||||
unsigned char vmods0;
|
||||
unsigned char vmods1;
|
||||
} XkbRedirectKeyAction;
|
||||
|
||||
#define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|\
|
||||
((unsigned int)(a)->vmods0))
|
||||
#define XkbSARedirectSetVMods(a,m) (((a)->vmods1=(((m)>>8)&0xff)),\
|
||||
((a)->vmods0=((m)&0xff)))
|
||||
#define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask1)<<8)|\
|
||||
((unsigned int)(a)->vmods_mask0))
|
||||
#define XkbSARedirectSetVModsMask(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\
|
||||
((a)->vmods_mask0=((m)&0xff)))
|
||||
|
||||
typedef struct _XkbDeviceBtnAction {
|
||||
unsigned char type;
|
||||
unsigned char flags;
|
||||
unsigned char count;
|
||||
unsigned char button;
|
||||
unsigned char device;
|
||||
} XkbDeviceBtnAction;
|
||||
|
||||
typedef struct _XkbDeviceValuatorAction {
|
||||
unsigned char type;
|
||||
unsigned char device;
|
||||
unsigned char v1_what;
|
||||
unsigned char v1_ndx;
|
||||
unsigned char v1_value;
|
||||
unsigned char v2_what;
|
||||
unsigned char v2_ndx;
|
||||
unsigned char v2_value;
|
||||
} XkbDeviceValuatorAction;
|
||||
|
||||
typedef union _XkbAction {
|
||||
XkbAnyAction any;
|
||||
XkbModAction mods;
|
||||
XkbGroupAction group;
|
||||
XkbISOAction iso;
|
||||
XkbPtrAction ptr;
|
||||
XkbPtrBtnAction btn;
|
||||
XkbPtrDfltAction dflt;
|
||||
XkbSwitchScreenAction screen;
|
||||
XkbCtrlsAction ctrls;
|
||||
XkbMessageAction msg;
|
||||
XkbRedirectKeyAction redirect;
|
||||
XkbDeviceBtnAction devbtn;
|
||||
XkbDeviceValuatorAction devval;
|
||||
unsigned char type;
|
||||
} XkbAction;
|
||||
|
||||
typedef struct _XkbControls {
|
||||
unsigned char mk_dflt_btn;
|
||||
unsigned char num_groups;
|
||||
unsigned char groups_wrap;
|
||||
XkbModsRec internal;
|
||||
XkbModsRec ignore_lock;
|
||||
unsigned int enabled_ctrls;
|
||||
unsigned short repeat_delay;
|
||||
unsigned short repeat_interval;
|
||||
unsigned short slow_keys_delay;
|
||||
unsigned short debounce_delay;
|
||||
unsigned short mk_delay;
|
||||
unsigned short mk_interval;
|
||||
unsigned short mk_time_to_max;
|
||||
unsigned short mk_max_speed;
|
||||
short mk_curve;
|
||||
unsigned short ax_options;
|
||||
unsigned short ax_timeout;
|
||||
unsigned short axt_opts_mask;
|
||||
unsigned short axt_opts_values;
|
||||
unsigned int axt_ctrls_mask;
|
||||
unsigned int axt_ctrls_values;
|
||||
unsigned char per_key_repeat[XkbPerKeyBitArraySize];
|
||||
} XkbControlsRec, *XkbControlsPtr;
|
||||
|
||||
#define XkbAX_AnyFeedback(c) ((c)->enabled_ctrls&XkbAccessXFeedbackMask)
|
||||
#define XkbAX_NeedOption(c,w) ((c)->ax_options&(w))
|
||||
#define XkbAX_NeedFeedback(c,w) (XkbAX_AnyFeedback(c)&&XkbAX_NeedOption(c,w))
|
||||
|
||||
typedef struct _XkbServerMapRec {
|
||||
/* acts is an array of XkbActions structs, with size_acts entries
|
||||
allocated, and num_acts entries used. */
|
||||
unsigned short num_acts;
|
||||
unsigned short size_acts;
|
||||
XkbAction *acts;
|
||||
|
||||
/* behaviors, key_acts, explicit, & vmodmap are all arrays with
|
||||
(xkb->max_key_code + 1) entries allocated for each. */
|
||||
XkbBehavior *behaviors;
|
||||
unsigned short *key_acts;
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
/* explicit is a C++ reserved word */
|
||||
unsigned char *c_explicit;
|
||||
#else
|
||||
unsigned char *explicit;
|
||||
#endif
|
||||
unsigned char vmods[XkbNumVirtualMods];
|
||||
unsigned short *vmodmap;
|
||||
} XkbServerMapRec, *XkbServerMapPtr;
|
||||
|
||||
#define XkbSMKeyActionsPtr(m,k) (&(m)->acts[(m)->key_acts[k]])
|
||||
|
||||
/*
|
||||
* Structures and access macros used primarily by clients
|
||||
*/
|
||||
|
||||
typedef struct _XkbSymMapRec {
|
||||
unsigned char kt_index[XkbNumKbdGroups];
|
||||
unsigned char group_info;
|
||||
unsigned char width;
|
||||
unsigned short offset;
|
||||
} XkbSymMapRec, *XkbSymMapPtr;
|
||||
|
||||
typedef struct _XkbClientMapRec {
|
||||
/* types is an array of XkbKeyTypeRec structs, with size_types entries
|
||||
allocated, and num_types entries used. */
|
||||
unsigned char size_types;
|
||||
unsigned char num_types;
|
||||
XkbKeyTypePtr types;
|
||||
|
||||
/* syms is an array of size_syms KeySyms, in which num_syms are used */
|
||||
unsigned short size_syms;
|
||||
unsigned short num_syms;
|
||||
KeySym *syms;
|
||||
/* key_sym_map is an array of (max_key_code + 1) XkbSymMapRec structs */
|
||||
XkbSymMapPtr key_sym_map;
|
||||
|
||||
/* modmap is an array of (max_key_code + 1) unsigned chars */
|
||||
unsigned char *modmap;
|
||||
} XkbClientMapRec, *XkbClientMapPtr;
|
||||
|
||||
#define XkbCMKeyGroupInfo(m,k) ((m)->key_sym_map[k].group_info)
|
||||
#define XkbCMKeyNumGroups(m,k) (XkbNumGroups((m)->key_sym_map[k].group_info))
|
||||
#define XkbCMKeyGroupWidth(m,k,g) (XkbCMKeyType(m,k,g)->num_levels)
|
||||
#define XkbCMKeyGroupsWidth(m,k) ((m)->key_sym_map[k].width)
|
||||
#define XkbCMKeyTypeIndex(m,k,g) ((m)->key_sym_map[k].kt_index[g&0x3])
|
||||
#define XkbCMKeyType(m,k,g) (&(m)->types[XkbCMKeyTypeIndex(m,k,g)])
|
||||
#define XkbCMKeyNumSyms(m,k) (XkbCMKeyGroupsWidth(m,k)*XkbCMKeyNumGroups(m,k))
|
||||
#define XkbCMKeySymsOffset(m,k) ((m)->key_sym_map[k].offset)
|
||||
#define XkbCMKeySymsPtr(m,k) (&(m)->syms[XkbCMKeySymsOffset(m,k)])
|
||||
|
||||
/*
|
||||
* Compatibility structures and access macros
|
||||
*/
|
||||
|
||||
typedef struct _XkbSymInterpretRec {
|
||||
KeySym sym;
|
||||
unsigned char flags;
|
||||
unsigned char match;
|
||||
unsigned char mods;
|
||||
unsigned char virtual_mod;
|
||||
XkbAnyAction act;
|
||||
} XkbSymInterpretRec,*XkbSymInterpretPtr;
|
||||
|
||||
typedef struct _XkbCompatMapRec {
|
||||
/* sym_interpret is an array of XkbSymInterpretRec structs,
|
||||
in which size_si are allocated & num_si are used. */
|
||||
XkbSymInterpretPtr sym_interpret;
|
||||
XkbModsRec groups[XkbNumKbdGroups];
|
||||
unsigned short num_si;
|
||||
unsigned short size_si;
|
||||
} XkbCompatMapRec, *XkbCompatMapPtr;
|
||||
|
||||
typedef struct _XkbIndicatorMapRec {
|
||||
unsigned char flags;
|
||||
unsigned char which_groups;
|
||||
unsigned char groups;
|
||||
unsigned char which_mods;
|
||||
XkbModsRec mods;
|
||||
unsigned int ctrls;
|
||||
} XkbIndicatorMapRec, *XkbIndicatorMapPtr;
|
||||
|
||||
#define XkbIM_IsAuto(i) ((((i)->flags&XkbIM_NoAutomatic)==0)&&\
|
||||
(((i)->which_groups&&(i)->groups)||\
|
||||
((i)->which_mods&&(i)->mods.mask)||\
|
||||
((i)->ctrls)))
|
||||
#define XkbIM_InUse(i) (((i)->flags)||((i)->which_groups)||\
|
||||
((i)->which_mods)||((i)->ctrls))
|
||||
|
||||
|
||||
typedef struct _XkbIndicatorRec {
|
||||
unsigned long phys_indicators;
|
||||
XkbIndicatorMapRec maps[XkbNumIndicators];
|
||||
} XkbIndicatorRec,*XkbIndicatorPtr;
|
||||
|
||||
typedef struct _XkbKeyNameRec {
|
||||
char name[XkbKeyNameLength];
|
||||
} XkbKeyNameRec,*XkbKeyNamePtr;
|
||||
|
||||
typedef struct _XkbKeyAliasRec {
|
||||
char real[XkbKeyNameLength];
|
||||
char alias[XkbKeyNameLength];
|
||||
} XkbKeyAliasRec,*XkbKeyAliasPtr;
|
||||
|
||||
/*
|
||||
* Names for everything
|
||||
*/
|
||||
typedef struct _XkbNamesRec {
|
||||
Atom keycodes;
|
||||
Atom geometry;
|
||||
Atom symbols;
|
||||
Atom types;
|
||||
Atom compat;
|
||||
Atom vmods[XkbNumVirtualMods];
|
||||
Atom indicators[XkbNumIndicators];
|
||||
Atom groups[XkbNumKbdGroups];
|
||||
/* keys is an array of (xkb->max_key_code + 1) XkbKeyNameRec entries */
|
||||
XkbKeyNamePtr keys;
|
||||
/* key_aliases is an array of num_key_aliases XkbKeyAliasRec entries */
|
||||
XkbKeyAliasPtr key_aliases;
|
||||
/* radio_groups is an array of num_rg Atoms */
|
||||
Atom *radio_groups;
|
||||
Atom phys_symbols;
|
||||
|
||||
/* num_keys seems to be unused in libX11 */
|
||||
unsigned char num_keys;
|
||||
unsigned char num_key_aliases;
|
||||
unsigned short num_rg;
|
||||
} XkbNamesRec,*XkbNamesPtr;
|
||||
|
||||
typedef struct _XkbGeometry *XkbGeometryPtr;
|
||||
/*
|
||||
* Tie it all together into one big keyboard description
|
||||
*/
|
||||
typedef struct _XkbDesc {
|
||||
struct _XDisplay * dpy;
|
||||
unsigned short flags;
|
||||
unsigned short device_spec;
|
||||
KeyCode min_key_code;
|
||||
KeyCode max_key_code;
|
||||
|
||||
XkbControlsPtr ctrls;
|
||||
XkbServerMapPtr server;
|
||||
XkbClientMapPtr map;
|
||||
XkbIndicatorPtr indicators;
|
||||
XkbNamesPtr names;
|
||||
XkbCompatMapPtr compat;
|
||||
XkbGeometryPtr geom;
|
||||
} XkbDescRec, *XkbDescPtr;
|
||||
#define XkbKeyKeyTypeIndex(d,k,g) (XkbCMKeyTypeIndex((d)->map,k,g))
|
||||
#define XkbKeyKeyType(d,k,g) (XkbCMKeyType((d)->map,k,g))
|
||||
#define XkbKeyGroupWidth(d,k,g) (XkbCMKeyGroupWidth((d)->map,k,g))
|
||||
#define XkbKeyGroupsWidth(d,k) (XkbCMKeyGroupsWidth((d)->map,k))
|
||||
#define XkbKeyGroupInfo(d,k) (XkbCMKeyGroupInfo((d)->map,(k)))
|
||||
#define XkbKeyNumGroups(d,k) (XkbCMKeyNumGroups((d)->map,(k)))
|
||||
#define XkbKeyNumSyms(d,k) (XkbCMKeyNumSyms((d)->map,(k)))
|
||||
#define XkbKeySymsPtr(d,k) (XkbCMKeySymsPtr((d)->map,(k)))
|
||||
#define XkbKeySym(d,k,n) (XkbKeySymsPtr(d,k)[n])
|
||||
#define XkbKeySymEntry(d,k,sl,g) \
|
||||
(XkbKeySym(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))))
|
||||
#define XkbKeyAction(d,k,n) \
|
||||
(XkbKeyHasActions(d,k)?&XkbKeyActionsPtr(d,k)[n]:NULL)
|
||||
#define XkbKeyActionEntry(d,k,sl,g) \
|
||||
(XkbKeyHasActions(d,k)?\
|
||||
XkbKeyAction(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))):NULL)
|
||||
|
||||
#define XkbKeyHasActions(d,k) ((d)->server->key_acts[k]!=0)
|
||||
#define XkbKeyNumActions(d,k) (XkbKeyHasActions(d,k)?XkbKeyNumSyms(d,k):1)
|
||||
#define XkbKeyActionsPtr(d,k) (XkbSMKeyActionsPtr((d)->server,k))
|
||||
#define XkbKeycodeInRange(d,k) (((k)>=(d)->min_key_code)&&\
|
||||
((k)<=(d)->max_key_code))
|
||||
#define XkbNumKeys(d) ((d)->max_key_code-(d)->min_key_code+1)
|
||||
|
||||
|
||||
/*
|
||||
* The following structures can be used to track changes
|
||||
* to a keyboard device
|
||||
*/
|
||||
typedef struct _XkbMapChanges {
|
||||
unsigned short changed;
|
||||
KeyCode min_key_code;
|
||||
KeyCode max_key_code;
|
||||
unsigned char first_type;
|
||||
unsigned char num_types;
|
||||
KeyCode first_key_sym;
|
||||
unsigned char num_key_syms;
|
||||
KeyCode first_key_act;
|
||||
unsigned char num_key_acts;
|
||||
KeyCode first_key_behavior;
|
||||
unsigned char num_key_behaviors;
|
||||
KeyCode first_key_explicit;
|
||||
unsigned char num_key_explicit;
|
||||
KeyCode first_modmap_key;
|
||||
unsigned char num_modmap_keys;
|
||||
KeyCode first_vmodmap_key;
|
||||
unsigned char num_vmodmap_keys;
|
||||
unsigned char pad;
|
||||
unsigned short vmods;
|
||||
} XkbMapChangesRec,*XkbMapChangesPtr;
|
||||
|
||||
typedef struct _XkbControlsChanges {
|
||||
unsigned int changed_ctrls;
|
||||
unsigned int enabled_ctrls_changes;
|
||||
Bool num_groups_changed;
|
||||
} XkbControlsChangesRec,*XkbControlsChangesPtr;
|
||||
|
||||
typedef struct _XkbIndicatorChanges {
|
||||
unsigned int state_changes;
|
||||
unsigned int map_changes;
|
||||
} XkbIndicatorChangesRec,*XkbIndicatorChangesPtr;
|
||||
|
||||
typedef struct _XkbNameChanges {
|
||||
unsigned int changed;
|
||||
unsigned char first_type;
|
||||
unsigned char num_types;
|
||||
unsigned char first_lvl;
|
||||
unsigned char num_lvls;
|
||||
unsigned char num_aliases;
|
||||
unsigned char num_rg;
|
||||
unsigned char first_key;
|
||||
unsigned char num_keys;
|
||||
unsigned short changed_vmods;
|
||||
unsigned long changed_indicators;
|
||||
unsigned char changed_groups;
|
||||
} XkbNameChangesRec,*XkbNameChangesPtr;
|
||||
|
||||
typedef struct _XkbCompatChanges {
|
||||
unsigned char changed_groups;
|
||||
unsigned short first_si;
|
||||
unsigned short num_si;
|
||||
} XkbCompatChangesRec,*XkbCompatChangesPtr;
|
||||
|
||||
typedef struct _XkbChanges {
|
||||
unsigned short device_spec;
|
||||
unsigned short state_changes;
|
||||
XkbMapChangesRec map;
|
||||
XkbControlsChangesRec ctrls;
|
||||
XkbIndicatorChangesRec indicators;
|
||||
XkbNameChangesRec names;
|
||||
XkbCompatChangesRec compat;
|
||||
} XkbChangesRec, *XkbChangesPtr;
|
||||
|
||||
/*
|
||||
* These data structures are used to construct a keymap from
|
||||
* a set of components or to list components in the server
|
||||
* database.
|
||||
*/
|
||||
typedef struct _XkbComponentNames {
|
||||
char * keymap;
|
||||
char * keycodes;
|
||||
char * types;
|
||||
char * compat;
|
||||
char * symbols;
|
||||
char * geometry;
|
||||
} XkbComponentNamesRec, *XkbComponentNamesPtr;
|
||||
|
||||
typedef struct _XkbComponentName {
|
||||
unsigned short flags;
|
||||
char * name;
|
||||
} XkbComponentNameRec,*XkbComponentNamePtr;
|
||||
|
||||
typedef struct _XkbComponentList {
|
||||
int num_keymaps;
|
||||
int num_keycodes;
|
||||
int num_types;
|
||||
int num_compat;
|
||||
int num_symbols;
|
||||
int num_geometry;
|
||||
XkbComponentNamePtr keymaps;
|
||||
XkbComponentNamePtr keycodes;
|
||||
XkbComponentNamePtr types;
|
||||
XkbComponentNamePtr compat;
|
||||
XkbComponentNamePtr symbols;
|
||||
XkbComponentNamePtr geometry;
|
||||
} XkbComponentListRec, *XkbComponentListPtr;
|
||||
|
||||
/*
|
||||
* The following data structures describe and track changes to a
|
||||
* non-keyboard extension device
|
||||
*/
|
||||
typedef struct _XkbDeviceLedInfo {
|
||||
unsigned short led_class;
|
||||
unsigned short led_id;
|
||||
unsigned int phys_indicators;
|
||||
unsigned int maps_present;
|
||||
unsigned int names_present;
|
||||
unsigned int state;
|
||||
Atom names[XkbNumIndicators];
|
||||
XkbIndicatorMapRec maps[XkbNumIndicators];
|
||||
} XkbDeviceLedInfoRec,*XkbDeviceLedInfoPtr;
|
||||
|
||||
typedef struct _XkbDeviceInfo {
|
||||
char * name;
|
||||
Atom type;
|
||||
unsigned short device_spec;
|
||||
Bool has_own_state;
|
||||
unsigned short supported;
|
||||
unsigned short unsupported;
|
||||
|
||||
/* btn_acts is an array of num_btn XkbAction entries */
|
||||
unsigned short num_btns;
|
||||
XkbAction * btn_acts;
|
||||
|
||||
unsigned short sz_leds;
|
||||
unsigned short num_leds;
|
||||
unsigned short dflt_kbd_fb;
|
||||
unsigned short dflt_led_fb;
|
||||
/* leds is an array of XkbDeviceLedInfoRec in which
|
||||
sz_leds entries are allocated and num_leds entries are used */
|
||||
XkbDeviceLedInfoPtr leds;
|
||||
} XkbDeviceInfoRec,*XkbDeviceInfoPtr;
|
||||
|
||||
#define XkbXI_DevHasBtnActs(d) (((d)->num_btns>0)&&((d)->btn_acts!=NULL))
|
||||
#define XkbXI_LegalDevBtn(d,b) (XkbXI_DevHasBtnActs(d)&&((b)<(d)->num_btns))
|
||||
#define XkbXI_DevHasLeds(d) (((d)->num_leds>0)&&((d)->leds!=NULL))
|
||||
|
||||
typedef struct _XkbDeviceLedChanges {
|
||||
unsigned short led_class;
|
||||
unsigned short led_id;
|
||||
unsigned int defined; /* names or maps changed */
|
||||
struct _XkbDeviceLedChanges *next;
|
||||
} XkbDeviceLedChangesRec,*XkbDeviceLedChangesPtr;
|
||||
|
||||
typedef struct _XkbDeviceChanges {
|
||||
unsigned int changed;
|
||||
unsigned short first_btn;
|
||||
unsigned short num_btns;
|
||||
XkbDeviceLedChangesRec leds;
|
||||
} XkbDeviceChangesRec,*XkbDeviceChangesPtr;
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif /* _XKBSTR_H_ */
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Copyright 1992 Network Computing Devices
|
||||
*
|
||||
* 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, and that the name of NCD. not be used in advertising or
|
||||
* publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission. NCD. makes no representations about the
|
||||
* suitability of this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*
|
||||
* NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _XLBX_H_
|
||||
#define _XLBX_H_
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
#include <X11/Xdefs.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/lbx.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
Bool XLbxQueryExtension(
|
||||
Display* /* dpy */,
|
||||
int* /* requestp */,
|
||||
int* /* event_basep */,
|
||||
int* /* error_basep */
|
||||
);
|
||||
|
||||
Bool XLbxQueryVersion(
|
||||
Display* /* dpy */,
|
||||
int* /* majorVersion */,
|
||||
int* /* minorVersion */
|
||||
);
|
||||
|
||||
int XLbxGetEventBase(Display *dpy);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif
|
|
@ -0,0 +1,227 @@
|
|||
/*
|
||||
Copyright (c) 2002 XFree86 Inc
|
||||
*/
|
||||
|
||||
#ifndef _XRESPROTO_H
|
||||
#define _XRESPROTO_H
|
||||
|
||||
#define XRES_MAJOR_VERSION 1
|
||||
#define XRES_MINOR_VERSION 2
|
||||
|
||||
#define XRES_NAME "X-Resource"
|
||||
|
||||
/* v1.0 */
|
||||
#define X_XResQueryVersion 0
|
||||
#define X_XResQueryClients 1
|
||||
#define X_XResQueryClientResources 2
|
||||
#define X_XResQueryClientPixmapBytes 3
|
||||
|
||||
/* Version 1.1 has been accidentally released from the version */
|
||||
/* control and while it doesn't have differences to version 1.0, the */
|
||||
/* next version is labeled 1.2 in order to remove the risk of confusion. */
|
||||
|
||||
/* v1.2 */
|
||||
#define X_XResQueryClientIds 4
|
||||
#define X_XResQueryResourceBytes 5
|
||||
|
||||
typedef struct {
|
||||
CARD32 resource_base;
|
||||
CARD32 resource_mask;
|
||||
} xXResClient;
|
||||
#define sz_xXResClient 8
|
||||
|
||||
typedef struct {
|
||||
CARD32 resource_type;
|
||||
CARD32 count;
|
||||
} xXResType;
|
||||
#define sz_xXResType 8
|
||||
|
||||
/* XResQueryVersion */
|
||||
|
||||
typedef struct _XResQueryVersion {
|
||||
CARD8 reqType;
|
||||
CARD8 XResReqType;
|
||||
CARD16 length B16;
|
||||
CARD8 client_major;
|
||||
CARD8 client_minor;
|
||||
CARD16 unused B16;
|
||||
} xXResQueryVersionReq;
|
||||
#define sz_xXResQueryVersionReq 8
|
||||
|
||||
typedef struct {
|
||||
CARD8 type;
|
||||
CARD8 pad1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD16 server_major B16;
|
||||
CARD16 server_minor B16;
|
||||
CARD32 pad2 B32;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
} xXResQueryVersionReply;
|
||||
#define sz_xXResQueryVersionReply 32
|
||||
|
||||
/* XResQueryClients */
|
||||
|
||||
typedef struct _XResQueryClients {
|
||||
CARD8 reqType;
|
||||
CARD8 XResReqType;
|
||||
CARD16 length B16;
|
||||
} xXResQueryClientsReq;
|
||||
#define sz_xXResQueryClientsReq 4
|
||||
|
||||
typedef struct {
|
||||
CARD8 type;
|
||||
CARD8 pad1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 num_clients B32;
|
||||
CARD32 pad2 B32;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
} xXResQueryClientsReply;
|
||||
#define sz_xXResQueryClientsReply 32
|
||||
|
||||
/* XResQueryClientResources */
|
||||
|
||||
typedef struct _XResQueryClientResources {
|
||||
CARD8 reqType;
|
||||
CARD8 XResReqType;
|
||||
CARD16 length B16;
|
||||
CARD32 xid B32;
|
||||
} xXResQueryClientResourcesReq;
|
||||
#define sz_xXResQueryClientResourcesReq 8
|
||||
|
||||
typedef struct {
|
||||
CARD8 type;
|
||||
CARD8 pad1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 num_types B32;
|
||||
CARD32 pad2 B32;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
} xXResQueryClientResourcesReply;
|
||||
#define sz_xXResQueryClientResourcesReply 32
|
||||
|
||||
/* XResQueryClientPixmapBytes */
|
||||
|
||||
typedef struct _XResQueryClientPixmapBytes {
|
||||
CARD8 reqType;
|
||||
CARD8 XResReqType;
|
||||
CARD16 length B16;
|
||||
CARD32 xid B32;
|
||||
} xXResQueryClientPixmapBytesReq;
|
||||
#define sz_xXResQueryClientPixmapBytesReq 8
|
||||
|
||||
typedef struct {
|
||||
CARD8 type;
|
||||
CARD8 pad1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 bytes B32;
|
||||
CARD32 bytes_overflow B32;
|
||||
CARD32 pad2 B32;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
} xXResQueryClientPixmapBytesReply;
|
||||
#define sz_xXResQueryClientPixmapBytesReply 32
|
||||
|
||||
/* v1.2 XResQueryClientIds */
|
||||
|
||||
#define X_XResClientXIDMask 0x01
|
||||
#define X_XResLocalClientPIDMask 0x02
|
||||
|
||||
typedef struct _XResClientIdSpec {
|
||||
CARD32 client B32;
|
||||
CARD32 mask B32;
|
||||
} xXResClientIdSpec;
|
||||
#define sz_xXResClientIdSpec 8
|
||||
|
||||
typedef struct _XResClientIdValue {
|
||||
xXResClientIdSpec spec;
|
||||
CARD32 length B32;
|
||||
// followed by length CARD32s
|
||||
} xXResClientIdValue;
|
||||
#define sz_xResClientIdValue (sz_xXResClientIdSpec + 4)
|
||||
|
||||
typedef struct _XResQueryClientIds {
|
||||
CARD8 reqType;
|
||||
CARD8 XResReqType;
|
||||
CARD16 length B16;
|
||||
CARD32 numSpecs B32;
|
||||
// followed by numSpecs times XResClientIdSpec
|
||||
} xXResQueryClientIdsReq;
|
||||
#define sz_xXResQueryClientIdsReq 8
|
||||
|
||||
typedef struct {
|
||||
CARD8 type;
|
||||
CARD8 pad1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 numIds B32;
|
||||
CARD32 pad2 B32;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
// followed by numIds times XResClientIdValue
|
||||
} xXResQueryClientIdsReply;
|
||||
#define sz_xXResQueryClientIdsReply 32
|
||||
|
||||
/* v1.2 XResQueryResourceBytes */
|
||||
|
||||
typedef struct _XResResourceIdSpec {
|
||||
CARD32 resource;
|
||||
CARD32 type;
|
||||
} xXResResourceIdSpec;
|
||||
#define sz_xXResResourceIdSpec 8
|
||||
|
||||
typedef struct _XResQueryResourceBytes {
|
||||
CARD8 reqType;
|
||||
CARD8 XResReqType;
|
||||
CARD16 length B16;
|
||||
CARD32 client B32;
|
||||
CARD32 numSpecs B32;
|
||||
// followed by numSpecs times XResResourceIdSpec
|
||||
} xXResQueryResourceBytesReq;
|
||||
#define sz_xXResQueryResourceBytesReq 12
|
||||
|
||||
typedef struct _XResResourceSizeSpec {
|
||||
xXResResourceIdSpec spec;
|
||||
CARD32 bytes B32;
|
||||
CARD32 refCount B32;
|
||||
CARD32 useCount B32;
|
||||
} xXResResourceSizeSpec;
|
||||
#define sz_xXResResourceSizeSpec (sz_xXResResourceIdSpec + 12)
|
||||
|
||||
typedef struct _XResResourceSizeValue {
|
||||
xXResResourceSizeSpec size;
|
||||
CARD32 numCrossReferences B32;
|
||||
// followed by numCrossReferences times XResResourceSizeSpec
|
||||
} xXResResourceSizeValue;
|
||||
#define sz_xXResResourceSizeValue (sz_xXResResourceSizeSpec + 4)
|
||||
|
||||
typedef struct {
|
||||
CARD8 type;
|
||||
CARD8 pad1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 numSizes B32;
|
||||
CARD32 pad2 B32;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
// followed by numSizes times XResResourceSizeValue
|
||||
} xXResQueryResourceBytesReply;
|
||||
#define sz_xXResQueryResourceBytesReply 32
|
||||
|
||||
#endif /* _XRESPROTO_H */
|
|
@ -0,0 +1,135 @@
|
|||
/************************************************************
|
||||
|
||||
Copyright 1989, 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.
|
||||
|
||||
********************************************************/
|
||||
|
||||
/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
|
||||
|
||||
#ifndef _XSHM_H_
|
||||
#define _XSHM_H_
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
#include <X11/extensions/shm.h>
|
||||
|
||||
#ifndef _XSHM_SERVER_
|
||||
typedef unsigned long ShmSeg;
|
||||
|
||||
typedef struct {
|
||||
int type; /* of event */
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came frome a SendEvent request */
|
||||
Display *display; /* Display the event was read from */
|
||||
Drawable drawable; /* drawable of request */
|
||||
int major_code; /* ShmReqCode */
|
||||
int minor_code; /* X_ShmPutImage */
|
||||
ShmSeg shmseg; /* the ShmSeg used in the request */
|
||||
unsigned long offset; /* the offset into ShmSeg used in the request */
|
||||
} XShmCompletionEvent;
|
||||
|
||||
typedef struct {
|
||||
ShmSeg shmseg; /* resource id */
|
||||
int shmid; /* kernel id */
|
||||
char *shmaddr; /* address in client */
|
||||
Bool readOnly; /* how the server should attach it */
|
||||
} XShmSegmentInfo;
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
Bool XShmQueryExtension(
|
||||
Display* /* dpy */
|
||||
);
|
||||
|
||||
int XShmGetEventBase(
|
||||
Display* /* dpy */
|
||||
);
|
||||
|
||||
Bool XShmQueryVersion(
|
||||
Display* /* dpy */,
|
||||
int* /* majorVersion */,
|
||||
int* /* minorVersion */,
|
||||
Bool* /* sharedPixmaps */
|
||||
);
|
||||
|
||||
int XShmPixmapFormat(
|
||||
Display* /* dpy */
|
||||
);
|
||||
|
||||
Bool XShmAttach(
|
||||
Display* /* dpy */,
|
||||
XShmSegmentInfo* /* shminfo */
|
||||
);
|
||||
|
||||
Bool XShmDetach(
|
||||
Display* /* dpy */,
|
||||
XShmSegmentInfo* /* shminfo */
|
||||
);
|
||||
|
||||
Bool XShmPutImage(
|
||||
Display* /* dpy */,
|
||||
Drawable /* d */,
|
||||
GC /* gc */,
|
||||
XImage* /* image */,
|
||||
int /* src_x */,
|
||||
int /* src_y */,
|
||||
int /* dst_x */,
|
||||
int /* dst_y */,
|
||||
unsigned int /* src_width */,
|
||||
unsigned int /* src_height */,
|
||||
Bool /* send_event */
|
||||
);
|
||||
|
||||
Bool XShmGetImage(
|
||||
Display* /* dpy */,
|
||||
Drawable /* d */,
|
||||
XImage* /* image */,
|
||||
int /* x */,
|
||||
int /* y */,
|
||||
unsigned long /* plane_mask */
|
||||
);
|
||||
|
||||
XImage *XShmCreateImage(
|
||||
Display* /* dpy */,
|
||||
Visual* /* visual */,
|
||||
unsigned int /* depth */,
|
||||
int /* format */,
|
||||
char* /* data */,
|
||||
XShmSegmentInfo* /* shminfo */,
|
||||
unsigned int /* width */,
|
||||
unsigned int /* height */
|
||||
);
|
||||
|
||||
Pixmap XShmCreatePixmap(
|
||||
Display* /* dpy */,
|
||||
Drawable /* d */,
|
||||
char* /* data */,
|
||||
XShmSegmentInfo* /* shminfo */,
|
||||
unsigned int /* width */,
|
||||
unsigned int /* height */,
|
||||
unsigned int /* depth */
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
#endif /* _XSHM_SERVER_ */
|
||||
|
||||
#endif
|
|
@ -0,0 +1,90 @@
|
|||
/*
|
||||
Copyright 1996, 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.
|
||||
*/
|
||||
|
||||
#ifndef _XAG_H_
|
||||
#define _XAG_H_
|
||||
|
||||
#include <X11/extensions/ag.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
typedef XID XAppGroup;
|
||||
|
||||
Bool XagQueryVersion(
|
||||
Display* /* dpy */,
|
||||
int* /* major_version */,
|
||||
int* /* minor_version */
|
||||
);
|
||||
|
||||
Status XagCreateEmbeddedApplicationGroup(
|
||||
Display* /* dpy */,
|
||||
VisualID /* root_visual */,
|
||||
Colormap /* default_colormap */,
|
||||
unsigned long /* black_pixel */,
|
||||
unsigned long /* white_pixel */,
|
||||
XAppGroup* /* app_group_return */
|
||||
);
|
||||
|
||||
Status XagCreateNonembeddedApplicationGroup(
|
||||
Display* /* dpy */,
|
||||
XAppGroup* /* app_group_return */
|
||||
);
|
||||
|
||||
Status XagDestroyApplicationGroup(
|
||||
Display* /* dpy */,
|
||||
XAppGroup /* app_group */
|
||||
);
|
||||
|
||||
Status XagGetApplicationGroupAttributes(
|
||||
Display* /* dpy */,
|
||||
XAppGroup /* app_group */,
|
||||
...
|
||||
);
|
||||
|
||||
Status XagQueryApplicationGroup(
|
||||
Display* /* dpy */,
|
||||
XID /* resource_base */,
|
||||
XAppGroup* /* app_group_ret */
|
||||
);
|
||||
|
||||
Status XagCreateAssociation(
|
||||
Display* /* dpy */,
|
||||
Window* /* window_ret */,
|
||||
void* /* system_window */
|
||||
);
|
||||
|
||||
Status XagDestroyAssociation(
|
||||
Display* /* dpy */,
|
||||
Window /* window */
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XAG_H_ */
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
|
||||
Copyright 1987, 1988, 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.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _XCUP_H_
|
||||
#define _XCUP_H_
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
#include <X11/extensions/cup.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
Bool XcupQueryVersion(
|
||||
Display* /* dpy */,
|
||||
int* /* major_version */,
|
||||
int* /* minor_version */
|
||||
);
|
||||
|
||||
Status XcupGetReservedColormapEntries(
|
||||
Display* /* dpy */,
|
||||
int /* screen */,
|
||||
XColor** /* colors_out */,
|
||||
int* /* ncolors */
|
||||
);
|
||||
|
||||
Status XcupStoreColors(
|
||||
Display* /* dpy */,
|
||||
Colormap /* colormap */,
|
||||
XColor* /* colors */,
|
||||
int /* ncolors */
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XCUP_H_ */
|
||||
|
|
@ -0,0 +1,138 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright (c) 1994, 1995 Hewlett-Packard Company
|
||||
*
|
||||
* 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 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 HEWLETT-PACKARD COMPANY 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 Hewlett-Packard
|
||||
* Company 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 Hewlett-Packard Company.
|
||||
*
|
||||
* Header file for Xlib-related DBE
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef XDBE_H
|
||||
#define XDBE_H
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
#include <X11/extensions/dbe.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
VisualID visual; /* one visual ID that supports double-buffering */
|
||||
int depth; /* depth of visual in bits */
|
||||
int perflevel; /* performance level of visual */
|
||||
}
|
||||
XdbeVisualInfo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int count; /* number of items in visual_depth */
|
||||
XdbeVisualInfo *visinfo; /* list of visuals & depths for scrn */
|
||||
}
|
||||
XdbeScreenVisualInfo;
|
||||
|
||||
|
||||
typedef Drawable XdbeBackBuffer;
|
||||
|
||||
typedef unsigned char XdbeSwapAction;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Window swap_window; /* window for which to swap buffers */
|
||||
XdbeSwapAction swap_action; /* swap action to use for swap_window */
|
||||
}
|
||||
XdbeSwapInfo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Window window; /* window that buffer belongs to */
|
||||
}
|
||||
XdbeBackBufferAttributes;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int type;
|
||||
Display *display; /* display the event was read from */
|
||||
XdbeBackBuffer buffer; /* resource id */
|
||||
unsigned long serial; /* serial number of failed request */
|
||||
unsigned char error_code; /* error base + XdbeBadBuffer */
|
||||
unsigned char request_code; /* major opcode of failed request */
|
||||
unsigned char minor_code; /* minor opcode of failed request */
|
||||
}
|
||||
XdbeBufferError;
|
||||
|
||||
/* _XFUNCPROTOBEGIN and _XFUNCPROTOEND are defined as noops
|
||||
* (for non-C++ builds) in X11/Xfuncproto.h.
|
||||
*/
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
extern Status XdbeQueryExtension(
|
||||
Display* /* dpy */,
|
||||
int* /* major_version_return */,
|
||||
int* /* minor_version_return */
|
||||
);
|
||||
|
||||
extern XdbeBackBuffer XdbeAllocateBackBufferName(
|
||||
Display* /* dpy */,
|
||||
Window /* window */,
|
||||
XdbeSwapAction /* swap_action */
|
||||
);
|
||||
|
||||
extern Status XdbeDeallocateBackBufferName(
|
||||
Display* /* dpy */,
|
||||
XdbeBackBuffer /* buffer */
|
||||
);
|
||||
|
||||
extern Status XdbeSwapBuffers(
|
||||
Display* /* dpy */,
|
||||
XdbeSwapInfo* /* swap_info */,
|
||||
int /* num_windows */
|
||||
);
|
||||
|
||||
extern Status XdbeBeginIdiom(
|
||||
Display* /* dpy */
|
||||
);
|
||||
|
||||
extern Status XdbeEndIdiom(
|
||||
Display* /* dpy */
|
||||
);
|
||||
|
||||
extern XdbeScreenVisualInfo *XdbeGetVisualInfo(
|
||||
Display* /* dpy */,
|
||||
Drawable* /* screen_specifiers */,
|
||||
int* /* num_screens */
|
||||
);
|
||||
|
||||
extern void XdbeFreeVisualInfo(
|
||||
XdbeScreenVisualInfo* /* visual_info */
|
||||
);
|
||||
|
||||
extern XdbeBackBufferAttributes *XdbeGetBackBufferAttributes(
|
||||
Display* /* dpy */,
|
||||
XdbeBackBuffer /* buffer */
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* XDBE_H */
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
*
|
||||
Copyright 1989, 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.
|
||||
*/
|
||||
|
||||
#ifndef _XEXT_H_
|
||||
#define _XEXT_H_
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
typedef int (*XextErrorHandler) (
|
||||
Display * /* dpy */,
|
||||
_Xconst char* /* ext_name */,
|
||||
_Xconst char* /* reason */
|
||||
);
|
||||
|
||||
extern XextErrorHandler XSetExtensionErrorHandler(
|
||||
XextErrorHandler /* handler */
|
||||
);
|
||||
|
||||
extern int XMissingExtension(
|
||||
Display* /* dpy */,
|
||||
_Xconst char* /* ext_name */
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#define X_EXTENSION_UNKNOWN "unknown"
|
||||
#define X_EXTENSION_MISSING "missing"
|
||||
|
||||
#endif /* _XEXT_H_ */
|
|
@ -0,0 +1,269 @@
|
|||
/*
|
||||
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2011 Red Hat, Inc.
|
||||
*
|
||||
* 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 (including the next
|
||||
* paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
|
||||
*/
|
||||
/*
|
||||
* Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
|
||||
*
|
||||
* 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, and that the name of Keith Packard not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. Keith Packard makes no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL KEITH PACKARD 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.
|
||||
*/
|
||||
|
||||
#ifndef _XFIXES_H_
|
||||
#define _XFIXES_H_
|
||||
|
||||
#include <X11/extensions/xfixeswire.h>
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
/*
|
||||
* This revision number also appears in configure.ac, they have
|
||||
* to be manually synchronized
|
||||
*/
|
||||
#define XFIXES_REVISION 1
|
||||
#define XFIXES_VERSION ((XFIXES_MAJOR * 10000) + (XFIXES_MINOR * 100) + (XFIXES_REVISION))
|
||||
|
||||
typedef struct {
|
||||
int type; /* event base */
|
||||
unsigned long serial;
|
||||
Bool send_event;
|
||||
Display *display;
|
||||
Window window;
|
||||
int subtype;
|
||||
Window owner;
|
||||
Atom selection;
|
||||
Time timestamp;
|
||||
Time selection_timestamp;
|
||||
} XFixesSelectionNotifyEvent;
|
||||
|
||||
typedef struct {
|
||||
int type; /* event base */
|
||||
unsigned long serial;
|
||||
Bool send_event;
|
||||
Display *display;
|
||||
Window window;
|
||||
int subtype;
|
||||
unsigned long cursor_serial;
|
||||
Time timestamp;
|
||||
Atom cursor_name;
|
||||
} XFixesCursorNotifyEvent;
|
||||
|
||||
typedef struct {
|
||||
short x, y;
|
||||
unsigned short width, height;
|
||||
unsigned short xhot, yhot;
|
||||
unsigned long cursor_serial;
|
||||
unsigned long *pixels;
|
||||
#if XFIXES_MAJOR >= 2
|
||||
Atom atom; /* Version >= 2 only */
|
||||
const char *name; /* Version >= 2 only */
|
||||
#endif
|
||||
} XFixesCursorImage;
|
||||
|
||||
#if XFIXES_MAJOR >= 2
|
||||
/* Version 2 types */
|
||||
|
||||
typedef XID XserverRegion;
|
||||
|
||||
typedef struct {
|
||||
short x, y;
|
||||
unsigned short width, height;
|
||||
unsigned short xhot, yhot;
|
||||
unsigned long cursor_serial;
|
||||
unsigned long *pixels;
|
||||
Atom atom;
|
||||
const char *name;
|
||||
} XFixesCursorImageAndName;
|
||||
|
||||
#endif
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
Bool XFixesQueryExtension (Display *dpy,
|
||||
int *event_base_return,
|
||||
int *error_base_return);
|
||||
Status XFixesQueryVersion (Display *dpy,
|
||||
int *major_version_return,
|
||||
int *minor_version_return);
|
||||
|
||||
int XFixesVersion (void);
|
||||
|
||||
void
|
||||
XFixesChangeSaveSet (Display *dpy,
|
||||
Window win,
|
||||
int mode,
|
||||
int target,
|
||||
int map);
|
||||
|
||||
void
|
||||
XFixesSelectSelectionInput (Display *dpy,
|
||||
Window win,
|
||||
Atom selection,
|
||||
unsigned long eventMask);
|
||||
|
||||
void
|
||||
XFixesSelectCursorInput (Display *dpy,
|
||||
Window win,
|
||||
unsigned long eventMask);
|
||||
|
||||
XFixesCursorImage *
|
||||
XFixesGetCursorImage (Display *dpy);
|
||||
|
||||
#if XFIXES_MAJOR >= 2
|
||||
/* Version 2 functions */
|
||||
|
||||
XserverRegion
|
||||
XFixesCreateRegion (Display *dpy, XRectangle *rectangles, int nrectangles);
|
||||
|
||||
XserverRegion
|
||||
XFixesCreateRegionFromBitmap (Display *dpy, Pixmap bitmap);
|
||||
|
||||
XserverRegion
|
||||
XFixesCreateRegionFromWindow (Display *dpy, Window window, int kind);
|
||||
|
||||
XserverRegion
|
||||
XFixesCreateRegionFromGC (Display *dpy, GC gc);
|
||||
|
||||
XserverRegion
|
||||
XFixesCreateRegionFromPicture (Display *dpy, XID picture);
|
||||
|
||||
void
|
||||
XFixesDestroyRegion (Display *dpy, XserverRegion region);
|
||||
|
||||
void
|
||||
XFixesSetRegion (Display *dpy, XserverRegion region,
|
||||
XRectangle *rectangles, int nrectangles);
|
||||
|
||||
void
|
||||
XFixesCopyRegion (Display *dpy, XserverRegion dst, XserverRegion src);
|
||||
|
||||
void
|
||||
XFixesUnionRegion (Display *dpy, XserverRegion dst,
|
||||
XserverRegion src1, XserverRegion src2);
|
||||
|
||||
void
|
||||
XFixesIntersectRegion (Display *dpy, XserverRegion dst,
|
||||
XserverRegion src1, XserverRegion src2);
|
||||
|
||||
void
|
||||
XFixesSubtractRegion (Display *dpy, XserverRegion dst,
|
||||
XserverRegion src1, XserverRegion src2);
|
||||
|
||||
void
|
||||
XFixesInvertRegion (Display *dpy, XserverRegion dst,
|
||||
XRectangle *rect, XserverRegion src);
|
||||
|
||||
void
|
||||
XFixesTranslateRegion (Display *dpy, XserverRegion region, int dx, int dy);
|
||||
|
||||
void
|
||||
XFixesRegionExtents (Display *dpy, XserverRegion dst, XserverRegion src);
|
||||
|
||||
XRectangle *
|
||||
XFixesFetchRegion (Display *dpy, XserverRegion region, int *nrectanglesRet);
|
||||
|
||||
XRectangle *
|
||||
XFixesFetchRegionAndBounds (Display *dpy, XserverRegion region,
|
||||
int *nrectanglesRet,
|
||||
XRectangle *bounds);
|
||||
|
||||
void
|
||||
XFixesSetGCClipRegion (Display *dpy, GC gc,
|
||||
int clip_x_origin, int clip_y_origin,
|
||||
XserverRegion region);
|
||||
|
||||
void
|
||||
XFixesSetWindowShapeRegion (Display *dpy, Window win, int shape_kind,
|
||||
int x_off, int y_off, XserverRegion region);
|
||||
|
||||
void
|
||||
XFixesSetPictureClipRegion (Display *dpy, XID picture,
|
||||
int clip_x_origin, int clip_y_origin,
|
||||
XserverRegion region);
|
||||
|
||||
void
|
||||
XFixesSetCursorName (Display *dpy, Cursor cursor, const char *name);
|
||||
|
||||
const char *
|
||||
XFixesGetCursorName (Display *dpy, Cursor cursor, Atom *atom);
|
||||
|
||||
void
|
||||
XFixesChangeCursor (Display *dpy, Cursor source, Cursor destination);
|
||||
|
||||
void
|
||||
XFixesChangeCursorByName (Display *dpy, Cursor source, const char *name);
|
||||
|
||||
#endif /* XFIXES_MAJOR >= 2 */
|
||||
|
||||
#if XFIXES_MAJOR >= 3
|
||||
|
||||
void
|
||||
XFixesExpandRegion (Display *dpy, XserverRegion dst, XserverRegion src,
|
||||
unsigned left, unsigned right,
|
||||
unsigned top, unsigned bottom);
|
||||
|
||||
#endif /* XFIXES_MAJOR >= 3 */
|
||||
|
||||
#if XFIXES_MAJOR >= 4
|
||||
/* Version 4.0 externs */
|
||||
|
||||
void
|
||||
XFixesHideCursor (Display *dpy, Window win);
|
||||
|
||||
void
|
||||
XFixesShowCursor (Display *dpy, Window win);
|
||||
|
||||
#endif /* XFIXES_MAJOR >= 4 */
|
||||
|
||||
#if XFIXES_MAJOR >= 5
|
||||
|
||||
typedef XID PointerBarrier;
|
||||
|
||||
PointerBarrier
|
||||
XFixesCreatePointerBarrier(Display *dpy, Window w, int x1, int y1,
|
||||
int x2, int y2, int directions,
|
||||
int num_devices, int *devices);
|
||||
|
||||
void
|
||||
XFixesDestroyPointerBarrier(Display *dpy, PointerBarrier b);
|
||||
|
||||
#endif /* XFIXES_MAJOR >= 5 */
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XFIXES_H_ */
|
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* Copyright © 2007-2008 Peter Hutterer
|
||||
*
|
||||
* 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 (including the next
|
||||
* paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
|
||||
*
|
||||
* Authors: Peter Hutterer, University of South Australia, NICTA
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/* XGE Client interfaces */
|
||||
|
||||
#ifndef _XGE_H_
|
||||
#define _XGE_H_
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
/**
|
||||
* Generic Event mask.
|
||||
* To be used whenever a list of masks per extension has to be provided.
|
||||
*
|
||||
* But, don't actually use the CARD{8,16,32} types. We can't get them them
|
||||
* defined here without polluting the namespace.
|
||||
*/
|
||||
typedef struct {
|
||||
unsigned char extension;
|
||||
unsigned char pad0;
|
||||
unsigned short pad1;
|
||||
unsigned int evmask;
|
||||
} XGenericEventMask;
|
||||
|
||||
Bool XGEQueryExtension(Display* dpy, int *event_basep, int *err_basep);
|
||||
Bool XGEQueryVersion(Display* dpy, int *major, int* minor);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XGE_H_ */
|
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
|
||||
Copyright 2003 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.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _Xinerama_h
|
||||
#define _Xinerama_h
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
typedef struct {
|
||||
int screen_number;
|
||||
short x_org;
|
||||
short y_org;
|
||||
short width;
|
||||
short height;
|
||||
} XineramaScreenInfo;
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
Bool XineramaQueryExtension (
|
||||
Display *dpy,
|
||||
int *event_base,
|
||||
int *error_base
|
||||
);
|
||||
|
||||
Status XineramaQueryVersion(
|
||||
Display *dpy,
|
||||
int *major_versionp,
|
||||
int *minor_versionp
|
||||
);
|
||||
|
||||
Bool XineramaIsActive(Display *dpy);
|
||||
|
||||
|
||||
/*
|
||||
Returns the number of heads and a pointer to an array of
|
||||
structures describing the position and size of the individual
|
||||
heads. Returns NULL and number = 0 if Xinerama is not active.
|
||||
|
||||
Returned array should be freed with XFree().
|
||||
*/
|
||||
|
||||
XineramaScreenInfo *
|
||||
XineramaQueryScreens(
|
||||
Display *dpy,
|
||||
int *number
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _Xinerama_h */
|
||||
|
|
@ -0,0 +1,587 @@
|
|||
/*
|
||||
* Copyright © 2000 Compaq Computer Corporation, Inc.
|
||||
* Copyright © 2002 Hewlett-Packard Company, Inc.
|
||||
* Copyright © 2006 Intel Corporation
|
||||
* Copyright © 2008 Red Hat, Inc.
|
||||
*
|
||||
* 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, and
|
||||
* that the name of the copyright holders not be used in advertising or
|
||||
* publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission. The copyright holders make no representations
|
||||
* about the suitability of this software for any purpose. It is provided "as
|
||||
* is" without express or implied warranty.
|
||||
*
|
||||
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDERS 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.
|
||||
*
|
||||
* Author: Jim Gettys, HP Labs, Hewlett-Packard, Inc.
|
||||
* Keith Packard, Intel Corporation
|
||||
*/
|
||||
|
||||
#ifndef _XRANDR_H_
|
||||
#define _XRANDR_H_
|
||||
|
||||
#include <X11/extensions/randr.h>
|
||||
#include <X11/extensions/Xrender.h>
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
typedef XID RROutput;
|
||||
typedef XID RRCrtc;
|
||||
typedef XID RRMode;
|
||||
typedef XID RRProvider;
|
||||
|
||||
typedef struct {
|
||||
int width, height;
|
||||
int mwidth, mheight;
|
||||
} XRRScreenSize;
|
||||
|
||||
/*
|
||||
* Events.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
int type; /* event base */
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came from a SendEvent request */
|
||||
Display *display; /* Display the event was read from */
|
||||
Window window; /* window which selected for this event */
|
||||
Window root; /* Root window for changed screen */
|
||||
Time timestamp; /* when the screen change occurred */
|
||||
Time config_timestamp; /* when the last configuration change */
|
||||
SizeID size_index;
|
||||
SubpixelOrder subpixel_order;
|
||||
Rotation rotation;
|
||||
int width;
|
||||
int height;
|
||||
int mwidth;
|
||||
int mheight;
|
||||
} XRRScreenChangeNotifyEvent;
|
||||
|
||||
typedef struct {
|
||||
int type; /* event base */
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came from a SendEvent request */
|
||||
Display *display; /* Display the event was read from */
|
||||
Window window; /* window which selected for this event */
|
||||
int subtype; /* RRNotify_ subtype */
|
||||
} XRRNotifyEvent;
|
||||
|
||||
typedef struct {
|
||||
int type; /* event base */
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came from a SendEvent request */
|
||||
Display *display; /* Display the event was read from */
|
||||
Window window; /* window which selected for this event */
|
||||
int subtype; /* RRNotify_OutputChange */
|
||||
RROutput output; /* affected output */
|
||||
RRCrtc crtc; /* current crtc (or None) */
|
||||
RRMode mode; /* current mode (or None) */
|
||||
Rotation rotation; /* current rotation of associated crtc */
|
||||
Connection connection; /* current connection status */
|
||||
SubpixelOrder subpixel_order;
|
||||
} XRROutputChangeNotifyEvent;
|
||||
|
||||
typedef struct {
|
||||
int type; /* event base */
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came from a SendEvent request */
|
||||
Display *display; /* Display the event was read from */
|
||||
Window window; /* window which selected for this event */
|
||||
int subtype; /* RRNotify_CrtcChange */
|
||||
RRCrtc crtc; /* current crtc (or None) */
|
||||
RRMode mode; /* current mode (or None) */
|
||||
Rotation rotation; /* current rotation of associated crtc */
|
||||
int x, y; /* position */
|
||||
unsigned int width, height; /* size */
|
||||
} XRRCrtcChangeNotifyEvent;
|
||||
|
||||
typedef struct {
|
||||
int type; /* event base */
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came from a SendEvent request */
|
||||
Display *display; /* Display the event was read from */
|
||||
Window window; /* window which selected for this event */
|
||||
int subtype; /* RRNotify_OutputProperty */
|
||||
RROutput output; /* related output */
|
||||
Atom property; /* changed property */
|
||||
Time timestamp; /* time of change */
|
||||
int state; /* NewValue, Deleted */
|
||||
} XRROutputPropertyNotifyEvent;
|
||||
|
||||
typedef struct {
|
||||
int type; /* event base */
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came from a SendEvent request */
|
||||
Display *display; /* Display the event was read from */
|
||||
Window window; /* window which selected for this event */
|
||||
int subtype; /* RRNotify_ProviderChange */
|
||||
RRProvider provider; /* current provider (or None) */
|
||||
Time timestamp; /* time of change */
|
||||
unsigned int current_role;
|
||||
} XRRProviderChangeNotifyEvent;
|
||||
|
||||
typedef struct {
|
||||
int type; /* event base */
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came from a SendEvent request */
|
||||
Display *display; /* Display the event was read from */
|
||||
Window window; /* window which selected for this event */
|
||||
int subtype; /* RRNotify_ProviderProperty */
|
||||
RRProvider provider; /* related provider */
|
||||
Atom property; /* changed property */
|
||||
Time timestamp; /* time of change */
|
||||
int state; /* NewValue, Deleted */
|
||||
} XRRProviderPropertyNotifyEvent;
|
||||
|
||||
typedef struct {
|
||||
int type; /* event base */
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came from a SendEvent request */
|
||||
Display *display; /* Display the event was read from */
|
||||
Window window; /* window which selected for this event */
|
||||
int subtype; /* RRNotify_ResourceChange */
|
||||
Time timestamp; /* time of change */
|
||||
} XRRResourceChangeNotifyEvent;
|
||||
|
||||
/* internal representation is private to the library */
|
||||
typedef struct _XRRScreenConfiguration XRRScreenConfiguration;
|
||||
|
||||
Bool XRRQueryExtension (Display *dpy,
|
||||
int *event_base_return,
|
||||
int *error_base_return);
|
||||
Status XRRQueryVersion (Display *dpy,
|
||||
int *major_version_return,
|
||||
int *minor_version_return);
|
||||
|
||||
XRRScreenConfiguration *XRRGetScreenInfo (Display *dpy,
|
||||
Window window);
|
||||
|
||||
void XRRFreeScreenConfigInfo (XRRScreenConfiguration *config);
|
||||
|
||||
/*
|
||||
* Note that screen configuration changes are only permitted if the client can
|
||||
* prove it has up to date configuration information. We are trying to
|
||||
* insist that it become possible for screens to change dynamically, so
|
||||
* we want to ensure the client knows what it is talking about when requesting
|
||||
* changes.
|
||||
*/
|
||||
Status XRRSetScreenConfig (Display *dpy,
|
||||
XRRScreenConfiguration *config,
|
||||
Drawable draw,
|
||||
int size_index,
|
||||
Rotation rotation,
|
||||
Time timestamp);
|
||||
|
||||
/* added in v1.1, sorry for the lame name */
|
||||
Status XRRSetScreenConfigAndRate (Display *dpy,
|
||||
XRRScreenConfiguration *config,
|
||||
Drawable draw,
|
||||
int size_index,
|
||||
Rotation rotation,
|
||||
short rate,
|
||||
Time timestamp);
|
||||
|
||||
|
||||
Rotation XRRConfigRotations(XRRScreenConfiguration *config, Rotation *current_rotation);
|
||||
|
||||
Time XRRConfigTimes (XRRScreenConfiguration *config, Time *config_timestamp);
|
||||
|
||||
XRRScreenSize *XRRConfigSizes(XRRScreenConfiguration *config, int *nsizes);
|
||||
|
||||
short *XRRConfigRates (XRRScreenConfiguration *config, int sizeID, int *nrates);
|
||||
|
||||
SizeID XRRConfigCurrentConfiguration (XRRScreenConfiguration *config,
|
||||
Rotation *rotation);
|
||||
|
||||
short XRRConfigCurrentRate (XRRScreenConfiguration *config);
|
||||
|
||||
int XRRRootToScreen(Display *dpy, Window root);
|
||||
|
||||
/*
|
||||
* returns the screen configuration for the specified screen; does a lazy
|
||||
* evalution to delay getting the information, and caches the result.
|
||||
* These routines should be used in preference to XRRGetScreenInfo
|
||||
* to avoid unneeded round trips to the X server. These are new
|
||||
* in protocol version 0.1.
|
||||
*/
|
||||
|
||||
|
||||
void XRRSelectInput(Display *dpy, Window window, int mask);
|
||||
|
||||
/*
|
||||
* the following are always safe to call, even if RandR is not implemented
|
||||
* on a screen
|
||||
*/
|
||||
|
||||
|
||||
Rotation XRRRotations(Display *dpy, int screen, Rotation *current_rotation);
|
||||
XRRScreenSize *XRRSizes(Display *dpy, int screen, int *nsizes);
|
||||
short *XRRRates (Display *dpy, int screen, int sizeID, int *nrates);
|
||||
Time XRRTimes (Display *dpy, int screen, Time *config_timestamp);
|
||||
|
||||
|
||||
/* Version 1.2 additions */
|
||||
|
||||
/* despite returning a Status, this returns 1 for success */
|
||||
Status
|
||||
XRRGetScreenSizeRange (Display *dpy, Window window,
|
||||
int *minWidth, int *minHeight,
|
||||
int *maxWidth, int *maxHeight);
|
||||
|
||||
void
|
||||
XRRSetScreenSize (Display *dpy, Window window,
|
||||
int width, int height,
|
||||
int mmWidth, int mmHeight);
|
||||
|
||||
typedef unsigned long XRRModeFlags;
|
||||
|
||||
typedef struct _XRRModeInfo {
|
||||
RRMode id;
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
unsigned long dotClock;
|
||||
unsigned int hSyncStart;
|
||||
unsigned int hSyncEnd;
|
||||
unsigned int hTotal;
|
||||
unsigned int hSkew;
|
||||
unsigned int vSyncStart;
|
||||
unsigned int vSyncEnd;
|
||||
unsigned int vTotal;
|
||||
char *name;
|
||||
unsigned int nameLength;
|
||||
XRRModeFlags modeFlags;
|
||||
} XRRModeInfo;
|
||||
|
||||
typedef struct _XRRScreenResources {
|
||||
Time timestamp;
|
||||
Time configTimestamp;
|
||||
int ncrtc;
|
||||
RRCrtc *crtcs;
|
||||
int noutput;
|
||||
RROutput *outputs;
|
||||
int nmode;
|
||||
XRRModeInfo *modes;
|
||||
} XRRScreenResources;
|
||||
|
||||
XRRScreenResources *
|
||||
XRRGetScreenResources (Display *dpy, Window window);
|
||||
|
||||
void
|
||||
XRRFreeScreenResources (XRRScreenResources *resources);
|
||||
|
||||
typedef struct _XRROutputInfo {
|
||||
Time timestamp;
|
||||
RRCrtc crtc;
|
||||
char *name;
|
||||
int nameLen;
|
||||
unsigned long mm_width;
|
||||
unsigned long mm_height;
|
||||
Connection connection;
|
||||
SubpixelOrder subpixel_order;
|
||||
int ncrtc;
|
||||
RRCrtc *crtcs;
|
||||
int nclone;
|
||||
RROutput *clones;
|
||||
int nmode;
|
||||
int npreferred;
|
||||
RRMode *modes;
|
||||
} XRROutputInfo;
|
||||
|
||||
XRROutputInfo *
|
||||
XRRGetOutputInfo (Display *dpy, XRRScreenResources *resources, RROutput output);
|
||||
|
||||
void
|
||||
XRRFreeOutputInfo (XRROutputInfo *outputInfo);
|
||||
|
||||
Atom *
|
||||
XRRListOutputProperties (Display *dpy, RROutput output, int *nprop);
|
||||
|
||||
typedef struct {
|
||||
Bool pending;
|
||||
Bool range;
|
||||
Bool immutable;
|
||||
int num_values;
|
||||
long *values;
|
||||
} XRRPropertyInfo;
|
||||
|
||||
XRRPropertyInfo *
|
||||
XRRQueryOutputProperty (Display *dpy, RROutput output, Atom property);
|
||||
|
||||
void
|
||||
XRRConfigureOutputProperty (Display *dpy, RROutput output, Atom property,
|
||||
Bool pending, Bool range, int num_values,
|
||||
long *values);
|
||||
|
||||
void
|
||||
XRRChangeOutputProperty (Display *dpy, RROutput output,
|
||||
Atom property, Atom type,
|
||||
int format, int mode,
|
||||
_Xconst unsigned char *data, int nelements);
|
||||
|
||||
void
|
||||
XRRDeleteOutputProperty (Display *dpy, RROutput output, Atom property);
|
||||
|
||||
int
|
||||
XRRGetOutputProperty (Display *dpy, RROutput output,
|
||||
Atom property, long offset, long length,
|
||||
Bool _delete, Bool pending, Atom req_type,
|
||||
Atom *actual_type, int *actual_format,
|
||||
unsigned long *nitems, unsigned long *bytes_after,
|
||||
unsigned char **prop);
|
||||
|
||||
XRRModeInfo *
|
||||
XRRAllocModeInfo (_Xconst char *name, int nameLength);
|
||||
|
||||
RRMode
|
||||
XRRCreateMode (Display *dpy, Window window, XRRModeInfo *modeInfo);
|
||||
|
||||
void
|
||||
XRRDestroyMode (Display *dpy, RRMode mode);
|
||||
|
||||
void
|
||||
XRRAddOutputMode (Display *dpy, RROutput output, RRMode mode);
|
||||
|
||||
void
|
||||
XRRDeleteOutputMode (Display *dpy, RROutput output, RRMode mode);
|
||||
|
||||
void
|
||||
XRRFreeModeInfo (XRRModeInfo *modeInfo);
|
||||
|
||||
typedef struct _XRRCrtcInfo {
|
||||
Time timestamp;
|
||||
int x, y;
|
||||
unsigned int width, height;
|
||||
RRMode mode;
|
||||
Rotation rotation;
|
||||
int noutput;
|
||||
RROutput *outputs;
|
||||
Rotation rotations;
|
||||
int npossible;
|
||||
RROutput *possible;
|
||||
} XRRCrtcInfo;
|
||||
|
||||
XRRCrtcInfo *
|
||||
XRRGetCrtcInfo (Display *dpy, XRRScreenResources *resources, RRCrtc crtc);
|
||||
|
||||
void
|
||||
XRRFreeCrtcInfo (XRRCrtcInfo *crtcInfo);
|
||||
|
||||
Status
|
||||
XRRSetCrtcConfig (Display *dpy,
|
||||
XRRScreenResources *resources,
|
||||
RRCrtc crtc,
|
||||
Time timestamp,
|
||||
int x, int y,
|
||||
RRMode mode,
|
||||
Rotation rotation,
|
||||
RROutput *outputs,
|
||||
int noutputs);
|
||||
|
||||
int
|
||||
XRRGetCrtcGammaSize (Display *dpy, RRCrtc crtc);
|
||||
|
||||
typedef struct _XRRCrtcGamma {
|
||||
int size;
|
||||
unsigned short *red;
|
||||
unsigned short *green;
|
||||
unsigned short *blue;
|
||||
} XRRCrtcGamma;
|
||||
|
||||
XRRCrtcGamma *
|
||||
XRRGetCrtcGamma (Display *dpy, RRCrtc crtc);
|
||||
|
||||
XRRCrtcGamma *
|
||||
XRRAllocGamma (int size);
|
||||
|
||||
void
|
||||
XRRSetCrtcGamma (Display *dpy, RRCrtc crtc, XRRCrtcGamma *gamma);
|
||||
|
||||
void
|
||||
XRRFreeGamma (XRRCrtcGamma *gamma);
|
||||
|
||||
/* Version 1.3 additions */
|
||||
|
||||
XRRScreenResources *
|
||||
XRRGetScreenResourcesCurrent (Display *dpy, Window window);
|
||||
|
||||
void
|
||||
XRRSetCrtcTransform (Display *dpy,
|
||||
RRCrtc crtc,
|
||||
XTransform *transform,
|
||||
_Xconst char *filter,
|
||||
XFixed *params,
|
||||
int nparams);
|
||||
|
||||
typedef struct _XRRCrtcTransformAttributes {
|
||||
XTransform pendingTransform;
|
||||
char *pendingFilter;
|
||||
int pendingNparams;
|
||||
XFixed *pendingParams;
|
||||
XTransform currentTransform;
|
||||
char *currentFilter;
|
||||
int currentNparams;
|
||||
XFixed *currentParams;
|
||||
} XRRCrtcTransformAttributes;
|
||||
|
||||
/*
|
||||
* Get current crtc transforms and filters.
|
||||
* Pass *attributes to XFree to free
|
||||
*/
|
||||
Status
|
||||
XRRGetCrtcTransform (Display *dpy,
|
||||
RRCrtc crtc,
|
||||
XRRCrtcTransformAttributes **attributes);
|
||||
|
||||
/*
|
||||
* intended to take RRScreenChangeNotify, or
|
||||
* ConfigureNotify (on the root window)
|
||||
* returns 1 if it is an event type it understands, 0 if not
|
||||
*/
|
||||
int XRRUpdateConfiguration(XEvent *event);
|
||||
|
||||
typedef struct _XRRPanning {
|
||||
Time timestamp;
|
||||
unsigned int left;
|
||||
unsigned int top;
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
unsigned int track_left;
|
||||
unsigned int track_top;
|
||||
unsigned int track_width;
|
||||
unsigned int track_height;
|
||||
int border_left;
|
||||
int border_top;
|
||||
int border_right;
|
||||
int border_bottom;
|
||||
} XRRPanning;
|
||||
|
||||
XRRPanning *
|
||||
XRRGetPanning (Display *dpy, XRRScreenResources *resources, RRCrtc crtc);
|
||||
|
||||
void
|
||||
XRRFreePanning (XRRPanning *panning);
|
||||
|
||||
Status
|
||||
XRRSetPanning (Display *dpy,
|
||||
XRRScreenResources *resources,
|
||||
RRCrtc crtc,
|
||||
XRRPanning *panning);
|
||||
|
||||
void
|
||||
XRRSetOutputPrimary(Display *dpy,
|
||||
Window window,
|
||||
RROutput output);
|
||||
|
||||
RROutput
|
||||
XRRGetOutputPrimary(Display *dpy,
|
||||
Window window);
|
||||
|
||||
typedef struct _XRRProviderResources {
|
||||
Time timestamp;
|
||||
int nproviders;
|
||||
RRProvider *providers;
|
||||
} XRRProviderResources;
|
||||
|
||||
XRRProviderResources *
|
||||
XRRGetProviderResources(Display *dpy, Window window);
|
||||
|
||||
void
|
||||
XRRFreeProviderResources(XRRProviderResources *resources);
|
||||
|
||||
typedef struct _XRRProviderInfo {
|
||||
unsigned int capabilities;
|
||||
int ncrtcs;
|
||||
RRCrtc *crtcs;
|
||||
int noutputs;
|
||||
RROutput *outputs;
|
||||
char *name;
|
||||
int nassociatedproviders;
|
||||
RRProvider *associated_providers;
|
||||
unsigned int *associated_capability;
|
||||
int nameLen;
|
||||
} XRRProviderInfo;
|
||||
|
||||
XRRProviderInfo *
|
||||
XRRGetProviderInfo(Display *dpy, XRRScreenResources *resources, RRProvider provider);
|
||||
|
||||
void
|
||||
XRRFreeProviderInfo(XRRProviderInfo *provider);
|
||||
|
||||
int
|
||||
XRRSetProviderOutputSource(Display *dpy, XID provider, XID source_provider);
|
||||
|
||||
int
|
||||
XRRSetProviderOffloadSink(Display *dpy, XID provider, XID sink_provider);
|
||||
|
||||
Atom *
|
||||
XRRListProviderProperties (Display *dpy, RRProvider provider, int *nprop);
|
||||
|
||||
XRRPropertyInfo *
|
||||
XRRQueryProviderProperty (Display *dpy, RRProvider provider, Atom property);
|
||||
|
||||
void
|
||||
XRRConfigureProviderProperty (Display *dpy, RRProvider provider, Atom property,
|
||||
Bool pending, Bool range, int num_values,
|
||||
long *values);
|
||||
|
||||
void
|
||||
XRRChangeProviderProperty (Display *dpy, RRProvider provider,
|
||||
Atom property, Atom type,
|
||||
int format, int mode,
|
||||
_Xconst unsigned char *data, int nelements);
|
||||
|
||||
void
|
||||
XRRDeleteProviderProperty (Display *dpy, RRProvider provider, Atom property);
|
||||
|
||||
int
|
||||
XRRGetProviderProperty (Display *dpy, RRProvider provider,
|
||||
Atom property, long offset, long length,
|
||||
Bool _delete, Bool pending, Atom req_type,
|
||||
Atom *actual_type, int *actual_format,
|
||||
unsigned long *nitems, unsigned long *bytes_after,
|
||||
unsigned char **prop);
|
||||
|
||||
|
||||
typedef struct _XRRMonitorInfo {
|
||||
Atom name;
|
||||
Bool primary;
|
||||
Bool automatic;
|
||||
int noutput;
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
int height;
|
||||
int mwidth;
|
||||
int mheight;
|
||||
RROutput *outputs;
|
||||
} XRRMonitorInfo;
|
||||
|
||||
XRRMonitorInfo *
|
||||
XRRAllocateMonitor(Display *dpy, int noutput);
|
||||
|
||||
XRRMonitorInfo *
|
||||
XRRGetMonitors(Display *dpy, Window window, Bool get_active, int *nmonitors);
|
||||
|
||||
void
|
||||
XRRSetMonitor(Display *dpy, Window window, XRRMonitorInfo *monitor);
|
||||
|
||||
void
|
||||
XRRDeleteMonitor(Display *dpy, Window window, Atom name);
|
||||
|
||||
void
|
||||
XRRFreeMonitors(XRRMonitorInfo *monitors);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XRANDR_H_ */
|
|
@ -0,0 +1,528 @@
|
|||
/*
|
||||
*
|
||||
* Copyright © 2000 SuSE, Inc.
|
||||
*
|
||||
* 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, and that the name of SuSE not be used in advertising or
|
||||
* publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission. SuSE makes no representations about the
|
||||
* suitability of this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*
|
||||
* SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
|
||||
* 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.
|
||||
*
|
||||
* Author: Keith Packard, SuSE, Inc.
|
||||
*/
|
||||
|
||||
#ifndef _XRENDER_H_
|
||||
#define _XRENDER_H_
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
#include <X11/Xosdefs.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
#include <X11/extensions/render.h>
|
||||
|
||||
typedef struct {
|
||||
short red;
|
||||
short redMask;
|
||||
short green;
|
||||
short greenMask;
|
||||
short blue;
|
||||
short blueMask;
|
||||
short alpha;
|
||||
short alphaMask;
|
||||
} XRenderDirectFormat;
|
||||
|
||||
typedef struct {
|
||||
PictFormat id;
|
||||
int type;
|
||||
int depth;
|
||||
XRenderDirectFormat direct;
|
||||
Colormap colormap;
|
||||
} XRenderPictFormat;
|
||||
|
||||
#define PictFormatID (1 << 0)
|
||||
#define PictFormatType (1 << 1)
|
||||
#define PictFormatDepth (1 << 2)
|
||||
#define PictFormatRed (1 << 3)
|
||||
#define PictFormatRedMask (1 << 4)
|
||||
#define PictFormatGreen (1 << 5)
|
||||
#define PictFormatGreenMask (1 << 6)
|
||||
#define PictFormatBlue (1 << 7)
|
||||
#define PictFormatBlueMask (1 << 8)
|
||||
#define PictFormatAlpha (1 << 9)
|
||||
#define PictFormatAlphaMask (1 << 10)
|
||||
#define PictFormatColormap (1 << 11)
|
||||
|
||||
typedef struct _XRenderPictureAttributes {
|
||||
int repeat;
|
||||
Picture alpha_map;
|
||||
int alpha_x_origin;
|
||||
int alpha_y_origin;
|
||||
int clip_x_origin;
|
||||
int clip_y_origin;
|
||||
Pixmap clip_mask;
|
||||
Bool graphics_exposures;
|
||||
int subwindow_mode;
|
||||
int poly_edge;
|
||||
int poly_mode;
|
||||
Atom dither;
|
||||
Bool component_alpha;
|
||||
} XRenderPictureAttributes;
|
||||
|
||||
typedef struct {
|
||||
unsigned short red;
|
||||
unsigned short green;
|
||||
unsigned short blue;
|
||||
unsigned short alpha;
|
||||
} XRenderColor;
|
||||
|
||||
typedef struct _XGlyphInfo {
|
||||
unsigned short width;
|
||||
unsigned short height;
|
||||
short x;
|
||||
short y;
|
||||
short xOff;
|
||||
short yOff;
|
||||
} XGlyphInfo;
|
||||
|
||||
typedef struct _XGlyphElt8 {
|
||||
GlyphSet glyphset;
|
||||
_Xconst char *chars;
|
||||
int nchars;
|
||||
int xOff;
|
||||
int yOff;
|
||||
} XGlyphElt8;
|
||||
|
||||
typedef struct _XGlyphElt16 {
|
||||
GlyphSet glyphset;
|
||||
_Xconst unsigned short *chars;
|
||||
int nchars;
|
||||
int xOff;
|
||||
int yOff;
|
||||
} XGlyphElt16;
|
||||
|
||||
typedef struct _XGlyphElt32 {
|
||||
GlyphSet glyphset;
|
||||
_Xconst unsigned int *chars;
|
||||
int nchars;
|
||||
int xOff;
|
||||
int yOff;
|
||||
} XGlyphElt32;
|
||||
|
||||
typedef double XDouble;
|
||||
|
||||
typedef struct _XPointDouble {
|
||||
XDouble x, y;
|
||||
} XPointDouble;
|
||||
|
||||
#define XDoubleToFixed(f) ((XFixed) ((f) * 65536))
|
||||
#define XFixedToDouble(f) (((XDouble) (f)) / 65536)
|
||||
|
||||
typedef int XFixed;
|
||||
|
||||
typedef struct _XPointFixed {
|
||||
XFixed x, y;
|
||||
} XPointFixed;
|
||||
|
||||
typedef struct _XLineFixed {
|
||||
XPointFixed p1, p2;
|
||||
} XLineFixed;
|
||||
|
||||
typedef struct _XTriangle {
|
||||
XPointFixed p1, p2, p3;
|
||||
} XTriangle;
|
||||
|
||||
typedef struct _XCircle {
|
||||
XFixed x;
|
||||
XFixed y;
|
||||
XFixed radius;
|
||||
} XCircle;
|
||||
|
||||
typedef struct _XTrapezoid {
|
||||
XFixed top, bottom;
|
||||
XLineFixed left, right;
|
||||
} XTrapezoid;
|
||||
|
||||
typedef struct _XTransform {
|
||||
XFixed matrix[3][3];
|
||||
} XTransform;
|
||||
|
||||
typedef struct _XFilters {
|
||||
int nfilter;
|
||||
char **filter;
|
||||
int nalias;
|
||||
short *alias;
|
||||
} XFilters;
|
||||
|
||||
typedef struct _XIndexValue {
|
||||
unsigned long pixel;
|
||||
unsigned short red, green, blue, alpha;
|
||||
} XIndexValue;
|
||||
|
||||
typedef struct _XAnimCursor {
|
||||
Cursor cursor;
|
||||
unsigned long delay;
|
||||
} XAnimCursor;
|
||||
|
||||
typedef struct _XSpanFix {
|
||||
XFixed left, right, y;
|
||||
} XSpanFix;
|
||||
|
||||
typedef struct _XTrap {
|
||||
XSpanFix top, bottom;
|
||||
} XTrap;
|
||||
|
||||
typedef struct _XLinearGradient {
|
||||
XPointFixed p1;
|
||||
XPointFixed p2;
|
||||
} XLinearGradient;
|
||||
|
||||
typedef struct _XRadialGradient {
|
||||
XCircle inner;
|
||||
XCircle outer;
|
||||
} XRadialGradient;
|
||||
|
||||
typedef struct _XConicalGradient {
|
||||
XPointFixed center;
|
||||
XFixed angle; /* in degrees */
|
||||
} XConicalGradient;
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
Bool XRenderQueryExtension (Display *dpy, int *event_basep, int *error_basep);
|
||||
|
||||
Status XRenderQueryVersion (Display *dpy,
|
||||
int *major_versionp,
|
||||
int *minor_versionp);
|
||||
|
||||
Status XRenderQueryFormats (Display *dpy);
|
||||
|
||||
int XRenderQuerySubpixelOrder (Display *dpy, int screen);
|
||||
|
||||
Bool XRenderSetSubpixelOrder (Display *dpy, int screen, int subpixel);
|
||||
|
||||
XRenderPictFormat *
|
||||
XRenderFindVisualFormat (Display *dpy, _Xconst Visual *visual);
|
||||
|
||||
XRenderPictFormat *
|
||||
XRenderFindFormat (Display *dpy,
|
||||
unsigned long mask,
|
||||
_Xconst XRenderPictFormat *templ,
|
||||
int count);
|
||||
|
||||
#define PictStandardARGB32 0
|
||||
#define PictStandardRGB24 1
|
||||
#define PictStandardA8 2
|
||||
#define PictStandardA4 3
|
||||
#define PictStandardA1 4
|
||||
#define PictStandardNUM 5
|
||||
|
||||
XRenderPictFormat *
|
||||
XRenderFindStandardFormat (Display *dpy,
|
||||
int format);
|
||||
|
||||
XIndexValue *
|
||||
XRenderQueryPictIndexValues(Display *dpy,
|
||||
_Xconst XRenderPictFormat *format,
|
||||
int *num);
|
||||
|
||||
Picture
|
||||
XRenderCreatePicture (Display *dpy,
|
||||
Drawable drawable,
|
||||
_Xconst XRenderPictFormat *format,
|
||||
unsigned long valuemask,
|
||||
_Xconst XRenderPictureAttributes *attributes);
|
||||
|
||||
void
|
||||
XRenderChangePicture (Display *dpy,
|
||||
Picture picture,
|
||||
unsigned long valuemask,
|
||||
_Xconst XRenderPictureAttributes *attributes);
|
||||
|
||||
void
|
||||
XRenderSetPictureClipRectangles (Display *dpy,
|
||||
Picture picture,
|
||||
int xOrigin,
|
||||
int yOrigin,
|
||||
_Xconst XRectangle *rects,
|
||||
int n);
|
||||
|
||||
void
|
||||
XRenderSetPictureClipRegion (Display *dpy,
|
||||
Picture picture,
|
||||
Region r);
|
||||
|
||||
void
|
||||
XRenderSetPictureTransform (Display *dpy,
|
||||
Picture picture,
|
||||
XTransform *transform);
|
||||
|
||||
void
|
||||
XRenderFreePicture (Display *dpy,
|
||||
Picture picture);
|
||||
|
||||
void
|
||||
XRenderComposite (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
Picture mask,
|
||||
Picture dst,
|
||||
int src_x,
|
||||
int src_y,
|
||||
int mask_x,
|
||||
int mask_y,
|
||||
int dst_x,
|
||||
int dst_y,
|
||||
unsigned int width,
|
||||
unsigned int height);
|
||||
|
||||
GlyphSet
|
||||
XRenderCreateGlyphSet (Display *dpy, _Xconst XRenderPictFormat *format);
|
||||
|
||||
GlyphSet
|
||||
XRenderReferenceGlyphSet (Display *dpy, GlyphSet existing);
|
||||
|
||||
void
|
||||
XRenderFreeGlyphSet (Display *dpy, GlyphSet glyphset);
|
||||
|
||||
void
|
||||
XRenderAddGlyphs (Display *dpy,
|
||||
GlyphSet glyphset,
|
||||
_Xconst Glyph *gids,
|
||||
_Xconst XGlyphInfo *glyphs,
|
||||
int nglyphs,
|
||||
_Xconst char *images,
|
||||
int nbyte_images);
|
||||
|
||||
void
|
||||
XRenderFreeGlyphs (Display *dpy,
|
||||
GlyphSet glyphset,
|
||||
_Xconst Glyph *gids,
|
||||
int nglyphs);
|
||||
|
||||
void
|
||||
XRenderCompositeString8 (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
Picture dst,
|
||||
_Xconst XRenderPictFormat *maskFormat,
|
||||
GlyphSet glyphset,
|
||||
int xSrc,
|
||||
int ySrc,
|
||||
int xDst,
|
||||
int yDst,
|
||||
_Xconst char *string,
|
||||
int nchar);
|
||||
|
||||
void
|
||||
XRenderCompositeString16 (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
Picture dst,
|
||||
_Xconst XRenderPictFormat *maskFormat,
|
||||
GlyphSet glyphset,
|
||||
int xSrc,
|
||||
int ySrc,
|
||||
int xDst,
|
||||
int yDst,
|
||||
_Xconst unsigned short *string,
|
||||
int nchar);
|
||||
|
||||
void
|
||||
XRenderCompositeString32 (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
Picture dst,
|
||||
_Xconst XRenderPictFormat *maskFormat,
|
||||
GlyphSet glyphset,
|
||||
int xSrc,
|
||||
int ySrc,
|
||||
int xDst,
|
||||
int yDst,
|
||||
_Xconst unsigned int *string,
|
||||
int nchar);
|
||||
|
||||
void
|
||||
XRenderCompositeText8 (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
Picture dst,
|
||||
_Xconst XRenderPictFormat *maskFormat,
|
||||
int xSrc,
|
||||
int ySrc,
|
||||
int xDst,
|
||||
int yDst,
|
||||
_Xconst XGlyphElt8 *elts,
|
||||
int nelt);
|
||||
|
||||
void
|
||||
XRenderCompositeText16 (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
Picture dst,
|
||||
_Xconst XRenderPictFormat *maskFormat,
|
||||
int xSrc,
|
||||
int ySrc,
|
||||
int xDst,
|
||||
int yDst,
|
||||
_Xconst XGlyphElt16 *elts,
|
||||
int nelt);
|
||||
|
||||
void
|
||||
XRenderCompositeText32 (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
Picture dst,
|
||||
_Xconst XRenderPictFormat *maskFormat,
|
||||
int xSrc,
|
||||
int ySrc,
|
||||
int xDst,
|
||||
int yDst,
|
||||
_Xconst XGlyphElt32 *elts,
|
||||
int nelt);
|
||||
|
||||
void
|
||||
XRenderFillRectangle (Display *dpy,
|
||||
int op,
|
||||
Picture dst,
|
||||
_Xconst XRenderColor *color,
|
||||
int x,
|
||||
int y,
|
||||
unsigned int width,
|
||||
unsigned int height);
|
||||
|
||||
void
|
||||
XRenderFillRectangles (Display *dpy,
|
||||
int op,
|
||||
Picture dst,
|
||||
_Xconst XRenderColor *color,
|
||||
_Xconst XRectangle *rectangles,
|
||||
int n_rects);
|
||||
|
||||
void
|
||||
XRenderCompositeTrapezoids (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
Picture dst,
|
||||
_Xconst XRenderPictFormat *maskFormat,
|
||||
int xSrc,
|
||||
int ySrc,
|
||||
_Xconst XTrapezoid *traps,
|
||||
int ntrap);
|
||||
|
||||
void
|
||||
XRenderCompositeTriangles (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
Picture dst,
|
||||
_Xconst XRenderPictFormat *maskFormat,
|
||||
int xSrc,
|
||||
int ySrc,
|
||||
_Xconst XTriangle *triangles,
|
||||
int ntriangle);
|
||||
|
||||
void
|
||||
XRenderCompositeTriStrip (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
Picture dst,
|
||||
_Xconst XRenderPictFormat *maskFormat,
|
||||
int xSrc,
|
||||
int ySrc,
|
||||
_Xconst XPointFixed *points,
|
||||
int npoint);
|
||||
|
||||
void
|
||||
XRenderCompositeTriFan (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
Picture dst,
|
||||
_Xconst XRenderPictFormat *maskFormat,
|
||||
int xSrc,
|
||||
int ySrc,
|
||||
_Xconst XPointFixed *points,
|
||||
int npoint);
|
||||
|
||||
void
|
||||
XRenderCompositeDoublePoly (Display *dpy,
|
||||
int op,
|
||||
Picture src,
|
||||
Picture dst,
|
||||
_Xconst XRenderPictFormat *maskFormat,
|
||||
int xSrc,
|
||||
int ySrc,
|
||||
int xDst,
|
||||
int yDst,
|
||||
_Xconst XPointDouble *fpoints,
|
||||
int npoints,
|
||||
int winding);
|
||||
Status
|
||||
XRenderParseColor(Display *dpy,
|
||||
char *spec,
|
||||
XRenderColor *def);
|
||||
|
||||
Cursor
|
||||
XRenderCreateCursor (Display *dpy,
|
||||
Picture source,
|
||||
unsigned int x,
|
||||
unsigned int y);
|
||||
|
||||
XFilters *
|
||||
XRenderQueryFilters (Display *dpy, Drawable drawable);
|
||||
|
||||
void
|
||||
XRenderSetPictureFilter (Display *dpy,
|
||||
Picture picture,
|
||||
const char *filter,
|
||||
XFixed *params,
|
||||
int nparams);
|
||||
|
||||
Cursor
|
||||
XRenderCreateAnimCursor (Display *dpy,
|
||||
int ncursor,
|
||||
XAnimCursor *cursors);
|
||||
|
||||
|
||||
void
|
||||
XRenderAddTraps (Display *dpy,
|
||||
Picture picture,
|
||||
int xOff,
|
||||
int yOff,
|
||||
_Xconst XTrap *traps,
|
||||
int ntrap);
|
||||
|
||||
Picture XRenderCreateSolidFill (Display *dpy,
|
||||
const XRenderColor *color);
|
||||
|
||||
Picture XRenderCreateLinearGradient (Display *dpy,
|
||||
const XLinearGradient *gradient,
|
||||
const XFixed *stops,
|
||||
const XRenderColor *colors,
|
||||
int nstops);
|
||||
|
||||
Picture XRenderCreateRadialGradient (Display *dpy,
|
||||
const XRadialGradient *gradient,
|
||||
const XFixed *stops,
|
||||
const XRenderColor *colors,
|
||||
int nstops);
|
||||
|
||||
Picture XRenderCreateConicalGradient (Display *dpy,
|
||||
const XConicalGradient *gradient,
|
||||
const XFixed *stops,
|
||||
const XRenderColor *colors,
|
||||
int nstops);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _XRENDER_H_ */
|
|
@ -0,0 +1,128 @@
|
|||
/***********************************************************
|
||||
Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
|
||||
and the Massachusetts Institute of Technology, Cambridge, 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 names of Digital or MIT 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.
|
||||
|
||||
******************************************************************/
|
||||
|
||||
#ifndef XV_H
|
||||
#define XV_H
|
||||
/*
|
||||
** File:
|
||||
**
|
||||
** Xv.h --- Xv shared library and server header file
|
||||
**
|
||||
** Author:
|
||||
**
|
||||
** David Carver (Digital Workstation Engineering/Project Athena)
|
||||
**
|
||||
** Revisions:
|
||||
**
|
||||
** 05.15.91 Carver
|
||||
** - version 2.0 upgrade
|
||||
**
|
||||
** 01.24.91 Carver
|
||||
** - version 1.4 upgrade
|
||||
**
|
||||
*/
|
||||
|
||||
#include <X11/X.h>
|
||||
|
||||
#define XvName "XVideo"
|
||||
#define XvVersion 2
|
||||
#define XvRevision 2
|
||||
|
||||
/* Symbols */
|
||||
|
||||
typedef XID XvPortID;
|
||||
typedef XID XvEncodingID;
|
||||
|
||||
#define XvNone 0
|
||||
|
||||
#define XvInput 0
|
||||
#define XvOutput 1
|
||||
|
||||
#define XvInputMask (1<<XvInput)
|
||||
#define XvOutputMask (1<<XvOutput)
|
||||
#define XvVideoMask 0x00000004
|
||||
#define XvStillMask 0x00000008
|
||||
#define XvImageMask 0x00000010
|
||||
|
||||
/* These two are not client viewable */
|
||||
#define XvPixmapMask 0x00010000
|
||||
#define XvWindowMask 0x00020000
|
||||
|
||||
|
||||
#define XvGettable 0x01
|
||||
#define XvSettable 0x02
|
||||
|
||||
#define XvRGB 0
|
||||
#define XvYUV 1
|
||||
|
||||
#define XvPacked 0
|
||||
#define XvPlanar 1
|
||||
|
||||
#define XvTopToBottom 0
|
||||
#define XvBottomToTop 1
|
||||
|
||||
|
||||
/* Events */
|
||||
|
||||
#define XvVideoNotify 0
|
||||
#define XvPortNotify 1
|
||||
#define XvNumEvents 2
|
||||
|
||||
/* Video Notify Reasons */
|
||||
|
||||
#define XvStarted 0
|
||||
#define XvStopped 1
|
||||
#define XvBusy 2
|
||||
#define XvPreempted 3
|
||||
#define XvHardError 4
|
||||
#define XvLastReason 4
|
||||
|
||||
#define XvNumReasons (XvLastReason + 1)
|
||||
|
||||
#define XvStartedMask (1<<XvStarted)
|
||||
#define XvStoppedMask (1<<XvStopped)
|
||||
#define XvBusyMask (1<<XvBusy)
|
||||
#define XvPreemptedMask (1<<XvPreempted)
|
||||
#define XvHardErrorMask (1<<XvHardError)
|
||||
|
||||
#define XvAnyReasonMask ((1<<XvNumReasons) - 1)
|
||||
#define XvNoReasonMask 0
|
||||
|
||||
/* Errors */
|
||||
|
||||
#define XvBadPort 0
|
||||
#define XvBadEncoding 1
|
||||
#define XvBadControl 2
|
||||
#define XvNumErrors 3
|
||||
|
||||
/* Status */
|
||||
|
||||
#define XvBadExtension 1
|
||||
#define XvAlreadyGrabbed 2
|
||||
#define XvInvalidTime 3
|
||||
#define XvBadReply 4
|
||||
#define XvBadAlloc 5
|
||||
|
||||
#endif /* XV_H */
|
||||
|
|
@ -0,0 +1,138 @@
|
|||
#ifndef _XVMC_H_
|
||||
#define _XVMC_H_
|
||||
|
||||
#include <X11/X.h>
|
||||
#include <X11/extensions/Xv.h>
|
||||
|
||||
#define XvMCName "XVideo-MotionCompensation"
|
||||
#define XvMCNumEvents 0
|
||||
#define XvMCNumErrors 3
|
||||
#define XvMCVersion 1
|
||||
#define XvMCRevision 1
|
||||
|
||||
#define XvMCBadContext 0
|
||||
#define XvMCBadSurface 1
|
||||
#define XvMCBadSubpicture 2
|
||||
|
||||
/* Chroma formats */
|
||||
#define XVMC_CHROMA_FORMAT_420 0x00000001
|
||||
#define XVMC_CHROMA_FORMAT_422 0x00000002
|
||||
#define XVMC_CHROMA_FORMAT_444 0x00000003
|
||||
|
||||
/* XvMCSurfaceInfo Flags */
|
||||
#define XVMC_OVERLAID_SURFACE 0x00000001
|
||||
#define XVMC_BACKEND_SUBPICTURE 0x00000002
|
||||
#define XVMC_SUBPICTURE_INDEPENDENT_SCALING 0x00000004
|
||||
#define XVMC_INTRA_UNSIGNED 0x00000008
|
||||
|
||||
/* Motion Compensation types */
|
||||
#define XVMC_MOCOMP 0x00000000
|
||||
#define XVMC_IDCT 0x00010000
|
||||
|
||||
#define XVMC_MPEG_1 0x00000001
|
||||
#define XVMC_MPEG_2 0x00000002
|
||||
#define XVMC_H263 0x00000003
|
||||
#define XVMC_MPEG_4 0x00000004
|
||||
|
||||
#define XVMC_MB_TYPE_MOTION_FORWARD 0x02
|
||||
#define XVMC_MB_TYPE_MOTION_BACKWARD 0x04
|
||||
#define XVMC_MB_TYPE_PATTERN 0x08
|
||||
#define XVMC_MB_TYPE_INTRA 0x10
|
||||
|
||||
#define XVMC_PREDICTION_FIELD 0x01
|
||||
#define XVMC_PREDICTION_FRAME 0x02
|
||||
#define XVMC_PREDICTION_DUAL_PRIME 0x03
|
||||
#define XVMC_PREDICTION_16x8 0x02
|
||||
#define XVMC_PREDICTION_4MV 0x04
|
||||
|
||||
#define XVMC_SELECT_FIRST_FORWARD 0x01
|
||||
#define XVMC_SELECT_FIRST_BACKWARD 0x02
|
||||
#define XVMC_SELECT_SECOND_FORWARD 0x04
|
||||
#define XVMC_SELECT_SECOND_BACKWARD 0x08
|
||||
|
||||
#define XVMC_DCT_TYPE_FRAME 0x00
|
||||
#define XVMC_DCT_TYPE_FIELD 0x01
|
||||
|
||||
#define XVMC_TOP_FIELD 0x00000001
|
||||
#define XVMC_BOTTOM_FIELD 0x00000002
|
||||
#define XVMC_FRAME_PICTURE (XVMC_TOP_FIELD | XVMC_BOTTOM_FIELD)
|
||||
|
||||
#define XVMC_SECOND_FIELD 0x00000004
|
||||
|
||||
#define XVMC_DIRECT 0x00000001
|
||||
|
||||
#define XVMC_RENDERING 0x00000001
|
||||
#define XVMC_DISPLAYING 0x00000002
|
||||
|
||||
|
||||
typedef struct {
|
||||
int surface_type_id;
|
||||
int chroma_format;
|
||||
unsigned short max_width;
|
||||
unsigned short max_height;
|
||||
unsigned short subpicture_max_width;
|
||||
unsigned short subpicture_max_height;
|
||||
int mc_type;
|
||||
int flags;
|
||||
} XvMCSurfaceInfo;
|
||||
|
||||
typedef struct {
|
||||
XID context_id;
|
||||
int surface_type_id;
|
||||
unsigned short width;
|
||||
unsigned short height;
|
||||
XvPortID port;
|
||||
int flags;
|
||||
void * privData; /* private to the library */
|
||||
} XvMCContext;
|
||||
|
||||
typedef struct {
|
||||
XID surface_id;
|
||||
XID context_id;
|
||||
int surface_type_id;
|
||||
unsigned short width;
|
||||
unsigned short height;
|
||||
void *privData; /* private to the library */
|
||||
} XvMCSurface;
|
||||
|
||||
typedef struct {
|
||||
XID subpicture_id;
|
||||
XID context_id;
|
||||
int xvimage_id;
|
||||
unsigned short width;
|
||||
unsigned short height;
|
||||
int num_palette_entries;
|
||||
int entry_bytes;
|
||||
char component_order[4];
|
||||
void *privData; /* private to the library */
|
||||
} XvMCSubpicture;
|
||||
|
||||
typedef struct {
|
||||
unsigned int num_blocks;
|
||||
XID context_id;
|
||||
void *privData;
|
||||
short *blocks;
|
||||
} XvMCBlockArray;
|
||||
|
||||
typedef struct {
|
||||
unsigned short x;
|
||||
unsigned short y;
|
||||
unsigned char macroblock_type;
|
||||
unsigned char motion_type;
|
||||
unsigned char motion_vertical_field_select;
|
||||
unsigned char dct_type;
|
||||
short PMV[2][2][2];
|
||||
unsigned int index;
|
||||
unsigned short coded_block_pattern;
|
||||
unsigned short pad0;
|
||||
} XvMCMacroBlock;
|
||||
|
||||
|
||||
typedef struct {
|
||||
unsigned int num_blocks;
|
||||
XID context_id;
|
||||
void *privData;
|
||||
XvMCMacroBlock *macro_blocks;
|
||||
} XvMCMacroBlockArray;
|
||||
|
||||
#endif
|
|
@ -0,0 +1,226 @@
|
|||
#ifndef _XVMCPROTO_H_
|
||||
#define _XVMCPROTO_H_
|
||||
|
||||
#define xvmc_QueryVersion 0
|
||||
#define xvmc_ListSurfaceTypes 1
|
||||
#define xvmc_CreateContext 2
|
||||
#define xvmc_DestroyContext 3
|
||||
#define xvmc_CreateSurface 4
|
||||
#define xvmc_DestroySurface 5
|
||||
#define xvmc_CreateSubpicture 6
|
||||
#define xvmc_DestroySubpicture 7
|
||||
#define xvmc_ListSubpictureTypes 8
|
||||
#define xvmc_GetDRInfo 9
|
||||
#define xvmc_LastRequest xvmc_GetDRInfo
|
||||
|
||||
#define xvmcNumRequest (xvmc_LastRequest + 1)
|
||||
|
||||
|
||||
typedef struct {
|
||||
CARD32 surface_type_id B32;
|
||||
CARD16 chroma_format B16;
|
||||
CARD16 pad0 B16;
|
||||
CARD16 max_width B16;
|
||||
CARD16 max_height B16;
|
||||
CARD16 subpicture_max_width B16;
|
||||
CARD16 subpicture_max_height B16;
|
||||
CARD32 mc_type B32;
|
||||
CARD32 flags B32;
|
||||
} xvmcSurfaceInfo;
|
||||
#define sz_xvmcSurfaceInfo 24;
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvmcReqType;
|
||||
CARD16 length B16;
|
||||
} xvmcQueryVersionReq;
|
||||
#define sz_xvmcQueryVersionReq 4;
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BYTE padb1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 major B32;
|
||||
CARD32 minor B32;
|
||||
CARD32 padl4 B32;
|
||||
CARD32 padl5 B32;
|
||||
CARD32 padl6 B32;
|
||||
CARD32 padl7 B32;
|
||||
} xvmcQueryVersionReply;
|
||||
#define sz_xvmcQueryVersionReply 32
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvmcReqType;
|
||||
CARD16 length B16;
|
||||
CARD32 port B32;
|
||||
} xvmcListSurfaceTypesReq;
|
||||
#define sz_xvmcListSurfaceTypesReq 8;
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BYTE padb1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 num B32;
|
||||
CARD32 padl3 B32;
|
||||
CARD32 padl4 B32;
|
||||
CARD32 padl5 B32;
|
||||
CARD32 padl6 B32;
|
||||
CARD32 padl7 B32;
|
||||
} xvmcListSurfaceTypesReply;
|
||||
#define sz_xvmcListSurfaceTypesReply 32
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvmcReqType;
|
||||
CARD16 length B16;
|
||||
CARD32 context_id B32;
|
||||
CARD32 port B32;
|
||||
CARD32 surface_type_id B32;
|
||||
CARD16 width B16;
|
||||
CARD16 height B16;
|
||||
CARD32 flags B32;
|
||||
} xvmcCreateContextReq;
|
||||
#define sz_xvmcCreateContextReq 24;
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BYTE padb1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD16 width_actual B16;
|
||||
CARD16 height_actual B16;
|
||||
CARD32 flags_return B32;
|
||||
CARD32 padl4 B32;
|
||||
CARD32 padl5 B32;
|
||||
CARD32 padl6 B32;
|
||||
CARD32 padl7 B32;
|
||||
} xvmcCreateContextReply;
|
||||
#define sz_xvmcCreateContextReply 32
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvmcReqType;
|
||||
CARD16 length B16;
|
||||
CARD32 context_id B32;
|
||||
} xvmcDestroyContextReq;
|
||||
#define sz_xvmcDestroyContextReq 8;
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvmcReqType;
|
||||
CARD16 length B16;
|
||||
CARD32 surface_id B32;
|
||||
CARD32 context_id B32;
|
||||
} xvmcCreateSurfaceReq;
|
||||
#define sz_xvmcCreateSurfaceReq 12;
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BYTE padb1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 padl2 B32;
|
||||
CARD32 padl3 B32;
|
||||
CARD32 padl4 B32;
|
||||
CARD32 padl5 B32;
|
||||
CARD32 padl6 B32;
|
||||
CARD32 padl7 B32;
|
||||
} xvmcCreateSurfaceReply;
|
||||
#define sz_xvmcCreateSurfaceReply 32
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvmcReqType;
|
||||
CARD16 length B16;
|
||||
CARD32 surface_id B32;
|
||||
} xvmcDestroySurfaceReq;
|
||||
#define sz_xvmcDestroySurfaceReq 8;
|
||||
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvmcReqType;
|
||||
CARD16 length B16;
|
||||
CARD32 subpicture_id B32;
|
||||
CARD32 context_id B32;
|
||||
CARD32 xvimage_id B32;
|
||||
CARD16 width B16;
|
||||
CARD16 height B16;
|
||||
} xvmcCreateSubpictureReq;
|
||||
#define sz_xvmcCreateSubpictureReq 20;
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BYTE padb1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD16 width_actual B16;
|
||||
CARD16 height_actual B16;
|
||||
CARD16 num_palette_entries B16;
|
||||
CARD16 entry_bytes B16;
|
||||
CARD8 component_order[4];
|
||||
CARD32 padl5 B32;
|
||||
CARD32 padl6 B32;
|
||||
CARD32 padl7 B32;
|
||||
} xvmcCreateSubpictureReply;
|
||||
#define sz_xvmcCreateSubpictureReply 32
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvmcReqType;
|
||||
CARD16 length B16;
|
||||
CARD32 subpicture_id B32;
|
||||
} xvmcDestroySubpictureReq;
|
||||
#define sz_xvmcDestroySubpictureReq 8;
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvmcReqType;
|
||||
CARD16 length B16;
|
||||
CARD32 port B32;
|
||||
CARD32 surface_type_id B32;
|
||||
} xvmcListSubpictureTypesReq;
|
||||
#define sz_xvmcListSubpictureTypesReq 12;
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BYTE padb1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 num B32;
|
||||
CARD32 padl2 B32;
|
||||
CARD32 padl3 B32;
|
||||
CARD32 padl4 B32;
|
||||
CARD32 padl5 B32;
|
||||
CARD32 padl6 B32;
|
||||
} xvmcListSubpictureTypesReply;
|
||||
#define sz_xvmcListSubpictureTypesReply 32
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvmcReqType;
|
||||
CARD16 length B16;
|
||||
CARD32 port B32;
|
||||
CARD32 shmKey B32;
|
||||
CARD32 magic B32;
|
||||
} xvmcGetDRInfoReq;
|
||||
#define sz_xvmcGetDRInfoReq 16;
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BYTE padb1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 major B32;
|
||||
CARD32 minor B32;
|
||||
CARD32 patchLevel B32;
|
||||
CARD32 nameLen B32;
|
||||
CARD32 busIDLen B32;
|
||||
CARD32 isLocal B32;
|
||||
} xvmcGetDRInfoReply;
|
||||
#define sz_xvmcGetDRInfoReply 32
|
||||
|
||||
#endif
|
|
@ -0,0 +1,603 @@
|
|||
/***********************************************************
|
||||
Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
|
||||
and the Massachusetts Institute of Technology, Cambridge, 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 names of Digital or MIT 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.
|
||||
|
||||
******************************************************************/
|
||||
|
||||
#ifndef XVPROTO_H
|
||||
#define XVPROTO_H
|
||||
/*
|
||||
** File:
|
||||
**
|
||||
** Xvproto.h --- Xv protocol header file
|
||||
**
|
||||
** Author:
|
||||
**
|
||||
** David Carver (Digital Workstation Engineering/Project Athena)
|
||||
**
|
||||
** Revisions:
|
||||
**
|
||||
** 11.06.91 Carver
|
||||
** - changed SetPortControl to SetPortAttribute
|
||||
** - changed GetPortControl to GetPortAttribute
|
||||
** - changed QueryBestSize
|
||||
**
|
||||
** 15.05.91 Carver
|
||||
** - version 2.0 upgrade
|
||||
**
|
||||
** 24.01.91 Carver
|
||||
** - version 1.4 upgrade
|
||||
**
|
||||
*/
|
||||
|
||||
#include <X11/Xmd.h>
|
||||
|
||||
/* Symbols: These are undefined at the end of this file to restore the
|
||||
values they have in Xv.h */
|
||||
|
||||
#define XvPortID CARD32
|
||||
#define XvEncodingID CARD32
|
||||
#define ShmSeg CARD32
|
||||
#define VisualID CARD32
|
||||
#define Drawable CARD32
|
||||
#define GContext CARD32
|
||||
#define Time CARD32
|
||||
#define Atom CARD32
|
||||
|
||||
/* Structures */
|
||||
|
||||
typedef struct {
|
||||
INT32 numerator B32;
|
||||
INT32 denominator B32;
|
||||
} xvRational;
|
||||
#define sz_xvRational 8
|
||||
|
||||
typedef struct {
|
||||
XvPortID base_id B32;
|
||||
CARD16 name_size B16;
|
||||
CARD16 num_ports B16;
|
||||
CARD16 num_formats B16;
|
||||
CARD8 type;
|
||||
CARD8 pad;
|
||||
} xvAdaptorInfo;
|
||||
#define sz_xvAdaptorInfo 12
|
||||
|
||||
typedef struct {
|
||||
XvEncodingID encoding B32;
|
||||
CARD16 name_size B16;
|
||||
CARD16 width B16, height B16;
|
||||
CARD16 pad B16;
|
||||
xvRational rate;
|
||||
} xvEncodingInfo;
|
||||
#define sz_xvEncodingInfo (12 + sz_xvRational)
|
||||
|
||||
typedef struct {
|
||||
VisualID visual B32;
|
||||
CARD8 depth;
|
||||
CARD8 pad1;
|
||||
CARD16 pad2 B16;
|
||||
} xvFormat;
|
||||
#define sz_xvFormat 8
|
||||
|
||||
typedef struct {
|
||||
CARD32 flags B32;
|
||||
INT32 min B32;
|
||||
INT32 max B32;
|
||||
CARD32 size B32;
|
||||
} xvAttributeInfo;
|
||||
#define sz_xvAttributeInfo 16
|
||||
|
||||
typedef struct {
|
||||
CARD32 id B32;
|
||||
CARD8 type;
|
||||
CARD8 byte_order;
|
||||
CARD16 pad1 B16;
|
||||
CARD8 guid[16];
|
||||
CARD8 bpp;
|
||||
CARD8 num_planes;
|
||||
CARD16 pad2 B16;
|
||||
CARD8 depth;
|
||||
CARD8 pad3;
|
||||
CARD16 pad4 B16;
|
||||
CARD32 red_mask B32;
|
||||
CARD32 green_mask B32;
|
||||
CARD32 blue_mask B32;
|
||||
CARD8 format;
|
||||
CARD8 pad5;
|
||||
CARD16 pad6 B16;
|
||||
CARD32 y_sample_bits B32;
|
||||
CARD32 u_sample_bits B32;
|
||||
CARD32 v_sample_bits B32;
|
||||
CARD32 horz_y_period B32;
|
||||
CARD32 horz_u_period B32;
|
||||
CARD32 horz_v_period B32;
|
||||
CARD32 vert_y_period B32;
|
||||
CARD32 vert_u_period B32;
|
||||
CARD32 vert_v_period B32;
|
||||
CARD8 comp_order[32];
|
||||
CARD8 scanline_order;
|
||||
CARD8 pad7;
|
||||
CARD16 pad8 B16;
|
||||
CARD32 pad9 B32;
|
||||
CARD32 pad10 B32;
|
||||
} xvImageFormatInfo;
|
||||
#define sz_xvImageFormatInfo 128
|
||||
|
||||
|
||||
/* Requests */
|
||||
|
||||
#define xv_QueryExtension 0
|
||||
#define xv_QueryAdaptors 1
|
||||
#define xv_QueryEncodings 2
|
||||
#define xv_GrabPort 3
|
||||
#define xv_UngrabPort 4
|
||||
#define xv_PutVideo 5
|
||||
#define xv_PutStill 6
|
||||
#define xv_GetVideo 7
|
||||
#define xv_GetStill 8
|
||||
#define xv_StopVideo 9
|
||||
#define xv_SelectVideoNotify 10
|
||||
#define xv_SelectPortNotify 11
|
||||
#define xv_QueryBestSize 12
|
||||
#define xv_SetPortAttribute 13
|
||||
#define xv_GetPortAttribute 14
|
||||
#define xv_QueryPortAttributes 15
|
||||
#define xv_ListImageFormats 16
|
||||
#define xv_QueryImageAttributes 17
|
||||
#define xv_PutImage 18
|
||||
#define xv_ShmPutImage 19
|
||||
#define xv_LastRequest xv_ShmPutImage
|
||||
|
||||
#define xvNumRequests (xv_LastRequest + 1)
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvReqType;
|
||||
CARD16 length B16;
|
||||
} xvQueryExtensionReq;
|
||||
#define sz_xvQueryExtensionReq 4
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvReqType;
|
||||
CARD16 length B16;
|
||||
CARD32 window B32;
|
||||
} xvQueryAdaptorsReq;
|
||||
#define sz_xvQueryAdaptorsReq 8
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvReqType;
|
||||
CARD16 length B16;
|
||||
CARD32 port B32;
|
||||
} xvQueryEncodingsReq;
|
||||
#define sz_xvQueryEncodingsReq 8
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvReqType;
|
||||
CARD16 length B16;
|
||||
XvPortID port B32;
|
||||
Drawable drawable B32;
|
||||
GContext gc B32;
|
||||
INT16 vid_x B16;
|
||||
INT16 vid_y B16;
|
||||
CARD16 vid_w B16;
|
||||
CARD16 vid_h B16;
|
||||
INT16 drw_x B16;
|
||||
INT16 drw_y B16;
|
||||
CARD16 drw_w B16;
|
||||
CARD16 drw_h B16;
|
||||
} xvPutVideoReq;
|
||||
#define sz_xvPutVideoReq 32
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvReqType;
|
||||
CARD16 length B16;
|
||||
XvPortID port B32;
|
||||
Drawable drawable B32;
|
||||
GContext gc B32;
|
||||
INT16 vid_x B16;
|
||||
INT16 vid_y B16;
|
||||
CARD16 vid_w B16;
|
||||
CARD16 vid_h B16;
|
||||
INT16 drw_x B16;
|
||||
INT16 drw_y B16;
|
||||
CARD16 drw_w B16;
|
||||
CARD16 drw_h B16;
|
||||
} xvPutStillReq;
|
||||
#define sz_xvPutStillReq 32
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvReqType;
|
||||
CARD16 length B16;
|
||||
XvPortID port B32;
|
||||
Drawable drawable B32;
|
||||
GContext gc B32;
|
||||
INT16 vid_x B16;
|
||||
INT16 vid_y B16;
|
||||
CARD16 vid_w B16;
|
||||
CARD16 vid_h B16;
|
||||
INT16 drw_x B16;
|
||||
INT16 drw_y B16;
|
||||
CARD16 drw_w B16;
|
||||
CARD16 drw_h B16;
|
||||
} xvGetVideoReq;
|
||||
#define sz_xvGetVideoReq 32
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvReqType;
|
||||
CARD16 length B16;
|
||||
XvPortID port B32;
|
||||
Drawable drawable B32;
|
||||
GContext gc B32;
|
||||
INT16 vid_x B16;
|
||||
INT16 vid_y B16;
|
||||
CARD16 vid_w B16;
|
||||
CARD16 vid_h B16;
|
||||
INT16 drw_x B16;
|
||||
INT16 drw_y B16;
|
||||
CARD16 drw_w B16;
|
||||
CARD16 drw_h B16;
|
||||
} xvGetStillReq;
|
||||
#define sz_xvGetStillReq 32
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvReqType;
|
||||
CARD16 length B16;
|
||||
XvPortID port B32;
|
||||
Time time B32;
|
||||
} xvGrabPortReq;
|
||||
#define sz_xvGrabPortReq 12
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvReqType;
|
||||
CARD16 length B16;
|
||||
XvPortID port B32;
|
||||
Time time B32;
|
||||
} xvUngrabPortReq;
|
||||
#define sz_xvUngrabPortReq 12
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvReqType;
|
||||
CARD16 length B16;
|
||||
Drawable drawable B32;
|
||||
BOOL onoff;
|
||||
CARD8 pad1;
|
||||
CARD16 pad2;
|
||||
} xvSelectVideoNotifyReq;
|
||||
#define sz_xvSelectVideoNotifyReq 12
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvReqType;
|
||||
CARD16 length B16;
|
||||
XvPortID port B32;
|
||||
BOOL onoff;
|
||||
CARD8 pad1;
|
||||
CARD16 pad2;
|
||||
} xvSelectPortNotifyReq;
|
||||
#define sz_xvSelectPortNotifyReq 12
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvReqType;
|
||||
CARD16 length B16;
|
||||
XvPortID port B32;
|
||||
Drawable drawable B32;
|
||||
} xvStopVideoReq;
|
||||
#define sz_xvStopVideoReq 12
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvReqType;
|
||||
CARD16 length B16;
|
||||
XvPortID port B32;
|
||||
Atom attribute B32;
|
||||
INT32 value B32;
|
||||
} xvSetPortAttributeReq;
|
||||
#define sz_xvSetPortAttributeReq 16
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvReqType;
|
||||
CARD16 length B16;
|
||||
XvPortID port B32;
|
||||
Atom attribute B32;
|
||||
} xvGetPortAttributeReq;
|
||||
#define sz_xvGetPortAttributeReq 12
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvReqType;
|
||||
CARD16 length B16;
|
||||
XvPortID port B32;
|
||||
CARD16 vid_w B16;
|
||||
CARD16 vid_h B16;
|
||||
CARD16 drw_w B16;
|
||||
CARD16 drw_h B16;
|
||||
CARD8 motion;
|
||||
CARD8 pad1;
|
||||
CARD16 pad2 B16;
|
||||
} xvQueryBestSizeReq;
|
||||
#define sz_xvQueryBestSizeReq 20
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvReqType;
|
||||
CARD16 length B16;
|
||||
XvPortID port B32;
|
||||
} xvQueryPortAttributesReq;
|
||||
#define sz_xvQueryPortAttributesReq 8
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvReqType;
|
||||
CARD16 length B16;
|
||||
XvPortID port B32;
|
||||
Drawable drawable B32;
|
||||
GContext gc B32;
|
||||
CARD32 id B32;
|
||||
INT16 src_x B16;
|
||||
INT16 src_y B16;
|
||||
CARD16 src_w B16;
|
||||
CARD16 src_h B16;
|
||||
INT16 drw_x B16;
|
||||
INT16 drw_y B16;
|
||||
CARD16 drw_w B16;
|
||||
CARD16 drw_h B16;
|
||||
CARD16 width B16;
|
||||
CARD16 height B16;
|
||||
} xvPutImageReq;
|
||||
#define sz_xvPutImageReq 40
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvReqType;
|
||||
CARD16 length B16;
|
||||
XvPortID port B32;
|
||||
Drawable drawable B32;
|
||||
GContext gc B32;
|
||||
ShmSeg shmseg B32;
|
||||
CARD32 id B32;
|
||||
CARD32 offset B32;
|
||||
INT16 src_x B16;
|
||||
INT16 src_y B16;
|
||||
CARD16 src_w B16;
|
||||
CARD16 src_h B16;
|
||||
INT16 drw_x B16;
|
||||
INT16 drw_y B16;
|
||||
CARD16 drw_w B16;
|
||||
CARD16 drw_h B16;
|
||||
CARD16 width B16;
|
||||
CARD16 height B16;
|
||||
CARD8 send_event;
|
||||
CARD8 pad1;
|
||||
CARD16 pad2 B16;
|
||||
} xvShmPutImageReq;
|
||||
#define sz_xvShmPutImageReq 52
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvReqType;
|
||||
CARD16 length B16;
|
||||
XvPortID port B32;
|
||||
} xvListImageFormatsReq;
|
||||
#define sz_xvListImageFormatsReq 8
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 xvReqType;
|
||||
CARD16 length B16;
|
||||
CARD32 port B32;
|
||||
CARD32 id B32;
|
||||
CARD16 width B16;
|
||||
CARD16 height B16;
|
||||
} xvQueryImageAttributesReq;
|
||||
#define sz_xvQueryImageAttributesReq 16
|
||||
|
||||
|
||||
/* Replies */
|
||||
|
||||
typedef struct _QueryExtensionReply {
|
||||
BYTE type; /* X_Reply */
|
||||
CARD8 padb1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD16 version B16;
|
||||
CARD16 revision B16;
|
||||
CARD32 padl4 B32;
|
||||
CARD32 padl5 B32;
|
||||
CARD32 padl6 B32;
|
||||
CARD32 padl7 B32;
|
||||
CARD32 padl8 B32;
|
||||
} xvQueryExtensionReply;
|
||||
#define sz_xvQueryExtensionReply 32
|
||||
|
||||
typedef struct _QueryAdaptorsReply {
|
||||
BYTE type; /* X_Reply */
|
||||
CARD8 padb1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD16 num_adaptors B16;
|
||||
CARD16 pads3 B16;
|
||||
CARD32 padl4 B32;
|
||||
CARD32 padl5 B32;
|
||||
CARD32 padl6 B32;
|
||||
CARD32 padl7 B32;
|
||||
CARD32 padl8 B32;
|
||||
} xvQueryAdaptorsReply;
|
||||
#define sz_xvQueryAdaptorsReply 32
|
||||
|
||||
typedef struct _QueryEncodingsReply {
|
||||
BYTE type; /* X_Reply */
|
||||
CARD8 padb1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD16 num_encodings B16;
|
||||
CARD16 padl3 B16;
|
||||
CARD32 padl4 B32;
|
||||
CARD32 padl5 B32;
|
||||
CARD32 padl6 B32;
|
||||
CARD32 padl7 B32;
|
||||
CARD32 padl8 B32;
|
||||
} xvQueryEncodingsReply;
|
||||
#define sz_xvQueryEncodingsReply 32
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BYTE result;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32; /* 0 */
|
||||
CARD32 padl3 B32;
|
||||
CARD32 padl4 B32;
|
||||
CARD32 padl5 B32;
|
||||
CARD32 padl6 B32;
|
||||
CARD32 padl7 B32;
|
||||
CARD32 padl8 B32;
|
||||
} xvGrabPortReply;
|
||||
#define sz_xvGrabPortReply 32
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BYTE padb1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32; /* 0 */
|
||||
INT32 value B32;
|
||||
CARD32 padl4 B32;
|
||||
CARD32 padl5 B32;
|
||||
CARD32 padl6 B32;
|
||||
CARD32 padl7 B32;
|
||||
CARD32 padl8 B32;
|
||||
} xvGetPortAttributeReply;
|
||||
#define sz_xvGetPortAttributeReply 32
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BYTE padb1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32; /* 0 */
|
||||
CARD16 actual_width B16;
|
||||
CARD16 actual_height B16;
|
||||
CARD32 padl4 B32;
|
||||
CARD32 padl5 B32;
|
||||
CARD32 padl6 B32;
|
||||
CARD32 padl7 B32;
|
||||
CARD32 padl8 B32;
|
||||
} xvQueryBestSizeReply;
|
||||
#define sz_xvQueryBestSizeReply 32
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BYTE padb1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32; /* 0 */
|
||||
CARD32 num_attributes B32;
|
||||
CARD32 text_size B32;
|
||||
CARD32 padl5 B32;
|
||||
CARD32 padl6 B32;
|
||||
CARD32 padl7 B32;
|
||||
CARD32 padl8 B32;
|
||||
} xvQueryPortAttributesReply;
|
||||
#define sz_xvQueryPortAttributesReply 32
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BYTE padb1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 num_formats B32;
|
||||
CARD32 padl4 B32;
|
||||
CARD32 padl5 B32;
|
||||
CARD32 padl6 B32;
|
||||
CARD32 padl7 B32;
|
||||
CARD32 padl8 B32;
|
||||
} xvListImageFormatsReply;
|
||||
#define sz_xvListImageFormatsReply 32
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BYTE padb1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 num_planes B32;
|
||||
CARD32 data_size B32;
|
||||
CARD16 width B16;
|
||||
CARD16 height B16;
|
||||
CARD32 padl6 B32;
|
||||
CARD32 padl7 B32;
|
||||
CARD32 padl8 B32;
|
||||
} xvQueryImageAttributesReply;
|
||||
#define sz_xvQueryImageAttributesReply 32
|
||||
|
||||
/* DEFINE EVENT STRUCTURE */
|
||||
|
||||
typedef struct {
|
||||
union {
|
||||
struct {
|
||||
BYTE type;
|
||||
BYTE detail;
|
||||
CARD16 sequenceNumber B16;
|
||||
} u;
|
||||
struct {
|
||||
BYTE type;
|
||||
BYTE reason;
|
||||
CARD16 sequenceNumber B16;
|
||||
Time time B32;
|
||||
Drawable drawable B32;
|
||||
XvPortID port B32;
|
||||
CARD32 padl5 B32;
|
||||
CARD32 padl6 B32;
|
||||
CARD32 padl7 B32;
|
||||
CARD32 padl8 B32;
|
||||
} videoNotify;
|
||||
struct {
|
||||
BYTE type;
|
||||
BYTE padb1;
|
||||
CARD16 sequenceNumber B16;
|
||||
Time time B32;
|
||||
XvPortID port B32;
|
||||
Atom attribute B32;
|
||||
INT32 value B32;
|
||||
CARD32 padl6 B32;
|
||||
CARD32 padl7 B32;
|
||||
CARD32 padl8 B32;
|
||||
} portNotify;
|
||||
} u;
|
||||
} xvEvent;
|
||||
|
||||
#undef XvPortID
|
||||
#undef XvEncodingID
|
||||
#undef ShmSeg
|
||||
#undef VisualID
|
||||
#undef Drawable
|
||||
#undef GContext
|
||||
#undef Time
|
||||
#undef Atom
|
||||
|
||||
#endif /* XVPROTO_H */
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
Copyright 1996, 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.
|
||||
*/
|
||||
|
||||
#ifndef _AG_H_
|
||||
#define _AG_H_
|
||||
|
||||
#define XAGNAME "XC-APPGROUP"
|
||||
|
||||
#define XAG_MAJOR_VERSION 1 /* current version numbers */
|
||||
#define XAG_MINOR_VERSION 0
|
||||
|
||||
#define XagWindowTypeX11 0
|
||||
#define XagWindowTypeMacintosh 1
|
||||
#define XagWindowTypeWin32 2
|
||||
#define XagWindowTypeWin16 3
|
||||
|
||||
#define XagBadAppGroup 0
|
||||
#define XagNumberErrors (XagBadAppGroup + 1)
|
||||
|
||||
#define XagNsingleScreen 7
|
||||
#define XagNdefaultRoot 1
|
||||
#define XagNrootVisual 2
|
||||
#define XagNdefaultColormap 3
|
||||
#define XagNblackPixel 4
|
||||
#define XagNwhitePixel 5
|
||||
#define XagNappGroupLeader 6
|
||||
|
||||
#endif /* _AG_H_ */
|
||||
|
|
@ -0,0 +1,178 @@
|
|||
/*
|
||||
Copyright 1996, 1998, 2001 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.
|
||||
*/
|
||||
|
||||
#ifndef _AGPROTO_H_ /* { */
|
||||
#define _AGPROTO_H_
|
||||
|
||||
#include <X11/extensions/ag.h>
|
||||
|
||||
#define X_XagQueryVersion 0
|
||||
#define X_XagCreate 1
|
||||
#define X_XagDestroy 2
|
||||
#define X_XagGetAttr 3
|
||||
#define X_XagQuery 4
|
||||
#define X_XagCreateAssoc 5
|
||||
#define X_XagDestroyAssoc 6
|
||||
|
||||
#define XAppGroup CARD32
|
||||
|
||||
/*
|
||||
* Redefine some basic types used by structures defined herein. This allows
|
||||
* both the library and server to view communicated data as 32-bit entities,
|
||||
* thus preventing problems on 64-bit architectures where libXext sees this
|
||||
* data as 64 bits and the server sees it as 32 bits.
|
||||
*/
|
||||
|
||||
#define Colormap CARD32
|
||||
#define VisualID CARD32
|
||||
#define Window CARD32
|
||||
|
||||
typedef struct _XagQueryVersion {
|
||||
CARD8 reqType; /* always XagReqCode */
|
||||
CARD8 xagReqType; /* always X_XagQueryVersion */
|
||||
CARD16 length B16;
|
||||
CARD16 client_major_version B16;
|
||||
CARD16 client_minor_version B16;
|
||||
} xXagQueryVersionReq;
|
||||
#define sz_xXagQueryVersionReq 8
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BOOL pad1;
|
||||
CARD16 sequence_number B16;
|
||||
CARD32 length B32;
|
||||
CARD16 server_major_version B16;
|
||||
CARD16 server_minor_version B16;
|
||||
CARD32 pad2 B32;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
} xXagQueryVersionReply;
|
||||
#define sz_xXagQueryVersionReply 32
|
||||
|
||||
/* Set AppGroup Attributes masks */
|
||||
#define XagSingleScreenMask 1 << 0
|
||||
#define XagDefaultRootMask 1 << XagNdefaultRoot
|
||||
#define XagRootVisualMask 1 << XagNrootVisual
|
||||
#define XagDefaultColormapMask 1 << XagNdefaultColormap
|
||||
#define XagBlackPixelMask 1 << XagNblackPixel
|
||||
#define XagWhitePixelMask 1 << XagNwhitePixel
|
||||
#define XagAppGroupLeaderMask 1 << XagNappGroupLeader
|
||||
|
||||
typedef struct _XagCreate {
|
||||
CARD8 reqType; /* always XagReqCode */
|
||||
CARD8 xagReqType; /* always X_XagCreate */
|
||||
CARD16 length B16;
|
||||
XAppGroup app_group B32;
|
||||
CARD32 attrib_mask B32; /* LISTofVALUE follows */
|
||||
} xXagCreateReq;
|
||||
#define sz_xXagCreateReq 12
|
||||
|
||||
typedef struct _XagDestroy {
|
||||
CARD8 reqType; /* always XagReqCode */
|
||||
CARD8 xagReqType; /* always X_XagDestroy */
|
||||
CARD16 length B16;
|
||||
XAppGroup app_group B32;
|
||||
} xXagDestroyReq;
|
||||
#define sz_xXagDestroyReq 8
|
||||
|
||||
typedef struct _XagGetAttr {
|
||||
CARD8 reqType; /* always XagReqCode */
|
||||
CARD8 xagReqType; /* always X_XagGetAttr */
|
||||
CARD16 length B16;
|
||||
XAppGroup app_group B32;
|
||||
} xXagGetAttrReq;
|
||||
#define sz_xXagGetAttrReq 8
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BOOL pad1;
|
||||
CARD16 sequence_number B16;
|
||||
CARD32 length B32;
|
||||
Window default_root B32;
|
||||
VisualID root_visual B32;
|
||||
Colormap default_colormap B32;
|
||||
CARD32 black_pixel B32;
|
||||
CARD32 white_pixel B32;
|
||||
BOOL single_screen;
|
||||
BOOL app_group_leader;
|
||||
CARD16 pad2 B16;
|
||||
} xXagGetAttrReply;
|
||||
#define sz_xXagGetAttrReply 32
|
||||
|
||||
typedef struct _XagQuery {
|
||||
CARD8 reqType; /* always XagReqCode */
|
||||
CARD8 xagReqType; /* always X_XagQuery */
|
||||
CARD16 length B16;
|
||||
CARD32 resource B32;
|
||||
} xXagQueryReq;
|
||||
#define sz_xXagQueryReq 8
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BOOL pad1;
|
||||
CARD16 sequence_number B16;
|
||||
CARD32 length B32;
|
||||
XAppGroup app_group B32;
|
||||
CARD32 pad2 B32;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
} xXagQueryReply;
|
||||
#define sz_xXagQueryReply 32
|
||||
|
||||
typedef struct _XagCreateAssoc {
|
||||
CARD8 reqType; /* always XagReqCode */
|
||||
CARD8 xagReqType; /* always X_XagCreateAssoc */
|
||||
CARD16 length B16;
|
||||
Window window B32;
|
||||
CARD16 window_type B16;
|
||||
CARD16 system_window_len B16; /* LISTofCARD8 follows */
|
||||
} xXagCreateAssocReq;
|
||||
#define sz_xXagCreateAssocReq 12
|
||||
|
||||
typedef struct _XagDestroyAssoc {
|
||||
CARD8 reqType; /* always XagReqCode */
|
||||
CARD8 xagReqType; /* always X_XagDestroyAssoc */
|
||||
CARD16 length B16;
|
||||
Window window B32;
|
||||
} xXagDestroyAssocReq;
|
||||
#define sz_xXagDestroyAssocReq 8
|
||||
|
||||
#undef XAppGroup
|
||||
/*
|
||||
* Cancel the previous redefinition of the basic types, thus restoring their
|
||||
* X.h definitions.
|
||||
*/
|
||||
|
||||
#undef Window
|
||||
#undef Colormap
|
||||
#undef VisualID
|
||||
|
||||
#endif /* } _AGPROTO_H_ */
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
/**************************************************************************
|
||||
|
||||
Copyright (c) 2002 Apple Computer, Inc.
|
||||
All Rights Reserved.
|
||||
|
||||
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, sub license, 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 (including the
|
||||
next paragraph) 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 NON-INFRINGEMENT.
|
||||
IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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 _APPLEWMCONST_H_
|
||||
#define _APPLEWMCONST_H_
|
||||
|
||||
/* Events */
|
||||
#define AppleWMControllerNotify 0
|
||||
#define AppleWMActivationNotify 1
|
||||
#define AppleWMPasteboardNotify 2
|
||||
#define AppleWMNumberEvents 3
|
||||
|
||||
#define AppleWMControllerNotifyMask (1L << 0)
|
||||
#define AppleWMActivationNotifyMask (1L << 1)
|
||||
#define AppleWMPasteboardNotifyMask (1L << 2)
|
||||
|
||||
/* "Kinds" of ControllerNotify events */
|
||||
#define AppleWMMinimizeWindow 0
|
||||
#define AppleWMZoomWindow 1
|
||||
#define AppleWMCloseWindow 2
|
||||
#define AppleWMBringAllToFront 3
|
||||
#define AppleWMHideWindow 4
|
||||
#define AppleWMHideAll 5
|
||||
#define AppleWMShowAll 6
|
||||
#define AppleWMWindowMenuItem 9
|
||||
#define AppleWMWindowMenuNotify 10
|
||||
#define AppleWMNextWindow 11
|
||||
#define AppleWMPreviousWindow 12
|
||||
|
||||
/* "Kinds" of ActivationNotify events */
|
||||
#define AppleWMIsActive 0
|
||||
#define AppleWMIsInactive 1
|
||||
#define AppleWMReloadPreferences 2
|
||||
|
||||
/* "Kinds" of PasteboardNotify events */
|
||||
#define AppleWMCopyToPasteboard 0
|
||||
|
||||
/* Errors */
|
||||
#define AppleWMClientNotLocal 0
|
||||
#define AppleWMOperationNotSupported 1
|
||||
#define AppleWMNumberErrors (AppleWMOperationNotSupported + 1)
|
||||
|
||||
/* Window level ids */
|
||||
#define AppleWMWindowLevelNormal 0
|
||||
#define AppleWMWindowLevelFloating 1
|
||||
#define AppleWMWindowLevelTornOff 2
|
||||
#define AppleWMWindowLevelDock 3
|
||||
#define AppleWMWindowLevelDesktop 4
|
||||
#define AppleWMNumWindowLevels 5
|
||||
|
||||
/* Possible value for frame_rect argument to XAppleWMFrameGetRect() */
|
||||
/* Use xp_frame_rect_enum from <Xplugin.h> */
|
||||
|
||||
/* Window frame classes */
|
||||
/* Use xp_frame_class_enum from <Xplugin.h> */
|
||||
|
||||
/* Window frame attributes */
|
||||
/* Use xp_frame_attr_enum from <Xplugin.h> */
|
||||
|
||||
#endif /* _APPLEWMCONST_H_ */
|
|
@ -0,0 +1,293 @@
|
|||
/**************************************************************************
|
||||
|
||||
Copyright (c) 2002 Apple Computer, Inc.
|
||||
All Rights Reserved.
|
||||
|
||||
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, sub license, 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 (including the
|
||||
next paragraph) 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 NON-INFRINGEMENT.
|
||||
IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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 _APPLEWMPROTO_H_
|
||||
#define _APPLEWMPROTO_H_
|
||||
|
||||
#include <X11/extensions/applewmconst.h>
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xmd.h>
|
||||
|
||||
#define APPLEWMNAME "Apple-WM"
|
||||
|
||||
#define APPLE_WM_MAJOR_VERSION 1 /* current version numbers */
|
||||
#define APPLE_WM_MINOR_VERSION 3
|
||||
#define APPLE_WM_PATCH_VERSION 0
|
||||
|
||||
#define X_AppleWMQueryVersion 0
|
||||
#define X_AppleWMFrameGetRect 1
|
||||
#define X_AppleWMFrameHitTest 2
|
||||
#define X_AppleWMFrameDraw 3
|
||||
#define X_AppleWMDisableUpdate 4
|
||||
#define X_AppleWMReenableUpdate 5
|
||||
#define X_AppleWMSelectInput 6
|
||||
#define X_AppleWMSetWindowMenuCheck 7
|
||||
#define X_AppleWMSetFrontProcess 8
|
||||
#define X_AppleWMSetWindowLevel 9
|
||||
#define X_AppleWMSetCanQuit 10
|
||||
#define X_AppleWMSetWindowMenu 11
|
||||
#define X_AppleWMSendPSN 12
|
||||
#define X_AppleWMAttachTransient 13
|
||||
|
||||
/* For the purpose of the structure definitions in this file,
|
||||
we must redefine the following types in terms of Xmd.h's types, which may
|
||||
include bit fields. All of these are #undef'd at the end of this file,
|
||||
restoring the definitions in X.h. */
|
||||
|
||||
#define Window CARD32
|
||||
#define Drawable CARD32
|
||||
#define Font CARD32
|
||||
#define Pixmap CARD32
|
||||
#define Cursor CARD32
|
||||
#define Colormap CARD32
|
||||
#define GContext CARD32
|
||||
#define Atom CARD32
|
||||
#define VisualID CARD32
|
||||
#define Time CARD32
|
||||
#define KeyCode CARD8
|
||||
#define KeySym CARD32
|
||||
|
||||
typedef struct _AppleWMQueryVersion {
|
||||
CARD8 reqType; /* always WMReqCode */
|
||||
CARD8 wmReqType; /* always X_AppleWMQueryVersion */
|
||||
CARD16 length B16;
|
||||
} xAppleWMQueryVersionReq;
|
||||
#define sz_xAppleWMQueryVersionReq 4
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BOOL pad1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD16 majorVersion B16; /* major version of WM protocol */
|
||||
CARD16 minorVersion B16; /* minor version of WM protocol */
|
||||
CARD32 patchVersion B32; /* patch version of WM protocol */
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
} xAppleWMQueryVersionReply;
|
||||
#define sz_xAppleWMQueryVersionReply 32
|
||||
|
||||
typedef struct _AppleWMDisableUpdate {
|
||||
CARD8 reqType; /* always WMReqCode */
|
||||
CARD8 wmReqType; /* always X_AppleWMDisableUpdate */
|
||||
CARD16 length B16;
|
||||
CARD32 screen B32;
|
||||
} xAppleWMDisableUpdateReq;
|
||||
#define sz_xAppleWMDisableUpdateReq 8
|
||||
|
||||
typedef struct _AppleWMReenableUpdate {
|
||||
CARD8 reqType; /* always WMReqCode */
|
||||
CARD8 wmReqType; /* always X_AppleWMReenableUpdate */
|
||||
CARD16 length B16;
|
||||
CARD32 screen B32;
|
||||
} xAppleWMReenableUpdateReq;
|
||||
#define sz_xAppleWMReenableUpdateReq 8
|
||||
|
||||
typedef struct _AppleWMSelectInput {
|
||||
CARD8 reqType; /* always WMReqCode */
|
||||
CARD8 wmReqType; /* always X_AppleWMSelectInput */
|
||||
CARD16 length B16;
|
||||
CARD32 mask B32;
|
||||
} xAppleWMSelectInputReq;
|
||||
#define sz_xAppleWMSelectInputReq 8
|
||||
|
||||
typedef struct _AppleWMNotify {
|
||||
BYTE type; /* always eventBase + event type */
|
||||
BYTE kind;
|
||||
CARD16 sequenceNumber B16;
|
||||
Time time B32; /* time of change */
|
||||
CARD16 pad1 B16;
|
||||
CARD32 arg B32;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
} xAppleWMNotifyEvent;
|
||||
#define sz_xAppleWMNotifyEvent 32
|
||||
|
||||
typedef struct _AppleWMSetWindowMenu {
|
||||
CARD8 reqType; /* always WMReqCode */
|
||||
CARD8 wmReqType; /* always X_AppleWMSetWindowMenu */
|
||||
CARD16 length B16;
|
||||
CARD16 nitems B16;
|
||||
CARD16 pad1 B16;
|
||||
} xAppleWMSetWindowMenuReq;
|
||||
#define sz_xAppleWMSetWindowMenuReq 8
|
||||
|
||||
typedef struct _AppleWMSetWindowMenuCheck {
|
||||
CARD8 reqType; /* always WMReqCode */
|
||||
CARD8 wmReqType; /* always X_AppleWMSetWindowMenuCheck */
|
||||
CARD16 length B16;
|
||||
CARD32 index;
|
||||
} xAppleWMSetWindowMenuCheckReq;
|
||||
#define sz_xAppleWMSetWindowMenuCheckReq 8
|
||||
|
||||
typedef struct _AppleWMSetFrontProcess {
|
||||
CARD8 reqType; /* always WMReqCode */
|
||||
CARD8 wmReqType; /* always X_AppleWMSetFrontProcess */
|
||||
CARD16 length B16;
|
||||
} xAppleWMSetFrontProcessReq;
|
||||
#define sz_xAppleWMSetFrontProcessReq 4
|
||||
|
||||
typedef struct _AppleWMSetWindowLevel {
|
||||
CARD8 reqType; /* always WMReqCode */
|
||||
CARD8 wmReqType; /* always X_AppleWMSetWindowLevel */
|
||||
CARD16 length B16;
|
||||
CARD32 window;
|
||||
CARD32 level;
|
||||
} xAppleWMSetWindowLevelReq;
|
||||
#define sz_xAppleWMSetWindowLevelReq 12
|
||||
|
||||
typedef struct _AppleWMSendPSN {
|
||||
CARD8 reqType; /* always WMReqCode */
|
||||
CARD8 wmReqType; /* always X_AppleWMSendPSN */
|
||||
CARD16 length B16;
|
||||
CARD32 psn_hi;
|
||||
CARD32 psn_lo;
|
||||
} xAppleWMSendPSNReq;
|
||||
#define sz_xAppleWMSendPSNReq 12
|
||||
|
||||
typedef struct _AppleWMAttachTransient {
|
||||
CARD8 reqType; /* always WMReqCode */
|
||||
CARD8 wmReqType; /* always X_AppleWMAttachTransient */
|
||||
CARD16 length B16;
|
||||
CARD32 child;
|
||||
CARD32 parent;
|
||||
} xAppleWMAttachTransientReq;
|
||||
#define sz_xAppleWMAttachTransientReq 12
|
||||
|
||||
typedef struct _AppleWMSetCanQuit {
|
||||
CARD8 reqType; /* always WMReqCode */
|
||||
CARD8 wmReqType; /* always X_AppleWMSetCanQuit */
|
||||
CARD16 length B16;
|
||||
CARD32 state;
|
||||
} xAppleWMSetCanQuitReq;
|
||||
#define sz_xAppleWMSetCanQuitReq 8
|
||||
|
||||
typedef struct _AppleWMFrameGetRect {
|
||||
CARD8 reqType; /* always WMReqCode */
|
||||
CARD8 wmReqType; /* always X_AppleWMFrameGetRect */
|
||||
CARD16 length B16;
|
||||
CARD16 frame_class B16;
|
||||
CARD16 frame_rect B16;
|
||||
CARD16 ix B16;
|
||||
CARD16 iy B16;
|
||||
CARD16 iw B16;
|
||||
CARD16 ih B16;
|
||||
CARD16 ox B16;
|
||||
CARD16 oy B16;
|
||||
CARD16 ow B16;
|
||||
CARD16 oh B16;
|
||||
} xAppleWMFrameGetRectReq;
|
||||
#define sz_xAppleWMFrameGetRectReq 24
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BOOL pad1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD16 x B16;
|
||||
CARD16 y B16;
|
||||
CARD16 w B16;
|
||||
CARD16 h B16;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
} xAppleWMFrameGetRectReply;
|
||||
#define sz_xAppleWMFrameGetRectReply 32
|
||||
|
||||
typedef struct _AppleWMFrameHitTest {
|
||||
CARD8 reqType; /* always WMReqCode */
|
||||
CARD8 wmReqType; /* always X_AppleWMFrameHitTest */
|
||||
CARD16 length B16;
|
||||
CARD16 frame_class B16;
|
||||
CARD16 pad1 B16;
|
||||
CARD16 px B16;
|
||||
CARD16 py B16;
|
||||
CARD16 ix B16;
|
||||
CARD16 iy B16;
|
||||
CARD16 iw B16;
|
||||
CARD16 ih B16;
|
||||
CARD16 ox B16;
|
||||
CARD16 oy B16;
|
||||
CARD16 ow B16;
|
||||
CARD16 oh B16;
|
||||
} xAppleWMFrameHitTestReq;
|
||||
#define sz_xAppleWMFrameHitTestReq 28
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BOOL pad1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 ret B32;
|
||||
CARD32 pad2 B32;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
} xAppleWMFrameHitTestReply;
|
||||
#define sz_xAppleWMFrameHitTestReply 32
|
||||
|
||||
typedef struct _AppleWMFrameDraw {
|
||||
CARD8 reqType; /* always WMReqCode */
|
||||
CARD8 wmReqType; /* always X_AppleWMFrameDraw */
|
||||
CARD16 length B16;
|
||||
CARD32 screen B32;
|
||||
CARD32 window B32;
|
||||
CARD16 frame_class B16;
|
||||
CARD16 frame_attr B16;
|
||||
CARD16 ix B16;
|
||||
CARD16 iy B16;
|
||||
CARD16 iw B16;
|
||||
CARD16 ih B16;
|
||||
CARD16 ox B16;
|
||||
CARD16 oy B16;
|
||||
CARD16 ow B16;
|
||||
CARD16 oh B16;
|
||||
CARD32 title_length B32;
|
||||
} xAppleWMFrameDrawReq;
|
||||
#define sz_xAppleWMFrameDrawReq 36
|
||||
|
||||
/* restore these definitions back to the typedefs in X.h */
|
||||
#undef Window
|
||||
#undef Drawable
|
||||
#undef Font
|
||||
#undef Pixmap
|
||||
#undef Cursor
|
||||
#undef Colormap
|
||||
#undef GContext
|
||||
#undef Atom
|
||||
#undef VisualID
|
||||
#undef Time
|
||||
#undef KeyCode
|
||||
#undef KeySym
|
||||
|
||||
#endif /* _APPLEWMPROTO_H_ */
|
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
|
||||
Copyright 1992, 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.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _BIGREQSPROTO_H_
|
||||
#define _BIGREQSPROTO_H_
|
||||
|
||||
#define X_BigReqEnable 0
|
||||
|
||||
#define XBigReqNumberEvents 0
|
||||
|
||||
#define XBigReqNumberErrors 0
|
||||
|
||||
#define XBigReqExtensionName "BIG-REQUESTS"
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType; /* always XBigReqCode */
|
||||
CARD8 brReqType; /* always X_BigReqEnable */
|
||||
CARD16 length B16;
|
||||
} xBigReqEnableReq;
|
||||
#define sz_xBigReqEnableReq 4
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
CARD8 pad0;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 max_request_size B32;
|
||||
CARD32 pad1 B32;
|
||||
CARD32 pad2 B32;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
} xBigReqEnableReply;
|
||||
#define sz_xBigReqEnableReply 32
|
||||
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 data;
|
||||
CARD16 zero B16;
|
||||
CARD32 length B32;
|
||||
} xBigReq;
|
||||
|
||||
#endif /* _BIGREQSPROTO_H_ */
|
|
@ -0,0 +1,3 @@
|
|||
#warning "bigreqstr.h is obsolete and may be removed in the future."
|
||||
#warning "include <X11/extensions/bigreqsproto.h> for the protocol defines."
|
||||
#include <X11/extensions/bigreqsproto.h>
|
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* 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 (including the next
|
||||
* paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
|
||||
*/
|
||||
/*
|
||||
* Copyright © 2003 Keith Packard
|
||||
*
|
||||
* 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, and that the name of Keith Packard not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. Keith Packard makes no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL KEITH PACKARD 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.
|
||||
*/
|
||||
|
||||
#ifndef _COMPOSITE_H_
|
||||
#define _COMPOSITE_H_
|
||||
|
||||
#include <X11/extensions/xfixeswire.h>
|
||||
|
||||
#define COMPOSITE_NAME "Composite"
|
||||
#define COMPOSITE_MAJOR 0
|
||||
#define COMPOSITE_MINOR 4
|
||||
|
||||
#define CompositeRedirectAutomatic 0
|
||||
#define CompositeRedirectManual 1
|
||||
|
||||
#define X_CompositeQueryVersion 0
|
||||
#define X_CompositeRedirectWindow 1
|
||||
#define X_CompositeRedirectSubwindows 2
|
||||
#define X_CompositeUnredirectWindow 3
|
||||
#define X_CompositeUnredirectSubwindows 4
|
||||
#define X_CompositeCreateRegionFromBorderClip 5
|
||||
#define X_CompositeNameWindowPixmap 6
|
||||
#define X_CompositeGetOverlayWindow 7
|
||||
#define X_CompositeReleaseOverlayWindow 8
|
||||
|
||||
#define CompositeNumberRequests (X_CompositeReleaseOverlayWindow + 1)
|
||||
|
||||
#define CompositeNumberEvents 0
|
||||
|
||||
#endif /* _COMPOSITE_H_ */
|
|
@ -0,0 +1,192 @@
|
|||
/*
|
||||
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* 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 (including the next
|
||||
* paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
|
||||
*/
|
||||
/*
|
||||
* Copyright © 2003 Keith Packard
|
||||
*
|
||||
* 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, and that the name of Keith Packard not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. Keith Packard makes no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL KEITH PACKARD 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.
|
||||
*/
|
||||
|
||||
#ifndef _COMPOSITEPROTO_H_
|
||||
#define _COMPOSITEPROTO_H_
|
||||
|
||||
#include <X11/Xmd.h>
|
||||
#include <X11/extensions/composite.h>
|
||||
|
||||
#define Window CARD32
|
||||
#define Region CARD32
|
||||
#define Pixmap CARD32
|
||||
|
||||
/*
|
||||
* requests and replies
|
||||
*/
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 compositeReqType;
|
||||
CARD16 length B16;
|
||||
CARD32 majorVersion B32;
|
||||
CARD32 minorVersion B32;
|
||||
} xCompositeQueryVersionReq;
|
||||
|
||||
#define sz_xCompositeQueryVersionReq 12
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BYTE pad1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 majorVersion B32;
|
||||
CARD32 minorVersion B32;
|
||||
CARD32 pad2 B32;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
} xCompositeQueryVersionReply;
|
||||
|
||||
#define sz_xCompositeQueryVersionReply 32
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 compositeReqType;
|
||||
CARD16 length B16;
|
||||
Window window B32;
|
||||
CARD8 update;
|
||||
CARD8 pad1;
|
||||
CARD16 pad2 B16;
|
||||
} xCompositeRedirectWindowReq;
|
||||
|
||||
#define sz_xCompositeRedirectWindowReq 12
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 compositeReqType;
|
||||
CARD16 length B16;
|
||||
Window window B32;
|
||||
CARD8 update;
|
||||
CARD8 pad1;
|
||||
CARD16 pad2 B16;
|
||||
} xCompositeRedirectSubwindowsReq;
|
||||
|
||||
#define sz_xCompositeRedirectSubwindowsReq 12
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 compositeReqType;
|
||||
CARD16 length B16;
|
||||
Window window B32;
|
||||
CARD8 update;
|
||||
CARD8 pad1;
|
||||
CARD16 pad2 B16;
|
||||
} xCompositeUnredirectWindowReq;
|
||||
|
||||
#define sz_xCompositeUnredirectWindowReq 12
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 compositeReqType;
|
||||
CARD16 length B16;
|
||||
Window window B32;
|
||||
CARD8 update;
|
||||
CARD8 pad1;
|
||||
CARD16 pad2 B16;
|
||||
} xCompositeUnredirectSubwindowsReq;
|
||||
|
||||
#define sz_xCompositeUnredirectSubwindowsReq 12
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 compositeReqType;
|
||||
CARD16 length B16;
|
||||
Region region B32;
|
||||
Window window B32;
|
||||
} xCompositeCreateRegionFromBorderClipReq;
|
||||
|
||||
#define sz_xCompositeCreateRegionFromBorderClipReq 12
|
||||
|
||||
/* Version 0.2 additions */
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 compositeReqType;
|
||||
CARD16 length;
|
||||
Window window B32;
|
||||
Pixmap pixmap B32;
|
||||
} xCompositeNameWindowPixmapReq;
|
||||
|
||||
#define sz_xCompositeNameWindowPixmapReq 12
|
||||
|
||||
/* Version 0.3 additions */
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 compositeReqType;
|
||||
CARD16 length B16;
|
||||
Window window B32;
|
||||
} xCompositeGetOverlayWindowReq;
|
||||
|
||||
#define sz_xCompositeGetOverlayWindowReq sizeof(xCompositeGetOverlayWindowReq)
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BYTE pad1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
Window overlayWin B32;
|
||||
CARD32 pad2 B32;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
} xCompositeGetOverlayWindowReply;
|
||||
|
||||
#define sz_xCompositeGetOverlayWindowReply sizeof(xCompositeGetOverlayWindowReply)
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 compositeReqType;
|
||||
CARD16 length B16;
|
||||
Window window B32;
|
||||
} xCompositeReleaseOverlayWindowReq;
|
||||
|
||||
#define sz_xCompositeReleaseOverlayWindowReq sizeof(xCompositeReleaseOverlayWindowReq)
|
||||
|
||||
#undef Window
|
||||
#undef Region
|
||||
#undef Pixmap
|
||||
|
||||
#endif /* _COMPOSITEPROTO_H_ */
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
|
||||
Copyright 1987, 1988, 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.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _CUP_H_
|
||||
#define _CUP_H_
|
||||
|
||||
#define XCUPNAME "TOG-CUP"
|
||||
|
||||
#define XCUP_MAJOR_VERSION 1 /* current version numbers */
|
||||
#define XCUP_MINOR_VERSION 0
|
||||
|
||||
#define XcupNumberErrors 0
|
||||
|
||||
#endif /* _CUP_H_ */
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
/*
|
||||
|
||||
Copyright 1987, 1988, 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.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _XCUPPROTO_H_ /* { */
|
||||
#define _XCUPPROTO_H_
|
||||
|
||||
#include <X11/extensions/cup.h>
|
||||
|
||||
#define X_XcupQueryVersion 0
|
||||
#define X_XcupGetReservedColormapEntries 1
|
||||
#define X_XcupStoreColors 2
|
||||
|
||||
typedef struct _XcupQueryVersion {
|
||||
CARD8 reqType; /* always XcupReqCode */
|
||||
CARD8 xcupReqType; /* always X_XcupQueryVersion */
|
||||
CARD16 length B16;
|
||||
CARD16 client_major_version B16;
|
||||
CARD16 client_minor_version B16;
|
||||
} xXcupQueryVersionReq;
|
||||
#define sz_xXcupQueryVersionReq 8
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BOOL pad1;
|
||||
CARD16 sequence_number B16;
|
||||
CARD32 length B32;
|
||||
CARD16 server_major_version B16;
|
||||
CARD16 server_minor_version B16;
|
||||
CARD32 pad2 B32;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
} xXcupQueryVersionReply;
|
||||
#define sz_xXcupQueryVersionReply 32
|
||||
|
||||
typedef struct _XcupGetReservedColormapEntries {
|
||||
CARD8 reqType; /* always XcupReqCode */
|
||||
CARD8 xcupReqType; /* always X_XcupGetReservedColormapEntries */
|
||||
CARD16 length B16;
|
||||
CARD32 screen B32;
|
||||
} xXcupGetReservedColormapEntriesReq;
|
||||
#define sz_xXcupGetReservedColormapEntriesReq 8
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BOOL pad1;
|
||||
CARD16 sequence_number B16;
|
||||
CARD32 length B32;
|
||||
CARD32 pad2 B32;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
CARD32 pad7 B32;
|
||||
} xXcupGetReservedColormapEntriesReply;
|
||||
#define sz_xXcupGetReservedColormapEntriesReply 32
|
||||
|
||||
typedef struct _XcupStoreColors {
|
||||
CARD8 reqType; /* always XcupReqCode */
|
||||
CARD8 xcupReqType; /* always X_XcupStoreColors */
|
||||
CARD16 length B16;
|
||||
CARD32 cmap B32;
|
||||
} xXcupStoreColorsReq;
|
||||
#define sz_xXcupStoreColorsReq 8
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BOOL pad1;
|
||||
CARD16 sequence_number B16;
|
||||
CARD32 length B32;
|
||||
CARD32 pad2 B32;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
CARD32 pad7 B32;
|
||||
} xXcupStoreColorsReply;
|
||||
#define sz_xXcupStoreColorsReply 32
|
||||
|
||||
#endif /* } _XCUPPROTO_H_ */
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue