New file, wrapper for IShellBrowser class.
[wine/multimedia.git] / include / x11drv.h
blobbd22e0853fbfaceccc46c226b1563f153486db51
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 "xmalloc.h" /* for XCREATEIMAGE macro */
14 /* X physical pen */
15 typedef struct
17 int style;
18 int endcap;
19 int linejoin;
20 int pixel;
21 int width;
22 char * dashes;
23 int dash_len;
24 int type; /* GEOMETRIC || COSMETIC */
25 } X_PHYSPEN;
27 /* X physical brush */
28 typedef struct
30 int style;
31 int fillStyle;
32 int pixel;
33 Pixmap pixmap;
34 } X_PHYSBRUSH;
36 /* X physical font */
37 typedef UINT32 X_PHYSFONT;
39 /* X physical device */
40 typedef struct
42 GC gc; /* X Window GC */
43 Drawable drawable;
44 X_PHYSFONT font;
45 X_PHYSPEN pen;
46 X_PHYSBRUSH brush;
47 int backgroundPixel;
48 int textPixel;
49 } X11DRV_PDEVICE;
52 typedef struct {
53 Pixmap pixmap;
54 } X11DRV_PHYSBITMAP;
56 /* GCs used for B&W and color bitmap operations */
57 extern GC BITMAP_monoGC, BITMAP_colorGC;
59 #define BITMAP_GC(bmp) \
60 (((bmp)->bitmap.bmBitsPixel == 1) ? BITMAP_monoGC : BITMAP_colorGC)
62 typedef INT32 (*DEVICEFONTENUMPROC)(LPENUMLOGFONT16,LPNEWTEXTMETRIC16,UINT16,LPARAM);
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 /* Xlib critical section */
155 extern CRITICAL_SECTION X11DRV_CritSection;
157 extern void _XInitImageFuncPtrs(XImage *);
159 #define XCREATEIMAGE(image,width,height,bpp) \
161 int width_bytes = X11DRV_DIB_GetXImageWidthBytes( (width), (bpp) ); \
162 (image) = TSXCreateImage(display, DefaultVisualOfScreen(screen), \
163 (bpp), ZPixmap, 0, xcalloc( (height)*width_bytes ),\
164 (width), (height), 32, width_bytes ); \
168 /* exported dib functions for now */
170 /* This structure holds the arguments for DIB_SetImageBits() */
171 typedef struct
173 struct tagDC *dc;
174 LPCVOID bits;
175 XImage *image;
176 int lines;
177 DWORD infoWidth;
178 WORD depth;
179 WORD infoBpp;
180 WORD compression;
181 int *colorMap;
182 int nColorMap;
183 Drawable drawable;
184 GC gc;
185 int xSrc;
186 int ySrc;
187 int xDest;
188 int yDest;
189 int width;
190 int height;
191 } DIB_SETIMAGEBITS_DESCR;
193 extern int X11DRV_DIB_GetImageBits( const DIB_SETIMAGEBITS_DESCR *descr );
194 extern int X11DRV_DIB_SetImageBits( const DIB_SETIMAGEBITS_DESCR *descr );
195 extern int *X11DRV_DIB_BuildColorMap( struct tagDC *dc, WORD coloruse,
196 WORD depth, const BITMAPINFO *info,
197 int *nColors );
200 #endif /* __WINE_X11DRV_H */