Release 950302
[wine/multimedia.git] / include / bitmap.h
blobdda2d553a96fed0ee74ddb284da8e752faec150c
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 SIZE 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, malloc( (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 HICON OBM_LoadIcon( WORD id );
50 #endif /* __WINE_BITMAP_H */