Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-03-13 09:29:37

0001 /***************************************************************************
0002  * Copyright 1995 Network Computing Devices
0003  *
0004  * Permission to use, copy, modify, distribute, and sell this software and
0005  * its documentation for any purpose is hereby granted without fee, provided
0006  * that the above copyright notice appear in all copies and that both that
0007  * copyright notice and this permission notice appear in supporting
0008  * documentation, and that the name of Network Computing Devices
0009  * not be used in advertising or publicity pertaining to distribution
0010  * of the software without specific, written prior permission.
0011  *
0012  * NETWORK COMPUTING DEVICES DISCLAIMs ALL WARRANTIES WITH REGARD TO
0013  * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
0014  * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE
0015  * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
0016  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
0017  * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
0018  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
0019  **************************************************************************/
0020 
0021 #ifndef _RECORD_H_
0022 #define _RECORD_H_
0023 
0024 #include <X11/extensions/recordconst.h>
0025 
0026 typedef unsigned long   XRecordClientSpec;
0027 typedef unsigned long   XRecordContext;
0028 
0029 typedef struct
0030 {
0031     unsigned char   first;
0032     unsigned char   last;
0033 } XRecordRange8;
0034 
0035 typedef struct
0036 {
0037     unsigned short  first;
0038     unsigned short  last;
0039 } XRecordRange16;
0040 
0041 typedef struct
0042 {
0043     XRecordRange8   ext_major;
0044     XRecordRange16  ext_minor;
0045 } XRecordExtRange;
0046 
0047 typedef struct
0048 {
0049     XRecordRange8     core_requests;    /* core X requests */
0050     XRecordRange8     core_replies; /* core X replies */
0051     XRecordExtRange   ext_requests; /* extension requests */
0052     XRecordExtRange   ext_replies;  /* extension replies */
0053     XRecordRange8     delivered_events; /* delivered core and ext events */
0054     XRecordRange8     device_events;    /* all core and ext device events */
0055     XRecordRange8     errors;       /* core X and ext errors */
0056     Bool          client_started;   /* connection setup reply */
0057     Bool              client_died;  /* notice of client disconnect */
0058 } XRecordRange;
0059 
0060 typedef struct
0061 {
0062     XRecordClientSpec   client;
0063     unsigned long   nranges;
0064     XRecordRange    **ranges;
0065 } XRecordClientInfo;
0066 
0067 typedef struct
0068 {
0069     Bool        enabled;
0070     int         datum_flags;
0071     unsigned long   nclients;
0072     XRecordClientInfo   **client_info;
0073 } XRecordState;
0074 
0075 typedef struct
0076 {
0077     XID     id_base;
0078     Time        server_time;
0079     unsigned long   client_seq;
0080     int         category;
0081     Bool        client_swapped;
0082     unsigned char   *data;
0083     unsigned long   data_len;   /* in 4-byte units */
0084 } XRecordInterceptData;
0085 
0086 _XFUNCPROTOBEGIN
0087 
0088 /*********************************************************
0089  *
0090  * Prototypes
0091  *
0092  */
0093 
0094 XID XRecordIdBaseMask(
0095     Display *dpy
0096 );
0097 
0098 extern Status XRecordQueryVersion(
0099     Display*            /* dpy */,
0100     int*            /* cmajor_return */,
0101     int*            /* cminor_return */
0102 );
0103 
0104 extern XRecordContext XRecordCreateContext(
0105     Display*            /* dpy */,
0106     int             /* datum_flags */,
0107     XRecordClientSpec*      /* clients */,
0108     int             /* nclients */,
0109     XRecordRange**              /* ranges */,
0110     int             /* nranges */
0111 );
0112 
0113 extern XRecordRange *XRecordAllocRange(
0114     void
0115 );
0116 
0117 extern Status XRecordRegisterClients(
0118     Display*            /* dpy */,
0119     XRecordContext      /* context */,
0120     int             /* datum_flags */,
0121     XRecordClientSpec*      /* clients */,
0122     int             /* nclients */,
0123     XRecordRange**      /* ranges */,
0124     int             /* nranges */
0125 );
0126 
0127 extern Status XRecordUnregisterClients(
0128     Display*            /* dpy */,
0129     XRecordContext      /* context */,
0130     XRecordClientSpec*      /* clients */,
0131     int             /* nclients */
0132 );
0133 
0134 extern Status XRecordGetContext(
0135     Display*            /* dpy */,
0136     XRecordContext      /* context */,
0137     XRecordState**      /* state_return */
0138 );
0139 
0140 extern void XRecordFreeState(
0141 XRecordState*           /* state */
0142 );
0143 
0144 typedef void (*XRecordInterceptProc) (
0145     XPointer            /* closure */,
0146     XRecordInterceptData*   /* recorded_data */
0147 );
0148 
0149 extern Status XRecordEnableContext(
0150     Display*            /* dpy */,
0151     XRecordContext      /* context */,
0152     XRecordInterceptProc    /* callback */,
0153     XPointer            /* closure */
0154 );
0155 
0156 extern Status XRecordEnableContextAsync(
0157     Display*            /* dpy */,
0158     XRecordContext      /* context */,
0159     XRecordInterceptProc    /* callback */,
0160     XPointer            /* closure */
0161 );
0162 
0163 extern void XRecordProcessReplies(
0164     Display*            /* dpy */
0165 );
0166 
0167 extern void XRecordFreeData(
0168 XRecordInterceptData*   /* data */
0169 );
0170 
0171 extern Status XRecordDisableContext(
0172     Display*            /* dpy */,
0173     XRecordContext      /* context */
0174 );
0175 
0176 extern Status XRecordFreeContext(
0177     Display*            /* dpy */,
0178     XRecordContext      /* context */
0179 );
0180 
0181 _XFUNCPROTOEND
0182 
0183 #endif