2 * GDI bitmap definitions
4 * Copyright 1993, 1994 Alexandre Julliard
7 #ifndef __WINE_BITMAP_H
8 #define __WINE_BITMAP_H
12 struct tagGDI_BITMAP_DRIVER
;
14 /* Flags used for BitmapBits. We only use the first two at the moment */
19 #define DDB_SETWITHFILLER 8
21 /* GDI logical bitmap object */
22 typedef struct tagBITMAPOBJ
26 SIZE size
; /* For SetBitmapDimension() */
27 const struct tagDC_FUNCS
*funcs
; /* DC function table */
28 void *physBitmap
; /* ptr to device specific data */
29 /* For device-independent bitmaps: */
33 typedef struct tagBITMAP_DRIVER
35 INT (*pSetDIBits
)(struct tagBITMAPOBJ
*,struct tagDC
*,UINT
,UINT
,LPCVOID
,const BITMAPINFO
*,UINT
,HBITMAP
);
36 INT (*pGetDIBits
)(struct tagBITMAPOBJ
*,struct tagDC
*,UINT
,UINT
,LPVOID
,BITMAPINFO
*,UINT
,HBITMAP
);
37 VOID (*pDeleteDIBSection
)(struct tagBITMAPOBJ
*);
38 UINT (*pSetDIBColorTable
)(struct tagBITMAPOBJ
*,struct tagDC
*,UINT
,UINT
,const RGBQUAD
*);
39 UINT (*pGetDIBColorTable
)(struct tagBITMAPOBJ
*,struct tagDC
*,UINT
,UINT
,RGBQUAD
*);
42 extern BITMAP_DRIVER
*BITMAP_Driver
;
44 /* objects/bitmap.c */
45 extern INT16
BITMAP_GetObject16( BITMAPOBJ
* bmp
, INT16 count
, LPVOID buffer
);
46 extern INT
BITMAP_GetObject( BITMAPOBJ
* bmp
, INT count
, LPVOID buffer
);
47 extern BOOL
BITMAP_DeleteObject( HBITMAP16 hbitmap
, BITMAPOBJ
* bitmap
);
48 extern INT
BITMAP_GetWidthBytes( INT width
, INT depth
);
49 extern HBITMAP
BITMAP_CopyBitmap( HBITMAP hbitmap
);
52 extern int DIB_GetDIBWidthBytes( int width
, int depth
);
53 extern int DIB_GetDIBImageBytes( int width
, int height
, int depth
);
54 extern int DIB_BitmapInfoSize( const BITMAPINFO
* info
, WORD coloruse
);
55 extern int DIB_GetBitmapInfo( const BITMAPINFOHEADER
*header
, DWORD
*width
,
56 int *height
, WORD
*bpp
, WORD
*compr
);
57 extern HBITMAP
DIB_CreateDIBSection( HDC hdc
, BITMAPINFO
*bmi
, UINT usage
, LPVOID
*bits
,
58 HANDLE section
, DWORD offset
, DWORD ovr_pitch
);
59 extern void DIB_UpdateDIBSection( DC
*dc
, BOOL toDIB
);
60 extern void DIB_DeleteDIBSection( BITMAPOBJ
*bmp
);
61 extern void DIB_SelectDIBSection( DC
*dc
, BITMAPOBJ
*bmp
);
62 extern HGLOBAL
DIB_CreateDIBFromBitmap(HDC hdc
, HBITMAP hBmp
);
64 #endif /* __WINE_BITMAP_H */