Don't issue error message if message number in application range.
[wine] / include / bitmap.h
1 /*
2  * GDI bitmap definitions
3  *
4  * Copyright 1993, 1994  Alexandre Julliard
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #ifndef __WINE_BITMAP_H
22 #define __WINE_BITMAP_H
23
24 #include "gdi.h"
25
26 /* DIB Section sync state */
27 enum { DIB_Status_None, DIB_Status_InSync, DIB_Status_GdiMod, DIB_Status_AppMod, DIB_Status_AuxMod };
28
29   /* GDI logical bitmap object */
30 typedef struct tagBITMAPOBJ
31 {
32     GDIOBJHDR   header;
33     BITMAP      bitmap;
34     SIZE        size;   /* For SetBitmapDimension() */
35     const struct tagDC_FUNCS *funcs; /* DC function table */
36     void        *physBitmap; /* ptr to device specific data */
37     /* For device-independent bitmaps: */
38     DIBSECTION *dib;
39     SEGPTR      segptr_bits;  /* segptr to DIB bits */
40 } BITMAPOBJ;
41
42   /* objects/bitmap.c */
43 extern INT   BITMAP_GetWidthBytes( INT width, INT depth );
44 extern HBITMAP BITMAP_CopyBitmap( HBITMAP hbitmap );
45 extern BOOL BITMAP_SetOwnerDC( HBITMAP hbitmap, DC *dc );
46
47   /* objects/dib.c */
48 extern int DIB_GetDIBWidthBytes( int width, int depth );
49 extern int DIB_GetDIBImageBytes( int width, int height, int depth );
50 extern int DIB_BitmapInfoSize( const BITMAPINFO * info, WORD coloruse );
51 extern int DIB_GetBitmapInfo( const BITMAPINFOHEADER *header, DWORD *width,
52                               int *height, WORD *bpp, WORD *compr );
53 extern HBITMAP DIB_CreateDIBSection( HDC hdc, BITMAPINFO *bmi, UINT usage, LPVOID *bits,
54                                      HANDLE section, DWORD offset, DWORD ovr_pitch );
55 extern void DIB_UpdateDIBSection( DC *dc, BOOL toDIB );
56 extern void DIB_SelectDIBSection( DC *dc, BITMAPOBJ *bmp );
57 extern HGLOBAL DIB_CreateDIBFromBitmap(HDC hdc, HBITMAP hBmp);
58
59 #endif  /* __WINE_BITMAP_H */