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