00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00051 #ifndef DMX_H
00052 #define DMX_H
00053
00054 #include "gcstruct.h"
00055
00056
00057 #include "dmxclient.h"
00058
00059 #include "globals.h"
00060 #include "scrnintstr.h"
00061
00062 #ifdef RENDER
00063 #include "picturestr.h"
00064 #endif
00065
00066 #ifdef GLXEXT
00067 #include <GL/glx.h>
00068 #include <GL/glxint.h>
00069 #endif
00070
00071 typedef enum {
00072 PosNone = -1,
00073 PosAbsolute = 0,
00074 PosRightOf,
00075 PosLeftOf,
00076 PosAbove,
00077 PosBelow,
00078 PosRelative
00079 } PositionType;
00080
00083 typedef struct _DMXInputInfo DMXInputInfo;
00084
00087 typedef struct _DMXStatInfo DMXStatInfo;
00088
00090 typedef struct _DMXScreenInfo {
00091 const char *name;
00092 int index;
00094
00095
00096 Display *beDisplay;
00097 int beWidth;
00098 int beHeight;
00099 int beDepth;
00100 int beBPP;
00101 int beXDPI;
00102 int beYDPI;
00104 int beNumDepths;
00105 int *beDepths;
00107 int beNumPixmapFormats;
00108 XPixmapFormatValues *bePixmapFormats;
00110 int beNumVisuals;
00111 XVisualInfo *beVisuals;
00112 int beDefVisualIndex;
00114 int beNumDefColormaps;
00115 Colormap *beDefColormaps;
00117 Pixel beBlackPixel;
00118 Pixel beWhitePixel;
00120
00121
00122 Window scrnWin;
00123 int scrnX;
00124 int scrnY;
00125 int scrnWidth;
00126 int scrnHeight;
00127 int scrnXSign;
00128 int scrnYSign;
00131 Drawable scrnDefDrawables[MAXFORMATS];
00132
00133 struct _DMXScreenInfo *next;
00134 struct _DMXScreenInfo *over;
00136
00137
00138 Window rootWin;
00139 int rootX;
00140 int rootY;
00141 int rootWidth;
00142 int rootHeight;
00144 int rootXOrigin;
00145 int rootYOrigin;
00147
00148
00149 void *shadow;
00150 XlibGC shadowGC;
00151 XImage *shadowFBImage;
00153
00154
00155 int shared;
00157 Bool WMRunningOnBE;
00158
00159 Cursor noCursor;
00160 Cursor curCursor;
00161
00162
00163 CursorPtr cursor;
00164 int cursorVisible;
00165 int cursorNotShared;
00166
00167 PositionType where;
00168 int whereX;
00169 int whereY;
00170 int whereRefScreen;
00172 int savedTimeout;
00173 int dpmsCapable;
00174 int dpmsEnabled;
00175 int dpmsStandby;
00176 int dpmsSuspend;
00177 int dpmsOff;
00179 DMXStatInfo *stat;
00180 Bool needsSync;
00182 #ifdef GLXEXT
00183
00184 int numGlxVisuals;
00185 __GLXvisualConfig *glxVisuals;
00186 int glxMajorOpcode;
00187 int glxErrorBase;
00188
00190 __GLXFBConfig *fbconfigs;
00191 int numFBConfigs;
00192 #endif
00193
00196 CloseScreenProcPtr CloseScreen;
00197 SaveScreenProcPtr SaveScreen;
00198
00199 CreateGCProcPtr CreateGC;
00200
00201 CreateWindowProcPtr CreateWindow;
00202 DestroyWindowProcPtr DestroyWindow;
00203 PositionWindowProcPtr PositionWindow;
00204 ChangeWindowAttributesProcPtr ChangeWindowAttributes;
00205 RealizeWindowProcPtr RealizeWindow;
00206 UnrealizeWindowProcPtr UnrealizeWindow;
00207 RestackWindowProcPtr RestackWindow;
00208 WindowExposuresProcPtr WindowExposures;
00209 PaintWindowBackgroundProcPtr PaintWindowBackground;
00210 PaintWindowBorderProcPtr PaintWindowBorder;
00211 CopyWindowProcPtr CopyWindow;
00212
00213 ResizeWindowProcPtr ResizeWindow;
00214 ReparentWindowProcPtr ReparentWindow;
00215
00216 ChangeBorderWidthProcPtr ChangeBorderWidth;
00217
00218 GetImageProcPtr GetImage;
00219 GetSpansProcPtr GetSpans;
00220
00221 CreatePixmapProcPtr CreatePixmap;
00222 DestroyPixmapProcPtr DestroyPixmap;
00223 BitmapToRegionProcPtr BitmapToRegion;
00224
00225 RealizeFontProcPtr RealizeFont;
00226 UnrealizeFontProcPtr UnrealizeFont;
00227
00228 CreateColormapProcPtr CreateColormap;
00229 DestroyColormapProcPtr DestroyColormap;
00230 InstallColormapProcPtr InstallColormap;
00231 StoreColorsProcPtr StoreColors;
00232
00233 #ifdef SHAPE
00234 SetShapeProcPtr SetShape;
00235 #endif
00236
00237 #ifdef RENDER
00238 CreatePictureProcPtr CreatePicture;
00239 DestroyPictureProcPtr DestroyPicture;
00240 ChangePictureClipProcPtr ChangePictureClip;
00241 DestroyPictureClipProcPtr DestroyPictureClip;
00242
00243 ChangePictureProcPtr ChangePicture;
00244 ValidatePictureProcPtr ValidatePicture;
00245
00246 CompositeProcPtr Composite;
00247 GlyphsProcPtr Glyphs;
00248 CompositeRectsProcPtr CompositeRects;
00249
00250 InitIndexedProcPtr InitIndexed;
00251 CloseIndexedProcPtr CloseIndexed;
00252 UpdateIndexedProcPtr UpdateIndexed;
00253
00254 TrapezoidsProcPtr Trapezoids;
00255 TrianglesProcPtr Triangles;
00256 TriStripProcPtr TriStrip;
00257 TriFanProcPtr TriFan;
00258 #endif
00259 } DMXScreenInfo;
00260
00261
00262 extern int dmxNumScreens;
00263 extern DMXScreenInfo *dmxScreens;
00264 extern int dmxShadowFB;
00267 extern XErrorEvent dmxLastErrorEvent;
00269 extern Bool dmxErrorOccurred;
00271 extern Bool dmxOffScreenOpt;
00274 extern Bool dmxSubdividePrimitives;
00277 extern Bool dmxLazyWindowCreation;
00280 extern Bool dmxUseXKB;
00284 extern int dmxDepth;
00286 extern Bool dmxNoRender;
00289 #ifdef GLXEXT
00290 extern Bool dmxGLXProxy;
00292 extern Bool dmxGLXSwapGroupSupport;
00296 extern Bool dmxGLXSyncSwap;
00300 extern Bool dmxGLXFinishSwap;
00305 #endif
00306 extern char *dmxFontPath;
00315 extern Bool dmxIgnoreBadFontPaths;
00319 extern Bool dmxAddRemoveScreens;
00324 #define DMX_WRAP(_entry, _newfunc, _saved, _actual) \
00325 do { \
00326 (_saved)->_entry = (_actual)->_entry; \
00327 (_actual)->_entry = (_newfunc); \
00328 } while (0)
00329
00331 #define DMX_UNWRAP(_entry, _saved, _actual) \
00332 do { \
00333 (_actual)->_entry = (_saved)->_entry; \
00334 } while (0)
00335
00336 #endif