]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/dib.h
Fix MinGW compilation.
[wxWidgets.git] / include / wx / msw / dib.h
CommitLineData
2bda0e17 1/////////////////////////////////////////////////////////////////////////////
6d167489 2// Name: wx/msw/dib.h
2bda0e17
KB
3// Purpose: Routines for loading and saving DIBs
4// Author: Various
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
bbcdf8bc 8// Copyright: (c) Julian Smart
6d167489 9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////////
11
8fb3a512
JS
12#ifndef _WX_DIB_H_
13#define _WX_DIB_H_
14
423a556f 15class WXDLLEXPORT wxBitmap;
6d167489
VZ
16class WXDLLEXPORT wxPalette;
17
6d56eb5c
VZ
18// WARNING: these functions are private to wxWindows and shouldn't be used
19// by the user code, they risk to disappear in the next versions!
20
6d167489
VZ
21// ----------------------------------------------------------------------------
22// Functions for working with DIBs
23// ----------------------------------------------------------------------------
24
25// VZ: we have 3 different sets of functions: from bitmap.cpp (wxCreateDIB and
26// wxFreeDIB), from dib.cpp and from dataobj.cpp - surely there is some
27// redundancy between them? (FIXME)
28
29// defined in bitmap.cpp
30extern bool wxCreateDIB(long xSize, long ySize, long bitsPerPixel,
31 HPALETTE hPal, LPBITMAPINFO* lpDIBHeader);
32extern void wxFreeDIB(LPBITMAPINFO lpDIBHeader);
33
34// defined in ole/dataobj.cpp
6d56eb5c
VZ
35extern WXDLLEXPORT size_t wxConvertBitmapToDIB(LPBITMAPINFO pbi, const wxBitmap& bitmap);
36extern WXDLLEXPORT wxBitmap wxConvertDIBToBitmap(const LPBITMAPINFO pbi);
6d167489
VZ
37
38// the rest is defined in dib.cpp
423a556f 39
2bda0e17 40// Save (device dependent) wxBitmap as a DIB
6d167489 41bool wxSaveBitmap(wxChar *filename, wxBitmap *bitmap, wxPalette *colourmap = NULL);
2bda0e17
KB
42
43// Load device independent bitmap into device dependent bitmap
6d56eb5c 44wxBitmap *wxLoadBitmap(wxChar *filename, wxPalette **colourmap = NULL);
2bda0e17
KB
45
46// Load into existing bitmap;
fef15b42 47bool wxLoadIntoBitmap(wxChar *filename, wxBitmap *bitmap, wxPalette **pal = NULL);
2bda0e17 48
a61ddc47
UJ
49HANDLE wxBitmapToDIB (HBITMAP hBitmap, HPALETTE hPal);
50BOOL wxReadDIB(LPTSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette);
51HANDLE wxReadDIB2(LPTSTR lpFileName);
52LPSTR wxFindDIBBits (LPSTR lpbi);
53HPALETTE wxMakeDIBPalette(LPBITMAPINFOHEADER lpInfo);
2bda0e17 54
6d167489 55#endif // _WX_DIB_H_
8fb3a512 56