Don't define MZ_SUPPORTED on non-i386 platforms.
[wine] / include / bitmap.h
1 /*
2  * GDI bitmap definitions
3  *
4  * Copyright 1993, 1994  Alexandre Julliard
5  */
6
7 #ifndef __WINE_BITMAP_H
8 #define __WINE_BITMAP_H
9
10 #include "gdi.h"
11 #include "ts_xlib.h"
12 #include "ts_xutil.h"
13
14   /* Additional info for DIB section objects */
15 typedef struct
16 {
17     /* Windows DIB section */
18     DIBSECTION  dibSection;
19
20     /* Mapping status */
21     enum { DIB_NoHandler, DIB_InSync, DIB_AppMod, DIB_GdiMod } status;
22
23     /* Color map info */
24     int         nColorMap;
25     int        *colorMap;
26
27     /* Cached XImage */
28     XImage     *image;
29
30 } DIBSECTIONOBJ;
31
32 /* Flags used for BitmapBits. We only use the first two at the moment */
33
34 #define DDB_SET                 1
35 #define DDB_GET                 2
36 #define DDB_COPY                4
37 #define DDB_SETWITHFILLER       8
38
39 typedef struct {
40     const struct tagDC_FUNCS *funcs; /* DC function table */
41     void         *physBitmap; /* ptr to device specific data */
42 } DDBITMAP;
43
44   /* GDI logical bitmap object */
45 typedef struct tagBITMAPOBJ
46 {
47     GDIOBJHDR   header;
48     BITMAP32    bitmap;
49     SIZE32      size;   /* For SetBitmapDimension() */
50
51     DDBITMAP    *DDBitmap;
52
53     /* For device-independent bitmaps: */
54     DIBSECTIONOBJ *dib;
55
56 } BITMAPOBJ;
57
58   /* objects/bitmap.c */
59 extern INT16   BITMAP_GetObject16( BITMAPOBJ * bmp, INT16 count, LPVOID buffer );
60 extern INT32   BITMAP_GetObject32( BITMAPOBJ * bmp, INT32 count, LPVOID buffer );
61 extern BOOL32  BITMAP_DeleteObject( HBITMAP16 hbitmap, BITMAPOBJ * bitmap );
62 extern INT32   BITMAP_GetPadding( INT32 width, INT32 depth );
63 extern INT32   BITMAP_GetWidthBytes( INT32 width, INT32 depth );
64 extern HBITMAP32 BITMAP_LoadBitmap32W(HINSTANCE32 instance,LPCWSTR name,
65   UINT32 loadflags);
66 extern HBITMAP32 BITMAP_CopyBitmap( HBITMAP32 hbitmap );
67
68   /* objects/dib.c */
69 extern int DIB_GetDIBWidthBytes( int width, int depth );
70 extern int DIB_BitmapInfoSize( BITMAPINFO * info, WORD coloruse );
71 extern int DIB_GetBitmapInfo( const BITMAPINFOHEADER *header, DWORD *width,
72                               int *height, WORD *bpp, WORD *compr );
73 extern void DIB_UpdateDIBSection( DC *dc, BOOL32 toDIB );
74 extern void DIB_DeleteDIBSection( BITMAPOBJ *bmp );
75 extern void DIB_SelectDIBSection( DC *dc, BITMAPOBJ *bmp );
76 extern void DIB_FixColorsToLoadflags(BITMAPINFO * bmi, UINT32 loadflags,
77   BYTE pix);
78
79 #endif  /* __WINE_BITMAP_H */