f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Copyright 2001-2003 Red Hat Inc., Durham, North Carolina.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * All Rights Reserved.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Permission is hereby granted, free of charge, to any person obtaining
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * a copy of this software and associated documentation files (the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * "Software"), to deal in the Software without restriction, including
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * without limitation on the rights to use, copy, modify, merge,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * publish, distribute, sublicense, and/or sell copies of the Software,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * and to permit persons to whom the Software is furnished to do so,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * subject to the following conditions:
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * The above copyright notice and this permission notice (including the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * next paragraph) shall be included in all copies or substantial
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * portions of the Software.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * SOFTWARE.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Kevin E. Martin <kem@redhat.com>
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * David H. Dawes <dawes@xfree86.org>
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Rickard E. (Rik) Faith <faith@redhat.com>
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Main header file included by all other DMX-related files.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** \mainpage
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * - <a href="http://dmx.sourceforge.net">DMX Home Page</a>
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * - <a href="http://sourceforge.net/projects/dmx">DMX Project Page (on
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Source Forge)</a>
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * - <a href="http://dmx.sourceforge.net/dmx.html">Distributed Multihead
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * X design</a>, the design document for DMX
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * - <a href="http://dmx.sourceforge.net/DMXSpec.txt">Client-to-Server
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * DMX Extension to the X Protocol</a>
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* Handle client-side include files in one place. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef enum {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** Provide the typedef globally, but keep the contents opaque outside
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * of the input routines. \see dmxinput.h */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** Provide the typedef globally, but keep the contents opaque outside
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * of the XSync statistic routines. \see dmxstat.c */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** Global structure containing information about each backend screen. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync const char *name; /**< Name from command line or config file */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /*---------- Back-end X server information ----------*/
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Display *beDisplay; /**< Back-end X server's display */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int beNumDepths; /**< Number of depths on BE server */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int beNumPixmapFormats; /**< Number of pixmap formats on BE */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XPixmapFormatValues *bePixmapFormats; /**< Pixmap formats on BE */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XVisualInfo *beVisuals; /**< Visuals from BE server */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int beDefVisualIndex; /**< Default visual index of BE */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int beNumDefColormaps; /**< Number of default colormaps */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Colormap *beDefColormaps; /**< Default colormaps for DMX server */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Pixel beBlackPixel; /**< Default black pixel for BE */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Pixel beWhitePixel; /**< Default white pixel for BE */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /*---------- Screen window information ----------*/
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Window scrnWin; /**< "Screen" window on backend display */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int scrnX; /**< X offset of "screen" WRT BE display */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int scrnY; /**< Y offset of "screen" WRT BE display */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /** Default drawables for "screen" */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync struct _DMXScreenInfo *next; /**< List of "screens" on same display */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync struct _DMXScreenInfo *over; /**< List of "screens" that overlap */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /*---------- Root window information ----------*/
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Window rootWin; /**< "Root" window on backend display */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int rootX; /**< X offset of "root" window WRT "screen"*/
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int rootY; /**< Y offset of "root" window WRT "screen"*/
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int rootXOrigin; /**< Global X origin of "root" window */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int rootYOrigin; /**< Global Y origin of "root" window */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /*---------- Shadow framebuffer information ----------*/
f78b12e570284aa8291f4ca1add24937fd107403vboxsync void *shadow; /**< Shadow framebuffer data (if enabled) */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XlibGC shadowGC; /**< Default GC used by shadow FB code */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XImage *shadowFBImage; /**< Screen image used by shadow FB code */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /*---------- Other related information ----------*/
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int shared; /**< Non-zero if another Xdmx is running */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /* Support for cursors on overlapped
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * backend displays. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int cursorNotShared; /* for overlapping screens on a backend */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PositionType where; /**< Relative layout information */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int whereRefScreen; /**< Relative layout information */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int savedTimeout; /**< Original screen saver timeout */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int dpmsCapable; /**< Non-zero if backend is DPMS capable */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int dpmsStandby; /**< Original DPMS standby value */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int dpmsSuspend; /**< Original DPMS suspend value */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Bool needsSync; /**< True if an XSync is pending */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /** Visual information for glxProxy */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /** FB config information for glxProxy */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /** Function pointers to wrapped screen
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * functions */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ChangeWindowAttributesProcPtr ChangeWindowAttributes;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* Global variables available to all Xserver/hw/dmx routines. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern int dmxNumScreens; /**< Number of dmxScreens */
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern DMXScreenInfo *dmxScreens; /**< List of outputs */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * shadow frame-buffer
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * (deprecated) */
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern XErrorEvent dmxLastErrorEvent; /**< Last error that
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * occurred */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * occurred */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * optimizations */
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern Bool dmxSubdividePrimitives; /**< True if using the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * primitive subdivision
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * optimization */
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern Bool dmxLazyWindowCreation; /**< True if using the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * lazy window creation
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * optimization */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * extension should be
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * used with the backend
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * servers */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * non-zero */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * support is enabled */
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern Bool dmxGLXSwapGroupSupport; /**< True if glxProxy
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * support for swap
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * groups and barriers
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * is enabled */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * should force an XSync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * request after each
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * swap buffers call */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * should force a
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * glFinish request
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * after each swap
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * buffers call */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * path is set on the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * command line;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * otherwise, a string
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * of comma separated
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * paths built from the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * command line
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * specified font
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern Bool dmxIgnoreBadFontPaths; /**< True if bad font
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * paths should be
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * ignored during server
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern Bool dmxAddRemoveScreens; /**< True if add and
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * remove screens support
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * is enabled */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** Wrap screen or GC function pointer */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define DMX_WRAP(_entry, _newfunc, _saved, _actual) \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** Unwrap screen or GC function pointer */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* Define the MAXSCREENSALLOC/FREE macros, when MAXSCREENS patch has not
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * been applied to sources. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define MAXSCREEN_MAKECONSTSTR2(x) MAXSCREEN_MAKECONSTSTR1(x)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MAXSCREEN_MAKECONSTSTR2(__LINE__) ":" __FILE__ "] to allocate object: "
f78b12e570284aa8291f4ca1add24937fd107403vboxsync if (!o) { \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync if (!o && fatal) FatalError(MAXSCREEN_FAILED_TXT #o); \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync } while (0)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync if (!o) { \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync if (!o) return retval; \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync } while (0)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync } while (0)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define MAXSCREENSALLOC(o) _MAXSCREENSALLOCF(o,MAXSCREENS, 0)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define MAXSCREENSALLOC_FATAL(o) _MAXSCREENSALLOCF(o,MAXSCREENS, 1)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define MAXSCREENSALLOC_RETURN(o,r) _MAXSCREENSALLOCR(o,MAXSCREENS, (r))
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define MAXSCREENSALLOCPLUSONE(o) _MAXSCREENSALLOCF(o,MAXSCREENS+1,0)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define MAXSCREENSALLOCPLUSONE_FATAL(o) _MAXSCREENSALLOCF(o,MAXSCREENS+1,1)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define MAXSCREENSCALLOC(o,m) _MAXSCREENSALLOCF(o,MAXSCREENS*(m),0)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define MAXSCREENSCALLOC_FATAL(o,m) _MAXSCREENSALLOCF(o,MAXSCREENS*(m),1)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define dmxGCPrivateKey (&dmxGCPrivateKeyRec) /**< Private index for GCs */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define dmxWinPrivateKey (&dmxWinPrivateKeyRec) /**< Private index for Windows */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define dmxPixPrivateKey (&dmxPixPrivateKeyRec) /**< Private index for Pixmaps */
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern int dmxFontPrivateIndex; /**< Private index for Fonts */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define dmxScreenPrivateKey (&dmxScreenPrivateKeyRec) /**< Private index for Screens */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define dmxColormapPrivateKey (&dmxColormapPrivateKeyRec) /**< Private index for Colormaps */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define dmxPictPrivateKey (&dmxPictPrivateKeyRec) /**< Private index for Picts */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define dmxGlyphSetPrivateKey (&dmxGlyphSetPrivateKeyRec) /**< Private index for GlyphSets */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#endif /* DMX_H */