Release 960516
[wine.git] / include / bitmap.h
blob5c3b763b530aff0746c441b1400c010f258878bb
1 /*
2 * GDI bitmap definitions
4 * Copyright 1993, 1994 Alexandre Julliard
5 */
7 #ifndef __WINE_BITMAP_H
8 #define __WINE_BITMAP_H
10 #include "gdi.h"
12 /* GDI logical bitmap object */
13 typedef struct
15 GDIOBJHDR header;
16 BITMAP bitmap;
17 Pixmap pixmap;
18 SIZE16 size; /* For SetBitmapDimension() */
19 } BITMAPOBJ;
21 /* GCs used for B&W and color bitmap operations */
22 extern GC BITMAP_monoGC, BITMAP_colorGC;
24 #define BITMAP_GC(bmp) \
25 (((bmp)->bitmap.bmBitsPixel == 1) ? BITMAP_monoGC : BITMAP_colorGC)
27 #define XCREATEIMAGE(image,width,height,bpp) \
28 { \
29 int width_bytes = DIB_GetImageWidthBytes( (width), (bpp) ); \
30 (image) = XCreateImage(display, DefaultVisualOfScreen(screen), \
31 (bpp), ZPixmap, 0, xmalloc( (height)*width_bytes ),\
32 (width), (height), 32, width_bytes ); \
35 /* objects/bitmap.c */
36 extern BOOL BITMAP_Init(void);
37 extern int BITMAP_GetObject( BITMAPOBJ * bmp, int count, LPSTR buffer );
38 extern BOOL BITMAP_DeleteObject( HBITMAP hbitmap, BITMAPOBJ * bitmap );
39 extern HBITMAP BITMAP_SelectObject( HDC hdc, DC * dc, HBITMAP hbitmap,
40 BITMAPOBJ * bmp );
42 /* objects/dib.c */
43 extern int DIB_GetImageWidthBytes( int width, int depth );
44 extern int DIB_BitmapInfoSize( BITMAPINFO * info, WORD coloruse );
46 /* objects/oembitmap.c */
47 extern HBITMAP OBM_LoadBitmap( WORD id );
48 extern HANDLE OBM_LoadCursorIcon( WORD id, BOOL fCursor );
50 #endif /* __WINE_BITMAP_H */