2 * GDI bitmap definitions
4 * Copyright 1993, 1994 Alexandre Julliard
7 #ifndef __WINE_BITMAP_H
8 #define __WINE_BITMAP_H
10 #include <X11/extensions/XShm.h>
13 #ifdef PRELIMINARY_WING16_SUPPORT
23 /* GDI logical bitmap object */
29 SIZE16 size
; /* For SetBitmapDimension() */
32 /* GCs used for B&W and color bitmap operations */
33 extern GC BITMAP_monoGC
, BITMAP_colorGC
;
35 #define BITMAP_GC(bmp) \
36 (((bmp)->bitmap.bmBitsPixel == 1) ? BITMAP_monoGC : BITMAP_colorGC)
38 #define BITMAP_WIDTH_BYTES(width,bpp) \
39 (((bpp) == 24) ? (width) * 4 : ((width) * (bpp) + 15) / 16 * 2)
41 #define XCREATEIMAGE(image,width,height,bpp) \
43 int width_bytes = DIB_GetImageWidthBytes( (width), (bpp) ); \
44 (image) = XCreateImage(display, DefaultVisualOfScreen(screen), \
45 (bpp), ZPixmap, 0, xmalloc( (height)*width_bytes ),\
46 (width), (height), 32, width_bytes ); \
49 /* objects/bitmap.c */
50 extern BOOL32
BITMAP_Init(void);
51 extern INT16
BITMAP_GetObject16( BITMAPOBJ
* bmp
, INT16 count
, LPVOID buffer
);
52 extern INT32
BITMAP_GetObject32( BITMAPOBJ
* bmp
, INT32 count
, LPVOID buffer
);
53 extern BOOL32
BITMAP_DeleteObject( HBITMAP16 hbitmap
, BITMAPOBJ
* bitmap
);
54 extern HBITMAP16
BITMAP_SelectObject( DC
* dc
, HBITMAP16 hbitmap
,
58 extern int DIB_GetImageWidthBytes( int width
, int depth
);
59 extern int DIB_BitmapInfoSize( BITMAPINFO
* info
, WORD coloruse
);
61 /* objects/oembitmap.c */
62 extern HBITMAP16
OBM_LoadBitmap( WORD id
);
63 extern HGLOBAL16
OBM_LoadCursorIcon( WORD id
, BOOL32 fCursor
);
65 #endif /* __WINE_BITMAP_H */