# dmxext.h

Go to the documentation of this file.

    00001 /* $XFree86$ */
    00002 /*
    00003  * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina.
    00004  *
    00005  * All Rights Reserved.
    00006  *
    00007  * Permission is hereby granted, free of charge, to any person obtaining
    00008  * a copy of this software and associated documentation files (the
    00009  * "Software"), to deal in the Software without restriction, including
    00010  * without limitation on the rights to use, copy, modify, merge,
    00011  * publish, distribute, sublicense, and/or sell copies of the Software,
    00012  * and to permit persons to whom the Software is furnished to do so,
    00013  * subject to the following conditions:
    00014  *
    00015  * The above copyright notice and this permission notice (including the
    00016  * next paragraph) shall be included in all copies or substantial
    00017  * portions of the Software.
    00018  *
    00019  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    00020  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    00021  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    00022  * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
    00023  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
    00024  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
    00025  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    00026  * SOFTWARE.
    00027  */
    00028
    00029 /*
    00030  * Authors:
    00031  *   Rickard E. (Rik) Faith <faith@redhat.com>
    00032  *
    00033  */
    00034
    00040 #ifndef _DMXEXT_H_
    00041 #define _DMXEXT_H_
    00042
    00043 /* These values must be larger than LastExtensionError.
    00044    The values in dmxext.h and dmxproto.h *MUST* match. */
    00045 #define DmxBadXinerama         1001
    00046 #define DmxBadValue            1002
    00047 #define DmxBadReply            1003
    00048
    00049 #define DMXScreenWindowWidth   (1L<<0)
    00050 #define DMXScreenWindowHeight  (1L<<1)
    00051 #define DMXScreenWindowXoffset (1L<<2)
    00052 #define DMXScreenWindowYoffset (1L<<3)
    00053 #define DMXRootWindowWidth     (1L<<4)
    00054 #define DMXRootWindowHeight    (1L<<5)
    00055 #define DMXRootWindowXoffset   (1L<<6)
    00056 #define DMXRootWindowYoffset   (1L<<7)
    00057 #define DMXRootWindowXorigin   (1L<<8)
    00058 #define DMXRootWindowYorigin   (1L<<9)
    00059
    00060 #define DMXDesktopWidth        (1L<<0)
    00061 #define DMXDesktopHeight       (1L<<1)
    00062 #define DMXDesktopShiftX       (1L<<2)
    00063 #define DMXDesktopShiftY       (1L<<3)
    00064
    00065 #define DMXInputType           (1L<<0)
    00066 #define DMXInputPhysicalScreen (1L<<1)
    00067 #define DMXInputSendsCore      (1L<<2)
    00068
    00069 #ifndef _DMX_SERVER_
    00070
    00073 typedef struct {
    00074     char         *displayName;
    00075     int          logicalScreen;
    00076
    00077     unsigned int screenWindowWidth;    /* displayName's coordinate system */
    00078     unsigned int screenWindowHeight;   /* displayName's coordinate system */
    00079     int          screenWindowXoffset;  /* displayName's coordinate system */
    00080     int          screenWindowYoffset;  /* displayName's coordinate system */
    00081
    00082     unsigned int rootWindowWidth;      /* screenWindow's coordinate system */
    00083     unsigned int rootWindowHeight;     /* screenWindow's coordinate system */
    00084     int          rootWindowXoffset;    /* screenWindow's coordinate system */
    00085     int          rootWindowYoffset;    /* screenWindow's coordinate system */
    00086
    00087     int          rootWindowXorigin;    /* global coordinate system */
    00088     int          rootWindowYorigin;    /* global coordinate system */
    00089 } DMXScreenAttributes;
    00090
    00093 typedef struct {
    00094     int          screen;
    00095     Window       window;
    00096     XRectangle   pos, vis;
    00097 } DMXWindowAttributes;
    00098
    00101 typedef struct {
    00102     unsigned int width;         /* global coordinate system */
    00103     unsigned int height;        /* global coordinate system */
    00104     int          shiftX;        /* global coordinate system */
    00105     int          shiftY;        /* global coordinate system */
    00106 } DMXDesktopAttributes;
    00107
    00110 typedef enum {
    00111     DMXLocalInputType,
    00112     DMXConsoleInputType,
    00113     DMXBackendInputType
    00114 } DMXInputEnum;
    00115
    00118 typedef struct {
    00119     DMXInputEnum inputType;
    00120     int          physicalScreen;
    00121     int          physicalId;
    00122     Bool         isCore;
    00123     Bool         sendsCore;
    00124     const char   *name;
    00125     Bool         detached;
    00126 } DMXInputAttributes;
    00127
    00128 _XFUNCPROTOBEGIN
    00129
    00130 extern Bool DMXQueryExtension(Display *dpy,
    00131                               int *event_basep, int *error_basep);
    00132 extern Bool DMXQueryVersion(Display *dpy, int *major_version,
    00133                             int *minor_version, int *patch_version);
    00134 extern Bool DMXSync(Display *dpy);
    00135 extern Bool DMXForceWindowCreation(Display *dpy, Window window);
    00136
    00137
    00138 extern Bool DMXGetScreenCount(Display *dpy, int *screen_count);
    00139 extern Bool DMXGetScreenAttributes(Display *dpy,
    00140                                    int screen,
    00141                                    DMXScreenAttributes *attr);
    00142 extern int  DMXChangeScreensAttributes(Display *dpy,
    00143                                        int screen_count,
    00144                                        int *screens,
    00145                                        int mask_count,
    00146                                        unsigned int *masks,
    00147                                        DMXScreenAttributes *attr, /* vector */
    00148                                        int *error_screen);
    00149
    00150 extern Bool DMXAddScreen(Display *dpy,
    00151                          const char *displayName,
    00152                          unsigned int mask,
    00153                          DMXScreenAttributes *attr,
    00154                          int *screen);
    00155 extern Bool DMXRemoveScreen(Display *dpy, int screen);
    00156
    00157 /* Call DMXGetScreenWindowCount and allocate info to that size.  Pass
    00158  * the size in available_count.  This call can generate a large amount
    00159  * of wire traffic and should not be used called with available_count=0
    00160  * just to determine the screen_count value -- use DMXGetScreenCount
    00161  * instead.  NOTE: Also see DMX protocol specification (DMXSpec.txt) for
    00162  * usage of DMXSync to flush pending commands. */
    00163 extern Bool DMXGetWindowAttributes(Display *dpy, Window window,
    00164                                    int *screen_count, int available_count,
    00165                                    DMXWindowAttributes *attr);
    00166
    00167 extern Bool DMXGetDesktopAttributes(Display *dpy, DMXDesktopAttributes *attr);
    00168 extern int  DMXChangeDesktopAttributes(Display *dpy,
    00169                                        unsigned int mask,
    00170                                        DMXDesktopAttributes *attr);
    00171
    00172 extern Bool DMXGetInputCount(Display *dpy, int *input_count);
    00173 extern Bool DMXGetInputAttributes(Display *dpy, int id,
    00174                                   DMXInputAttributes *attr);
    00175
    00176 extern Bool DMXAddInput(Display *dpy,
    00177                         unsigned int mask,
    00178                         DMXInputAttributes *attr,
    00179                         int *id);
    00180 extern Bool DMXRemoveInput(Display *dpy, int id);
    00181
    00182 /* These are helper functions that call DMXAddInput. */
    00183 extern Bool DMXAddBackendInput(Display *dpy, int screen, int sendsCore,
    00184                                int *newId);
    00185 extern Bool DMXAddConsoleInput(Display *dpy, const char *name, int sendsCore,
    00186                                int *newId);
    00187
    00188 _XFUNCPROTOEND
    00189 #endif
    00190 #endif

Generated June 29, 2004 for Distributed Multihead X by doxygen 1.3.4. </addres>