Adapted to cursor/icon handling changes.
[wine/multimedia.git] / include / bitmap.h
blob35b58ea43eb25102f9a9d86f9c02f8238afa274e
1 /*
2 * GDI bitmap definitions
4 * Copyright 1993, 1994 Alexandre Julliard
5 */
7 #ifndef __WINE_BITMAP_H
8 #define __WINE_BITMAP_H
10 #include <X11/Xlib.h>
12 #include "gdi.h"
14 /* Additional info for DIB section objects */
15 typedef struct
17 /* Windows DIB section */
18 DIBSECTION dibSection;
20 /* Mapping status */
21 enum { DIB_NoHandler, DIB_InSync, DIB_AppMod, DIB_GdiMod } status;
23 /* Color map info */
24 int nColorMap;
25 int *colorMap;
27 /* Cached XImage */
28 XImage *image;
30 /* Selector for 16-bit access to bits */
31 WORD selector;
33 } DIBSECTIONOBJ;
35 /* Flags used for BitmapBits. We only use the first two at the moment */
37 #define DDB_SET 1
38 #define DDB_GET 2
39 #define DDB_COPY 4
40 #define DDB_SETWITHFILLER 8
42 typedef struct {
43 const struct tagDC_FUNCS *funcs; /* DC function table */
44 void *physBitmap; /* ptr to device specific data */
45 } DDBITMAP;
47 /* GDI logical bitmap object */
48 typedef struct tagBITMAPOBJ
50 GDIOBJHDR header;
51 BITMAP bitmap;
52 SIZE size; /* For SetBitmapDimension() */
54 DDBITMAP *DDBitmap;
56 /* For device-independent bitmaps: */
57 DIBSECTIONOBJ *dib;
59 } BITMAPOBJ;
61 /* objects/bitmap.c */
62 extern INT16 BITMAP_GetObject16( BITMAPOBJ * bmp, INT16 count, LPVOID buffer );
63 extern INT BITMAP_GetObject( BITMAPOBJ * bmp, INT count, LPVOID buffer );
64 extern BOOL BITMAP_DeleteObject( HBITMAP16 hbitmap, BITMAPOBJ * bitmap );
65 extern INT BITMAP_GetPadding( INT width, INT depth );
66 extern INT BITMAP_GetWidthBytes( INT width, INT depth );
67 extern HBITMAP BITMAP_LoadBitmapW(HINSTANCE instance,LPCWSTR name,
68 UINT loadflags);
69 extern HBITMAP BITMAP_CopyBitmap( HBITMAP hbitmap );
71 /* objects/dib.c */
72 extern int DIB_GetDIBWidthBytes( int width, int depth );
73 extern int DIB_BitmapInfoSize( BITMAPINFO * info, WORD coloruse );
74 extern int DIB_GetBitmapInfo( const BITMAPINFOHEADER *header, DWORD *width,
75 int *height, WORD *bpp, WORD *compr );
76 extern void DIB_UpdateDIBSection( DC *dc, BOOL toDIB );
77 extern void DIB_DeleteDIBSection( BITMAPOBJ *bmp );
78 extern void DIB_SelectDIBSection( DC *dc, BITMAPOBJ *bmp );
79 extern void DIB_FixColorsToLoadflags(BITMAPINFO * bmi, UINT loadflags,
80 BYTE pix);
82 #endif /* __WINE_BITMAP_H */