Fixed bug in WINSOCK_accept when no event is present.
[wine] / include / bitmap.h
1 /*
2  * GDI bitmap definitions
3  *
4  * Copyright 1993, 1994  Alexandre Julliard
5  */
6
7 #ifndef __WINE_BITMAP_H
8 #define __WINE_BITMAP_H
9
10 #include "gdi.h"
11
12 struct tagGDI_BITMAP_DRIVER;
13
14 /* Flags used for BitmapBits. We only use the first two at the moment */
15
16 #define DDB_SET                 1
17 #define DDB_GET                 2
18 #define DDB_COPY                4
19 #define DDB_SETWITHFILLER       8
20
21 typedef struct {
22     const struct tagDC_FUNCS *funcs; /* DC function table */
23     void         *physBitmap; /* ptr to device specific data */
24 } DDBITMAP;
25
26   /* GDI logical bitmap object */
27 typedef struct tagBITMAPOBJ
28 {
29     GDIOBJHDR   header;
30     BITMAP      bitmap;
31     SIZE        size;   /* For SetBitmapDimension() */
32
33     DDBITMAP   *DDBitmap;
34
35     /* For device-independent bitmaps: */
36     DIBSECTION *dib;
37 } BITMAPOBJ;
38
39 typedef struct tagBITMAP_DRIVER
40 {
41   INT  (*pSetDIBits)(struct tagBITMAPOBJ *,struct tagDC *,UINT,UINT,LPCVOID,const BITMAPINFO *,UINT,HBITMAP);
42   INT  (*pGetDIBits)(struct tagBITMAPOBJ *,struct tagDC *,UINT,UINT,LPVOID,BITMAPINFO *,UINT,HBITMAP);
43   VOID (*pDeleteDIBSection)(struct tagBITMAPOBJ *);
44 } BITMAP_DRIVER;
45
46 extern BITMAP_DRIVER *BITMAP_Driver;
47
48   /* objects/bitmap.c */
49 extern INT16   BITMAP_GetObject16( BITMAPOBJ * bmp, INT16 count, LPVOID buffer );
50 extern INT   BITMAP_GetObject( BITMAPOBJ * bmp, INT count, LPVOID buffer );
51 extern BOOL  BITMAP_DeleteObject( HBITMAP16 hbitmap, BITMAPOBJ * bitmap );
52 extern INT   BITMAP_GetWidthBytes( INT width, INT depth );
53 extern HBITMAP BITMAP_Load( HINSTANCE instance, LPCWSTR name, UINT loadflags );
54 extern HBITMAP BITMAP_CopyBitmap( HBITMAP hbitmap );
55
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 void DIB_UpdateDIBSection( DC *dc, BOOL toDIB );
63 extern void DIB_DeleteDIBSection( BITMAPOBJ *bmp );
64 extern void DIB_SelectDIBSection( DC *dc, BITMAPOBJ *bmp );
65 extern void DIB_FixColorsToLoadflags(BITMAPINFO * bmi, UINT loadflags, BYTE pix);
66 extern HGLOBAL DIB_CreateDIBFromBitmap(HDC hdc, HBITMAP hBmp);
67
68 #endif  /* __WINE_BITMAP_H */