dmxext.h revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
/* $XFree86$ */
/*
* Copyright 2002-2004 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:
* Rickard E. (Rik) Faith <faith@redhat.com>
*
*/
/** \file
* This file describes the interface to the client-side libdmx.a
* library. All DMX-aware client-side applications should include this
* file. */
#ifndef _DMXEXT_H_
#define _DMXEXT_H_
/* These values must be larger than LastExtensionError.
The values in dmxext.h and dmxproto.h *MUST* match. */
#define DmxBadXinerama 1001
#define DmxBadValue 1002
#define DmxBadReply 1003
#define DMXScreenWindowWidth (1L<<0)
#define DMXDesktopWidth (1L<<0)
#define DMXInputType (1L<<0)
#ifndef _DMX_SERVER_
/** Client-library screen information structure, returned by
* #DMXGetScreenAttributes. */
typedef struct {
char *displayName;
int logicalScreen;
unsigned int screenWindowWidth; /* displayName's coordinate system */
unsigned int screenWindowHeight; /* displayName's coordinate system */
int screenWindowXoffset; /* displayName's coordinate system */
int screenWindowYoffset; /* displayName's coordinate system */
unsigned int rootWindowWidth; /* screenWindow's coordinate system */
unsigned int rootWindowHeight; /* screenWindow's coordinate system */
int rootWindowXoffset; /* screenWindow's coordinate system */
int rootWindowYoffset; /* screenWindow's coordinate system */
int rootWindowXorigin; /* global coordinate system */
int rootWindowYorigin; /* global coordinate system */
/** Client-library window information structure, returned by
* #DMXGetWindowAttributes. */
typedef struct {
int screen;
/** Client-library desktop information structure, returned by
* #DMXGetDesktopAttributes. */
typedef struct {
unsigned int width; /* global coordinate system */
unsigned int height; /* global coordinate system */
int shiftX; /* global coordinate system */
int shiftY; /* global coordinate system */
/** Enumeration for the #inputType field in the #DMXInputAttributes
* structure. */
typedef enum {
} DMXInputEnum;
/** Client-library input information structure, returned by
* #DMXGetInputAttributes. */
typedef struct {
int physicalScreen;
int physicalId;
const char *name;
int *event_basep, int *error_basep);
int *minor_version, int *patch_version);
int screen,
int screen_count,
int *screens,
int mask_count,
unsigned int *masks,
int *error_screen);
const char *displayName,
unsigned int mask,
int *screen);
/* Call DMXGetScreenWindowCount and allocate info to that size. Pass
* the size in available_count. This call can generate a large amount
* of wire traffic and should not be used called with available_count=0
* just to determine the screen_count value -- use DMXGetScreenCount
* instead. NOTE: Also see DMX protocol specification (DMXSpec.txt) for
* usage of DMXSync to flush pending commands. */
int *screen_count, int available_count,
unsigned int mask,
unsigned int mask,
int *id);
/* These are helper functions that call DMXAddInput. */
int *newId);
int *newId);
#endif
#endif