mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-13 21:30:09 +00:00
premake4 build: allow to dynamically load X11 if X11 system headers/library is missing
premake4 build: allow to dynamically load OpenGL/GLEW/glx if system headers are missing
This commit is contained in:
parent
670576ec72
commit
bf1bd07636
@ -182,7 +182,63 @@ void DemoApplication::toggleIdle() {
|
||||
}
|
||||
}
|
||||
|
||||
void bCreateDiagonalMatrix(GLfloat value, GLfloat result[4][4])
|
||||
{
|
||||
for (int i=0;i<4;i++)
|
||||
{
|
||||
for (int j=0;j<4;j++)
|
||||
{
|
||||
if (i==j)
|
||||
{
|
||||
result[i][j] = value;
|
||||
} else
|
||||
{
|
||||
result[i][j] = 0.f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void bCreateOrtho(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar, GLfloat result[4][4])
|
||||
{
|
||||
bCreateDiagonalMatrix(1.f,result);
|
||||
|
||||
result[0][0] = 2.f / (right - left);
|
||||
result[1][1] = 2.f / (top - bottom);
|
||||
result[2][2] = - 2.f / (zFar - zNear);
|
||||
result[3][0] = - (right + left) / (right - left);
|
||||
result[3][1] = - (top + bottom) / (top - bottom);
|
||||
result[3][2] = - (zFar + zNear) / (zFar - zNear);
|
||||
}
|
||||
|
||||
void bCreateLookAt(const btVector3& eye, const btVector3& center,const btVector3& up, GLfloat result[16])
|
||||
{
|
||||
btVector3 f = (center - eye).normalized();
|
||||
btVector3 u = up.normalized();
|
||||
btVector3 s = (f.cross(u)).normalized();
|
||||
u = s.cross(f);
|
||||
|
||||
result[0*4+0] = s.x();
|
||||
result[1*4+0] = s.y();
|
||||
result[2*4+0] = s.z();
|
||||
|
||||
result[0*4+1] = u.x();
|
||||
result[1*4+1] = u.y();
|
||||
result[2*4+1] = u.z();
|
||||
|
||||
result[0*4+2] =-f.x();
|
||||
result[1*4+2] =-f.y();
|
||||
result[2*4+2] =-f.z();
|
||||
|
||||
result[0*4+3] = 0.f;
|
||||
result[1*4+3] = 0.f;
|
||||
result[2*4+3] = 0.f;
|
||||
|
||||
result[3*4+0] = -s.dot(eye);
|
||||
result[3*4+1] = -u.dot(eye);
|
||||
result[3*4+2] = f.dot(eye);
|
||||
result[3*4+3] = 1.f;
|
||||
}
|
||||
|
||||
|
||||
void DemoApplication::updateCamera() {
|
||||
@ -246,9 +302,9 @@ void DemoApplication::updateCamera() {
|
||||
glFrustum (-aspect * m_frustumZNear, aspect * m_frustumZNear, -m_frustumZNear, m_frustumZNear, m_frustumZNear, m_frustumZFar);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
gluLookAt(m_cameraPosition[0], m_cameraPosition[1], m_cameraPosition[2],
|
||||
m_cameraTargetPosition[0], m_cameraTargetPosition[1], m_cameraTargetPosition[2],
|
||||
m_cameraUp.getX(),m_cameraUp.getY(),m_cameraUp.getZ());
|
||||
GLfloat resultMat[16];
|
||||
bCreateLookAt(m_cameraPosition,m_cameraTargetPosition, m_cameraUp, resultMat);
|
||||
glMultMatrixf(resultMat);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1054,7 +1110,7 @@ void DemoApplication::setOrthographicProjection()
|
||||
// reset matrix
|
||||
glLoadIdentity();
|
||||
// set a 2D orthographic projection
|
||||
gluOrtho2D(0, m_glutScreenWidth, 0, m_glutScreenHeight);
|
||||
glOrtho(0, m_glutScreenWidth, 0, m_glutScreenHeight,-1000,1000);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
|
||||
|
@ -14,8 +14,10 @@ subject to the following restrictions:
|
||||
*/
|
||||
|
||||
#include "GLDebugFont.h"
|
||||
#include "OpenGLWindow/OpenGLInclude.h"
|
||||
|
||||
|
||||
#ifdef DONT_USE_GLUT
|
||||
#else
|
||||
#ifdef _WIN32//for glut.h
|
||||
#include <windows.h>
|
||||
#endif
|
||||
@ -44,7 +46,7 @@ subject to the following restrictions:
|
||||
#include <GL/glu.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <string.h> //for memset
|
||||
|
||||
|
@ -299,51 +299,6 @@ void GL_ShapeDrawer::drawSphere(btScalar radius, int lats, int longs)
|
||||
}
|
||||
}
|
||||
|
||||
void GL_ShapeDrawer::drawCylinder(float radius,float halfHeight, int upAxis)
|
||||
{
|
||||
|
||||
|
||||
glPushMatrix();
|
||||
switch (upAxis)
|
||||
{
|
||||
case 0:
|
||||
glRotatef(-90.0, 0.0, 1.0, 0.0);
|
||||
glTranslatef(0.0, 0.0, -halfHeight);
|
||||
break;
|
||||
case 1:
|
||||
glRotatef(-90.0, 1.0, 0.0, 0.0);
|
||||
glTranslatef(0.0, 0.0, -halfHeight);
|
||||
break;
|
||||
case 2:
|
||||
|
||||
glTranslatef(0.0, 0.0, -halfHeight);
|
||||
break;
|
||||
default:
|
||||
{
|
||||
btAssert(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GLUquadricObj *quadObj = gluNewQuadric();
|
||||
|
||||
//The gluCylinder subroutine draws a cylinder that is oriented along the z axis.
|
||||
//The base of the cylinder is placed at z = 0; the top of the cylinder is placed at z=height.
|
||||
//Like a sphere, the cylinder is subdivided around the z axis into slices and along the z axis into stacks.
|
||||
|
||||
gluQuadricDrawStyle(quadObj, (GLenum)GLU_FILL);
|
||||
gluQuadricNormals(quadObj, (GLenum)GLU_SMOOTH);
|
||||
|
||||
gluDisk(quadObj,0,radius,15, 10);
|
||||
|
||||
gluCylinder(quadObj, radius, radius, 2.f*halfHeight, 15, 10);
|
||||
glTranslatef(0.0f, 0.0f, 2.f*halfHeight);
|
||||
glRotatef(-180.0f, 0.0f, 1.0f, 0.0f);
|
||||
gluDisk(quadObj,0.f,radius,15, 10);
|
||||
|
||||
glPopMatrix();
|
||||
gluDeleteQuadric(quadObj);
|
||||
}
|
||||
|
||||
GL_ShapeDrawer::ShapeCache* GL_ShapeDrawer::cache(btConvexShape* shape)
|
||||
{
|
||||
@ -498,7 +453,7 @@ void GL_ShapeDrawer::drawOpenGL(btScalar* m, const btCollisionShape* shape, cons
|
||||
{
|
||||
if(m_textureenabled&&(!m_textureinitialized))
|
||||
{
|
||||
GLubyte* image=new GLubyte[256*256*3];
|
||||
GLubyte* image=new GLubyte[256*256*4];
|
||||
for(int y=0;y<256;++y)
|
||||
{
|
||||
const int t=y>>4;
|
||||
@ -508,20 +463,22 @@ void GL_ShapeDrawer::drawOpenGL(btScalar* m, const btCollisionShape* shape, cons
|
||||
const int s=x>>4;
|
||||
const GLubyte b=180;
|
||||
GLubyte c=b+((s+t&1)&1)*(255-b);
|
||||
pi[0]=pi[1]=pi[2]=c;pi+=3;
|
||||
pi[0]=pi[1]=pi[2]=pi[3]=c;pi+=3;
|
||||
}
|
||||
}
|
||||
|
||||
glGenTextures(1,(GLuint*)&m_texturehandle);
|
||||
glBindTexture(GL_TEXTURE_2D,m_texturehandle);
|
||||
glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MODULATE);
|
||||
//glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR);
|
||||
//glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR_MIPMAP_LINEAR);
|
||||
glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT);
|
||||
glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT);
|
||||
gluBuild2DMipmaps(GL_TEXTURE_2D,3,256,256,GL_RGB,GL_UNSIGNED_BYTE,image);
|
||||
delete[] image;
|
||||
|
||||
|
||||
|
||||
glGenTextures(1,(GLuint*)&m_texturehandle);
|
||||
glBindTexture(GL_TEXTURE_2D,m_texturehandle);
|
||||
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, 3, 256 , 256 , 0, GL_RGB, GL_UNSIGNED_BYTE, image);
|
||||
//glGenerateMipmap(GL_TEXTURE_2D);
|
||||
delete[] image;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -691,21 +648,6 @@ void GL_ShapeDrawer::drawOpenGL(btScalar* m, const btCollisionShape* shape, cons
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
case CYLINDER_SHAPE_PROXYTYPE:
|
||||
{
|
||||
const btCylinderShape* cylinder = static_cast<const btCylinderShape*>(shape);
|
||||
int upAxis = cylinder->getUpAxis();
|
||||
|
||||
|
||||
float radius = cylinder->getRadius();
|
||||
float halfHeight = cylinder->getHalfExtentsWithMargin()[upAxis];
|
||||
|
||||
drawCylinder(radius,halfHeight,upAxis);
|
||||
|
||||
break;
|
||||
}
|
||||
*/
|
||||
|
||||
case MULTI_SPHERE_SHAPE_PROXYTYPE:
|
||||
{
|
||||
|
@ -57,7 +57,6 @@ public:
|
||||
return m_textureenabled;
|
||||
}
|
||||
|
||||
static void drawCylinder(float radius,float halfHeight, int upAxis);
|
||||
void drawSphere(btScalar r, int lats, int longs);
|
||||
static void drawCoordSystem();
|
||||
|
||||
|
@ -16,20 +16,18 @@ subject to the following restrictions:
|
||||
#define GLUT_STUFF_H
|
||||
|
||||
#ifdef DONT_USE_GLUT
|
||||
#ifdef _WIN32//for glut.h
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#endif //DONT_USE_GLUT
|
||||
#include "OpenGLWindow/OpenGLInclude.h"
|
||||
#define BT_ACTIVE_ALT 8192
|
||||
#define BT_ACTIVE_SHIFT 8193
|
||||
#define BT_ACTIVE_CTRL 8194
|
||||
#else //DONT_USE_GLUT
|
||||
|
||||
//think different
|
||||
#if defined(__APPLE__) && !defined (VMDMESA)
|
||||
#include <OpenGL/OpenGL.h>
|
||||
#include <OpenGL/gl.h>
|
||||
#include <OpenGL/glu.h>
|
||||
#ifndef DONT_USE_GLUT
|
||||
#include <GLUT/glut.h>
|
||||
#endif//DONT_USE_GLUT
|
||||
|
||||
#include <GLUT/glut.h>
|
||||
#else//(__APPLE__) && !defined (VMDMESA)
|
||||
|
||||
|
||||
@ -39,17 +37,12 @@ subject to the following restrictions:
|
||||
#include <GL/glu.h>
|
||||
#else //_WINDOWS
|
||||
|
||||
#ifdef DONT_USE_GLUT
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#else//DONT_USE_GLUT
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif//_WIN32
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glut.h>
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif//_WIN32
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
#endif//DONT_USE_GLUT
|
||||
#endif//_WINDOWS
|
||||
#endif //(__APPLE__) && !defined (VMDMESA)
|
||||
|
||||
@ -58,11 +51,6 @@ subject to the following restrictions:
|
||||
#define BT_ACTIVE_SHIFT VK_LSHIFT
|
||||
#define BT_ACTIVE_CTRL VK_LCONTROL
|
||||
#else //_WINDOWS
|
||||
#ifdef DONT_USE_GLUT
|
||||
#define BT_ACTIVE_ALT 8192
|
||||
#define BT_ACTIVE_SHIFT 8193
|
||||
#define BT_ACTIVE_CTRL 8194
|
||||
#else//DONT_USE_GLUT
|
||||
#define BT_KEY_K 'k'
|
||||
#define BT_KEY_LEFT GLUT_KEY_LEFT
|
||||
#define BT_KEY_RIGHT GLUT_KEY_RIGHT
|
||||
@ -81,12 +69,10 @@ subject to the following restrictions:
|
||||
#define BT_ACTIVE_CTRL GLUT_ACTIVE_ALT
|
||||
#define BT_ACTIVE_SHIFT GLUT_ACTIVE_SHIFT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if BT_USE_FREEGLUT
|
||||
#include "GL/freeglut_ext.h" //to be able to return from glutMainLoop()
|
||||
#endif
|
||||
|
||||
#endif // DONT_USE_GLUT
|
||||
|
||||
|
||||
class DemoApplication;
|
||||
|
@ -79,7 +79,9 @@
|
||||
"../GpuDemos/gwenUserInterface.h"
|
||||
}
|
||||
|
||||
if os.is("Linux") then links{"X11","pthread"} end
|
||||
if os.is("Linux") then
|
||||
initX11()
|
||||
end
|
||||
if os.is("MacOSX") then
|
||||
links{"Cocoa.framework"}
|
||||
end
|
||||
|
@ -32,7 +32,7 @@ project "App_BasicDemoCustomOpenGL2"
|
||||
"../../Demos/OpenGL/GLDebugFont.cpp",
|
||||
"../../Demos/OpenGL/GLDebugFont.h"
|
||||
}
|
||||
if os.is("Linux") then links{"X11","pthread"} end
|
||||
if os.is("Linux") then initX11() end
|
||||
|
||||
if os.is("MacOSX") then
|
||||
links{"Cocoa.framework"}
|
||||
|
@ -1,3 +1,5 @@
|
||||
if (OPENGL_FOUND)
|
||||
if (BUILD_BULLET3_DEMOS)
|
||||
SUBDIRS( AllBullet2Demos GpuDemos SimpleOpenGL3 )
|
||||
endif(BUILD_BULLET3_DEMOS)
|
||||
endif(OPENGL_FOUND)
|
||||
|
@ -91,7 +91,7 @@ function createProject(vendor)
|
||||
}
|
||||
end
|
||||
if os.is("Linux") then
|
||||
links{"X11","pthread"}
|
||||
initX11()
|
||||
files {
|
||||
"../../btgui/OpenGLWindow/X11OpenGLWindow.cpp",
|
||||
"../../btgui/OpenGLWindow/X11OpenGLWindows.h"
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
}
|
||||
|
||||
if os.is("Linux") then links {"X11","pthread"} end
|
||||
if os.is("Linux") then initX11() end
|
||||
|
||||
if os.is("MacOSX") then
|
||||
links{"Cocoa.framework"}
|
||||
|
@ -1,13 +1,16 @@
|
||||
project "gwen"
|
||||
|
||||
kind "StaticLib"
|
||||
|
||||
|
||||
flags {"Unicode"}
|
||||
|
||||
|
||||
initOpenGL()
|
||||
initGlew()
|
||||
if os.is("Linux") then
|
||||
initX11()
|
||||
end
|
||||
|
||||
defines { "GWEN_COMPILE_STATIC" , "_HAS_EXCEPTIONS=0", "_STATIC_CPPLIB" }
|
||||
|
||||
defines { "DONT_USE_GLUT"}
|
||||
targetdir "../../lib"
|
||||
includedirs {
|
||||
".",".."
|
||||
|
@ -5,6 +5,7 @@
|
||||
flags {"Unicode"}
|
||||
|
||||
defines { "GWEN_COMPILE_STATIC" , "_HAS_EXCEPTIONS=0", "_STATIC_CPPLIB" }
|
||||
defines { "DONT_USE_GLUT"}
|
||||
|
||||
targetdir "../../bin"
|
||||
|
||||
@ -50,7 +51,7 @@
|
||||
}
|
||||
end
|
||||
if os.is("Linux") then
|
||||
links ("X11")
|
||||
initX11()
|
||||
files{
|
||||
"../OpenGLWindow/X11OpenGLWindow.h",
|
||||
"../OpenGLWindow/X11OpenGLWindow.cpp"
|
||||
|
@ -14,6 +14,9 @@
|
||||
"../../src",
|
||||
".."
|
||||
}
|
||||
if os.is("Linux") then
|
||||
initX11()
|
||||
end
|
||||
|
||||
files
|
||||
{
|
||||
|
717
btgui/OpenGLWindow/optionalX11/X11/X.h
Normal file
717
btgui/OpenGLWindow/optionalX11/X11/X.h
Normal file
@ -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 */
|
1149
btgui/OpenGLWindow/optionalX11/X11/XKBlib.h
Normal file
1149
btgui/OpenGLWindow/optionalX11/X11/XKBlib.h
Normal file
File diff suppressed because it is too large
Load Diff
79
btgui/OpenGLWindow/optionalX11/X11/Xatom.h
Normal file
79
btgui/OpenGLWindow/optionalX11/X11/Xatom.h
Normal file
@ -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 */
|
175
btgui/OpenGLWindow/optionalX11/X11/Xfuncproto.h
Normal file
175
btgui/OpenGLWindow/optionalX11/X11/Xfuncproto.h
Normal file
@ -0,0 +1,175 @@
|
||||
/* Xfuncproto.h. Generated from Xfuncproto.h.in by configure. */
|
||||
/*
|
||||
*
|
||||
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) */
|
||||
#ifndef NARROWPROTO
|
||||
#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 */
|
||||
|
||||
/* Added in X11R6.9, so available in any version of modular xproto */
|
||||
#if 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 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 */
|
||||
|
||||
/* 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
|
||||
|
||||
/* Added in X11R6.9, so available in any version of modular xproto */
|
||||
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)
|
||||
# define _X_DEPRECATED __attribute__((deprecated))
|
||||
#else /* not gcc >= 3.1 */
|
||||
# define _X_DEPRECATED
|
||||
#endif
|
||||
|
||||
/* requires xproto >= 7.0.17 */
|
||||
#if (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 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 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 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
|
||||
|
||||
#endif /* _XFUNCPROTO_H_ */
|
69
btgui/OpenGLWindow/optionalX11/X11/Xfuncs.h
Normal file
69
btgui/OpenGLWindow/optionalX11/X11/Xfuncs.h
Normal file
@ -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__)
|
||||
# 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__)
|
||||
# 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_ */
|
4032
btgui/OpenGLWindow/optionalX11/X11/Xlib.h
Normal file
4032
btgui/OpenGLWindow/optionalX11/X11/Xlib.h
Normal file
File diff suppressed because it is too large
Load Diff
38
btgui/OpenGLWindow/optionalX11/X11/XlibConf.h
Normal file
38
btgui/OpenGLWindow/optionalX11/X11/XlibConf.h
Normal file
@ -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_ */
|
1334
btgui/OpenGLWindow/optionalX11/X11/Xlibint.h
Normal file
1334
btgui/OpenGLWindow/optionalX11/X11/Xlibint.h
Normal file
File diff suppressed because it is too large
Load Diff
187
btgui/OpenGLWindow/optionalX11/X11/Xmd.h
Normal file
187
btgui/OpenGLWindow/optionalX11/X11/Xmd.h
Normal file
@ -0,0 +1,187 @@
|
||||
/***********************************************************
|
||||
|
||||
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
|
||||
|
||||
/*
|
||||
* Stuff to handle large architecture machines; the constants were generated
|
||||
* on a 32-bit machine and must correspond to the protocol.
|
||||
*/
|
||||
# ifdef WORD64
|
||||
# define MUSTCOPY
|
||||
# endif /* WORD64 */
|
||||
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
# ifdef WORD64
|
||||
typedef long INT64;
|
||||
typedef unsigned long CARD64;
|
||||
# define B32 :32
|
||||
# define B16 :16
|
||||
# ifdef UNSIGNEDBITFIELDS
|
||||
typedef unsigned int INT32;
|
||||
typedef unsigned int INT16;
|
||||
# else
|
||||
typedef signed int INT32;
|
||||
typedef signed int INT16;
|
||||
# endif
|
||||
# else
|
||||
# define B32
|
||||
# define B16
|
||||
# ifdef LONG64
|
||||
typedef long INT64;
|
||||
typedef int INT32;
|
||||
# else
|
||||
typedef long INT32;
|
||||
# endif
|
||||
typedef short INT16;
|
||||
# endif
|
||||
|
||||
typedef signed char INT8;
|
||||
|
||||
# ifdef LONG64
|
||||
typedef unsigned long CARD64;
|
||||
typedef unsigned int CARD32;
|
||||
# else
|
||||
typedef unsigned long CARD32;
|
||||
# endif
|
||||
# if !defined(WORD64) && !defined(LONG64)
|
||||
typedef unsigned long long CARD64;
|
||||
# endif
|
||||
typedef unsigned short CARD16;
|
||||
typedef unsigned char CARD8;
|
||||
|
||||
typedef CARD32 BITS32;
|
||||
typedef CARD16 BITS16;
|
||||
|
||||
typedef CARD8 BYTE;
|
||||
typedef CARD8 BOOL;
|
||||
|
||||
/*
|
||||
* definitions for sign-extending bitfields on 64-bit architectures
|
||||
*/
|
||||
# if defined(WORD64) && defined(UNSIGNEDBITFIELDS)
|
||||
# define cvtINT8toInt(val) (((val) & 0x00000080) ? ((val) | 0xffffffffffffff00) : (val))
|
||||
# define cvtINT16toInt(val) (((val) & 0x00008000) ? ((val) | 0xffffffffffff0000) : (val))
|
||||
# define cvtINT32toInt(val) (((val) & 0x80000000) ? ((val) | 0xffffffff00000000) : (val))
|
||||
# define cvtINT8toShort(val) cvtINT8toInt(val)
|
||||
# define cvtINT16toShort(val) cvtINT16toInt(val)
|
||||
# define cvtINT32toShort(val) cvtINT32toInt(val)
|
||||
# define cvtINT8toLong(val) cvtINT8toInt(val)
|
||||
# define cvtINT16toLong(val) cvtINT16toInt(val)
|
||||
# define cvtINT32toLong(val) cvtINT32toInt(val)
|
||||
# else
|
||||
# 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)
|
||||
# endif /* WORD64 and UNSIGNEDBITFIELDS */
|
||||
|
||||
|
||||
|
||||
# ifdef MUSTCOPY
|
||||
/*
|
||||
* This macro must not cast or else pointers will get aligned and be wrong
|
||||
*/
|
||||
# define NEXTPTR(p,t) (((char *) p) + SIZEOF(t))
|
||||
# else /* else not MUSTCOPY, this is used for 32-bit machines */
|
||||
/*
|
||||
* 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 /* MUSTCOPY - used machines whose C structs don't line up with proto */
|
||||
|
||||
#endif /* XMD_H */
|
116
btgui/OpenGLWindow/optionalX11/X11/Xosdefs.h
Normal file
116
btgui/OpenGLWindow/optionalX11/X11/Xosdefs.h
Normal file
@ -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_ */
|
||||
|
2157
btgui/OpenGLWindow/optionalX11/X11/Xproto.h
Normal file
2157
btgui/OpenGLWindow/optionalX11/X11/Xproto.h
Normal file
File diff suppressed because it is too large
Load Diff
77
btgui/OpenGLWindow/optionalX11/X11/Xprotostr.h
Normal file
77
btgui/OpenGLWindow/optionalX11/X11/Xprotostr.h
Normal file
@ -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 */
|
838
btgui/OpenGLWindow/optionalX11/X11/Xutil.h
Normal file
838
btgui/OpenGLWindow/optionalX11/X11/Xutil.h
Normal file
@ -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_ */
|
111
btgui/OpenGLWindow/optionalX11/X11/cursorfont.h
Normal file
111
btgui/OpenGLWindow/optionalX11/X11/cursorfont.h
Normal file
@ -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_ */
|
786
btgui/OpenGLWindow/optionalX11/X11/extensions/XKB.h
Normal file
786
btgui/OpenGLWindow/optionalX11/X11/extensions/XKB.h
Normal file
@ -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_ */
|
613
btgui/OpenGLWindow/optionalX11/X11/extensions/XKBstr.h
Normal file
613
btgui/OpenGLWindow/optionalX11/X11/extensions/XKBstr.h
Normal file
@ -0,0 +1,613 @@
|
||||
/************************************************************
|
||||
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)))
|
||||
|
||||
#if defined(WORD64) && defined(UNSIGNEDBITFIELDS)
|
||||
#define Xkb2CharsToInt(h,l) ((h)&0x80?(int)(((h)<<8)|(l)|(~0xffff)):\
|
||||
(int)(((h)<<8)|(l)&0x7fff))
|
||||
#else
|
||||
#define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l)))
|
||||
#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;
|
||||
XkbKTMapEntryPtr map;
|
||||
XkbModsPtr preserve;
|
||||
Atom name;
|
||||
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)->vmods_mask1=(((m)>>8)&0xff)),\
|
||||
((a)->vmods_mask0=((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 {
|
||||
unsigned short num_acts;
|
||||
unsigned short size_acts;
|
||||
XkbAction *acts;
|
||||
|
||||
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 {
|
||||
unsigned char size_types;
|
||||
unsigned char num_types;
|
||||
XkbKeyTypePtr types;
|
||||
|
||||
unsigned short size_syms;
|
||||
unsigned short num_syms;
|
||||
KeySym *syms;
|
||||
XkbSymMapPtr key_sym_map;
|
||||
|
||||
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 {
|
||||
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];
|
||||
XkbKeyNamePtr keys;
|
||||
XkbKeyAliasPtr key_aliases;
|
||||
Atom *radio_groups;
|
||||
Atom phys_symbols;
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
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;
|
||||
|
||||
#endif /* _XKBSTR_H_ */
|
135
btgui/OpenGLWindow/optionalX11/X11/extensions/XShm.h
Normal file
135
btgui/OpenGLWindow/optionalX11/X11/extensions/XShm.h
Normal file
@ -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
|
53
btgui/OpenGLWindow/optionalX11/X11/extensions/Xext.h
Normal file
53
btgui/OpenGLWindow/optionalX11/X11/extensions/Xext.h
Normal file
@ -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_ */
|
190
btgui/OpenGLWindow/optionalX11/X11/extensions/extutil.h
Normal file
190
btgui/OpenGLWindow/optionalX11/X11/extensions/extutil.h
Normal file
@ -0,0 +1,190 @@
|
||||
/*
|
||||
*
|
||||
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.
|
||||
*
|
||||
* Author: Jim Fulton, MIT The Open Group
|
||||
*
|
||||
* Xlib Extension-Writing Utilities
|
||||
*
|
||||
* This package contains utilities for writing the client API for various
|
||||
* protocol extensions. THESE INTERFACES ARE NOT PART OF THE X STANDARD AND
|
||||
* ARE SUBJECT TO CHANGE!
|
||||
*/
|
||||
|
||||
#ifndef _EXTUTIL_H_
|
||||
#define _EXTUTIL_H_
|
||||
|
||||
#include <X11/extensions/Xext.h>
|
||||
|
||||
/*
|
||||
* We need to keep a list of open displays since the Xlib display list isn't
|
||||
* public. We also have to per-display info in a separate block since it isn't
|
||||
* stored directly in the Display structure.
|
||||
*/
|
||||
typedef struct _XExtDisplayInfo {
|
||||
struct _XExtDisplayInfo *next; /* keep a linked list */
|
||||
Display *display; /* which display this is */
|
||||
XExtCodes *codes; /* the extension protocol codes */
|
||||
XPointer data; /* extra data for extension to use */
|
||||
} XExtDisplayInfo;
|
||||
|
||||
typedef struct _XExtensionInfo {
|
||||
XExtDisplayInfo *head; /* start of list */
|
||||
XExtDisplayInfo *cur; /* most recently used */
|
||||
int ndisplays; /* number of displays */
|
||||
} XExtensionInfo;
|
||||
|
||||
typedef struct _XExtensionHooks {
|
||||
int (*create_gc)(
|
||||
Display* /* display */,
|
||||
GC /* gc */,
|
||||
XExtCodes* /* codes */
|
||||
);
|
||||
int (*copy_gc)(
|
||||
Display* /* display */,
|
||||
GC /* gc */,
|
||||
XExtCodes* /* codes */
|
||||
);
|
||||
int (*flush_gc)(
|
||||
Display* /* display */,
|
||||
GC /* gc */,
|
||||
XExtCodes* /* codes */
|
||||
);
|
||||
int (*free_gc)(
|
||||
Display* /* display */,
|
||||
GC /* gc */,
|
||||
XExtCodes* /* codes */
|
||||
);
|
||||
int (*create_font)(
|
||||
Display* /* display */,
|
||||
XFontStruct* /* fs */,
|
||||
XExtCodes* /* codes */
|
||||
);
|
||||
int (*free_font)(
|
||||
Display* /* display */,
|
||||
XFontStruct* /* fs */,
|
||||
XExtCodes* /* codes */
|
||||
);
|
||||
int (*close_display)(
|
||||
Display* /* display */,
|
||||
XExtCodes* /* codes */
|
||||
);
|
||||
Bool (*wire_to_event)(
|
||||
Display* /* display */,
|
||||
XEvent* /* re */,
|
||||
xEvent* /* event */
|
||||
);
|
||||
Status (*event_to_wire)(
|
||||
Display* /* display */,
|
||||
XEvent* /* re */,
|
||||
xEvent* /* event */
|
||||
);
|
||||
int (*error)(
|
||||
Display* /* display */,
|
||||
xError* /* err */,
|
||||
XExtCodes* /* codes */,
|
||||
int* /* ret_code */
|
||||
);
|
||||
char *(*error_string)(
|
||||
Display* /* display */,
|
||||
int /* code */,
|
||||
XExtCodes* /* codes */,
|
||||
char* /* buffer */,
|
||||
int /* nbytes */
|
||||
);
|
||||
} XExtensionHooks;
|
||||
|
||||
extern XExtensionInfo *XextCreateExtension(
|
||||
void
|
||||
);
|
||||
extern void XextDestroyExtension(
|
||||
XExtensionInfo* /* info */
|
||||
);
|
||||
extern XExtDisplayInfo *XextAddDisplay(
|
||||
XExtensionInfo* /* extinfo */,
|
||||
Display* /* dpy */,
|
||||
_Xconst char* /* ext_name */,
|
||||
XExtensionHooks* /* hooks */,
|
||||
int /* nevents */,
|
||||
XPointer /* data */
|
||||
);
|
||||
extern int XextRemoveDisplay(
|
||||
XExtensionInfo* /* extinfo */,
|
||||
Display* /* dpy */
|
||||
);
|
||||
extern XExtDisplayInfo *XextFindDisplay(
|
||||
XExtensionInfo* /* extinfo */,
|
||||
Display* /* dpy */
|
||||
);
|
||||
|
||||
#define XextHasExtension(i) ((i) && ((i)->codes))
|
||||
#define XextCheckExtension(dpy,i,name,val) \
|
||||
if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return val; }
|
||||
#define XextSimpleCheckExtension(dpy,i,name) \
|
||||
if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return; }
|
||||
|
||||
|
||||
/*
|
||||
* helper macros to generate code that is common to all extensions; caller
|
||||
* should prefix it with static if extension source is in one file; this
|
||||
* could be a utility function, but have to stack 6 unused arguments for
|
||||
* something that is called many, many times would be bad.
|
||||
*/
|
||||
#define XEXT_GENERATE_FIND_DISPLAY(proc,extinfo,extname,hooks,nev,data) \
|
||||
XExtDisplayInfo *proc (Display *dpy) \
|
||||
{ \
|
||||
XExtDisplayInfo *dpyinfo; \
|
||||
if (!extinfo) { if (!(extinfo = XextCreateExtension())) return NULL; } \
|
||||
if (!(dpyinfo = XextFindDisplay (extinfo, dpy))) \
|
||||
dpyinfo = XextAddDisplay (extinfo,dpy,extname,hooks,nev,data); \
|
||||
return dpyinfo; \
|
||||
}
|
||||
|
||||
#define XEXT_FIND_DISPLAY_PROTO(proc) \
|
||||
XExtDisplayInfo *proc(Display *dpy)
|
||||
|
||||
#define XEXT_GENERATE_CLOSE_DISPLAY(proc,extinfo) \
|
||||
int proc (Display *dpy, XExtCodes *codes) \
|
||||
{ \
|
||||
return XextRemoveDisplay (extinfo, dpy); \
|
||||
}
|
||||
|
||||
#define XEXT_CLOSE_DISPLAY_PROTO(proc) \
|
||||
int proc(Display *dpy, XExtCodes *codes)
|
||||
|
||||
#define XEXT_GENERATE_ERROR_STRING(proc,extname,nerr,errl) \
|
||||
char *proc (Display *dpy, int code, XExtCodes *codes, char *buf, int n) \
|
||||
{ \
|
||||
code -= codes->first_error; \
|
||||
if (code >= 0 && code < nerr) { \
|
||||
char tmp[256]; \
|
||||
sprintf (tmp, "%s.%d", extname, code); \
|
||||
XGetErrorDatabaseText (dpy, "XProtoError", tmp, errl[code], buf, n); \
|
||||
return buf; \
|
||||
} \
|
||||
return (char *)0; \
|
||||
}
|
||||
|
||||
#define XEXT_ERROR_STRING_PROTO(proc) \
|
||||
char *proc(Display *dpy, int code, XExtCodes *codes, char *buf, int n)
|
||||
#endif
|
152
btgui/OpenGLWindow/optionalX11/X11/extensions/shape.h
Normal file
152
btgui/OpenGLWindow/optionalX11/X11/extensions/shape.h
Normal file
@ -0,0 +1,152 @@
|
||||
/************************************************************
|
||||
|
||||
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 _SHAPE_H_
|
||||
#define _SHAPE_H_
|
||||
|
||||
#include <X11/Xfuncproto.h>
|
||||
#include <X11/extensions/shapeconst.h>
|
||||
|
||||
#ifndef _SHAPE_SERVER_
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
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 */
|
||||
Window window; /* window of event */
|
||||
int kind; /* ShapeBounding or ShapeClip */
|
||||
int x, y; /* extents of new region */
|
||||
unsigned width, height;
|
||||
Time time; /* server timestamp when region changed */
|
||||
Bool shaped; /* true if the region exists */
|
||||
} XShapeEvent;
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
extern Bool XShapeQueryExtension (
|
||||
Display* /* display */,
|
||||
int* /* event_base */,
|
||||
int* /* error_base */
|
||||
);
|
||||
|
||||
extern Status XShapeQueryVersion (
|
||||
Display* /* display */,
|
||||
int* /* major_version */,
|
||||
int* /* minor_version */
|
||||
);
|
||||
|
||||
extern void XShapeCombineRegion (
|
||||
Display* /* display */,
|
||||
Window /* dest */,
|
||||
int /* dest_kind */,
|
||||
int /* x_off */,
|
||||
int /* y_off */,
|
||||
Region /* region */,
|
||||
int /* op */
|
||||
);
|
||||
|
||||
extern void XShapeCombineRectangles (
|
||||
Display* /* display */,
|
||||
Window /* dest */,
|
||||
int /* dest_kind */,
|
||||
int /* x_off */,
|
||||
int /* y_off */,
|
||||
XRectangle* /* rectangles */,
|
||||
int /* n_rects */,
|
||||
int /* op */,
|
||||
int /* ordering */
|
||||
);
|
||||
|
||||
extern void XShapeCombineMask (
|
||||
Display* /* display */,
|
||||
Window /* dest */,
|
||||
int /* dest_kind */,
|
||||
int /* x_off */,
|
||||
int /* y_off */,
|
||||
Pixmap /* src */,
|
||||
int /* op */
|
||||
);
|
||||
|
||||
extern void XShapeCombineShape (
|
||||
Display* /* display */,
|
||||
Window /* dest */,
|
||||
int /* dest_kind */,
|
||||
int /* x_off */,
|
||||
int /* y_off */,
|
||||
Window /* src */,
|
||||
int /* src_kind */,
|
||||
int /* op */
|
||||
);
|
||||
|
||||
extern void XShapeOffsetShape (
|
||||
Display* /* display */,
|
||||
Window /* dest */,
|
||||
int /* dest_kind */,
|
||||
int /* x_off */,
|
||||
int /* y_off */
|
||||
);
|
||||
|
||||
extern Status XShapeQueryExtents (
|
||||
Display* /* display */,
|
||||
Window /* window */,
|
||||
Bool* /* bounding_shaped */,
|
||||
int* /* x_bounding */,
|
||||
int* /* y_bounding */,
|
||||
unsigned int* /* w_bounding */,
|
||||
unsigned int* /* h_bounding */,
|
||||
Bool* /* clip_shaped */,
|
||||
int* /* x_clip */,
|
||||
int* /* y_clip */,
|
||||
unsigned int* /* w_clip */,
|
||||
unsigned int* /* h_clip */
|
||||
);
|
||||
|
||||
extern void XShapeSelectInput (
|
||||
Display* /* display */,
|
||||
Window /* window */,
|
||||
unsigned long /* mask */
|
||||
);
|
||||
|
||||
extern unsigned long XShapeInputSelected (
|
||||
Display* /* display */,
|
||||
Window /* window */
|
||||
);
|
||||
|
||||
extern XRectangle *XShapeGetRectangles (
|
||||
Display* /* display */,
|
||||
Window /* window */,
|
||||
int /* kind */,
|
||||
int* /* count */,
|
||||
int* /* ordering */
|
||||
);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* !_SHAPE_SERVER_ */
|
||||
|
||||
#endif /* _SHAPE_H_ */
|
55
btgui/OpenGLWindow/optionalX11/X11/extensions/shapeconst.h
Normal file
55
btgui/OpenGLWindow/optionalX11/X11/extensions/shapeconst.h
Normal file
@ -0,0 +1,55 @@
|
||||
/************************************************************
|
||||
|
||||
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 _SHAPECONST_H_
|
||||
#define _SHAPECONST_H_
|
||||
|
||||
/*
|
||||
* Protocol requests constants and alignment values
|
||||
* These would really be in SHAPE's X.h and Xproto.h equivalents
|
||||
*/
|
||||
|
||||
#define SHAPENAME "SHAPE"
|
||||
|
||||
#define SHAPE_MAJOR_VERSION 1 /* current version numbers */
|
||||
#define SHAPE_MINOR_VERSION 1
|
||||
|
||||
#define ShapeSet 0
|
||||
#define ShapeUnion 1
|
||||
#define ShapeIntersect 2
|
||||
#define ShapeSubtract 3
|
||||
#define ShapeInvert 4
|
||||
|
||||
#define ShapeBounding 0
|
||||
#define ShapeClip 1
|
||||
#define ShapeInput 2
|
||||
|
||||
#define ShapeNotifyMask (1L << 0)
|
||||
#define ShapeNotify 0
|
||||
|
||||
#define ShapeNumberEvents (ShapeNotify + 1)
|
||||
|
||||
#endif /* _SHAPECONST_H_ */
|
44
btgui/OpenGLWindow/optionalX11/X11/extensions/shm.h
Normal file
44
btgui/OpenGLWindow/optionalX11/X11/extensions/shm.h
Normal file
@ -0,0 +1,44 @@
|
||||
/************************************************************
|
||||
|
||||
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 _SHM_H_
|
||||
#define _SHM_H_
|
||||
|
||||
#define SHMNAME "MIT-SHM"
|
||||
|
||||
#define SHM_MAJOR_VERSION 1 /* current version numbers */
|
||||
#define SHM_MINOR_VERSION 2
|
||||
|
||||
#define ShmCompletion 0
|
||||
#define ShmNumberEvents (ShmCompletion + 1)
|
||||
|
||||
#define BadShmSeg 0
|
||||
#define ShmNumberErrors (BadShmSeg + 1)
|
||||
|
||||
|
||||
#endif /* _SHM_H_ */
|
74
btgui/OpenGLWindow/optionalX11/X11/keysym.h
Normal file
74
btgui/OpenGLWindow/optionalX11/X11/keysym.h
Normal file
@ -0,0 +1,74 @@
|
||||
/***********************************************************
|
||||
|
||||
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.
|
||||
|
||||
******************************************************************/
|
||||
|
||||
/* default keysyms */
|
||||
#define XK_MISCELLANY
|
||||
#define XK_XKB_KEYS
|
||||
#define XK_LATIN1
|
||||
#define XK_LATIN2
|
||||
#define XK_LATIN3
|
||||
#define XK_LATIN4
|
||||
#define XK_LATIN8
|
||||
#define XK_LATIN9
|
||||
#define XK_CAUCASUS
|
||||
#define XK_GREEK
|
||||
#define XK_KATAKANA
|
||||
#define XK_ARABIC
|
||||
#define XK_CYRILLIC
|
||||
#define XK_HEBREW
|
||||
#define XK_THAI
|
||||
#define XK_KOREAN
|
||||
#define XK_ARMENIAN
|
||||
#define XK_GEORGIAN
|
||||
#define XK_VIETNAMESE
|
||||
#define XK_CURRENCY
|
||||
#define XK_MATHEMATICAL
|
||||
#define XK_BRAILLE
|
||||
#define XK_SINHALA
|
||||
|
||||
#include <X11/keysymdef.h>
|
||||
|
2491
btgui/OpenGLWindow/optionalX11/X11/keysymdef.h
Normal file
2491
btgui/OpenGLWindow/optionalX11/X11/keysymdef.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -29,6 +29,9 @@
|
||||
"Win32Window.h",
|
||||
}
|
||||
end
|
||||
if os.is("Linux") then
|
||||
initX11()
|
||||
end
|
||||
if not os.is("Linux") then
|
||||
excludes {
|
||||
"X11OpenGLWindow.cpp",
|
||||
|
@ -1,9 +1,7 @@
|
||||
function findOpenGL()
|
||||
configuration{}
|
||||
if os.is("Linux") then
|
||||
if os.isdir("/usr/include") and os.isfile("/usr/include/GL/gl.h") then return true
|
||||
end
|
||||
return false
|
||||
return true
|
||||
end
|
||||
--assume OpenGL is available on Mac OSX, Windows etc
|
||||
return true
|
||||
@ -16,7 +14,13 @@
|
||||
configuration {"MacOSX"}
|
||||
links { "OpenGL.framework"}
|
||||
configuration {"not Windows", "not MacOSX"}
|
||||
links {"GL","GLU"}
|
||||
if os.isdir("/usr/include") and os.isfile("/usr/include/GL/gl.h") then
|
||||
links {"GL","GLU"}
|
||||
else
|
||||
print("No GL/gl.h found, using dynamic loading of GL using glew")
|
||||
defines {"GLEW_INIT_OPENGL11_FUNCTIONS=1"}
|
||||
links {"dl"}
|
||||
end
|
||||
configuration{}
|
||||
end
|
||||
|
||||
@ -53,20 +57,33 @@
|
||||
end
|
||||
if os.is("Linux") then
|
||||
configuration{"Linux"}
|
||||
if os.isdir("/usr/include") and os.isfile("/usr/include/GL/glew.h") then
|
||||
links {"GLEW"}
|
||||
else
|
||||
defines { "GLEW_STATIC"}
|
||||
--,"GLEW_NO_GLU"}
|
||||
--if os.isdir("/usr/include") and os.isfile("/usr/include/GL/glew.h") then
|
||||
-- links {"GLEW"}
|
||||
-- else
|
||||
--print("Using static glew and dynamic loading of glx functions")
|
||||
defines { "GLEW_STATIC","GLEW_DYNAMIC_LOAD_ALL_GLX_FUNCTIONS=1"}
|
||||
includedirs {
|
||||
projectRootDir .. "btgui/OpenGLWindow/GlewWindows"
|
||||
}
|
||||
files { projectRootDir .. "btgui/OpenGLWindow/GlewWindows/glew.c"}
|
||||
end
|
||||
-- end
|
||||
|
||||
end
|
||||
configuration{}
|
||||
end
|
||||
|
||||
|
||||
function initX11()
|
||||
if os.is("Linux") then
|
||||
if os.isdir("/usr/include") and os.isfile("/usr/include/X11/X.h") then
|
||||
links{"X11","pthread"}
|
||||
else
|
||||
print("No X11/X.h found, using dynamic loading of X11")
|
||||
includedirs {
|
||||
projectRootDir .. "btgui/OpenGLWindow/optionalX11"
|
||||
}
|
||||
defines {"DYNAMIC_LOAD_X11_FUNCTIONS"}
|
||||
links {"dl","pthread"}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
act = _ACTION
|
||||
end
|
||||
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "midi",
|
||||
|
Loading…
Reference in New Issue
Block a user