2 * GDI bitmap definitions
4 * Copyright 1993, 1994 Alexandre Julliard
7 #ifndef __WINE_BITMAP_H
8 #define __WINE_BITMAP_H
13 #ifdef PRELIMINARY_WING16_SUPPORT
14 /* FIXME: this doesn't belong here */
15 #include <X11/extensions/XShm.h>
25 /* GDI logical bitmap object */
31 SIZE16 size
; /* For SetBitmapDimension() */
34 /* GCs used for B&W and color bitmap operations */
35 extern GC BITMAP_monoGC
, BITMAP_colorGC
;
37 #define BITMAP_GC(bmp) \
38 (((bmp)->bitmap.bmBitsPixel == 1) ? BITMAP_monoGC : BITMAP_colorGC)
40 #define BITMAP_WIDTH_BYTES(width,bpp) \
41 (((bpp) == 24) ? (width) * 4 : ((width) * (bpp) + 15) / 16 * 2)
43 #define XCREATEIMAGE(image,width,height,bpp) \
45 int width_bytes = DIB_GetXImageWidthBytes( (width), (bpp) ); \
46 (image) = XCreateImage(display, DefaultVisualOfScreen(screen), \
47 (bpp), ZPixmap, 0, xmalloc( (height)*width_bytes ),\
48 (width), (height), 32, width_bytes ); \
51 /* objects/bitmap.c */
52 extern BOOL32
BITMAP_Init(void);
53 extern INT16
BITMAP_GetObject16( BITMAPOBJ
* bmp
, INT16 count
, LPVOID buffer
);
54 extern INT32
BITMAP_GetObject32( BITMAPOBJ
* bmp
, INT32 count
, LPVOID buffer
);
55 extern BOOL32
BITMAP_DeleteObject( HBITMAP16 hbitmap
, BITMAPOBJ
* bitmap
);
56 extern XImage
*BITMAP_GetXImage( const BITMAPOBJ
*bmp
);
59 extern int DIB_GetDIBWidthBytes( int width
, int depth
);
60 extern int DIB_GetXImageWidthBytes( int width
, int depth
);
61 extern int DIB_BitmapInfoSize( BITMAPINFO
* info
, WORD coloruse
);
63 /* objects/oembitmap.c */
64 extern BOOL32
OBM_Init(void);
65 extern HBITMAP16
OBM_LoadBitmap( WORD id
);
66 extern HGLOBAL16
OBM_LoadCursorIcon( WORD id
, BOOL32 fCursor
);
68 #endif /* __WINE_BITMAP_H */