diff options
Diffstat (limited to 'x11.h')
-rw-r--r-- | x11.h | 132 |
1 files changed, 82 insertions, 50 deletions
@@ -23,8 +23,37 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. * * + * Copyright 2002 Sun Microsystems, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, and/or sell copies of the Software, and to permit persons + * to whom the Software is furnished to do so, provided that the above + * copyright notice(s) and this permission notice appear in all copies of + * the Software and that both the above copyright notice(s) and this + * permission notice appear in supporting documentation. + * + * 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 + * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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. + * + * Except as contained in this notice, the name of a copyright holder + * shall not be used in advertising or otherwise to promote the sale, use + * or other dealings in this Software without prior written authorization + * of the copyright holder. + * * ************************************************************ */ +#ifndef XSCOPE_X11_H +#define XSCOPE_X11_H /* Some field contents are constants, not just types */ @@ -238,53 +267,6 @@ extern char ScopeEnabled; /* */ /* ************************************************************ */ -/* declaration of the existance of print routines for the basic types */ - -extern int PrintINT8(); -extern int PrintINT16(); -extern int PrintINT32(); -extern int PrintCARD8(); -extern int PrintCARD16(); -extern int PrintCARD32(); -extern int PrintBYTE(); -extern int PrintCHAR8(); -extern int PrintSTRING16(); -extern int PrintTEXTITEM8(); -extern int PrintTEXTITEM16(); -extern int PrintSTR(); -extern int PrintWINDOW(); -extern int PrintWINDOWD(); -extern int PrintWINDOWNR(); -extern int PrintPIXMAP(); -extern int PrintPIXMAPNPR(); -extern int PrintPIXMAPC(); -extern int PrintCURSOR(); -extern int PrintFONT(); -extern int PrintGCONTEXT(); -extern int PrintCOLORMAP(); -extern int PrintCOLORMAPC(); -extern int PrintDRAWABLE(); -extern int PrintFONTABLE(); -extern int PrintATOM(); -extern int PrintATOMT(); -extern int PrintVISUALID(); -extern int PrintVISUALIDC(); -extern int PrintTIMESTAMP(); -extern int PrintRESOURCEID(); -extern int PrintKEYSYM(); -extern int PrintKEYCODE(); -extern int PrintKEYCODEA(); -extern int PrintBUTTON(); -extern int PrintBUTTONA(); -extern int PrintEVENTFORM(); -extern int PrintENUMERATED(); -extern int PrintSET(); - -/* ************************************************************ */ -/* */ -/* */ -/* ************************************************************ */ - /* Type Definition Table Each item in the X11 Protocol has a type. There are about 120 @@ -314,12 +296,14 @@ struct ValueListEntry long Value; }; +typedef int (*PrintProcType) (unsigned char *); + struct TypeDef { char *Name; short Type /* BUILTIN, ENUMERATED, SET, or RECORD */ ; struct ValueListEntry *ValueList; - int (*PrintProc)(); + PrintProcType PrintProc; }; typedef struct TypeDef *TYPE; @@ -331,6 +315,53 @@ extern struct TypeDef TD[MaxTypes]; /* */ /* ************************************************************ */ +/* declaration of the existance of print routines for the basic types */ + +extern int PrintINT8(unsigned char *buf); +extern int PrintINT16(unsigned char *buf); +extern int PrintINT32(unsigned char *buf); +extern int PrintCARD8(unsigned char *buf); +extern int PrintCARD16(unsigned char *buf); +extern int PrintCARD32(unsigned char *buf); +extern int PrintBYTE(unsigned char *buf); +extern int PrintCHAR8(unsigned char *buf); +extern int PrintSTRING16(unsigned char *buf); +extern int PrintTEXTITEM8(unsigned char *buf); +extern int PrintTEXTITEM16(unsigned char *buf); +extern int PrintSTR(unsigned char *buf); +extern int PrintWINDOW(unsigned char *buf); +extern int PrintWINDOWD(unsigned char *buf); +extern int PrintWINDOWNR(unsigned char *buf); +extern int PrintPIXMAP(unsigned char *buf); +extern int PrintPIXMAPNPR(unsigned char *buf); +extern int PrintPIXMAPC(unsigned char *buf); +extern int PrintCURSOR(unsigned char *buf); +extern int PrintFONT(unsigned char *buf); +extern int PrintGCONTEXT(unsigned char *buf); +extern int PrintCOLORMAP(unsigned char *buf); +extern int PrintCOLORMAPC(unsigned char *buf); +extern int PrintDRAWABLE(unsigned char *buf); +extern int PrintFONTABLE(unsigned char *buf); +extern int PrintATOM(unsigned char *buf); +extern int PrintATOMT(unsigned char *buf); +extern int PrintVISUALID(unsigned char *buf); +extern int PrintVISUALIDC(unsigned char *buf); +extern int PrintTIMESTAMP(unsigned char *buf); +extern int PrintRESOURCEID(unsigned char *buf); +extern int PrintKEYSYM(unsigned char *buf); +extern int PrintKEYCODE(unsigned char *buf); +extern int PrintKEYCODEA(unsigned char *buf); +extern int PrintBUTTON(unsigned char *buf); +extern int PrintBUTTONA(unsigned char *buf); +extern int PrintEVENTFORM(unsigned char *buf); +extern int PrintENUMERATED(unsigned char *buf, short length, struct ValueListEntry *ValueList); +extern int PrintSET(unsigned char *buf, short length, struct ValueListEntry *ValueList); + +/* ************************************************************ */ +/* */ +/* */ +/* ************************************************************ */ + /* Reply Buffer: Pseudo-buffer used to provide the opcode for the request to which this is a reply: Set by DecodeReply and used in the PrintField of the Reply procedure */ @@ -498,15 +529,14 @@ extern PrintValueRec (); extern unsigned long ILong(); extern unsigned short IShort(); -extern unsigned short IChar2B(); extern unsigned short IByte(); extern Boolean IBool(); extern PrintString8(), PrintTString8 (); extern PrintString16(), PrintTString16 (); -extern PrintListSTR(); extern long PrintList(); +extern long PrintListSTR(); extern long pad(); extern char *REQUESTHEADER, *EVENTHEADER, *ERRORHEADER, *REPLYHEADER; @@ -534,3 +564,5 @@ extern char *REQUESTHEADER, *EVENTHEADER, *ERRORHEADER, *REPLYHEADER; #define GC_dash_offset 0x00100000L #define GC_dashes 0x00200000L #define GC_arc_mode 0x00400000L + +#endif /* XSCOPE_X11_H */ |