DIB Engine: Fork DDB-DIB behaviour
[wine/hacks.git] / dlls / winedib.drv / dibdrv.h
blob8a2e139856a15881009e8047b400d87d32f35b41
1 /*
2 * DIB driver private definitions
4 * Copyright 2009 Massimo Del Fedele
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #ifndef __WINE_DIBDRV_H
21 #define __WINE_DIBDRV_H
23 #include <stdarg.h>
24 #include <stdlib.h>
25 #include <X11/Xlib.h>
27 #include "windef.h"
28 #include "winbase.h"
29 #include "winerror.h"
30 #include "wingdi.h"
31 #include "wine/list.h"
32 #include "wine/library.h"
33 #include "wine/debug.h"
34 #include "wingdi.h"
35 #include "winreg.h"
36 #include "wine/winbase16.h" /* GlobalLock16 */
38 /* data structures needed to access opaque pointers
39 * defined in gdi32.h */
40 #include "dibdrv_gdi32.h"
42 /* provide a way to make debugging output appear
43 only once. Usage example:
44 ONCE(FIXME("Some message\n")); */
45 #define ONCE(x) \
46 { \
47 static BOOL done = FALSE; \
48 if(!done) \
49 { \
50 done = TRUE; \
51 x; \
52 } \
55 /* extra stock object: default 1x1 bitmap for memory DCs
56 grabbed from gdi_private.h */
57 #define DEFAULT_BITMAP (STOCK_LAST+1)
59 /* DIB driver physical device */
60 typedef struct _DIBDRVPHYSDEV
62 /* X11 driver physical device */
63 PHYSDEV X11PhysDev;
65 /* is a DIB selected into DC ? */
66 BOOL hasDIB;
68 /* currently selected HBITMAP */
69 HBITMAP hbitmap;
71 /* active ROP2 */
72 INT rop2;
74 } DIBDRVPHYSDEV;
77 /* *********************************************************************
78 * DISPLAY DRIVER ACCESS FUNCTIONS
79 * ********************************************************************/
81 /* LoadDisplayDriver
82 * Loads display driver - partially grabbed from gdi32 */
83 DC_FUNCTIONS *_DIBDRV_LoadDisplayDriver(void);
85 /* FreeDisplayDriver
86 Frees resources allocated by Display driver */
87 void _DIBDRV_FreeDisplayDriver(void);
89 /* GetDisplayDriver
90 Gets a pointer to display drives'function table */
91 inline DC_FUNCTIONS *_DIBDRV_GetDisplayDriver(void);
93 #endif /* __WINE_DIBDRV_H */