- Main Page
- Data Structures
- Files

- File List
- Globals

# dmxinput.h

Go to the documentation of this file.

    00001 /*
    00002  * Copyright 2001,2002 Red Hat Inc., Durham, North Carolina.
    00003  *
    00004  * All Rights Reserved.
    00005  *
    00006  * Permission is hereby granted, free of charge, to any person obtaining
    00007  * a copy of this software and associated documentation files (the
    00008  * "Software"), to deal in the Software without restriction, including
    00009  * without limitation on the rights to use, copy, modify, merge,
    00010  * publish, distribute, sublicense, and/or sell copies of the Software,
    00011  * and to permit persons to whom the Software is furnished to do so,
    00012  * subject to the following conditions:
    00013  *
    00014  * The above copyright notice and this permission notice (including the
    00015  * next paragraph) shall be included in all copies or substantial
    00016  * portions of the Software.
    00017  *
    00018  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    00019  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    00020  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    00021  * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
    00022  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
    00023  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
    00024  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    00025  * SOFTWARE.
    00026  */
    00027
    00028 /*
    00029  * Authors:
    00030  *   David H. Dawes <dawes@xfree86.org>
    00031  *   Kevin E. Martin <kem@redhat.com>
    00032  *   Rickard E. (Rik) Faith <faith@redhat.com>
    00033  *
    00034  */
    00035
    00047 #ifndef DMXINPUT_H
    00048 #define DMXINPUT_H
    00049
    00051 #define DMX_MAX_SIGIO_FDS 4
    00052
    00053 struct _DMXInputInfo;
    00054
    00056 typedef enum {
    00057     DMX_UPDATE_REALIZE,
    00058     DMX_UPDATE_UNREALIZE,
    00059     DMX_UPDATE_RESTACK,
    00060     DMX_UPDATE_COPY,
    00061     DMX_UPDATE_RESIZE,
    00062     DMX_UPDATE_REPARENT
    00063 } DMXUpdateType;
    00064
    00065 typedef void (*ProcessInputEventsProc)(struct _DMXInputInfo *);
    00066 typedef void (*UpdateWindowInfoProc)(struct _DMXInputInfo *,
    00067                                      DMXUpdateType, WindowPtr);
    00068
    00070 typedef struct _DMXLocalInputInfo *DMXLocalInputInfoPtr;
    00071
    00073 typedef enum {
    00074     DMX_NOSIGIO = 0,
    00075     DMX_USESIGIO,
    00078     DMX_ACTIVESIGIO
    00079 } dmxSigioState;
    00080
    00084 struct _DMXInputInfo {
    00085     const char              *name;
    00088     Bool                    freename;
    00089     Bool                    detached;
    00090     int                     inputIdx;
    00091     int                     scrnIdx;
    00092     Bool                    core;
    00095     Bool                    console;
    00099     Bool                    windows;
    00102     ProcessInputEventsProc  processInputEvents;
    00103     UpdateWindowInfoProc    updateWindowInfo;
    00104
    00105                                 /* Local input information */
    00106     dmxSigioState           sigioState;
    00107     int                     sigioFdCount;
    00108     int                     sigioFd[DMX_MAX_SIGIO_FDS];
    00109     Bool                    sigioAdded[DMX_MAX_SIGIO_FDS];
    00113     int                     vt_switch_pending;
    00114
    00116     int                     vt_switched;
    00117
    00119     int                     numDevs;
    00120
    00125     DMXLocalInputInfoPtr    *devs;
    00126
    00127     char                    *keycodes;
    00128     char                    *symbols;
    00129     char                    *geometry;
    00130 };
    00131
    00132 extern int                  dmxNumInputs;
    00133 extern DMXInputInfo         *dmxInputs;
    00135 extern void dmxInputInit(DMXInputInfo *dmxInput);
    00136 extern void dmxInputReInit(DMXInputInfo *dmxInput);
    00137 extern void dmxInputLateReInit(DMXInputInfo *dmxInput);
    00138 extern void dmxInputFree(DMXInputInfo *dmxInput);
    00139 extern void dmxInputLogDevices(void);
    00140 extern void dmxUpdateWindowInfo(DMXUpdateType type, WindowPtr pWindow);
    00141
    00142 /* These functions are defined in input/dmxeq.c */
    00143 extern void dmxeqSwitchScreen(DeviceIntPtr pDev, ScreenPtr pScreen, Bool fromDIX);
    00144
    00145 /* This type is used in input/dmxevents.c.  Also, these functions are
    00146  * defined in input/dmxevents.c */
    00147 typedef enum {
    00148     DMX_NO_BLOCK = 0,
    00149     DMX_BLOCK    = 1
    00150 } DMXBlockType;
    00151
    00152 extern void          dmxGetGlobalPosition(int *x, int *y);
    00153 extern DMXScreenInfo *dmxFindFirstScreen(int x, int y);
    00154 extern void          dmxCoreMotion(DevicePtr pDev, int x, int y, int delta,
    00155                                    DMXBlockType block);
    00156
    00157 /* Support for dynamic addition of inputs.  This functions is defined in
    00158  * config/dmxconfig.c */
    00159 extern DMXInputInfo *dmxConfigAddInput(const char *name, int core);
    00160 #endif /* DMXINPUT_H */