dmx.h revision deb4998ba50060c48cce222fd18a8eed053918d7
/* $XFree86$ */
/*
* Copyright 2001-2003 Red Hat Inc., Durham, North Carolina.
*
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation on the rights to use, copy, modify, merge,
* and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial
* portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/*
* Authors:
* Kevin E. Martin <kem@redhat.com>
* David H. Dawes <dawes@xfree86.org>
* Rickard E. (Rik) Faith <faith@redhat.com>
*
*/
/** \file
* Main header file included by all other DMX-related files.
*/
/** \mainpage
* - <a href="http://dmx.sourceforge.net">DMX Home Page</a>
* - <a href="http://sourceforge.net/projects/dmx">DMX Project Page (on
* Source Forge)</a>
* - <a href="http://dmx.sourceforge.net/dmx.html">Distributed Multihead
* X design</a>, the design document for DMX
* - <a href="http://dmx.sourceforge.net/DMXSpec.txt">Client-to-Server
* DMX Extension to the X Protocol</a>
*/
#ifndef DMX_H
#define DMX_H
#include <dmx-config.h>
#endif
#include "gcstruct.h"
/* Handle client-side include files in one place. */
#include "dmxclient.h"
#include "globals.h"
#include "scrnintstr.h"
#ifdef RENDER
#include "picturestr.h"
#endif
#ifdef GLXEXT
#endif
typedef enum {
PosNone = -1,
PosAbsolute = 0,
} PositionType;
/** Provide the typedef globally, but keep the contents opaque outside
* of the input routines. \see dmxinput.h */
typedef struct _DMXInputInfo DMXInputInfo;
/** Provide the typedef globally, but keep the contents opaque outside
* of the XSync statistic routines. \see dmxstat.c */
typedef struct _DMXStatInfo DMXStatInfo;
/** Global structure containing information about each backend screen. */
typedef struct _DMXScreenInfo {
const char *name; /**< Name from command line or config file */
int index; /**< Index into dmxScreens global */
/*---------- Back-end X server information ----------*/
int beWidth; /**< Width of BE display */
int beHeight; /**< Height of BE display */
int beDepth; /**< Depth of BE display */
int beBPP; /**< Bits per pixel of BE display */
int beXDPI; /**< Horizontal dots per inch of BE */
int beYDPI; /**< Vertical dots per inch of BE */
int beNumDepths; /**< Number of depths on BE server */
int *beDepths; /**< Depths from BE server */
int beNumPixmapFormats; /**< Number of pixmap formats on BE */
int beNumVisuals; /**< Number of visuals on BE */
int beDefVisualIndex; /**< Default visual index of BE */
int beNumDefColormaps; /**< Number of default colormaps */
/*---------- Screen window information ----------*/
int scrnX; /**< X offset of "screen" WRT BE display */
int scrnY; /**< Y offset of "screen" WRT BE display */
int scrnWidth; /**< Width of "screen" */
int scrnHeight; /**< Height of "screen" */
int scrnXSign; /**< X offset sign of "screen" */
int scrnYSign; /**< Y offset sign of "screen" */
/** Default drawables for "screen" */
/*---------- Root window information ----------*/
int rootX; /**< X offset of "root" window WRT "screen"*/
int rootY; /**< Y offset of "root" window WRT "screen"*/
int rootWidth; /**< Width of "root" window */
int rootHeight; /**< Height of "root" window */
int rootXOrigin; /**< Global X origin of "root" window */
int rootYOrigin; /**< Global Y origin of "root" window */
/*---------- Shadow framebuffer information ----------*/
void *shadow; /**< Shadow framebuffer data (if enabled) */
/*---------- Other related information ----------*/
int shared; /**< Non-zero if another Xdmx is running */
/* Support for cursors on overlapped
* backend displays. */
int cursorVisible;
int cursorNotShared; /* for overlapping screens on a backend */
int whereX; /**< Relative layout information */
int whereY; /**< Relative layout information */
int whereRefScreen; /**< Relative layout information */
int savedTimeout; /**< Original screen saver timeout */
int dpmsCapable; /**< Non-zero if backend is DPMS capable */
int dpmsEnabled; /**< Non-zero if DPMS enabled */
int dpmsStandby; /**< Original DPMS standby value */
int dpmsSuspend; /**< Original DPMS suspend value */
int dpmsOff; /**< Original DPMS off value */
#ifdef GLXEXT
/** Visual information for glxProxy */
int numGlxVisuals;
int glxMajorOpcode;
int glxErrorBase;
/** FB config information for glxProxy */
int numFBConfigs;
#endif
/** Function pointers to wrapped screen
* functions */
#ifdef SHAPE
#endif
#ifdef RENDER
#endif
extern int dmxNumScreens; /**< Number of dmxScreens */
extern int dmxShadowFB; /**< Non-zero if using
* shadow frame-buffer
* (deprecated) */
* occurred */
* occurred */
* screen
* optimizations */
* primitive subdivision
* optimization */
* lazy window creation
* optimization */
* extension should be
* used with the backend
* servers */
extern int dmxDepth; /**< Requested depth if
* non-zero */
#ifdef GLXEXT
* support is enabled */
* support for swap
* groups and barriers
* is enabled */
* should force an XSync
* request after each
* swap buffers call */
* should force a
* glFinish request
* after each swap
* buffers call */
#endif
extern char *dmxFontPath; /**< NULL if no font
* path is set on the
* command line;
* otherwise, a string
* of comma separated
* paths built from the
* command line
* specified font
* paths */
* paths should be
* ignored during server
* init */
* remove screens support
* is enabled */
/** Wrap screen or GC function pointer */
do { \
} while (0)
/** Unwrap screen or GC function pointer */
do { \
} while (0)
/* Define the MAXSCREENSALLOC/FREE macros, when MAXSCREENS patch has not
* been applied to sources. */
#ifdef MAXSCREENS
#define MAXSCREEN_MAKECONSTSTR1(x) #x
#define MAXSCREEN_MAKECONSTSTR2(x) MAXSCREEN_MAKECONSTSTR1(x)
#define MAXSCREEN_FAILED_TXT "Failed at [" \
do { \
if (!o) { \
} \
} while (0)
do { \
if (!o) { \
if (!o) return retval; \
} \
} while (0)
#define MAXSCREENSFREE(o) \
do { \
if (o) xfree(o); \
o = NULL; \
} while (0)
#endif
#endif /* DMX_H */