Commit 757fdc24 authored by dscho's avatar dscho

Initial revision

parents
File added
This diff is collapsed.
set args -desktop 'foobie bletch'
r
quit
where
info thread
info threads
thr 1
where
quit
quit
r
where
info threads
thr 2
where
f 31
kill
r
r
r
quit
This diff is collapsed.
CC=gcc
CFLAGS=-g -Wall
#CFLAGS=-O2 -Wall
RANLIB=ranlib
INCLUDES=-I. -Ilibvncauth -Iinclude -Iinclude/X11 -Iinclude/Xserver
VNCAUTHLIB=-Llibvncauth -lvncauth
VNCSERVERLIB=-L. -lvncserver -lz -ljpeg
# These two lines enable useage of PThreads
CFLAGS += -DHAVE_PTHREADS
VNCSERVERLIB += -lpthread
LIBS=$(VNCSERVERLIB) $(VNCAUTHLIB)
# for Mac OS X
OSX_LIBS = -framework ApplicationServices -framework Carbon
# for Example
PTHREAD_LIBS = -lpthread
SOURCES=main.c rfbserver.c miregion.c auth.c sockets.c xalloc.c \
stats.c corre.c hextile.c rre.c translate.c cutpaste.c \
zlib.c tight.c
OBJS=main.o rfbserver.o miregion.o auth.o sockets.o xalloc.o \
stats.o corre.o hextile.o rre.o translate.o cutpaste.o \
zlib.o tight.o
all: example storepasswd
install_OSX: OSXvnc-server
cp OSXvnc-server storepasswd ../OSXvnc/build/OSXvnc.app/Contents/MacOS
.c.o:
$(CC) $(CFLAGS) $(INCLUDES) -c $<
libvncserver.a: $(OBJS)
$(AR) cru $@ $(OBJS)
$(RANLIB) $@
example: example.o libvncauth/libvncauth.a libvncserver.a
$(CC) -o example example.o $(LIBS) $(PTHREAD_LIBS)
OSXvnc-server: mac.o libvncauth/libvncauth.a libvncserver.a
$(CC) -o OSXvnc-server mac.o $(LIBS) $(OSX_LIBS)
storepasswd: storepasswd.o libvncauth/libvncauth.a
$(CC) -o storepasswd storepasswd.o $(VNCAUTHLIB)
libvncauth/libvncauth.a:
(cd libvncauth; make)
clean:
rm -f $(OBJS) *~ core "#"* *.bak *.orig storepasswd.o *.a example.o \
libvncauth/*.o libvncauth/*~ libvncauth/*.a
realclean: clean
rm -f OSXvnc-server storepasswd
depend:
$(CC) -M $(INCLUDES) $(SOURCES) >.depend
#include .depend
OSXvnc: a VNC server for Mac OS X
Copyright (C) 2001 Dan McGuirk
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.dfdf
For help with OSXvnc, please visit http://www.osxvnc.com/.
.cutpaste
httpd
.other encodings
adapt rdp2vnc (rdesktop)
udp
rfbCloseClient, rfbConnect, ConnectToTcpAddr
CORBA
translate.c: warning about non 8-bit colourmaps
cursors
/*
* auth.c - deal with authentication.
*
* This file implements the VNC authentication protocol when setting up an RFB
* connection.
*/
/*
* OSXvnc Copyright (C) 2001 Dan McGuirk <mcguirk@incompleteness.net>.
* Original Xvnc code Copyright (C) 1999 AT&T Laboratories Cambridge.
* All Rights Reserved.
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#include <stdio.h>
#include <stdlib.h>
#include "rfb.h"
char *rfbAuthPasswdFile = NULL;
/*
* rfbAuthNewClient is called when we reach the point of authenticating
* a new client. If authentication isn't being used then we simply send
* rfbNoAuth. Otherwise we send rfbVncAuth plus the challenge.
*/
void
rfbAuthNewClient(cl)
rfbClientPtr cl;
{
char buf[4 + CHALLENGESIZE];
int len;
cl->state = RFB_AUTHENTICATION;
if (rfbAuthPasswdFile && !cl->reverseConnection) {
*(CARD32 *)buf = Swap32IfLE(rfbVncAuth);
vncRandomBytes(cl->authChallenge);
memcpy(&buf[4], (char *)cl->authChallenge, CHALLENGESIZE);
len = 4 + CHALLENGESIZE;
} else {
*(CARD32 *)buf = Swap32IfLE(rfbNoAuth);
len = 4;
cl->state = RFB_INITIALISATION;
}
if (WriteExact(cl, buf, len) < 0) {
rfbLogPerror("rfbAuthNewClient: write");
rfbCloseClient(cl);
return;
}
}
/*
* rfbAuthProcessClientMessage is called when the client sends its
* authentication response.
*/
void
rfbAuthProcessClientMessage(cl)
rfbClientPtr cl;
{
char *passwd;
int i, n;
CARD8 response[CHALLENGESIZE];
CARD32 authResult;
if ((n = ReadExact(cl, (char *)response, CHALLENGESIZE)) <= 0) {
if (n != 0)
rfbLogPerror("rfbAuthProcessClientMessage: read");
rfbCloseClient(cl);
return;
}
passwd = vncDecryptPasswdFromFile(rfbAuthPasswdFile);
if (passwd == NULL) {
rfbLog("rfbAuthProcessClientMessage: could not get password from %s\n",
rfbAuthPasswdFile);
authResult = Swap32IfLE(rfbVncAuthFailed);
if (WriteExact(cl, (char *)&authResult, 4) < 0) {
rfbLogPerror("rfbAuthProcessClientMessage: write");
}
rfbCloseClient(cl);
return;
}
vncEncryptBytes(cl->authChallenge, passwd);
/* Lose the password from memory */
for (i = strlen(passwd); i >= 0; i--) {
passwd[i] = '\0';
}
free((char *)passwd);
if (memcmp(cl->authChallenge, response, CHALLENGESIZE) != 0) {
rfbLog("rfbAuthProcessClientMessage: authentication failed from %s\n",
cl->host);
authResult = Swap32IfLE(rfbVncAuthFailed);
if (WriteExact(cl, (char *)&authResult, 4) < 0) {
rfbLogPerror("rfbAuthProcessClientMessage: write");
}
rfbCloseClient(cl);
return;
}
authResult = Swap32IfLE(rfbVncAuthOK);
if (WriteExact(cl, (char *)&authResult, 4) < 0) {
rfbLogPerror("rfbAuthProcessClientMessage: write");
rfbCloseClient(cl);
return;
}
cl->state = RFB_INITIALISATION;
}
This diff is collapsed.
/*
* cutpaste.c - routines to deal with cut & paste buffers / selection.
*/
/*
* OSXvnc Copyright (C) 2001 Dan McGuirk <mcguirk@incompleteness.net>.
* Original Xvnc code Copyright (C) 1999 AT&T Laboratories Cambridge.
* All Rights Reserved.
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#include <stdio.h>
#include "rfb.h"
/*
* rfbSetXCutText sets the cut buffer to be the given string. We also clear
* the primary selection. Ideally we'd like to set it to the same thing, but I
* can't work out how to do that without some kind of helper X client.
*/
void rfbGotXCutText(rfbScreenInfoPtr rfbScreen, char *str, int len)
{
rfbSendServerCutText(rfbScreen, str, len);
}
/*
*
* This is an example of how to use libvncserver.
*
* libvncserver example
* Copyright (C) 2001 Johannes E. Schindelin <Johannes.Schindelin@gmx.de>
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#include <stdio.h>
#include <netinet/in.h>
#ifdef __IRIX__
#include <netdb.h>
#endif
#define XK_MISCELLANY
#include "rfb.h"
#include "keysymdef.h"
const int maxx=640, maxy=480, bpp=4;
void doptr(int buttonMask,int x,int y,rfbClientPtr cl)
{
if(buttonMask && x>=0 && y>=0 && x<maxx && y<maxy) {
int i;
for(i=0;i<bpp;i++)
cl->screen->frameBuffer[y*cl->screen->paddedWidthInBytes+x*bpp+i]^=0xff;
rfbMarkRectAsModified(cl->screen,x,y,x+1,y+1);
rfbGotXCutText(cl->screen,"Hallo",5);
}
}
void dokey(Bool down,KeySym key,rfbClientPtr cl)
{
if(down && key==XK_Escape)
rfbCloseClient(cl);
}
int main(int argc,char** argv)
{
int i,j;
rfbScreenInfoPtr rfbScreen = rfbDefaultScreenInit(argc,argv);
rfbScreen->desktopName="LibVNCServer Example";
rfbScreen->frameBuffer = (char*)malloc(maxx*maxy*bpp);
rfbScreen->width=maxx;
rfbScreen->height=maxy;
rfbScreen->paddedWidthInBytes=maxx*bpp;
rfbScreen->ptrAddEvent=doptr;
rfbScreen->kbdAddEvent=dokey;
for(i=0;i<maxx;++i)
for(j=0;j<maxy;++j) {
rfbScreen->frameBuffer[(j*maxx+i)*bpp]=i*256/maxx;
rfbScreen->frameBuffer[(j*maxx+i)*bpp+1]=j*256/maxy;
rfbScreen->frameBuffer[(j*maxx+i)*bpp+2]=(i+j)*256/(maxx*maxy);
}
runEventLoop(rfbScreen,40000,FALSE);
runEventLoop(rfbScreen,40000,TRUE);
while(1);
return(0);
}
L`#
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
/* $XConsortium: Xalloca.h /main/6 1996/09/28 16:17:22 rws $ */
/*
Copyright (c) 1995 X Consortium
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE X CONSORTIUM 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 X Consortium 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 X Consortium.
*/
/*
* The purpose of this header is to define the macros ALLOCATE_LOCAL and
* DEALLOCATE_LOCAL appropriately for the platform being compiled on.
* These macros are used to make fast, function-local memory allocations.
* Their characteristics are as follows:
*
* void *ALLOCATE_LOCAL(int size)
* Returns a pointer to size bytes of memory, or NULL if the allocation
* failed. The memory must be freed with DEALLOCATE_LOCAL before the
* function that made the allocation returns. You should not ask for
* large blocks of memory with this function, since on many platforms
* the memory comes from the stack, which may have limited size.
*
* void DEALLOCATE_LOCAL(void *)
* Frees the memory allocated by ALLOCATE_LOCAL. Omission of this
* step may be harmless on some platforms, but will result in
* memory leaks or worse on others.
*
* Before including this file, you should define two macros,
* ALLOCATE_LOCAL_FALLBACK and DEALLOCATE_LOCAL_FALLBACK, that have the
* same characteristics as ALLOCATE_LOCAL and DEALLOCATE_LOCAL. The
* header uses the fallbacks if it doesn't know a "better" way to define
* ALLOCATE_LOCAL and DEALLOCATE_LOCAL. Typical usage would be:
*
* #define ALLOCATE_LOCAL_FALLBACK(_size) malloc(_size)
* #define DEALLOCATE_LOCAL_FALLBACK(_ptr) free(_ptr)
* #include "Xalloca.h"
*/
#ifndef XALLOCA_H
#define XALLOCA_H 1
#ifdef INCLUDE_ALLOCA_H
# include <alloca.h>
#endif
#ifndef NO_ALLOCA
/*
* os-dependent definition of local allocation and deallocation
* If you want something other than (DE)ALLOCATE_LOCAL_FALLBACK
* for ALLOCATE/DEALLOCATE_LOCAL then you add that in here.
*/
# if defined(__HIGHC__)
# ifndef NCR
extern char *alloca();
# if HCVERSION < 21003
# define ALLOCATE_LOCAL(size) alloca((int)(size))
pragma on(alloca);
# else /* HCVERSION >= 21003 */
# define ALLOCATE_LOCAL(size) _Alloca((int)(size))
# endif /* HCVERSION < 21003 */
# else /* NCR */
# define ALLOCATE_LOCAL(size) alloca(size)
# endif
# define DEALLOCATE_LOCAL(ptr) /* as nothing */
# endif /* defined(__HIGHC__) */
# ifdef __GNUC__
# ifndef alloca
# define alloca __builtin_alloca
# endif /* !alloca */
# define ALLOCATE_LOCAL(size) alloca((int)(size))
# define DEALLOCATE_LOCAL(ptr) /* as nothing */
# else /* ! __GNUC__ */
/*
* warning: old mips alloca (pre 2.10) is unusable, new one is built in
* Test is easy, the new one is named __builtin_alloca and comes
* from alloca.h which #defines alloca.
*/
# ifndef NCR
# if defined(vax) || defined(sun) || defined(apollo) || defined(stellar) || defined(USL) || defined(alloca)
/*
* Some System V boxes extract alloca.o from /lib/libPW.a; if you
* decide that you don't want to use alloca, you might want to fix it here.
*/
/* alloca might be a macro taking one arg (hi, Sun!), so give it one. */
# ifndef __sgi /* IRIX 5/6 has definition */
# define __Xnullarg /* as nothing */
# ifndef X_NOT_STDC_ENV
extern void *alloca(__Xnullarg);
# else
extern char *alloca(__Xnullarg);
# endif
# endif /* __sgi */
# define ALLOCATE_LOCAL(size) alloca((int)(size))
# define DEALLOCATE_LOCAL(ptr) /* as nothing */
# endif /* who does alloca */
# endif /* NCR */
# endif /* __GNUC__ */
#endif /* NO_ALLOCA */
#if !defined(ALLOCATE_LOCAL)
# if defined(ALLOCATE_LOCAL_FALLBACK) && defined(DEALLOCATE_LOCAL_FALLBACK)
# define ALLOCATE_LOCAL(_size) ALLOCATE_LOCAL_FALLBACK(_size)
# define DEALLOCATE_LOCAL(_ptr) DEALLOCATE_LOCAL_FALLBACK(_ptr)
# else /* no fallbacks supplied; error */
# define ALLOCATE_LOCAL(_size) ALLOCATE_LOCAL_FALLBACK undefined!
# define DEALLOCATE_LOCAL(_ptr) DEALLOCATE_LOCAL_FALLBACK undefined!
# endif /* defined(ALLOCATE_LOCAL_FALLBACK && DEALLOCATE_LOCAL_FALLBACK) */
#endif /* !defined(ALLOCATE_LOCAL) */
#endif /* XALLOCA_H */
/* $XConsortium: Xfuncproto.h,v 1.9 95/06/08 23:20:39 gildea Exp $ */
/*
*
Copyright (c) 1989, 1991 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM 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 X Consortium 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 X Consortium.
*
*/
/* Definitions to make function prototypes manageable */
#ifndef _XFUNCPROTO_H_
#define _XFUNCPROTO_H_
#ifndef NeedFunctionPrototypes
#if defined(FUNCPROTO) || defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
#define NeedFunctionPrototypes 1
#else
#define NeedFunctionPrototypes 0
#endif
#endif /* NeedFunctionPrototypes */
#ifndef NeedVarargsPrototypes
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus) || (FUNCPROTO&2)
#define NeedVarargsPrototypes 1
#else
#define NeedVarargsPrototypes 0
#endif
#endif /* NeedVarargsPrototypes */
#if NeedFunctionPrototypes
#ifndef NeedNestedPrototypes
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus) || (FUNCPROTO&8)
#define NeedNestedPrototypes 1
#else
#define NeedNestedPrototypes 0
#endif
#endif /* NeedNestedPrototypes */
#ifndef _Xconst
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus) || (FUNCPROTO&4)
#define _Xconst const
#else
#define _Xconst
#endif
#endif /* _Xconst */
#ifndef NeedWidePrototypes
#ifdef NARROWPROTO
#define NeedWidePrototypes 0
#else
#define NeedWidePrototypes 1 /* default to make interropt. easier */
#endif
#endif /* NeedWidePrototypes */
#endif /* NeedFunctionPrototypes */
#ifndef _XFUNCPROTOBEGIN
#ifdef __cplusplus /* for C++ V2.0 */
#define _XFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */
#define _XFUNCPROTOEND }
#else
#define _XFUNCPROTOBEGIN
#define _XFUNCPROTOEND
#endif
#endif /* _XFUNCPROTOBEGIN */
#endif /* _XFUNCPROTO_H_ */
/*
* $XConsortium: Xfuncs.h,v 1.16 94/12/01 16:25:53 kaleb Exp $
* $XFree86: xc/include/Xfuncs.h,v 3.2 1995/01/28 15:42:03 dawes Exp $
*
*
Copyright (c) 1990 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM 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 X Consortium 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 X Consortium.
*
*/
#ifndef _XFUNCS_H_
#define _XFUNCS_H_
#include <X11/Xosdefs.h>
/* the old Xfuncs.h, for pre-R6 */
#ifdef X_USEBFUNCS
void bcopy();
void bzero();
int bcmp();
#else
#if (__STDC__ && !defined(X_NOT_STDC_ENV) && !defined(sun) && !defined(macII) && !defined(apollo)) || defined(SVR4) || defined(hpux) || defined(_IBMR2) || defined(_SEQUENT_)
#include <string.h>
#define _XFUNCS_H_INCLUDED_STRING_H
#define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len))
#define bzero(b,len) memset(b, 0, (size_t)(len))
#define bcmp(b1,b2,len) memcmp(b1, b2, (size_t)(len))
#else
#ifdef sgi
#include <bstring.h>
#else
#ifdef SYSV
#include <memory.h>
void bcopy();
#define bzero(b,len) memset(b, 0, len)
#define bcmp(b1,b2,len) memcmp(b1, b2, len)
#else
#ifdef __EMX__
#include <strings.h>
#define _XFUNCS_H_INCLUDED_STRING_H
/* bcopy, bcmp, bzero declared */
#else /* bsd */
void bcopy();
void bzero();
int bcmp();
#endif
#endif /* SYSV */
#endif /* sgi */
#endif /* __STDC__ and relatives */
#endif /* X_USEBFUNCS */
/* the new Xfuncs.h */
#if !defined(X_NOT_STDC_ENV) && (!defined(sun) || defined(SVR4))
/* the ANSI C way */
#ifndef _XFUNCS_H_INCLUDED_STRING_H
#include <string.h>
#endif
#undef bzero
#define bzero(b,len) memset(b,0,len)
#else /* else X_NOT_STDC_ENV or SunOS 4 */
#if defined(SYSV) || defined(luna) || defined(sun) || defined(__sxg__)
#include <memory.h>
#define memmove(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
#if defined(SYSV) && defined(_XBCOPYFUNC)
#undef memmove
#define memmove(dst,src,len) _XBCOPYFUNC((char *)(src),(char *)(dst),(int)(len))
#define _XNEEDBCOPYFUNC
#endif
#else /* else vanilla BSD */
#define memmove(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
#define memcpy(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
#define memcmp(b1,b2,len) bcmp((char *)(b1),(char *)(b2),(int)(len))
#endif /* SYSV else */
#endif /* ! X_NOT_STDC_ENV else */
#endif /* _XFUNCS_H_ */
/***********************************************************
Copyright (c) 1987 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM 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 X Consortium 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 X Consortium.
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
/* $XConsortium: Xmd.h,v 1.49 95/06/08 23:20:39 gildea Exp $ */
/* $XFree86: xc/include/Xmd.h,v 3.4 1996/12/31 04:15:20 dawes Exp $ */
/*
* Xmd.h: MACHINE DEPENDENT DECLARATIONS.
*/
/*
* Special per-machine configuration flags.
*/
#ifdef CRAY
#define WORD64 /* 64-bit architecture */
#endif
#if defined(__alpha) || defined(__alpha__)
#define LONG64 /* 32/64-bit architecture */
#endif
#ifdef __sgi
#if (_MIPS_SZLONG == 64)
#define LONG64
#endif
#endif
/*
* Stuff to handle large architecture machines; the constants were generated
* on a 32-bit machine and must coorespond 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 in the __STDC__ case is to get macro arguments to
* expand correctly before the concatenation, rather than afterward.
*/
#if ((defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)) && !defined(UNIXCPP)) || defined(ANSICPP)
#define _SIZEOF(x) sz_##x
#define SIZEOF(x) _SIZEOF(x)
#else
#define SIZEOF(x) sz_/**/x
#endif /* if ANSI C compiler else not */
/*
* Bitfield suffixes for the protocol structure elements, if you
* need them. Note that bitfields are not guarranteed 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
#ifdef __STDC__
typedef signed int INT32;
typedef signed int INT16;
#else
typedef int INT32;
typedef int INT16;
#endif
#endif
#else
#define B32
#define B16
#ifdef LONG64
typedef long INT64;
typedef int INT32;
#else
typedef long INT32;
#endif
typedef short INT16;
#endif
#if defined(__STDC__) || defined(sgi) || defined(AIXV3)
typedef signed char INT8;
#else
typedef char INT8;
#endif
#ifdef LONG64
typedef unsigned long CARD64;
typedef unsigned int CARD32;
#else
typedef unsigned long CARD32;
#endif
typedef unsigned short CARD16;
typedef unsigned char CARD8;
typedef CARD32 BITS32;
typedef CARD16 BITS16;
#ifndef __EMX__
typedef CARD8 BYTE;
typedef CARD8 BOOL;
#else
/*
* This is bad style, but the central include file <os2.h> declares them
* as well
*/
#define BYTE CARD8
#define BOOL CARD8
#endif
/*
* 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 */
/*
* $XConsortium: Xos.h /main/70 1996/11/15 16:00:41 kaleb $
* $XFree86: xc/include/Xos.h,v 3.21.2.1 1998/01/23 12:35:11 dawes Exp $
*
*
Copyright (c) 1987 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM 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 X Consortium 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 X Consortium.
*
* The X Window System is a Trademark of X Consortium.
*
*/
/* This is a collection of things to try and minimize system dependencies
* in a "signficant" number of source files.
*/
#ifndef _XOS_H_
#define _XOS_H_
#include <X11/Xosdefs.h>
/*
* Get major data types (esp. caddr_t)
*/
#ifdef USG
#ifndef __TYPES__
#ifdef CRAY
#define word word_t
#endif /* CRAY */
#include <sys/types.h> /* forgot to protect it... */
#define __TYPES__
#endif /* __TYPES__ */
#else /* USG */
#if defined(_POSIX_SOURCE) && (defined(MOTOROLA) || defined(AMOEBA))
#undef _POSIX_SOURCE
#include <sys/types.h>
#define _POSIX_SOURCE
#else
#include <sys/types.h>
#endif
#endif /* USG */
/*
* Just about everyone needs the strings routines. We provide both forms here,
* index/rindex and strchr/strrchr, so any systems that don't provide them all
* need to have #defines here.
*
* NOTE: The following ISN'T true for this XFree86 version of this file.
*
* These macros are defined this way, rather than, e.g.:
* #defined index(s,c) strchr(s,c)
* because someone might be using them as function pointers, and such
* a change would break compatibility for anyone who's relying on them
* being the way they currently are. So we're stuck with them this way,
* which can be really inconvenient. :-(
*/
#ifndef X_NOT_STDC_ENV
#include <string.h>
#ifdef __STDC__
#ifndef index
#define index(s,c) (strchr((s),(c)))
#endif
#ifndef rindex
#define rindex(s,c) (strrchr((s),(c)))
#endif
#else
#ifndef index
#define index strchr
#endif
#ifndef rindex
#define rindex strrchr
#endif
#endif
#else
#ifdef SYSV
#if defined(clipper) || defined(__clipper__)
#include <malloc.h>
#endif
#include <string.h>
#define index strchr
#define rindex strrchr
#else
#include <strings.h>
#define strchr index
#define strrchr rindex
#endif
#endif /* X_NOT_STDC_ENV */
/*
* strerror()
*/
#if (defined(X_NOT_STDC_ENV) || (defined(sun) && !defined(SVR4)) || defined(macII)) && !defined(__GLIBC__)
#ifndef strerror
extern char *sys_errlist[];
extern int sys_nerr;
#define strerror(n) \
(((n) >= 0 && (n) < sys_nerr) ? sys_errlist[n] : "unknown error")
#endif
#endif
/*
* Get open(2) constants
*/
#ifdef X_NOT_POSIX
#include <fcntl.h>
#if defined(USL) || defined(CRAY) || defined(MOTOROLA) || (defined(i386) && (defined(SYSV) || defined(SVR4))) || defined(__sxg__)
#include <unistd.h>
#endif
#ifdef WIN32
#include <X11/Xw32defs.h>
#else
#include <sys/file.h>
#endif
#else /* X_NOT_POSIX */
#if !defined(_POSIX_SOURCE) && defined(macII)
#define _POSIX_SOURCE
#include <fcntl.h>
#include <unistd.h>
#undef _POSIX_SOURCE
#else
#include <fcntl.h>
#include <unistd.h>
#endif
#endif /* X_NOT_POSIX else */
#ifdef CSRG_BASED
#include <stdlib.h>
#include <unistd.h>
#endif /* CSRG_BASED */
/*
* Get struct timeval
*/
#ifdef SYSV
#ifndef USL
#include <sys/time.h>
#endif
#include <time.h>
#ifdef CRAY
#undef word
#endif /* CRAY */
#if defined(USG) && !defined(CRAY) && !defined(MOTOROLA) && !defined(uniosu) && !defined(__sxg__) && !defined(clipper) && !defined(__clipper__)
struct timeval {
long tv_sec;
long tv_usec;
};
#ifndef USL_SHARELIB
struct timezone {
int tz_minuteswest;
int tz_dsttime;
};
#endif /* USL_SHARELIB */
#endif /* USG */
#ifdef _SEQUENT_
struct timezone {
int tz_minuteswest;
int tz_dsttime;
};
#endif /* _SEQUENT_ */
#else /* not SYSV */
#if defined(_ANSI_SOURCE) && defined(__bsdi__)
#undef _ANSI_SOURCE
#include <sys/time.h>
#define _ANSI_SOURCE
#endif
#if defined(_POSIX_SOURCE) && defined(SVR4)
/* need to omit _POSIX_SOURCE in order to get what we want in SVR4 */
#undef _POSIX_SOURCE
#include <sys/time.h>
#define _POSIX_SOURCE
#else /* defined(_POSIX_SOURCE) && defined(SVR4) */
#ifdef WIN32
#include <time.h>
#if !defined(_WINSOCKAPI_) && !defined(_WILLWINSOCK_)
struct timeval {
long tv_sec; /* seconds */
long tv_usec; /* and microseconds */
};
#endif
#include <sys/timeb.h>
#define gettimeofday(t) \
{ \
struct _timeb _gtodtmp; \
_ftime (&_gtodtmp); \
(t)->tv_sec = _gtodtmp.time; \
(t)->tv_usec = _gtodtmp.millitm * 1000; \
}
#else /* WIN32 */
#ifdef _SEQUENT_
#include <time.h>
#else /* _SEQUENT_ */
#ifdef AMOEBA
#include <time.h>
#include <sys/time.h>
#else /* AMOEBA */
#ifdef MINIX
#include <time.h>
#else /* !MINIX */
#ifndef Lynx
#include <sys/time.h>
#else
#include <time.h>
#endif /* Lynx */
#endif /* MINIX */
#endif /* AMOEBA */
#endif /* _SEQUENT_ */
#endif /* WIN32 else */
#endif /* defined(_POSIX_SOURCE) && defined(SVR4) */
#endif /* SYSV */
/* define X_GETTIMEOFDAY macro, a portable gettimeofday() */
#if defined(_XOPEN_XPG4) || defined(_XOPEN_UNIX) /* _XOPEN_UNIX is XPG4.2 */
#define X_GETTIMEOFDAY(t) gettimeofday(t, (struct timezone*)0)
#else
#if defined(SVR4) || defined(VMS) || defined(WIN32)
#define X_GETTIMEOFDAY(t) gettimeofday(t)
#else
#define X_GETTIMEOFDAY(t) gettimeofday(t, (struct timezone*)0)
#endif
#endif /* XPG4 else */
#ifdef MINIX
#include <errno.h>
#include <net/gen/in.h>
#include <net/gen/socket.h>
#include <net/gen/udp.h>
#include <net/gen/udp_hdr.h>
struct sockaddr
{
u16_t sa_family;
char sa_data[14];
};
struct sockaddr_in
{
u16_t sin_family;
u16_t sin_port;
struct
{
ipaddr_t s_addr;
} sin_addr;
char sin_zero[8];
};
struct in_addr
{
ipaddr_t s_addr;
};
typedef char *caddr_t;
typedef unsigned char u_char;
#endif /* MINIX */
#ifdef __EMX__
typedef unsigned long fd_mask;
#endif
/* use POSIX name for signal */
#if defined(X_NOT_POSIX) && defined(SYSV) && !defined(SIGCHLD) && !defined(ISC)
#define SIGCHLD SIGCLD
#endif
#ifdef ISC
#include <sys/bsdtypes.h>
#include <sys/limits.h>
#define NGROUPS 16
#endif
#if defined(ISC) || defined(__EMX__)
/*
* Some OS's may not have this
*/
#define X_NO_SYS_UN 1
struct sockaddr_un {
short sun_family;
char sun_path[108];
};
#endif
#endif /* _XOS_H_ */
/*
* O/S-dependent (mis)feature macro definitions
*
* $XConsortium: Xosdefs.h /main/16 1996/09/28 16:17:29 rws $
* $XFree86: xc/include/Xosdefs.h,v 3.11 1996/12/23 05:58:09 dawes Exp $
*
Copyright (c) 1991 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM 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 X Consortium 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 X Consortium.
*/
#ifndef _XOSDEFS_H_
#define _XOSDEFS_H_
/*
* X_NOT_STDC_ENV means does not have ANSI C header files. Lack of this
* symbol does NOT mean that the system has stdarg.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 NOSTDHDRS
#define X_NOT_POSIX
#define X_NOT_STDC_ENV
#endif
#ifdef sony
#if !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV)
#define X_NOT_POSIX
#endif
#endif
#ifdef UTEK
#define X_NOT_POSIX
#define X_NOT_STDC_ENV
#endif
#ifdef vax
#ifndef ultrix /* assume vanilla BSD */
#define X_NOT_POSIX
#define X_NOT_STDC_ENV
#endif
#endif
#ifdef luna
#define X_NOT_POSIX
#define X_NOT_STDC_ENV
#endif
#ifdef Mips
#define X_NOT_POSIX
#define X_NOT_STDC_ENV
#endif
#ifdef USL
#ifdef SYSV /* (release 3.2) */
#define X_NOT_POSIX
#define X_NOT_STDC_ENV
#endif
#endif
#ifdef i386
#ifdef SYSV
#if !(defined(ISC) && defined(_POSIX_SOURCE))
#ifndef SCO
#ifndef _SCO_DS /* SCO 5.0 has SVR4 header files */
#define X_NOT_POSIX
#endif
#define X_NOT_STDC_ENV
#endif
#endif /* !(defined(ISC) && defined(_POSIX_SOURCE)) */
#endif
#endif
#ifdef MOTOROLA
#ifdef SYSV
#define X_NOT_STDC_ENV
#endif
#endif
#ifdef sun
#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
#if defined(nec_ews_svr2) || defined(SX) || defined(PC_UX)
#define X_NOT_POSIX
#define X_NOT_STDC_ENV
#endif
#ifdef __EMX__
#define USGISH
/* EMX claims to be ANSI, so X_NOT_STDC_ENV does not hold */
/* could have been provided as std flags as well */
#define X_WCHAR
#define X_LOCALE
#endif
#endif /* _XOSDEFS_H_ */
This diff is collapsed.
/* $XConsortium: Xprotostr.h,v 1.5 94/04/17 20:10:53 rws Exp $ */
#ifndef XPROTOSTRUCTS_H
#define XPROTOSTRUCTS_H
/***********************************************************
Copyright (c) 1987 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM 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 X Consortium 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 X Consortium.
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 */
/* $XConsortium: keysym.h,v 1.15 94/04/17 20:10:55 rws Exp $ */
/***********************************************************
Copyright (c) 1987 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM 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 X Consortium 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 X Consortium.
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_GREEK
#include <X11/keysymdef.h>
This diff is collapsed.
/*
Copyright (c) 1987 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM 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 X Consortium 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 X Consortium.
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.
*/
/* $XConsortium: colormap.h,v 1.28 94/04/17 20:25:32 dpw Exp $ */
/* $XFree86: xc/programs/Xserver/include/colormap.h,v 1.2 1997/01/14 22:22:38 dawes Exp $ */
#ifndef CMAP_H
#define CMAP_H 1
#include "X11/Xproto.h"
#include "screenint.h"
#include "window.h"
/* these follow X.h's AllocNone and AllocAll */
#define CM_PSCREEN 2
#define CM_PWIN 3
/* Passed internally in colormap.c */
#define REDMAP 0
#define GREENMAP 1
#define BLUEMAP 2
#define PSEUDOMAP 3
#define AllocPrivate (-1)
#define AllocTemporary (-2)
#define DynamicClass 1
/* Values for the flags field of a colormap. These should have 1 bit set
* and not overlap */
#define IsDefault 1
#define AllAllocated 2
#define BeingCreated 4
typedef CARD32 Pixel;
typedef struct _CMEntry *EntryPtr;
/* moved to screenint.h: typedef struct _ColormapRec *ColormapPtr */
typedef struct _colorResource *colorResourcePtr;
extern int CreateColormap(
#if NeedFunctionPrototypes
Colormap /*mid*/,
ScreenPtr /*pScreen*/,
VisualPtr /*pVisual*/,
ColormapPtr* /*ppcmap*/,
int /*alloc*/,
int /*client*/
#endif
);
extern int FreeColormap(
#if NeedFunctionPrototypes
pointer /*pmap*/,
XID /*mid*/
#endif
);
extern int TellLostMap(
#if NeedFunctionPrototypes
X11WindowPtr /*pwin*/,
pointer /* Colormap *pmid */
#endif
);
extern int TellGainedMap(
#if NeedFunctionPrototypes
X11WindowPtr /*pwin*/,
pointer /* Colormap *pmid */
#endif
);
extern int CopyColormapAndFree(
#if NeedFunctionPrototypes
Colormap /*mid*/,
ColormapPtr /*pSrc*/,
int /*client*/
#endif
);
extern int AllocColor(
#if NeedFunctionPrototypes
ColormapPtr /*pmap*/,
unsigned short* /*pred*/,
unsigned short* /*pgreen*/,
unsigned short* /*pblue*/,
Pixel* /*pPix*/,
int /*client*/
#endif
);
extern void FakeAllocColor(
#if NeedFunctionPrototypes
ColormapPtr /*pmap*/,
xColorItem * /*item*/
#endif
);
extern void FakeFreeColor(
#if NeedFunctionPrototypes
ColormapPtr /*pmap*/,
Pixel /*pixel*/
#endif
);
typedef int (*ColorCompareProcPtr)(
#if NeedNestedPrototypes
EntryPtr /*pent*/,
xrgb * /*prgb*/
#endif
);
extern int FindColor(
#if NeedFunctionPrototypes
ColormapPtr /*pmap*/,
EntryPtr /*pentFirst*/,
int /*size*/,
xrgb* /*prgb*/,
Pixel* /*pPixel*/,
int /*channel*/,
int /*client*/,
ColorCompareProcPtr /*comp*/
#endif
);
extern int QueryColors(
#if NeedFunctionPrototypes
ColormapPtr /*pmap*/,
int /*count*/,
Pixel* /*ppixIn*/,
xrgb* /*prgbList*/
#endif
);
extern int FreeClientPixels(
#if NeedFunctionPrototypes
pointer /*pcr*/,
XID /*fakeid*/
#endif
);
extern int AllocColorCells(
#if NeedFunctionPrototypes
int /*client*/,
ColormapPtr /*pmap*/,
int /*colors*/,
int /*planes*/,
Bool /*contig*/,
Pixel* /*ppix*/,
Pixel* /*masks*/
#endif
);
extern int AllocColorPlanes(
#if NeedFunctionPrototypes
int /*client*/,
ColormapPtr /*pmap*/,
int /*colors*/,
int /*r*/,
int /*g*/,
int /*b*/,
Bool /*contig*/,
Pixel* /*pixels*/,
Pixel* /*prmask*/,
Pixel* /*pgmask*/,
Pixel* /*pbmask*/
#endif
);
extern int FreeColors(
#if NeedFunctionPrototypes
ColormapPtr /*pmap*/,
int /*client*/,
int /*count*/,
Pixel* /*pixels*/,
Pixel /*mask*/
#endif
);
extern int StoreColors(
#if NeedFunctionPrototypes
ColormapPtr /*pmap*/,
int /*count*/,
xColorItem* /*defs*/
#endif
);
extern int IsMapInstalled(
#if NeedFunctionPrototypes
Colormap /*map*/,
X11WindowPtr /*pWin*/
#endif
);
#endif /* CMAP_H */
/***********************************************************
Copyright (c) 1987 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM 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 X Consortium 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 X Consortium.
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.
******************************************************************/
/* $XConsortium: cursor.h,v 1.22 94/04/17 20:25:34 dpw Exp $ */
#ifndef CURSOR_H
#define CURSOR_H
#include "misc.h"
#include "screenint.h"
#include "window.h"
#define NullCursor ((CursorPtr)NULL)
typedef struct _Cursor *CursorPtr;
typedef struct _CursorMetric *CursorMetricPtr;
extern CursorPtr rootCursor;
extern int FreeCursor(
#if NeedFunctionPrototypes
pointer /*pCurs*/,
XID /*cid*/
#endif
);
extern CursorPtr X11AllocCursor(
#if NeedFunctionPrototypes
unsigned char* /*psrcbits*/,
unsigned char* /*pmaskbits*/,
CursorMetricPtr /*cm*/,
unsigned /*foreRed*/,
unsigned /*foreGreen*/,
unsigned /*foreBlue*/,
unsigned /*backRed*/,
unsigned /*backGreen*/,
unsigned /*backBlue*/
#endif
);
extern int AllocGlyphCursor(
#if NeedFunctionPrototypes
Font /*source*/,
unsigned int /*sourceChar*/,
Font /*mask*/,
unsigned int /*maskChar*/,
unsigned /*foreRed*/,
unsigned /*foreGreen*/,
unsigned /*foreBlue*/,
unsigned /*backRed*/,
unsigned /*backGreen*/,
unsigned /*backBlue*/,
CursorPtr* /*ppCurs*/,
ClientPtr /*client*/
#endif
);
extern CursorPtr CreateRootCursor(
#if NeedFunctionPrototypes
char* /*pfilename*/,
unsigned int /*glyph*/
#endif
);
extern int ServerBitsFromGlyph(
#if NeedFunctionPrototypes
FontPtr /*pfont*/,
unsigned int /*ch*/,
register CursorMetricPtr /*cm*/,
unsigned char ** /*ppbits*/
#endif
);
extern Bool CursorMetricsFromGlyph(
#if NeedFunctionPrototypes
FontPtr /*pfont*/,
unsigned /*ch*/,
CursorMetricPtr /*cm*/
#endif
);
extern void CheckCursorConfinement(
#if NeedFunctionPrototypes
X11WindowPtr /*pWin*/
#endif
);
extern void NewCurrentScreen(
#if NeedFunctionPrototypes
ScreenPtr /*newScreen*/,
int /*x*/,
int /*y*/
#endif
);
extern Bool PointerConfinedToScreen(
#if NeedFunctionPrototypes
void
#endif
);
extern void GetSpritePosition(
#if NeedFunctionPrototypes
int * /*px*/,
int * /*py*/
#endif
);
#endif /* CURSOR_H */
This diff is collapsed.
/***********************************************************
Copyright (c) 1987 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM 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 X Consortium 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 X Consortium.
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.
******************************************************************/
/* $XConsortium: gc.h /main/16 1996/08/01 19:18:17 dpw $ */
#ifndef GC_H
#define GC_H
#include "misc.h" /* for Bool */
#include "X11/X.h" /* for GContext, Mask */
#include "X11/Xproto.h"
#include "screenint.h" /* for ScreenPtr */
#include "pixmap.h" /* for DrawablePtr */
/* clientClipType field in GC */
#define CT_NONE 0
#define CT_PIXMAP 1
#define CT_REGION 2
#define CT_UNSORTED 6
#define CT_YSORTED 10
#define CT_YXSORTED 14
#define CT_YXBANDED 18
#define GCQREASON_VALIDATE 1
#define GCQREASON_CHANGE 2
#define GCQREASON_COPY_SRC 3
#define GCQREASON_COPY_DST 4
#define GCQREASON_DESTROY 5
#define GC_CHANGE_SERIAL_BIT (((unsigned long)1)<<31)
#define GC_CALL_VALIDATE_BIT (1L<<30)
#define GCExtensionInterest (1L<<29)
#define DRAWABLE_SERIAL_BITS (~(GC_CHANGE_SERIAL_BIT))
#define MAX_SERIAL_NUM (1L<<28)
#define NEXT_SERIAL_NUMBER ((++globalSerialNumber) > MAX_SERIAL_NUM ? \
(globalSerialNumber = 1): globalSerialNumber)
typedef struct _GCInterest *GCInterestPtr;
typedef struct _GC *GCPtr;
typedef struct _GCOps *GCOpsPtr;
extern void ValidateGC(
#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
GCPtr /*pGC*/
#endif
);
extern int ChangeGC(
#if NeedFunctionPrototypes
GCPtr/*pGC*/,
BITS32 /*mask*/,
XID* /*pval*/
#endif
);
extern int DoChangeGC(
#if NeedFunctionPrototypes
GCPtr/*pGC*/,
BITS32 /*mask*/,
XID* /*pval*/,
int /*fPointer*/
#endif
);
typedef union {
CARD32 val;
pointer ptr;
} ChangeGCVal, *ChangeGCValPtr;
extern int dixChangeGC(
#if NeedFunctionPrototypes
ClientPtr /*client*/,
GCPtr /*pGC*/,
BITS32 /*mask*/,
CARD32 * /*pval*/,
ChangeGCValPtr /*pCGCV*/
#endif
);
extern GCPtr CreateGC(
#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
BITS32 /*mask*/,
XID* /*pval*/,
int* /*pStatus*/
#endif
);
extern int CopyGC(
#if NeedFunctionPrototypes
GCPtr/*pgcSrc*/,
GCPtr/*pgcDst*/,
BITS32 /*mask*/
#endif
);
extern int FreeGC(
#if NeedFunctionPrototypes
pointer /*pGC*/,
XID /*gid*/
#endif
);
extern void SetGCMask(
#if NeedFunctionPrototypes
GCPtr /*pGC*/,
Mask /*selectMask*/,
Mask /*newDataMask*/
#endif
);
extern GCPtr CreateScratchGC(
#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/,
unsigned /*depth*/
#endif
);
extern void FreeGCperDepth(
#if NeedFunctionPrototypes
int /*screenNum*/
#endif
);
extern Bool CreateGCperDepth(
#if NeedFunctionPrototypes
int /*screenNum*/
#endif
);
extern Bool CreateDefaultStipple(
#if NeedFunctionPrototypes
int /*screenNum*/
#endif
);
extern void FreeDefaultStipple(
#if NeedFunctionPrototypes
int /*screenNum*/
#endif
);
extern int SetDashes(
#if NeedFunctionPrototypes
GCPtr /*pGC*/,
unsigned /*offset*/,
unsigned /*ndash*/,
unsigned char* /*pdash*/
#endif
);
extern int VerifyRectOrder(
#if NeedFunctionPrototypes
int /*nrects*/,
xRectangle* /*prects*/,
int /*ordering*/
#endif
);
extern int SetClipRects(
#if NeedFunctionPrototypes
GCPtr /*pGC*/,
int /*xOrigin*/,
int /*yOrigin*/,
int /*nrects*/,
xRectangle* /*prects*/,
int /*ordering*/
#endif
);
extern GCPtr GetScratchGC(
#if NeedFunctionPrototypes
unsigned /*depth*/,
ScreenPtr /*pScreen*/
#endif
);
extern void FreeScratchGC(
#if NeedFunctionPrototypes
GCPtr /*pGC*/
#endif
);
#endif /* GC_H */
This diff is collapsed.
This diff is collapsed.
/* $XConsortium: miscstruct.h,v 5.5 94/04/17 20:25:50 dpw Exp $ */
/* $XFree86: xc/programs/Xserver/include/miscstruct.h,v 3.0 1996/02/18 03:45:10 dawes Exp $ */
/***********************************************************
Copyright (c) 1987 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM 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 X Consortium 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 X Consortium.
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 MISCSTRUCT_H
#define MISCSTRUCT_H 1
#include "misc.h"
#include "X11/Xprotostr.h"
typedef xPoint DDXPointRec;
typedef struct _Box {
short x1, y1, x2, y2;
} BoxRec;
typedef union _DevUnion {
pointer ptr;
long val;
unsigned long uval;
pointer (*fptr)(
#if NeedFunctionPrototypes
void
#endif
);
} DevUnion;
#endif /* MISCSTRUCT_H */
/* $XConsortium: opaque.h,v 1.19 94/04/17 20:25:51 dpw Exp $ */
/*
Copyright (c) 1987 X Consortium
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE X CONSORTIUM 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 X Consortium 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 X Consortium.
*/
/* $XFree86: xc/programs/Xserver/include/opaque.h,v 1.2.2.1 1997/06/01 12:33:43 dawes Exp $ */
#ifndef OPAQUE_H
#define OPAQUE_H
#include <X11/Xmd.h>
extern char *defaultFontPath;
extern char *defaultTextFont;
extern char *defaultCursorFont;
extern char *rgbPath;
extern int MaxClients;
extern char isItTimeToYield;
extern char dispatchException;
/* bit values for dispatchException */
#define DE_RESET 1
#define DE_TERMINATE 2
#define DE_PRIORITYCHANGE 4 /* set when a client's priority changes */
extern CARD32 TimeOutValue;
extern CARD32 ScreenSaverTime;
extern CARD32 ScreenSaverInterval;
extern int ScreenSaverBlanking;
extern int ScreenSaverAllowExposures;
extern int argcGlobal;
extern char **argvGlobal;
#if DPMSExtension
extern CARD32 defaultDPMSStandbyTime;
extern CARD32 defaultDPMSSuspendTime;
extern CARD32 defaultDPMSOffTime;
extern CARD32 DPMSStandbyTime;
extern CARD32 DPMSSuspendTime;
extern CARD32 DPMSOffTime;
extern CARD16 DPMSPowerLevel;
extern Bool defaultDPMSEnabled;
extern Bool DPMSEnabled;
extern Bool DPMSEnabledSwitch;
extern Bool DPMSDisabledSwitch;
extern Bool DPMSCapableFlag;
#endif
#endif /* OPAQUE_H */
This diff is collapsed.
This diff is collapsed.
/* $XConsortium: region.h,v 1.5 94/04/17 20:25:59 dpw Exp $ */
/***********************************************************
Copyright (c) 1987 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM 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 X Consortium 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 X Consortium.
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 REGION_H
#define REGION_H
#include "regionstr.h"
#endif /* REGION_H */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* $XConsortium: validate.h,v 5.4 94/04/17 20:26:11 dpw Exp $ */
/*
Copyright (c) 1989 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM 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 X Consortium 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 X Consortium.
*/
#ifndef VALIDATE_H
#define VALIDATE_H
#include "miscstruct.h"
#include "regionstr.h"
typedef enum { VTOther, VTStack, VTMove, VTUnmap, VTMap } VTKind;
/* union _Validate is now device dependent; see mivalidate.h for an example */
typedef union _Validate *ValidatePtr;
#define UnmapValData ((ValidatePtr)1)
#endif /* VALIDATE_H */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment