f78b12e570284aa8291f4ca1add24937fd107403vboxsync/*
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Copyright 2001-2003 Red Hat Inc., Durham, North Carolina.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * All Rights Reserved.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
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 *
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 *
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 */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/*
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Authors:
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Kevin E. Martin <kem@redhat.com>
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * David H. Dawes <dawes@xfree86.org>
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Rickard E. (Rik) Faith <faith@redhat.com>
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** \file
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Main header file included by all other DMX-related files.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
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 */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#ifndef DMX_H
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define DMX_H
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#if HAVE_DMX_CONFIG_H
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#include <dmx-config.h>
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#endif
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#include "gcstruct.h"
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* Handle client-side include files in one place. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#include "dmxclient.h"
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#include "globals.h"
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#include "scrnintstr.h"
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#include "picturestr.h"
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#ifdef GLXEXT
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#include <GL/glx.h>
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#include <GL/glxint.h>
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#endif
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef enum {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PosNone = -1,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PosAbsolute = 0,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PosRightOf,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PosLeftOf,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PosAbove,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PosBelow,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PosRelative
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} PositionType;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** Provide the typedef globally, but keep the contents opaque outside
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * of the input routines. \see dmxinput.h */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _DMXInputInfo DMXInputInfo;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** Provide the typedef globally, but keep the contents opaque outside
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * of the XSync statistic routines. \see dmxstat.c */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _DMXStatInfo DMXStatInfo;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** Global structure containing information about each backend screen. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _DMXScreenInfo {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync const char *name; /**< Name from command line or config file */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int index; /**< Index into dmxScreens global */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /*---------- Back-end X server information ----------*/
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Display *beDisplay; /**< Back-end X server's display */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int beWidth; /**< Width of BE display */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int beHeight; /**< Height of BE display */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int beDepth; /**< Depth of BE display */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int beBPP; /**< Bits per pixel of BE display */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int beXDPI; /**< Horizontal dots per inch of BE */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int beYDPI; /**< Vertical dots per inch of BE */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int beNumDepths; /**< Number of depths on BE server */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int *beDepths; /**< Depths from BE server */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int beNumPixmapFormats; /**< Number of pixmap formats on BE */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XPixmapFormatValues *bePixmapFormats; /**< Pixmap formats on BE */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int beNumVisuals; /**< Number of visuals on BE */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XVisualInfo *beVisuals; /**< Visuals from BE server */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int beDefVisualIndex; /**< Default visual index of BE */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int beNumDefColormaps; /**< Number of default colormaps */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Colormap *beDefColormaps; /**< Default colormaps for DMX server */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Pixel beBlackPixel; /**< Default black pixel for BE */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Pixel beWhitePixel; /**< Default white pixel for BE */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /*---------- Screen window information ----------*/
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
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 int scrnWidth; /**< Width of "screen" */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int scrnHeight; /**< Height of "screen" */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int scrnXSign; /**< X offset sign of "screen" */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int scrnYSign; /**< Y offset sign of "screen" */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /** Default drawables for "screen" */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Drawable scrnDefDrawables[MAXFORMATS];
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync struct _DMXScreenInfo *next; /**< List of "screens" on same display */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync struct _DMXScreenInfo *over; /**< List of "screens" that overlap */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /*---------- Root window information ----------*/
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
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 rootWidth; /**< Width of "root" window */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int rootHeight; /**< Height of "root" window */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int rootXOrigin; /**< Global X origin of "root" window */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int rootYOrigin; /**< Global Y origin of "root" window */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /*---------- Shadow framebuffer information ----------*/
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
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
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /*---------- Other related information ----------*/
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int shared; /**< Non-zero if another Xdmx is running */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Bool WMRunningOnBE;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Cursor noCursor;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Cursor curCursor;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /* Support for cursors on overlapped
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * backend displays. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync CursorPtr cursor;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int cursorVisible;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int cursorNotShared; /* for overlapping screens on a backend */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PositionType where; /**< Relative layout information */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int whereX; /**< Relative layout information */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int whereY; /**< Relative layout information */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int whereRefScreen; /**< Relative layout information */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int savedTimeout; /**< Original screen saver timeout */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int dpmsCapable; /**< Non-zero if backend is DPMS capable */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int dpmsEnabled; /**< Non-zero if DPMS enabled */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int dpmsStandby; /**< Original DPMS standby value */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int dpmsSuspend; /**< Original DPMS suspend value */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int dpmsOff; /**< Original DPMS off value */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DMXStatInfo *stat; /**< Statistics about XSync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Bool needsSync; /**< True if an XSync is pending */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#ifdef GLXEXT
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /** Visual information for glxProxy */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int numGlxVisuals;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync __GLXvisualConfig *glxVisuals;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int glxMajorOpcode;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int glxErrorBase;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /** FB config information for glxProxy */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync __GLXFBConfig *fbconfigs;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int numFBConfigs;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#endif
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /** Function pointers to wrapped screen
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * functions */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync CloseScreenProcPtr CloseScreen;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync SaveScreenProcPtr SaveScreen;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync CreateGCProcPtr CreateGC;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync CreateWindowProcPtr CreateWindow;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DestroyWindowProcPtr DestroyWindow;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PositionWindowProcPtr PositionWindow;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ChangeWindowAttributesProcPtr ChangeWindowAttributes;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync RealizeWindowProcPtr RealizeWindow;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync UnrealizeWindowProcPtr UnrealizeWindow;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync RestackWindowProcPtr RestackWindow;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync WindowExposuresProcPtr WindowExposures;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync CopyWindowProcPtr CopyWindow;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ResizeWindowProcPtr ResizeWindow;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ReparentWindowProcPtr ReparentWindow;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ChangeBorderWidthProcPtr ChangeBorderWidth;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync GetImageProcPtr GetImage;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync GetSpansProcPtr GetSpans;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync CreatePixmapProcPtr CreatePixmap;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DestroyPixmapProcPtr DestroyPixmap;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync BitmapToRegionProcPtr BitmapToRegion;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync RealizeFontProcPtr RealizeFont;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync UnrealizeFontProcPtr UnrealizeFont;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync CreateColormapProcPtr CreateColormap;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DestroyColormapProcPtr DestroyColormap;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync InstallColormapProcPtr InstallColormap;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync StoreColorsProcPtr StoreColors;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync SetShapeProcPtr SetShape;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync CreatePictureProcPtr CreatePicture;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DestroyPictureProcPtr DestroyPicture;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ChangePictureClipProcPtr ChangePictureClip;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DestroyPictureClipProcPtr DestroyPictureClip;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ChangePictureProcPtr ChangePicture;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ValidatePictureProcPtr ValidatePicture;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync CompositeProcPtr Composite;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync GlyphsProcPtr Glyphs;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync CompositeRectsProcPtr CompositeRects;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync InitIndexedProcPtr InitIndexed;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync CloseIndexedProcPtr CloseIndexed;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync UpdateIndexedProcPtr UpdateIndexed;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync TrapezoidsProcPtr Trapezoids;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync TrianglesProcPtr Triangles;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} DMXScreenInfo;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* Global variables available to all Xserver/hw/dmx routines. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern int dmxNumScreens; /**< Number of dmxScreens */
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern DMXScreenInfo *dmxScreens; /**< List of outputs */
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern int dmxShadowFB; /**< Non-zero if using
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * shadow frame-buffer
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * (deprecated) */
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern XErrorEvent dmxLastErrorEvent; /**< Last error that
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * occurred */
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern Bool dmxErrorOccurred; /**< True if an error
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * occurred */
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern Bool dmxOffScreenOpt; /**< True if using off
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * screen
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 */
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern Bool dmxUseXKB; /**< True if the XKB
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * extension should be
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * used with the backend
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * servers */
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern int dmxDepth; /**< Requested depth if
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * non-zero */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#ifdef GLXEXT
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern Bool dmxGLXProxy; /**< True if glxProxy
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * support is enabled */
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern Bool dmxGLXSwapGroupSupport; /**< True if glxProxy
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * support for swap
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * groups and barriers
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * is enabled */
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern Bool dmxGLXSyncSwap; /**< True if glxProxy
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * should force an XSync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * request after each
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * swap buffers call */
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern Bool dmxGLXFinishSwap; /**< True if glxProxy
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * should force a
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * glFinish request
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * after each swap
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * buffers call */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#endif
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern char *dmxFontPath; /**< NULL if no font
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
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * paths */
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern Bool dmxIgnoreBadFontPaths; /**< True if bad font
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * paths should be
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * ignored during server
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * init */
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern Bool dmxAddRemoveScreens; /**< True if add and
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * remove screens support
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * is enabled */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** Wrap screen or GC function pointer */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define DMX_WRAP(_entry, _newfunc, _saved, _actual) \
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncdo { \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync (_saved)->_entry = (_actual)->_entry; \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync (_actual)->_entry = (_newfunc); \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} while (0)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** Unwrap screen or GC function pointer */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define DMX_UNWRAP(_entry, _saved, _actual) \
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncdo { \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync (_actual)->_entry = (_saved)->_entry; \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} while (0)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* Define the MAXSCREENSALLOC/FREE macros, when MAXSCREENS patch has not
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * been applied to sources. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#ifdef MAXSCREENS
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define MAXSCREEN_MAKECONSTSTR1(x) #x
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define MAXSCREEN_MAKECONSTSTR2(x) MAXSCREEN_MAKECONSTSTR1(x)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define MAXSCREEN_FAILED_TXT "Failed at [" \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MAXSCREEN_MAKECONSTSTR2(__LINE__) ":" __FILE__ "] to allocate object: "
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define _MAXSCREENSALLOCF(o,size,fatal) \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync do { \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync if (!o) { \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync o = calloc((size), sizeof(*(o))); \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync if (!o && fatal) FatalError(MAXSCREEN_FAILED_TXT #o); \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync } \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync } while (0)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define _MAXSCREENSALLOCR(o,size,retval) \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync do { \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync if (!o) { \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync o = calloc((size), sizeof(*(o))); \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync if (!o) return retval; \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync } \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync } while (0)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define MAXSCREENSFREE(o) \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync do { \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync free(o); \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync o = NULL; \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync } while (0)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
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#endif
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern DevPrivateKeyRec dmxGCPrivateKeyRec;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define dmxGCPrivateKey (&dmxGCPrivateKeyRec) /**< Private index for GCs */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern DevPrivateKeyRec dmxWinPrivateKeyRec;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define dmxWinPrivateKey (&dmxWinPrivateKeyRec) /**< Private index for Windows */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern DevPrivateKeyRec dmxPixPrivateKeyRec;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define dmxPixPrivateKey (&dmxPixPrivateKeyRec) /**< Private index for Pixmaps */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern int dmxFontPrivateIndex; /**< Private index for Fonts */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern DevPrivateKeyRec dmxScreenPrivateKeyRec;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define dmxScreenPrivateKey (&dmxScreenPrivateKeyRec) /**< Private index for Screens */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern DevPrivateKeyRec dmxColormapPrivateKeyRec;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define dmxColormapPrivateKey (&dmxColormapPrivateKeyRec) /**< Private index for Colormaps */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern DevPrivateKeyRec dmxPictPrivateKeyRec;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define dmxPictPrivateKey (&dmxPictPrivateKeyRec) /**< Private index for Picts */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern DevPrivateKeyRec dmxGlyphSetPrivateKeyRec;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define dmxGlyphSetPrivateKey (&dmxGlyphSetPrivateKeyRec) /**< Private index for GlyphSets */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#endif /* DMX_H */