Annotation of researchv9/X11/src/X.V11R1/server/include/inputstr.h, revision 1.1.1.1

1.1       root        1: /************************************************************
                      2: Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
                      3: and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
                      4: 
                      5:                         All Rights Reserved
                      6: 
                      7: Permission to use, copy, modify, and distribute this software and its 
                      8: documentation for any purpose and without fee is hereby granted, 
                      9: provided that the above copyright notice appear in all copies and that
                     10: both that copyright notice and this permission notice appear in 
                     11: supporting documentation, and that the names of Digital or MIT not be
                     12: used in advertising or publicity pertaining to distribution of the
                     13: software without specific, written prior permission.  
                     14: 
                     15: DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
                     16: ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
                     17: DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
                     18: ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
                     19: WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
                     20: ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
                     21: SOFTWARE.
                     22: 
                     23: ********************************************************/
                     24: 
                     25: /* $Header: inputstr.h,v 1.14 87/08/29 16:31:44 toddb Exp $ */
                     26: 
                     27: #ifndef INPUTSTRUCT_H
                     28: #define INPUTSTRUCT_H
                     29: 
                     30: #include "input.h"
                     31: #include "window.h"
                     32: #include "dixstruct.h"
                     33: 
                     34: typedef struct _OtherClients {
                     35:     OtherClientsPtr    next;
                     36:     ClientPtr          client;   /* which client is slecting on this window */
                     37:     int                        resource; /* id for putting into resource manager */
                     38:     long               mask;
                     39: } OtherClients;
                     40: 
                     41: typedef struct _DeviceIntRec *DeviceIntPtr;
                     42: 
                     43: /*
                     44:  * The following structure gets used for both active and passive grabs. For
                     45:  * active grabs some of the fields (e.g. modifiers) are not used. However,
                     46:  * that is not much waste since there are at most 2 active grabs (keyboard
                     47:  * and pointer) going at once in the server.
                     48:  */
                     49: 
                     50: #define MasksPerDetailMask 8           /* 256 keycodes and 256 possible
                     51:                                                modifier combinations, but only 
                     52:                                                3 buttons. */
                     53: 
                     54:   typedef struct _DetailRec {          /* Grab details may be bit masks */
                     55:        int exact;
                     56:        Mask *pMask;
                     57:   } DetailRec;
                     58: 
                     59:   typedef struct _GrabRec {
                     60:     GrabPtr            next;           /* for chain of passive grabs */
                     61:     int                        resource;
                     62:     ClientPtr          client;
                     63:     DeviceIntPtr       device;
                     64:     WindowPtr          window;
                     65:     Bool               ownerEvents;
                     66:     Bool               keyboardMode, pointerMode;
                     67:     DetailRec          modifiersDetail;
                     68:     Mask               eventMask;
                     69:     union {
                     70:        struct {
                     71:            DetailRec   buttonDetail;
                     72:            WindowPtr   confineTo;
                     73:            CursorPtr   cursor;
                     74:        } ptr;
                     75:        struct {
                     76:            DetailRec   keyDetail;
                     77:        } keybd;
                     78:     } u;
                     79: } GrabRec;
                     80: 
                     81: typedef struct {
                     82:     WindowPtr  win;
                     83:     int                revert;
                     84:     TimeStamp  time;
                     85: } FocusRec, *FocusPtr;
                     86: 
                     87: /* states for devices */
                     88: 
                     89: #define NOT_GRABBED            0
                     90: #define THAWED                 1
                     91: #define THAWED_BOTH            2       /* not a real state */
                     92: #define FREEZE_NEXT_EVENT      3
                     93: #define FREEZE_BOTH_NEXT_EVENT 4
                     94: #define FROZEN                 5       /* any state >= has device frozen */
                     95: #define FROZEN_NO_EVENT                5
                     96: #define FROZEN_WITH_EVENT      6
                     97: 
                     98: typedef struct _DeviceIntRec {
                     99:     DeviceRec  public;
                    100:     TimeStamp  grabTime;
                    101:     Bool       startup;                /* true if needs to be turned on at
                    102:                                          server intialization time */
                    103:     DeviceProc deviceProc;             /* proc(DevicePtr, DEVICE_??). It is
                    104:                                          used to initialize, turn on, or
                    105:                                          turn off the device */
                    106:     Bool       inited;                 /* TRUE if INIT returns Success */
                    107:     GrabPtr    grab;                   /* the grabber - used by DIX */
                    108:     struct {
                    109:        Bool            frozen;
                    110:        int             state;
                    111:        GrabPtr         other;          /* if other grab has this frozen */
                    112:        xEvent          event;          /* saved to be replayed */
                    113:     } sync;
                    114:     BYTE       down[DOWN_LENGTH];
                    115:     union {
                    116:        struct {
                    117:            /* here we store a bitmask for each key of the modifiers it sets */
                    118:            CARD8       modifierMap[MAP_LENGTH];
                    119:            KeybdCtrl   ctrl;
                    120:            void        (*BellProc) ();
                    121:            void        (*CtrlProc) ();
                    122:            FocusRec    focus;
                    123:            Bool        passiveGrab;
                    124:        } keybd;
                    125:        struct {
                    126:            PtrCtrl     ctrl;
                    127:            void        (*CtrlProc) ();
                    128:            int         (*GetMotionProc) ();
                    129:            Bool        autoReleaseGrab;        /* any button delivery */
                    130:            BYTE        map[MAP_LENGTH];
                    131:            int         mapLength;              /* valid entries in the map */
                    132:        } ptr;
                    133:        struct {
                    134:            FocusRec    focus;
                    135:            BYTE        map[MAP_LENGTH];
                    136:            int         mapLength;              /* valid entries in the map */
                    137:        } other;
                    138:     } u;
                    139: } DeviceIntRec;
                    140: 
                    141: typedef struct {
                    142:     int                        numMotionEvents;
                    143:     int                        numDevices;
                    144:     int                        arraySize;
                    145:     DeviceIntPtr       *devices;       /* all the devices (including below) */
                    146:     DeviceIntPtr       keyboard;       /* the main one for the server */
                    147:     DeviceIntPtr       pointer;
                    148: } InputInfo;
                    149: 
                    150: /* for keeping the events for devices grabbed synchronously */
                    151: typedef struct _QdEvent *QdEventPtr;
                    152: typedef struct _QdEvent {
                    153:     QdEventPtr         forw;
                    154:     QdEventPtr         back;
                    155:     DeviceIntPtr       device;
                    156:     xEvent             event;
                    157: } QdEventRec;    
                    158: 
                    159: #endif /* INPUTSTRUCT_H */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.