1 | /* $Id: bitmap.h,v 1.1 1999-05-24 20:19:08 ktk Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * GDI bitmap definitions
|
---|
5 | *
|
---|
6 | * Copyright 1993, 1994 Alexandre Julliard
|
---|
7 | */
|
---|
8 |
|
---|
9 | #ifndef __WINE_BITMAP_H
|
---|
10 | #define __WINE_BITMAP_H
|
---|
11 |
|
---|
12 | #include "gdi.h"
|
---|
13 |
|
---|
14 | struct tagGDI_BITMAP_DRIVER;
|
---|
15 |
|
---|
16 | /* Flags used for BitmapBits. We only use the first two at the moment */
|
---|
17 |
|
---|
18 | #define DDB_SET 1
|
---|
19 | #define DDB_GET 2
|
---|
20 | #define DDB_COPY 4
|
---|
21 | #define DDB_SETWITHFILLER 8
|
---|
22 |
|
---|
23 | typedef struct {
|
---|
24 | const struct tagDC_FUNCS *funcs; /* DC function table */
|
---|
25 | void *physBitmap; /* ptr to device specific data */
|
---|
26 | } DDBITMAP;
|
---|
27 |
|
---|
28 | /* GDI logical bitmap object */
|
---|
29 | typedef struct tagBITMAPOBJ
|
---|
30 | {
|
---|
31 | GDIOBJHDR header;
|
---|
32 | BITMAP bitmap;
|
---|
33 | SIZE size; /* For SetBitmapDimension() */
|
---|
34 |
|
---|
35 | DDBITMAP *DDBitmap;
|
---|
36 |
|
---|
37 | /* For device-independent bitmaps: */
|
---|
38 | DIBSECTION *dib;
|
---|
39 | } BITMAPOBJ;
|
---|
40 |
|
---|
41 | typedef struct tagBITMAP_DRIVER
|
---|
42 | {
|
---|
43 | INT (*pSetDIBits)(struct tagBITMAPOBJ *,struct tagDC *,UINT,UINT,LPCVOID,const BITMAPINFO *,UINT,HBITMAP);
|
---|
44 | INT (*pGetDIBits)(struct tagBITMAPOBJ *,struct tagDC *,UINT,UINT,LPVOID,BITMAPINFO *,UINT,HBITMAP);
|
---|
45 | VOID (*pDeleteDIBSection)(struct tagBITMAPOBJ *);
|
---|
46 | } BITMAP_DRIVER;
|
---|
47 |
|
---|
48 | extern BITMAP_DRIVER *BITMAP_Driver;
|
---|
49 |
|
---|
50 | /* objects/bitmap.c */
|
---|
51 | extern INT16 BITMAP_GetObject16( BITMAPOBJ * bmp, INT16 count, LPVOID buffer );
|
---|
52 | extern INT BITMAP_GetObject( BITMAPOBJ * bmp, INT count, LPVOID buffer );
|
---|
53 | extern BOOL BITMAP_DeleteObject( HBITMAP16 hbitmap, BITMAPOBJ * bitmap );
|
---|
54 | extern INT BITMAP_GetWidthBytes( INT width, INT depth );
|
---|
55 | extern HBITMAP BITMAP_Load( HINSTANCE instance, LPCWSTR name, UINT loadflags );
|
---|
56 | extern HBITMAP BITMAP_CopyBitmap( HBITMAP hbitmap );
|
---|
57 |
|
---|
58 | /* objects/dib.c */
|
---|
59 | extern int DIB_GetDIBWidthBytes( int width, int depth );
|
---|
60 | extern int DIB_GetDIBImageBytes( int width, int height, int depth );
|
---|
61 | extern int DIB_BitmapInfoSize( const BITMAPINFO * info, WORD coloruse );
|
---|
62 | extern int DIB_GetBitmapInfo( const BITMAPINFOHEADER *header, DWORD *width,
|
---|
63 | int *height, WORD *bpp, WORD *compr );
|
---|
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 void DIB_FixColorsToLoadflags(BITMAPINFO * bmi, UINT loadflags,
|
---|
68 | BYTE pix);
|
---|
69 |
|
---|
70 | #endif /* __WINE_BITMAP_H */
|
---|