Added version16.rc in RC_SRCS list.
[wine/multimedia.git] / include / bitmap.h
blob6aa311bfff16771ea214cd61fa2f570910779064
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 struct tagGDI_BITMAP_DRIVER;
14 /* Flags used for BitmapBits. We only use the first two at the moment */
16 #define DDB_SET 1
17 #define DDB_GET 2
18 #define DDB_COPY 4
19 #define DDB_SETWITHFILLER 8
21 /* DIB Section sync state */
22 enum { DIB_Status_None, DIB_Status_InSync, DIB_Status_GdiMod, DIB_Status_AppMod, DIB_Status_AuxMod };
24 /* GDI logical bitmap object */
25 typedef struct tagBITMAPOBJ
27 GDIOBJHDR header;
28 BITMAP bitmap;
29 SIZE size; /* For SetBitmapDimension() */
30 const struct tagDC_FUNCS *funcs; /* DC function table */
31 void *physBitmap; /* ptr to device specific data */
32 /* For device-independent bitmaps: */
33 DIBSECTION *dib;
34 } BITMAPOBJ;
36 typedef struct tagBITMAP_DRIVER
38 INT (*pSetDIBits)(struct tagBITMAPOBJ *,struct tagDC *,UINT,UINT,LPCVOID,const BITMAPINFO *,UINT,HBITMAP);
39 INT (*pGetDIBits)(struct tagBITMAPOBJ *,struct tagDC *,UINT,UINT,LPVOID,BITMAPINFO *,UINT,HBITMAP);
40 VOID (*pDeleteDIBSection)(struct tagBITMAPOBJ *);
41 UINT (*pSetDIBColorTable)(struct tagBITMAPOBJ *,struct tagDC *,UINT,UINT,const RGBQUAD *);
42 UINT (*pGetDIBColorTable)(struct tagBITMAPOBJ *,struct tagDC *,UINT,UINT,RGBQUAD *);
43 INT (*pLockDIB)(struct tagBITMAPOBJ *,INT,BOOL);
44 VOID (*pUnlockDIB)(struct tagBITMAPOBJ *,BOOL);
45 } BITMAP_DRIVER;
47 extern BITMAP_DRIVER *BITMAP_Driver;
49 /* objects/bitmap.c */
50 extern INT16 BITMAP_GetObject16( BITMAPOBJ * bmp, INT16 count, LPVOID buffer );
51 extern INT BITMAP_GetObject( BITMAPOBJ * bmp, INT count, LPVOID buffer );
52 extern BOOL BITMAP_DeleteObject( HBITMAP16 hbitmap, BITMAPOBJ * bitmap );
53 extern INT BITMAP_GetWidthBytes( INT width, INT depth );
54 extern HBITMAP BITMAP_CopyBitmap( HBITMAP hbitmap );
56 /* objects/dib.c */
57 extern int DIB_GetDIBWidthBytes( int width, int depth );
58 extern int DIB_GetDIBImageBytes( int width, int height, int depth );
59 extern int DIB_BitmapInfoSize( const BITMAPINFO * info, WORD coloruse );
60 extern int DIB_GetBitmapInfo( const BITMAPINFOHEADER *header, DWORD *width,
61 int *height, WORD *bpp, WORD *compr );
62 extern HBITMAP DIB_CreateDIBSection( HDC hdc, BITMAPINFO *bmi, UINT usage, LPVOID *bits,
63 HANDLE section, DWORD offset, DWORD ovr_pitch );
64 extern void DIB_UpdateDIBSection( DC *dc, BOOL toDIB );
65 extern void DIB_DeleteDIBSection( BITMAPOBJ *bmp );
66 extern void DIB_SelectDIBSection( DC *dc, BITMAPOBJ *bmp );
67 extern HGLOBAL DIB_CreateDIBFromBitmap(HDC hdc, HBITMAP hBmp);
69 #endif /* __WINE_BITMAP_H */