Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /*
0002 
0003 Copyright 1991, 1993, 1994, 1998  The Open Group
0004 
0005 Permission to use, copy, modify, distribute, and sell this software and its
0006 documentation for any purpose is hereby granted without fee, provided that
0007 the above copyright notice appear in all copies and that both that
0008 copyright notice and this permission notice appear in supporting
0009 documentation.
0010 
0011 The above copyright notice and this permission notice shall be included in
0012 all copies or substantial portions of the Software.
0013 
0014 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0015 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0016 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
0017 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
0018 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
0019 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0020 
0021 Except as contained in this notice, the name of The Open Group shall not be
0022 used in advertising or otherwise to promote the sale, use or other dealings
0023 in this Software without prior written authorization from The Open Group.
0024 
0025 */
0026 
0027 /***********************************************************
0028 Copyright 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts,
0029 and Olivetti Research Limited, Cambridge, England.
0030 
0031                         All Rights Reserved
0032 
0033 Permission to use, copy, modify, and distribute this software and its
0034 documentation for any purpose and without fee is hereby granted,
0035 provided that the above copyright notice appear in all copies and that
0036 both that copyright notice and this permission notice appear in
0037 supporting documentation, and that the names of Digital or Olivetti
0038 not be used in advertising or publicity pertaining to distribution of the
0039 software without specific, written prior permission.
0040 
0041 DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
0042 SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
0043 FITNESS, IN NO EVENT SHALL THEY BE LIABLE FOR ANY SPECIAL, INDIRECT OR
0044 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
0045 USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
0046 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
0047 PERFORMANCE OF THIS SOFTWARE.
0048 
0049 ******************************************************************/
0050 
0051 #ifndef _SYNCPROTO_H_
0052 #define _SYNCPROTO_H_
0053 
0054 #include <X11/extensions/syncconst.h>
0055 
0056 #define X_SyncInitialize        0
0057 #define X_SyncListSystemCounters    1
0058 #define X_SyncCreateCounter     2
0059 #define X_SyncSetCounter        3
0060 #define X_SyncChangeCounter     4
0061 #define X_SyncQueryCounter              5
0062 #define X_SyncDestroyCounter        6
0063 #define X_SyncAwait         7
0064 #define X_SyncCreateAlarm               8
0065 #define X_SyncChangeAlarm           9
0066 #define X_SyncQueryAlarm           10
0067 #define X_SyncDestroyAlarm         11
0068 #define X_SyncSetPriority              12
0069 #define X_SyncGetPriority              13
0070 #define X_SyncCreateFence          14
0071 #define X_SyncTriggerFence         15
0072 #define X_SyncResetFence           16
0073 #define X_SyncDestroyFence         17
0074 #define X_SyncQueryFence           18
0075 #define X_SyncAwaitFence           19
0076 
0077 /* cover up types from sync.h to make sure they're the right size for
0078  * protocol packaging.  These will be undef'ed after all the protocol
0079  * structures are defined.
0080  */
0081 #define XSyncCounter CARD32
0082 #define XSyncAlarm   CARD32
0083 #define XSyncFence   CARD32
0084 #define Drawable     CARD32
0085 
0086 /*
0087  * Initialize
0088  */
0089 typedef struct _xSyncInitialize {
0090     CARD8   reqType;
0091     CARD8   syncReqType;
0092     CARD16  length B16;
0093     CARD8   majorVersion;
0094     CARD8   minorVersion;
0095     CARD16  pad B16;
0096 } xSyncInitializeReq;
0097 #define sz_xSyncInitializeReq       8
0098 
0099 typedef struct {
0100     BYTE    type;
0101     CARD8   unused;
0102     CARD16  sequenceNumber B16;
0103     CARD32  length B32;
0104     CARD8   majorVersion;
0105     CARD8   minorVersion;
0106     CARD16  pad B16;
0107     CARD32  pad0 B32;
0108     CARD32  pad1 B32;
0109     CARD32  pad2 B32;
0110     CARD32  pad3 B32;
0111     CARD32  pad4 B32;
0112 } xSyncInitializeReply;
0113 #define sz_xSyncInitializeReply 32
0114 
0115 /*
0116  * ListSystemCounters
0117  */
0118 typedef struct _xSyncListSystemCounters
0119 {
0120     CARD8   reqType;
0121     CARD8   syncReqType;
0122     CARD16  length B16;
0123 } xSyncListSystemCountersReq;
0124 #define sz_xSyncListSystemCountersReq   4
0125 
0126 typedef struct {
0127     BYTE    type;
0128     CARD8   unused;
0129     CARD16  sequenceNumber B16;
0130     CARD32  length B32;
0131     INT32   nCounters B32;
0132     CARD32  pad0 B32;
0133     CARD32  pad1 B32;
0134     CARD32  pad2 B32;
0135     CARD32  pad3 B32;
0136     CARD32  pad4 B32;
0137 } xSyncListSystemCountersReply;
0138 #define sz_xSyncListSystemCountersReply 32
0139 
0140 typedef struct {
0141     XSyncCounter counter B32;
0142     INT32   resolution_hi B32;
0143     CARD32  resolution_lo B32;
0144     CARD16  name_length B16;
0145 } xSyncSystemCounter;
0146 #define sz_xSyncSystemCounter 14
0147 
0148 /*
0149  * Create Counter
0150  */
0151 typedef struct _xSyncCreateCounterReq {
0152     CARD8   reqType;
0153     CARD8   syncReqType;
0154     CARD16  length B16;
0155     XSyncCounter cid B32;
0156     INT32       initial_value_hi B32;
0157     CARD32  initial_value_lo B32;
0158 } xSyncCreateCounterReq;
0159 #define sz_xSyncCreateCounterReq    16
0160 
0161 /*
0162  * Change Counter
0163  */
0164 typedef struct _xSyncChangeCounterReq {
0165     CARD8   reqType;
0166     CARD8   syncReqType;
0167     CARD16  length B16;
0168     XSyncCounter cid B32;
0169     INT32       value_hi B32;
0170     CARD32  value_lo B32;
0171 } xSyncChangeCounterReq;
0172 #define sz_xSyncChangeCounterReq    16
0173 
0174 /*
0175  * Set Counter
0176  */
0177 typedef struct _xSyncSetCounterReq {
0178     CARD8   reqType;
0179     CARD8   syncReqType;
0180     CARD16  length B16;
0181     XSyncCounter cid B32;
0182     INT32       value_hi B32;
0183     CARD32  value_lo B32;
0184 } xSyncSetCounterReq;
0185 #define sz_xSyncSetCounterReq   16
0186 
0187 /*
0188  * Destroy Counter
0189  */
0190 typedef struct _xSyncDestroyCounterReq {
0191     CARD8   reqType;
0192     CARD8   syncReqType;
0193     CARD16  length B16;
0194     XSyncCounter counter B32;
0195 } xSyncDestroyCounterReq;
0196 #define sz_xSyncDestroyCounterReq   8
0197 
0198 /*
0199  * Query Counter
0200  */
0201 typedef struct _xSyncQueryCounterReq {
0202     CARD8   reqType;
0203     CARD8   syncReqType;
0204     CARD16  length B16;
0205     XSyncCounter counter B32;
0206 } xSyncQueryCounterReq;
0207 #define sz_xSyncQueryCounterReq     8
0208 
0209 
0210 typedef struct {
0211     BYTE    type;
0212     CARD8   unused;
0213     CARD16  sequenceNumber B16;
0214     CARD32  length B32;
0215     INT32   value_hi B32;
0216     CARD32  value_lo B32;
0217     CARD32  pad0 B32;
0218     CARD32  pad1 B32;
0219     CARD32  pad2 B32;
0220     CARD32  pad3 B32;
0221 } xSyncQueryCounterReply;
0222 #define sz_xSyncQueryCounterReply   32
0223 
0224 /*
0225  * Await
0226  */
0227 typedef struct _xSyncAwaitReq {
0228     CARD8   reqType;
0229     CARD8   syncReqType;
0230     CARD16  length B16;
0231 } xSyncAwaitReq;
0232 #define sz_xSyncAwaitReq        4
0233 
0234 typedef struct _xSyncWaitCondition {
0235     XSyncCounter counter B32;
0236     CARD32  value_type B32;
0237     INT32       wait_value_hi B32;
0238     CARD32      wait_value_lo B32;
0239     CARD32  test_type B32;
0240     INT32   event_threshold_hi B32;
0241     CARD32  event_threshold_lo B32;
0242 } xSyncWaitCondition;
0243 #define sz_xSyncWaitCondition       28
0244 
0245 /*
0246  * Create Alarm
0247  */
0248 typedef struct _xSyncCreateAlarmReq {
0249     CARD8   reqType;
0250     CARD8   syncReqType;
0251     CARD16  length B16;
0252     XSyncAlarm  id B32;
0253     CARD32      valueMask B32;
0254 } xSyncCreateAlarmReq;
0255 #define sz_xSyncCreateAlarmReq      12
0256 
0257 /*
0258  * Destroy Alarm
0259  */
0260 typedef struct _xSyncDestroyAlarmReq {
0261     CARD8   reqType;
0262     CARD8   syncReqType;
0263     CARD16  length B16;
0264     XSyncAlarm  alarm B32;
0265 } xSyncDestroyAlarmReq;
0266 #define sz_xSyncDestroyAlarmReq     8
0267 
0268 /*
0269  * Query Alarm
0270  */
0271 typedef struct _xSyncQueryAlarmReq {
0272     CARD8   reqType;
0273     CARD8   syncReqType;
0274     CARD16  length B16;
0275     XSyncAlarm  alarm B32;
0276 } xSyncQueryAlarmReq;
0277 #define sz_xSyncQueryAlarmReq       8
0278 
0279 typedef struct {
0280     BYTE    type;
0281     CARD8   unused;
0282     CARD16  sequenceNumber B16;
0283     CARD32  length B32;
0284     XSyncCounter counter B32;
0285     CARD32  value_type B32;
0286     INT32   wait_value_hi B32;
0287     CARD32  wait_value_lo B32;
0288     CARD32  test_type      B32;
0289     INT32   delta_hi B32;
0290     CARD32  delta_lo B32;
0291     BOOL        events;
0292     BYTE        state;
0293     BYTE    pad0;
0294     BYTE    pad1;
0295 } xSyncQueryAlarmReply;
0296 #define sz_xSyncQueryAlarmReply     40
0297 
0298 /*
0299  * Change Alarm
0300  */
0301 typedef struct _xSyncChangeAlarmReq {
0302     CARD8   reqType;
0303     CARD8   syncReqType;
0304     CARD16  length B16;
0305     XSyncAlarm  alarm B32;
0306     CARD32  valueMask B32;
0307 } xSyncChangeAlarmReq;
0308 #define sz_xSyncChangeAlarmReq      12
0309 
0310 /*
0311  * SetPriority
0312  */
0313 typedef struct _xSyncSetPriority{
0314     CARD8       reqType;
0315     CARD8       syncReqType;
0316     CARD16      length B16;
0317     CARD32      id B32;
0318     INT32   priority B32;
0319 } xSyncSetPriorityReq;
0320 #define sz_xSyncSetPriorityReq          12
0321 
0322 /*
0323  * Get Priority
0324  */
0325 typedef struct _xSyncGetPriority{
0326     CARD8       reqType;
0327     CARD8       syncReqType;
0328     CARD16      length B16;
0329     CARD32      id B32; /*XXX XID? */
0330 } xSyncGetPriorityReq;
0331 #define sz_xSyncGetPriorityReq           8
0332 
0333 typedef struct {
0334     BYTE    type;
0335     CARD8   unused;
0336     CARD16  sequenceNumber B16;
0337     CARD32  length B32;
0338     INT32   priority B32;
0339     CARD32      pad0 B32;
0340     CARD32      pad1 B32;
0341     CARD32      pad2 B32;
0342     CARD32      pad3 B32;
0343     CARD32      pad4 B32;
0344 } xSyncGetPriorityReply;
0345 #define sz_xSyncGetPriorityReply    32
0346 
0347 /*
0348  * Create Fence
0349  */
0350 typedef struct _xSyncCreateFenceReq {
0351     CARD8   reqType;
0352     CARD8   syncReqType;
0353     CARD16  length B16;
0354     Drawable    d B32;
0355     XSyncFence  fid B32;
0356     BOOL    initially_triggered;
0357     CARD8   pad0;
0358     CARD16  pad1;
0359 } xSyncCreateFenceReq;
0360 #define sz_xSyncCreateFenceReq      16
0361 
0362 /*
0363  * Put a fence object in the "triggered" state.
0364  */
0365 typedef struct _xSyncTriggerFenceReq {
0366     CARD8   reqType;
0367     CARD8   syncReqType;
0368     CARD16  length B16;
0369     XSyncFence  fid B32;
0370 } xSyncTriggerFenceReq;
0371 #define sz_xSyncTriggerFenceReq     8
0372 
0373 /*
0374  * Put a fence in the "untriggered" state.
0375  */
0376 typedef struct _xSyncResetFenceReq {
0377     CARD8   reqType;
0378     CARD8   syncReqType;
0379     CARD16  length B16;
0380     XSyncFence  fid B32;
0381 } xSyncResetFenceReq;
0382 #define sz_xSyncResetFenceReq       8
0383 
0384 /*
0385  * Destroy a fence object
0386  */
0387 typedef struct _xSyncDestroyFenceReq {
0388     CARD8   reqType;
0389     CARD8   syncReqType;
0390     CARD16  length B16;
0391     XSyncFence  fid B32;
0392 } xSyncDestroyFenceReq;
0393 #define sz_xSyncDestroyFenceReq     8
0394 
0395 /*
0396  * Query a fence object
0397  */
0398 typedef struct _xSyncQueryFenceReq {
0399     CARD8   reqType;
0400     CARD8   syncReqType;
0401     CARD16  length B16;
0402     XSyncFence  fid B32;
0403 } xSyncQueryFenceReq;
0404 #define sz_xSyncQueryFenceReq       8
0405 
0406 /*
0407  * Wait for any of a list of fence sync objects
0408  * to reach the "triggered" state.
0409  */
0410 typedef struct _xSyncAwaitFenceReq {
0411     CARD8   reqType;
0412     CARD8   syncReqType;
0413     CARD16  length B16;
0414 } xSyncAwaitFenceReq;
0415 #define sz_xSyncAwaitFenceReq       4
0416 
0417 typedef struct {
0418     BYTE    type;
0419     CARD8   unused;
0420     CARD16  sequenceNumber B16;
0421     CARD32  length B32;
0422     BOOL    triggered;
0423     BYTE    pad0;
0424     CARD16  pad1 B16;
0425     CARD32  pad2 B32;
0426     CARD32  pad3 B32;
0427     CARD32  pad4 B32;
0428     CARD32  pad5 B32;
0429     CARD32  pad6 B32;
0430 } xSyncQueryFenceReply;
0431 #define sz_xSyncQueryFenceReply     32
0432 
0433 /*
0434  * Events
0435  */
0436 
0437 typedef struct _xSyncCounterNotifyEvent {
0438     BYTE    type;
0439     BYTE    kind;
0440     CARD16  sequenceNumber B16;
0441     XSyncCounter counter B32;
0442     INT32   wait_value_hi B32;
0443     CARD32  wait_value_lo B32;
0444     INT32   counter_value_hi B32;
0445     CARD32  counter_value_lo B32;
0446     CARD32  time B32;
0447     CARD16  count B16;
0448     BOOL    destroyed;
0449     BYTE        pad0;
0450 } xSyncCounterNotifyEvent;
0451 
0452 typedef struct _xSyncAlarmNotifyEvent {
0453     BYTE    type;
0454     BYTE    kind;
0455     CARD16  sequenceNumber B16;
0456     XSyncAlarm  alarm B32;
0457     INT32   counter_value_hi B32;
0458     CARD32  counter_value_lo B32;
0459     INT32   alarm_value_hi B32;
0460     CARD32  alarm_value_lo B32;
0461     CARD32  time B32;
0462     CARD8       state;
0463     BYTE        pad0;
0464     BYTE        pad1;
0465     BYTE        pad2;
0466 } xSyncAlarmNotifyEvent;
0467 
0468 #undef XSyncCounter
0469 #undef XSyncAlarm
0470 #undef XSyncFence
0471 #undef Drawable
0472 
0473 
0474 #endif /* _SYNCPROTO_H_ */