Release 941227
[wine/multimedia.git] / include / bitmap.h
blob7d730b7a86c9e9f7dd3be9641d9b65f2ecb0a521
1 /*
2 * GDI bitmap definitions
4 * Copyright 1993, 1994 Alexandre Julliard
5 */
7 #ifndef BITMAP_H
8 #define BITMAP_H
10 #include <stdlib.h>
11 #include <X11/Xlib.h>
12 #include "windows.h"
14 /* objects/bitmap.c */
15 extern BOOL BITMAP_Init(void);
17 /* objects/dib.c */
18 extern int DIB_GetImageWidthBytes( int width, int depth );
19 extern int DIB_BitmapInfoSize( BITMAPINFO * info, WORD coloruse );
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 #endif /* BITMAP_H */