b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* $XFree86$ */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Copyright 2001-2003 Red Hat Inc., Durham, North Carolina.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync *
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * All Rights Reserved.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync *
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Permission is hereby granted, free of charge, to any person obtaining
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * a copy of this software and associated documentation files (the
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * "Software"), to deal in the Software without restriction, including
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * without limitation on the rights to use, copy, modify, merge,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * publish, distribute, sublicense, and/or sell copies of the Software,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * and to permit persons to whom the Software is furnished to do so,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * subject to the following conditions:
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync *
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * The above copyright notice and this permission notice (including the
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * next paragraph) shall be included in all copies or substantial
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * portions of the Software.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync *
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * SOFTWARE.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Authors:
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Kevin E. Martin <kem@redhat.com>
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * David H. Dawes <dawes@xfree86.org>
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Rickard E. (Rik) Faith <faith@redhat.com>
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync *
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/** \file
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Main header file included by all other DMX-related files.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/** \mainpage
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * - <a href="http://dmx.sourceforge.net">DMX Home Page</a>
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * - <a href="http://sourceforge.net/projects/dmx">DMX Project Page (on
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Source Forge)</a>
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * - <a href="http://dmx.sourceforge.net/dmx.html">Distributed Multihead
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * X design</a>, the design document for DMX
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * - <a href="http://dmx.sourceforge.net/DMXSpec.txt">Client-to-Server
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * DMX Extension to the X Protocol</a>
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#ifndef DMX_H
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define DMX_H
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include "gcstruct.h"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* Handle client-side include files in one place. */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include "dmxclient.h"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include "globals.h"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include "scrnintstr.h"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#ifdef RENDER
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include "picturestr.h"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#endif
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#ifdef GLXEXT
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include <GL/glx.h>
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include <GL/glxint.h>
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#endif
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef enum {
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PosNone = -1,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PosAbsolute = 0,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PosRightOf,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PosLeftOf,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PosAbove,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PosBelow,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PosRelative
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync} PositionType;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/** Provide the typedef globally, but keep the contents opaque outside
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * of the input routines. \see dmxinput.h */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct _DMXInputInfo DMXInputInfo;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/** Provide the typedef globally, but keep the contents opaque outside
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * of the XSync statistic routines. \see dmxstat.c */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct _DMXStatInfo DMXStatInfo;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/** Global structure containing information about each backend screen. */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct _DMXScreenInfo {
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync const char *name; /**< Name from command line or config file */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int index; /**< Index into dmxScreens global */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /*---------- Back-end X server information ----------*/
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync Display *beDisplay; /**< Back-end X server's display */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int beWidth; /**< Width of BE display */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int beHeight; /**< Height of BE display */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int beDepth; /**< Depth of BE display */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int beBPP; /**< Bits per pixel of BE display */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int beXDPI; /**< Horizontal dots per inch of BE */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int beYDPI; /**< Vertical dots per inch of BE */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int beNumDepths; /**< Number of depths on BE server */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int *beDepths; /**< Depths from BE server */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int beNumPixmapFormats; /**< Number of pixmap formats on BE */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync XPixmapFormatValues *bePixmapFormats; /**< Pixmap formats on BE */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int beNumVisuals; /**< Number of visuals on BE */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync XVisualInfo *beVisuals; /**< Visuals from BE server */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int beDefVisualIndex; /**< Default visual index of BE */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int beNumDefColormaps; /**< Number of default colormaps */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync Colormap *beDefColormaps; /**< Default colormaps for DMX server */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync Pixel beBlackPixel; /**< Default black pixel for BE */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync Pixel beWhitePixel; /**< Default white pixel for BE */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /*---------- Screen window information ----------*/
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync Window scrnWin; /**< "Screen" window on backend display */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int scrnX; /**< X offset of "screen" WRT BE display */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int scrnY; /**< Y offset of "screen" WRT BE display */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int scrnWidth; /**< Width of "screen" */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int scrnHeight; /**< Height of "screen" */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int scrnXSign; /**< X offset sign of "screen" */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int scrnYSign; /**< Y offset sign of "screen" */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /** Default drawables for "screen" */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync Drawable scrnDefDrawables[MAXFORMATS];
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync struct _DMXScreenInfo *next; /**< List of "screens" on same display */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync struct _DMXScreenInfo *over; /**< List of "screens" that overlap */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /*---------- Root window information ----------*/
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync Window rootWin; /**< "Root" window on backend display */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int rootX; /**< X offset of "root" window WRT "screen"*/
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int rootY; /**< Y offset of "root" window WRT "screen"*/
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int rootWidth; /**< Width of "root" window */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int rootHeight; /**< Height of "root" window */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int rootXOrigin; /**< Global X origin of "root" window */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int rootYOrigin; /**< Global Y origin of "root" window */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /*---------- Shadow framebuffer information ----------*/
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync void *shadow; /**< Shadow framebuffer data (if enabled) */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync XlibGC shadowGC; /**< Default GC used by shadow FB code */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync XImage *shadowFBImage; /**< Screen image used by shadow FB code */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /*---------- Other related information ----------*/
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int shared; /**< Non-zero if another Xdmx is running */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync Bool WMRunningOnBE;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync Cursor noCursor;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync Cursor curCursor;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /* Support for cursors on overlapped
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * backend displays. */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync CursorPtr cursor;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int cursorVisible;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int cursorNotShared; /* for overlapping screens on a backend */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PositionType where; /**< Relative layout information */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int whereX; /**< Relative layout information */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int whereY; /**< Relative layout information */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int whereRefScreen; /**< Relative layout information */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int savedTimeout; /**< Original screen saver timeout */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int dpmsCapable; /**< Non-zero if backend is DPMS capable */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int dpmsEnabled; /**< Non-zero if DPMS enabled */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int dpmsStandby; /**< Original DPMS standby value */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int dpmsSuspend; /**< Original DPMS suspend value */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int dpmsOff; /**< Original DPMS off value */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync DMXStatInfo *stat; /**< Statistics about XSync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync Bool needsSync; /**< True if an XSync is pending */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#ifdef GLXEXT
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /** Visual information for glxProxy */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int numGlxVisuals;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync __GLXvisualConfig *glxVisuals;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int glxMajorOpcode;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int glxErrorBase;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /** FB config information for glxProxy */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync __GLXFBConfig *fbconfigs;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int numFBConfigs;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#endif
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /** Function pointers to wrapped screen
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * functions */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync CloseScreenProcPtr CloseScreen;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync SaveScreenProcPtr SaveScreen;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync CreateGCProcPtr CreateGC;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync CreateWindowProcPtr CreateWindow;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync DestroyWindowProcPtr DestroyWindow;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PositionWindowProcPtr PositionWindow;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ChangeWindowAttributesProcPtr ChangeWindowAttributes;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync RealizeWindowProcPtr RealizeWindow;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync UnrealizeWindowProcPtr UnrealizeWindow;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync RestackWindowProcPtr RestackWindow;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync WindowExposuresProcPtr WindowExposures;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PaintWindowBackgroundProcPtr PaintWindowBackground;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PaintWindowBorderProcPtr PaintWindowBorder;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync CopyWindowProcPtr CopyWindow;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ResizeWindowProcPtr ResizeWindow;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ReparentWindowProcPtr ReparentWindow;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ChangeBorderWidthProcPtr ChangeBorderWidth;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync GetImageProcPtr GetImage;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync GetSpansProcPtr GetSpans;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync CreatePixmapProcPtr CreatePixmap;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync DestroyPixmapProcPtr DestroyPixmap;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync BitmapToRegionProcPtr BitmapToRegion;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync RealizeFontProcPtr RealizeFont;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync UnrealizeFontProcPtr UnrealizeFont;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync CreateColormapProcPtr CreateColormap;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync DestroyColormapProcPtr DestroyColormap;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync InstallColormapProcPtr InstallColormap;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync StoreColorsProcPtr StoreColors;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#ifdef SHAPE
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync SetShapeProcPtr SetShape;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#endif
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#ifdef RENDER
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync CreatePictureProcPtr CreatePicture;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync DestroyPictureProcPtr DestroyPicture;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ChangePictureClipProcPtr ChangePictureClip;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync DestroyPictureClipProcPtr DestroyPictureClip;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ChangePictureProcPtr ChangePicture;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ValidatePictureProcPtr ValidatePicture;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync CompositeProcPtr Composite;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync GlyphsProcPtr Glyphs;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync CompositeRectsProcPtr CompositeRects;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync InitIndexedProcPtr InitIndexed;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync CloseIndexedProcPtr CloseIndexed;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync UpdateIndexedProcPtr UpdateIndexed;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync TrapezoidsProcPtr Trapezoids;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync TrianglesProcPtr Triangles;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync TriStripProcPtr TriStrip;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync TriFanProcPtr TriFan;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#endif
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync} DMXScreenInfo;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* Global variables available to all Xserver/hw/dmx routines. */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int dmxNumScreens; /**< Number of dmxScreens */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern DMXScreenInfo *dmxScreens; /**< List of outputs */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int dmxShadowFB; /**< Non-zero if using
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * shadow frame-buffer
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * (deprecated) */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern XErrorEvent dmxLastErrorEvent; /**< Last error that
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * occurred */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool dmxErrorOccurred; /**< True if an error
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * occurred */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool dmxOffScreenOpt; /**< True if using off
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * screen
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * optimizations */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool dmxSubdividePrimitives; /**< True if using the
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * primitive subdivision
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * optimization */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool dmxLazyWindowCreation; /**< True if using the
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * lazy window creation
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * optimization */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool dmxUseXKB; /**< True if the XKB
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * extension should be
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * used with the backend
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * servers */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int dmxDepth; /**< Requested depth if
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * non-zero */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#ifdef GLXEXT
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool dmxGLXProxy; /**< True if glxProxy
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * support is enabled */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool dmxGLXSwapGroupSupport; /**< True if glxProxy
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * support for swap
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * groups and barriers
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * is enabled */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool dmxGLXSyncSwap; /**< True if glxProxy
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * should force an XSync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * request after each
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * swap buffers call */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool dmxGLXFinishSwap; /**< True if glxProxy
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * should force a
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * glFinish request
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * after each swap
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * buffers call */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#endif
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern char *dmxFontPath; /**< NULL if no font
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * path is set on the
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * command line;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * otherwise, a string
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * of comma separated
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * paths built from the
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * command line
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * specified font
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * paths */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool dmxIgnoreBadFontPaths; /**< True if bad font
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * paths should be
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * ignored during server
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * init */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool dmxAddRemoveScreens; /**< True if add and
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * remove screens support
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * is enabled */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/** Wrap screen or GC function pointer */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define DMX_WRAP(_entry, _newfunc, _saved, _actual) \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncdo { \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync (_saved)->_entry = (_actual)->_entry; \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync (_actual)->_entry = (_newfunc); \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync} while (0)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/** Unwrap screen or GC function pointer */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define DMX_UNWRAP(_entry, _saved, _actual) \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncdo { \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync (_actual)->_entry = (_saved)->_entry; \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync} while (0)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* Define the MAXSCREENSALLOC/FREE macros, when MAXSCREENS patch has not
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * been applied to sources. */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#ifdef MAXSCREENS
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define MAXSCREEN_MAKECONSTSTR1(x) #x
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define MAXSCREEN_MAKECONSTSTR2(x) MAXSCREEN_MAKECONSTSTR1(x)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define MAXSCREEN_FAILED_TXT "Failed at [" \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync MAXSCREEN_MAKECONSTSTR2(__LINE__) ":" __FILE__ "] to allocate object: "
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define _MAXSCREENSALLOCF(o,size,fatal) \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync do { \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync if (!o) { \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync o = xalloc((size) * sizeof(*(o))); \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync if (o) memset(o, 0, (size) * sizeof(*(o))); \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync if (!o && fatal) FatalError(MAXSCREEN_FAILED_TXT #o); \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync } \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync } while (0)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define _MAXSCREENSALLOCR(o,size,retval) \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync do { \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync if (!o) { \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync o = xalloc((size) * sizeof(*(o))); \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync if (o) memset(o, 0, (size) * sizeof(*(o))); \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync if (!o) return retval; \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync } \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync } while (0)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define MAXSCREENSFREE(o) \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync do { \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync if (o) xfree(o); \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync o = NULL; \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync } while (0)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define MAXSCREENSALLOC(o) _MAXSCREENSALLOCF(o,MAXSCREENS, 0)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define MAXSCREENSALLOC_FATAL(o) _MAXSCREENSALLOCF(o,MAXSCREENS, 1)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define MAXSCREENSALLOC_RETURN(o,r) _MAXSCREENSALLOCR(o,MAXSCREENS, (r))
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define MAXSCREENSALLOCPLUSONE(o) _MAXSCREENSALLOCF(o,MAXSCREENS+1,0)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define MAXSCREENSALLOCPLUSONE_FATAL(o) _MAXSCREENSALLOCF(o,MAXSCREENS+1,1)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define MAXSCREENSCALLOC(o,m) _MAXSCREENSALLOCF(o,MAXSCREENS*(m),0)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define MAXSCREENSCALLOC_FATAL(o,m) _MAXSCREENSALLOCF(o,MAXSCREENS*(m),1)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#endif
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#endif /* DMX_H */