Alexandre Julliard | 8d24ae6 | 1994-04-05 21:42:43 +0000 | [diff] [blame] | 1 | /* |
| 2 | * GDI bitmap definitions |
| 3 | * |
Alexandre Julliard | 3a5816f | 1994-12-27 14:11:53 +0000 | [diff] [blame] | 4 | * Copyright 1993, 1994 Alexandre Julliard |
Alexandre Julliard | 0799c1a | 2002-03-09 23:29:33 +0000 | [diff] [blame] | 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 |
Alexandre Julliard | 8d24ae6 | 1994-04-05 21:42:43 +0000 | [diff] [blame] | 19 | */ |
| 20 | |
Alexandre Julliard | 7cbe657 | 1995-01-09 18:21:16 +0000 | [diff] [blame] | 21 | #ifndef __WINE_BITMAP_H |
| 22 | #define __WINE_BITMAP_H |
Alexandre Julliard | 8d24ae6 | 1994-04-05 21:42:43 +0000 | [diff] [blame] | 23 | |
Alexandre Julliard | 7cbe657 | 1995-01-09 18:21:16 +0000 | [diff] [blame] | 24 | #include "gdi.h" |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 25 | |
Alexandre Julliard | 447ddfd | 2000-12-06 20:15:43 +0000 | [diff] [blame] | 26 | /* DIB Section sync state */ |
| 27 | enum { DIB_Status_None, DIB_Status_InSync, DIB_Status_GdiMod, DIB_Status_AppMod, DIB_Status_AuxMod }; |
| 28 | |
Alexandre Julliard | 7cbe657 | 1995-01-09 18:21:16 +0000 | [diff] [blame] | 29 | /* GDI logical bitmap object */ |
Huw D M Davies | 87f87bf | 1998-10-28 09:53:53 +0000 | [diff] [blame] | 30 | typedef struct tagBITMAPOBJ |
Alexandre Julliard | 7cbe657 | 1995-01-09 18:21:16 +0000 | [diff] [blame] | 31 | { |
| 32 | GDIOBJHDR header; |
Patrik Stridvall | b87fe2e | 1999-04-01 08:16:08 +0000 | [diff] [blame] | 33 | BITMAP bitmap; |
| 34 | SIZE size; /* For SetBitmapDimension() */ |
Alexandre Julliard | a08e2cf | 2000-03-28 13:37:50 +0000 | [diff] [blame] | 35 | const struct tagDC_FUNCS *funcs; /* DC function table */ |
| 36 | void *physBitmap; /* ptr to device specific data */ |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +0000 | [diff] [blame] | 37 | /* For device-independent bitmaps: */ |
Patrik Stridvall | b87fe2e | 1999-04-01 08:16:08 +0000 | [diff] [blame] | 38 | DIBSECTION *dib; |
Alexandre Julliard | 6bbc745 | 2001-07-22 23:13:08 +0000 | [diff] [blame] | 39 | SEGPTR segptr_bits; /* segptr to DIB bits */ |
Alexandre Julliard | 7cbe657 | 1995-01-09 18:21:16 +0000 | [diff] [blame] | 40 | } BITMAPOBJ; |
Alexandre Julliard | 3a5816f | 1994-12-27 14:11:53 +0000 | [diff] [blame] | 41 | |
Alexandre Julliard | 7cbe657 | 1995-01-09 18:21:16 +0000 | [diff] [blame] | 42 | /* objects/bitmap.c */ |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 43 | extern HBITMAP BITMAP_CopyBitmap( HBITMAP hbitmap ); |
Alexandre Julliard | d8a9244 | 2002-05-31 18:43:22 +0000 | [diff] [blame] | 44 | extern BOOL BITMAP_SetOwnerDC( HBITMAP hbitmap, DC *dc ); |
Alexandre Julliard | 7cbe657 | 1995-01-09 18:21:16 +0000 | [diff] [blame] | 45 | |
| 46 | /* objects/dib.c */ |
Alexandre Julliard | 7ff1c41 | 1997-05-25 13:58:18 +0000 | [diff] [blame] | 47 | extern int DIB_GetDIBWidthBytes( int width, int depth ); |
Huw D M Davies | 608629b | 1999-04-18 12:07:00 +0000 | [diff] [blame] | 48 | extern int DIB_GetDIBImageBytes( int width, int height, int depth ); |
Huw D M Davies | 56166a6 | 1999-04-19 16:45:24 +0000 | [diff] [blame] | 49 | extern int DIB_BitmapInfoSize( const BITMAPINFO * info, WORD coloruse ); |
Ove Kaaven | 8b9f338 | 2000-04-29 16:47:07 +0000 | [diff] [blame] | 50 | extern HBITMAP DIB_CreateDIBSection( HDC hdc, BITMAPINFO *bmi, UINT usage, LPVOID *bits, |
| 51 | HANDLE section, DWORD offset, DWORD ovr_pitch ); |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 52 | extern void DIB_UpdateDIBSection( DC *dc, BOOL toDIB ); |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 53 | extern void DIB_SelectDIBSection( DC *dc, BITMAPOBJ *bmp ); |
Noel Borthwick | d05b7be | 1999-09-20 15:42:47 +0000 | [diff] [blame] | 54 | extern HGLOBAL DIB_CreateDIBFromBitmap(HDC hdc, HBITMAP hBmp); |
Alexandre Julliard | 7cbe657 | 1995-01-09 18:21:16 +0000 | [diff] [blame] | 55 | |
| 56 | #endif /* __WINE_BITMAP_H */ |