bitmap.h 2.13 KB
Newer Older
Alexandre Julliard's avatar
Alexandre Julliard committed
1 2 3
/*
 * GDI bitmap definitions
 *
Alexandre Julliard's avatar
Alexandre Julliard committed
4
 * Copyright 1993, 1994  Alexandre Julliard
5 6 7 8 9 10 11 12 13 14 15 16 17 18
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
Alexandre Julliard's avatar
Alexandre Julliard committed
19 20
 */

Alexandre Julliard's avatar
Alexandre Julliard committed
21 22
#ifndef __WINE_BITMAP_H
#define __WINE_BITMAP_H
Alexandre Julliard's avatar
Alexandre Julliard committed
23

Alexandre Julliard's avatar
Alexandre Julliard committed
24
#include "gdi.h"
Alexandre Julliard's avatar
Alexandre Julliard committed
25

26 27 28
/* DIB Section sync state */
enum { DIB_Status_None, DIB_Status_InSync, DIB_Status_GdiMod, DIB_Status_AppMod, DIB_Status_AuxMod };

Alexandre Julliard's avatar
Alexandre Julliard committed
29
  /* GDI logical bitmap object */
30
typedef struct tagBITMAPOBJ
Alexandre Julliard's avatar
Alexandre Julliard committed
31 32
{
    GDIOBJHDR   header;
33 34
    BITMAP      bitmap;
    SIZE        size;   /* For SetBitmapDimension() */
35 36
    const struct tagDC_FUNCS *funcs; /* DC function table */
    void	*physBitmap; /* ptr to device specific data */
Alexandre Julliard's avatar
Alexandre Julliard committed
37
    /* For device-independent bitmaps: */
38
    DIBSECTION *dib;
39
    SEGPTR      segptr_bits;  /* segptr to DIB bits */
Alexandre Julliard's avatar
Alexandre Julliard committed
40
} BITMAPOBJ;
Alexandre Julliard's avatar
Alexandre Julliard committed
41

Alexandre Julliard's avatar
Alexandre Julliard committed
42
  /* objects/bitmap.c */
43
extern HBITMAP BITMAP_CopyBitmap( HBITMAP hbitmap );
44
extern BOOL BITMAP_SetOwnerDC( HBITMAP hbitmap, DC *dc );
Alexandre Julliard's avatar
Alexandre Julliard committed
45 46

  /* objects/dib.c */
Alexandre Julliard's avatar
Alexandre Julliard committed
47
extern int DIB_GetDIBWidthBytes( int width, int depth );
48
extern int DIB_GetDIBImageBytes( int width, int height, int depth );
49
extern int DIB_BitmapInfoSize( const BITMAPINFO * info, WORD coloruse );
50 51
extern HBITMAP DIB_CreateDIBSection( HDC hdc, BITMAPINFO *bmi, UINT usage, LPVOID *bits,
                                     HANDLE section, DWORD offset, DWORD ovr_pitch );
52
extern void DIB_UpdateDIBSection( DC *dc, BOOL toDIB );
Alexandre Julliard's avatar
Alexandre Julliard committed
53
extern void DIB_SelectDIBSection( DC *dc, BITMAPOBJ *bmp );
54
extern HGLOBAL DIB_CreateDIBFromBitmap(HDC hdc, HBITMAP hBmp);
Alexandre Julliard's avatar
Alexandre Julliard committed
55 56

#endif  /* __WINE_BITMAP_H */