xtraplibp.h revision 17ca54c3
1/* $XFree86$ */ 2#ifndef __XTRAPLIBP__ 3#define __XTRAPLIBP__ 4 5 6/***************************************************************************** 7Copyright 1987, 1988, 1989, 1990, 1991, 1994 by Digital Equipment Corp., 8Maynard, MA 9 10Permission to use, copy, modify, and distribute this software and its 11documentation for any purpose and without fee is hereby granted, 12provided that the above copyright notice appear in all copies and that 13both that copyright notice and this permission notice appear in 14supporting documentation, and that the name of Digital not be 15used in advertising or publicity pertaining to distribution of the 16software without specific, written prior permission. 17 18DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 19ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 20DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 21ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 22WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 23ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 24SOFTWARE. 25 26*****************************************************************************/ 27/* 28 * 29 * CONTRIBUTORS: 30 * 31 * Dick Annicchiarico 32 * Robert Chesler 33 * Dan Coutu 34 * Gene Durso 35 * Marc Evans 36 * Alan Jamison 37 * Mark Henry 38 * Ken Miller 39 * 40 * DESCRIPTION: 41 * This header file contains the function prototypes for client/toolkit 42 * routines sorted by module (globally defined routines *only*). 43 */ 44 45#include <X11/Xfuncproto.h> 46 47#include <stdio.h> 48 49_XFUNCPROTOBEGIN 50 51/* XEConTxt.c */ 52XETC *XECreateTC (Display *dpy , CARD32 valuemask , XETCValues *value ); 53int XEChangeTC (XETC *tc , CARD32 mask , XETCValues *values ); 54void XEFreeTC (XETC *tc ); 55int XETrapSetMaxPacket (XETC *tc , Bool set_flag , CARD16 size ); 56int XETrapSetCommandKey (XETC *tc , Bool set_flag , KeySym cmd_key , 57 Bool mod_flag ); 58int XETrapSetTimestamps (XETC *tc , Bool set_flag , Bool delta_flag ); 59int XETrapSetWinXY (XETC *tc , Bool set_flag ); 60int XETrapSetCursor (XETC *tc , Bool set_flag ); 61int XETrapSetXInput (XETC *tc , Bool set_flag ); 62int XETrapSetColorReplies (XETC *tc , Bool set_flag ); 63int XETrapSetGrabServer (XETC *tc , Bool set_flag ); 64int XETrapSetStatistics (XETC *tc , Bool set_flag ); 65int XETrapSetRequests (XETC *tc , Bool set_flag , ReqFlags requests ); 66int XETrapSetEvents (XETC *tc , Bool set_flag , EventFlags events ); 67Bool XESetCmdGateState (XETC *tc , CARD8 type, Bool *gate_closed , 68 CARD8 *next_key , Bool *key_ignore ); 69 70/* XERqsts.c */ 71int XEFlushConfig (XETC *tc ); 72int XEResetRequest (XETC *tc ); 73int XEGetVersionRequest (XETC *tc , XETrapGetVersRep *ret ); 74int XEGetLastInpTimeRequest (XETC *tc , XETrapGetLastInpTimeRep *ret ); 75int XEGetAvailableRequest (XETC *tc , XETrapGetAvailRep *ret ); 76int XEStartTrapRequest (XETC *tc ); 77int XEStopTrapRequest (XETC *tc ); 78int XESimulateXEventRequest (XETC *tc , CARD8 type , CARD8 detail , 79 CARD16 x , CARD16 y , CARD8 screen ); 80int XEGetCurrentRequest (XETC *tc , XETrapGetCurRep *ret ); 81int XEGetStatisticsRequest (XETC *tc , XETrapGetStatsRep *ret ); 82 83/* XECallBcks.c */ 84int XEAddRequestCB (XETC *tc , CARD8 req , void_function func , BYTE *data ); 85int XEAddRequestCBs (XETC *tc , ReqFlags req_flags , void_function func , 86 BYTE *data ); 87int XEAddEventCB (XETC *tc , CARD8 evt , void_function func , BYTE *data ); 88int XEAddEventCBs (XETC *tc , EventFlags evt_flags , void_function func , 89 BYTE *data ); 90 91/* The following seem to never be used. Perhaps they should be removed */ 92void XERemoveRequestCB (XETC *tc, CARD8 req); 93void XERemoveRequestCBs (XETC *tc, ReqFlags req_flags); 94void XERemoveAllRequestCBs (XETC *tc); 95void XERemoveEventCB (XETC *tc, CARD8 evt); 96void XERemoveEventCBs (XETC *tc, EventFlags evt_flags); 97void XERemoveAllEventCBs (XETC *tc); 98 99 100/* XEDsptch.c */ 101Boolean XETrapDispatchXLib (XETrapDataEvent *event , XETC *tc); 102 103/* XEWrappers.c */ 104Boolean XETrapDispatchEvent (XEvent *pevent , XETC *tc ); 105XtInputMask XETrapAppPending (XtAppContext app); 106void XETrapAppMainLoop (XtAppContext app , XETC *tc ); 107int XETrapAppWhileLoop (XtAppContext app , XETC *tc , Bool *done ); 108int XETrapWaitForSomething (XtAppContext app ); 109Boolean (*XETrapGetEventHandler(XETC *tc, CARD32 id))(XETrapDataEvent *event, XETC *tc); 110Boolean (*XETrapSetEventHandler(XETC *tc, CARD32 id, Boolean (*pfunc)(XETrapDataEvent *event, XETC *tc))) (XETrapDataEvent *event, XETC *tc); 111 112/* XEPrInfo.c */ 113void XEPrintRelease (FILE *ofp , XETrapGetAvailRep *pavail ); 114void XEPrintTkRelease ( FILE *ofp, XETC *tc); 115void XEPrintPlatform (FILE *ofp , XETrapGetAvailRep *pavail ); 116void XEPrintAvailFlags (FILE *ofp , XETrapGetAvailRep *pavail ); 117void XEPrintAvailPktSz (FILE *ofp , XETrapGetAvailRep *pavail ); 118void XEPrintStateFlags (FILE *ofp , XETrapGetCurRep *pcur ); 119void XEPrintMajOpcode (FILE *ofp , XETrapGetAvailRep *pavail ); 120void XEPrintCurXY (FILE *ofp , XETrapGetAvailRep *pavail ); 121void XEPrintTkFlags (FILE *ofp , XETC *tc ); 122void XEPrintLastTime (FILE *ofp , XETC *tc ); 123void XEPrintCfgFlags (FILE *ofp , XETrapGetCurRep *pcur ); 124void XEPrintRequests (FILE *ofp , XETrapGetCurRep *pcur ); 125void XEPrintEvents (FILE *ofp , XETrapGetCurRep *pcur ); 126void XEPrintCurPktSz (FILE *ofp , XETrapGetCurRep *pcur ); 127void XEPrintCmdKey (FILE *ofp , XETrapGetCurRep *pcur ); 128void XEPrintEvtStats (FILE *ofp , XETrapGetStatsRep *pstats , XETC *tc); 129void XEPrintReqStats (FILE *ofp , XETrapGetStatsRep *pstats , XETC *tc); 130void XEPrintAvail (FILE *ofp , XETrapGetAvailRep *pavail ); 131void XEPrintTkState (FILE *ofp , XETC *tc ); 132void XEPrintCurrent (FILE *ofp , XETrapGetCurRep *pcur ); 133void XEPrintStatistics (FILE *ofp , XETrapGetStatsRep *pstats, XETC *tc ); 134 135/* XEStrMap.c */ 136INT16 XEEventStringToID (char *string ); 137INT16 XERequestStringToID (char *string ); 138CARD32 XEPlatformStringToID (char *string ); 139char *XEEventIDToString (CARD8 id , XETC *tc); 140char *XERequestIDToExtString (register CARD8 id , XETC *tc); 141char *XERequestIDToString (CARD8 id , XETC *tc); 142char *XEPlatformIDToString (CARD32 id ); 143 144/* XETrapInit.c */ 145Bool XETrapQueryExtension (Display *dpy,INT32 *event_base_return, 146 INT32 *error_base_return, INT32 *opcode_return); 147 148 149_XFUNCPROTOEND 150 151#endif /* __XTRAPLIBP__ */ 152