Stubs for EnumServiceStatus32, small changes.
[wine/multimedia.git] / include / x11drv.h
blob186227c1dc873235e5258367bd4ed1046958a9d9
1 /*
2 * X11 display driver definitions
3 */
5 #ifndef __WINE_X11DRV_H
6 #define __WINE_X11DRV_H
8 #include "ts_xlib.h"
9 #include "ts_xutil.h"
10 #include "winbase.h"
11 #include "windows.h"
12 #include "gdi.h"
13 #include "xmalloc.h" /* for XCREATEIMAGE macro */
15 /* X physical pen */
16 typedef struct
18 int style;
19 int endcap;
20 int linejoin;
21 int pixel;
22 int width;
23 char * dashes;
24 int dash_len;
25 int type; /* GEOMETRIC || COSMETIC */
26 } X_PHYSPEN;
28 /* X physical brush */
29 typedef struct
31 int style;
32 int fillStyle;
33 int pixel;
34 Pixmap pixmap;
35 } X_PHYSBRUSH;
37 /* X physical font */
38 typedef UINT32 X_PHYSFONT;
40 /* X physical device */
41 typedef struct
43 GC gc; /* X Window GC */
44 Drawable drawable;
45 X_PHYSFONT font;
46 X_PHYSPEN pen;
47 X_PHYSBRUSH brush;
48 int backgroundPixel;
49 int textPixel;
50 } X11DRV_PDEVICE;
53 typedef struct {
54 Pixmap pixmap;
55 } X11DRV_PHYSBITMAP;
57 /* GCs used for B&W and color bitmap operations */
58 extern GC BITMAP_monoGC, BITMAP_colorGC;
60 #define BITMAP_GC(bmp) \
61 (((bmp)->bitmap.bmBitsPixel == 1) ? BITMAP_monoGC : BITMAP_colorGC)
64 /* Wine driver X11 functions */
66 struct tagDC;
67 struct tagDeviceCaps;
69 extern BOOL32 X11DRV_Init(void);
70 extern BOOL32 X11DRV_BitBlt( struct tagDC *dcDst, INT32 xDst, INT32 yDst,
71 INT32 width, INT32 height, struct tagDC *dcSrc,
72 INT32 xSrc, INT32 ySrc, DWORD rop );
73 extern BOOL32 X11DRV_EnumDeviceFonts( struct tagDC *dc, LPLOGFONT16 plf,
74 DEVICEFONTENUMPROC dfeproc, LPARAM lp );
75 extern BOOL32 X11DRV_GetCharWidth( struct tagDC *dc, UINT32 firstChar,
76 UINT32 lastChar, LPINT32 buffer );
77 extern BOOL32 X11DRV_GetTextExtentPoint( struct tagDC *dc, LPCSTR str,
78 INT32 count, LPSIZE32 size );
79 extern BOOL32 X11DRV_GetTextMetrics(struct tagDC *dc, TEXTMETRIC32A *metrics);
80 extern BOOL32 X11DRV_PatBlt( struct tagDC *dc, INT32 left, INT32 top,
81 INT32 width, INT32 height, DWORD rop );
82 extern VOID X11DRV_SetDeviceClipping(struct tagDC *dc);
83 extern BOOL32 X11DRV_StretchBlt( struct tagDC *dcDst, INT32 xDst, INT32 yDst,
84 INT32 widthDst, INT32 heightDst,
85 struct tagDC *dcSrc, INT32 xSrc, INT32 ySrc,
86 INT32 widthSrc, INT32 heightSrc, DWORD rop );
87 extern BOOL32 X11DRV_MoveToEx( struct tagDC *dc, INT32 x, INT32 y,LPPOINT32 pt);
88 extern BOOL32 X11DRV_LineTo( struct tagDC *dc, INT32 x, INT32 y);
89 extern BOOL32 X11DRV_Arc( struct tagDC *dc, INT32 left, INT32 top, INT32 right,
90 INT32 bottom, INT32 xstart, INT32 ystart, INT32 xend,
91 INT32 yend );
92 extern BOOL32 X11DRV_Pie( struct tagDC *dc, INT32 left, INT32 top, INT32 right,
93 INT32 bottom, INT32 xstart, INT32 ystart, INT32 xend,
94 INT32 yend );
95 extern BOOL32 X11DRV_Chord( struct tagDC *dc, INT32 left, INT32 top,
96 INT32 right, INT32 bottom, INT32 xstart,
97 INT32 ystart, INT32 xend, INT32 yend );
98 extern BOOL32 X11DRV_Ellipse( struct tagDC *dc, INT32 left, INT32 top,
99 INT32 right, INT32 bottom );
100 extern BOOL32 X11DRV_Rectangle(struct tagDC *dc, INT32 left, INT32 top,
101 INT32 right, INT32 bottom);
102 extern BOOL32 X11DRV_RoundRect( struct tagDC *dc, INT32 left, INT32 top,
103 INT32 right, INT32 bottom, INT32 ell_width,
104 INT32 ell_height );
105 extern COLORREF X11DRV_SetPixel( struct tagDC *dc, INT32 x, INT32 y,
106 COLORREF color );
107 extern COLORREF X11DRV_GetPixel( struct tagDC *dc, INT32 x, INT32 y);
108 extern BOOL32 X11DRV_PaintRgn( struct tagDC *dc, HRGN32 hrgn );
109 extern BOOL32 X11DRV_Polyline( struct tagDC *dc,const POINT32* pt,INT32 count);
110 extern BOOL32 X11DRV_PolyBezier( struct tagDC *dc, const POINT32 start, const POINT32* lppt, DWORD cPoints);
111 extern BOOL32 X11DRV_Polygon( struct tagDC *dc, const POINT32* pt, INT32 count );
112 extern BOOL32 X11DRV_PolyPolygon( struct tagDC *dc, const POINT32* pt,
113 const INT32* counts, UINT32 polygons);
114 extern BOOL32 X11DRV_PolyPolyline( struct tagDC *dc, const POINT32* pt,
115 const DWORD* counts, DWORD polylines);
117 extern HGDIOBJ32 X11DRV_SelectObject( struct tagDC *dc, HGDIOBJ32 handle );
119 extern COLORREF X11DRV_SetBkColor( struct tagDC *dc, COLORREF color );
120 extern COLORREF X11DRV_SetTextColor( struct tagDC *dc, COLORREF color );
121 extern BOOL32 X11DRV_ExtFloodFill( struct tagDC *dc, INT32 x, INT32 y,
122 COLORREF color, UINT32 fillType );
123 extern BOOL32 X11DRV_ExtTextOut( struct tagDC *dc, INT32 x, INT32 y,
124 UINT32 flags, const RECT32 *lprect,
125 LPCSTR str, UINT32 count, const INT32 *lpDx );
126 extern BOOL32 X11DRV_CreateBitmap( HBITMAP32 hbitmap );
127 extern BOOL32 X11DRV_DeleteObject( HGDIOBJ32 handle );
128 extern LONG X11DRV_BitmapBits( HBITMAP32 hbitmap, void *bits, LONG count,
129 WORD flags );
130 extern INT32 X11DRV_SetDIBitsToDevice( struct tagDC *dc, INT32 xDest,
131 INT32 yDest, DWORD cx, DWORD cy,
132 INT32 xSrc, INT32 ySrc,
133 UINT32 startscan, UINT32 lines,
134 LPCVOID bits, const BITMAPINFO *info,
135 UINT32 coloruse );
136 extern INT32 X11DRV_DeviceBitmapBits( struct tagDC *dc, HBITMAP32 hbitmap,
137 WORD fGet, UINT32 startscan,
138 UINT32 lines, LPSTR bits,
139 LPBITMAPINFO info, UINT32 coloruse );
140 /* X11 driver internal functions */
142 extern BOOL32 X11DRV_BITMAP_Init(void);
143 extern BOOL32 X11DRV_BRUSH_Init(void);
144 extern BOOL32 X11DRV_DIB_Init(void);
145 extern BOOL32 X11DRV_FONT_Init( struct tagDeviceCaps* );
147 struct tagBITMAPOBJ;
148 extern XImage *X11DRV_BITMAP_GetXImage( const struct tagBITMAPOBJ *bmp );
149 extern int X11DRV_DIB_GetXImageWidthBytes( int width, int depth );
150 extern BOOL32 X11DRV_DIB_Init(void);
151 extern X11DRV_PHYSBITMAP *X11DRV_AllocBitmap( struct tagBITMAPOBJ *bmp );
153 extern BOOL32 X11DRV_SetupGCForPatBlt( struct tagDC *dc, GC gc,
154 BOOL32 fMapColors );
155 extern BOOL32 X11DRV_SetupGCForBrush( struct tagDC *dc );
156 extern BOOL32 X11DRV_SetupGCForPen( struct tagDC *dc );
157 extern BOOL32 X11DRV_SetupGCForText( struct tagDC *dc );
159 extern const int X11DRV_XROPfunction[];
161 extern Display * display;
162 extern Screen * screen;
163 extern Window rootWindow;
164 extern int screenWidth, screenHeight, screenDepth;
167 /* Xlib critical section */
169 extern CRITICAL_SECTION X11DRV_CritSection;
171 extern void _XInitImageFuncPtrs(XImage *);
173 #define XCREATEIMAGE(image,width,height,bpp) \
175 int width_bytes = X11DRV_DIB_GetXImageWidthBytes( (width), (bpp) ); \
176 (image) = TSXCreateImage(display, DefaultVisualOfScreen(screen), \
177 (bpp), ZPixmap, 0, xcalloc( (height)*width_bytes ),\
178 (width), (height), 32, width_bytes ); \
182 /* exported dib functions for now */
184 /* This structure holds the arguments for DIB_SetImageBits() */
185 typedef struct
187 struct tagDC *dc;
188 LPCVOID bits;
189 XImage *image;
190 int lines;
191 DWORD infoWidth;
192 WORD depth;
193 WORD infoBpp;
194 WORD compression;
195 int *colorMap;
196 int nColorMap;
197 Drawable drawable;
198 GC gc;
199 int xSrc;
200 int ySrc;
201 int xDest;
202 int yDest;
203 int width;
204 int height;
205 } DIB_SETIMAGEBITS_DESCR;
207 extern int X11DRV_DIB_GetImageBits( const DIB_SETIMAGEBITS_DESCR *descr );
208 extern int X11DRV_DIB_SetImageBits( const DIB_SETIMAGEBITS_DESCR *descr );
209 extern int *X11DRV_DIB_BuildColorMap( struct tagDC *dc, WORD coloruse,
210 WORD depth, const BITMAPINFO *info,
211 int *nColors );
214 #endif /* __WINE_X11DRV_H */