Renameing funktions to prevent name clashes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -18,9 +18,9 @@ wxBitmap *wxLoadBitmap(wxChar *filename, wxColourMap **colourmap = NULL)
|
|||||||
// Load into existing bitmap;
|
// Load into existing bitmap;
|
||||||
bool wxLoadIntoBitmap(wxChar *filename, wxBitmap *bitmap, wxColourMap **pal = NULL);
|
bool wxLoadIntoBitmap(wxChar *filename, wxBitmap *bitmap, wxColourMap **pal = NULL);
|
||||||
|
|
||||||
HANDLE BitmapToDIB (HBITMAP hBitmap, HPALETTE hPal);
|
HANDLE wxBitmapToDIB (HBITMAP hBitmap, HPALETTE hPal);
|
||||||
BOOL ReadDIB(LPTSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette);
|
BOOL wxReadDIB(LPTSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette);
|
||||||
HANDLE ReadDIB2(LPTSTR lpFileName);
|
HANDLE wxReadDIB2(LPTSTR lpFileName);
|
||||||
LPSTR FindDIBBits (LPSTR lpbi);
|
LPSTR wxFindDIBBits (LPSTR lpbi);
|
||||||
HPALETTE MakeDIBPalette(LPBITMAPINFOHEADER lpInfo);
|
HPALETTE wxMakeDIBPalette(LPBITMAPINFOHEADER lpInfo);
|
||||||
|
|
||||||
|
@@ -40,84 +40,84 @@ typedef HANDLE HDIB;
|
|||||||
External function declarations
|
External function declarations
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
void ClearSystemPalette(void);
|
void wxClearSystemPalette(void);
|
||||||
PDIB DibOpenFile(LPTSTR szFile);
|
PDIB wxDibOpenFile(LPTSTR szFile);
|
||||||
int DibWriteFile(LPTSTR szFile, LPBITMAPINFOHEADER lpbi);
|
int wxDibWriteFile(LPTSTR szFile, LPBITMAPINFOHEADER lpbi);
|
||||||
BOOL DibSetUsage(PDIB pdib, HPALETTE hpal,UINT wUsage);
|
BOOL wxDibSetUsage(PDIB pdib, HPALETTE hpal,UINT wUsage);
|
||||||
PDIB DibCreate(int bits, int dx, int dy);
|
PDIB wxDibCreate(int bits, int dx, int dy);
|
||||||
BOOL DibMapToPalette(PDIB pdib, HPALETTE hpal);
|
BOOL wxDibMapToPalette(PDIB pdib, HPALETTE hpal);
|
||||||
HPALETTE MakePalette(const BITMAPINFO FAR* Info, UINT flags);
|
HPALETTE wxMakePalette(const BITMAPINFO FAR* Info, UINT flags);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Internal function declarations
|
Internal function declarations
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
PDIB DibReadBitmapInfo(HFILE fh);
|
PDIB wxDibReadBitmapInfo(HFILE fh);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
DIB macros.
|
DIB macros.
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#define HandleFromDib(lpbi) GlobalHandle(lpbi)
|
#define wxHandleFromDib(lpbi) GlobalHandle(lpbi)
|
||||||
#else
|
#else
|
||||||
#define HandleFromDib(lpbi) (HANDLE)GlobalHandle(SELECTOROF(lpbi))
|
#define wxHandleFromDib(lpbi) (HANDLE)GlobalHandle(SELECTOROF(lpbi))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DibFromHandle(h) (PDIB)GlobalLock(h)
|
#define wxDibFromHandle(h) (PDIB)GlobalLock(h)
|
||||||
|
|
||||||
#define DibFree(pdib) GlobalFreePtr(pdib)
|
#define wxDibFree(pdib) GlobalFreePtr(pdib)
|
||||||
|
|
||||||
#define WIDTHBYTES(i) ((unsigned)((i+31)&(~31))/8) /* ULONG aligned ! */
|
#define wxWIDTHBYTES(i) ((unsigned)((i+31)&(~31))/8) /* ULONG aligned ! */
|
||||||
|
|
||||||
#define DibWidth(lpbi) (UINT)(((LPBITMAPINFOHEADER)(lpbi))->biWidth)
|
#define wxDibWidth(lpbi) (UINT)(((LPBITMAPINFOHEADER)(lpbi))->biWidth)
|
||||||
#define DibHeight(lpbi) (UINT)(((LPBITMAPINFOHEADER)(lpbi))->biHeight)
|
#define wxDibHeight(lpbi) (UINT)(((LPBITMAPINFOHEADER)(lpbi))->biHeight)
|
||||||
#define DibBitCount(lpbi) (UINT)(((LPBITMAPINFOHEADER)(lpbi))->biBitCount)
|
#define wxDibBitCount(lpbi) (UINT)(((LPBITMAPINFOHEADER)(lpbi))->biBitCount)
|
||||||
#define DibCompression(lpbi) (DWORD)(((LPBITMAPINFOHEADER)(lpbi))->biCompression)
|
#define wxDibCompression(lpbi) (DWORD)(((LPBITMAPINFOHEADER)(lpbi))->biCompression)
|
||||||
|
|
||||||
#define DibWidthBytesN(lpbi, n) (UINT)WIDTHBYTES((UINT)(lpbi)->biWidth * (UINT)(n))
|
#define wxDibWidthBytesN(lpbi, n) (UINT)wxWIDTHBYTES((UINT)(lpbi)->biWidth * (UINT)(n))
|
||||||
#define DibWidthBytes(lpbi) DibWidthBytesN(lpbi, (lpbi)->biBitCount)
|
#define wxDibWidthBytes(lpbi) wxDibWidthBytesN(lpbi, (lpbi)->biBitCount)
|
||||||
|
|
||||||
#define DibSizeImage(lpbi) ((lpbi)->biSizeImage == 0 \
|
#define wxDibSizeImage(lpbi) ((lpbi)->biSizeImage == 0 \
|
||||||
? ((DWORD)(UINT)DibWidthBytes(lpbi) * (DWORD)(UINT)(lpbi)->biHeight) \
|
? ((DWORD)(UINT)wxDibWidthBytes(lpbi) * (DWORD)(UINT)(lpbi)->biHeight) \
|
||||||
: (lpbi)->biSizeImage)
|
: (lpbi)->biSizeImage)
|
||||||
|
|
||||||
#define DibSize(lpbi) ((lpbi)->biSize + (lpbi)->biSizeImage + (int)(lpbi)->biClrUsed * sizeof(RGBQUAD))
|
#define wxDibSize(lpbi) ((lpbi)->biSize + (lpbi)->biSizeImage + (int)(lpbi)->biClrUsed * sizeof(RGBQUAD))
|
||||||
#define DibPaletteSize(lpbi) (DibNumColors(lpbi) * sizeof(RGBQUAD))
|
#define wxDibPaletteSize(lpbi) (wxDibNumColors(lpbi) * sizeof(RGBQUAD))
|
||||||
|
|
||||||
#define DibFlipY(lpbi, y) ((int)(lpbi)->biHeight-1-(y))
|
#define wxDibFlipY(lpbi, y) ((int)(lpbi)->biHeight-1-(y))
|
||||||
|
|
||||||
//HACK for NT BI_BITFIELDS DIBs
|
//HACK for NT BI_BITFIELDS DIBs
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#define DibPtr(lpbi) ((lpbi)->biCompression == BI_BITFIELDS \
|
#define wxDibPtr(lpbi) ((lpbi)->biCompression == BI_BITFIELDS \
|
||||||
? (LPVOID)(DibColors(lpbi) + 3) \
|
? (LPVOID)(wxDibColors(lpbi) + 3) \
|
||||||
: (LPVOID)(DibColors(lpbi) + (UINT)(lpbi)->biClrUsed))
|
: (LPVOID)(wxDibColors(lpbi) + (UINT)(lpbi)->biClrUsed))
|
||||||
#else
|
#else
|
||||||
#define DibPtr(lpbi) (LPVOID)(DibColors(lpbi) + (UINT)(lpbi)->biClrUsed)
|
#define wxDibPtr(lpbi) (LPVOID)(wxDibColors(lpbi) + (UINT)(lpbi)->biClrUsed)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DibColors(lpbi) ((RGBQUAD FAR *)((LPBYTE)(lpbi) + (int)(lpbi)->biSize))
|
#define wxDibColors(lpbi) ((RGBQUAD FAR *)((LPBYTE)(lpbi) + (int)(lpbi)->biSize))
|
||||||
|
|
||||||
#define DibNumColors(lpbi) ((lpbi)->biClrUsed == 0 && (lpbi)->biBitCount <= 8 \
|
#define wxDibNumColors(lpbi) ((lpbi)->biClrUsed == 0 && (lpbi)->biBitCount <= 8 \
|
||||||
? (int)(1 << (int)(lpbi)->biBitCount) \
|
? (int)(1 << (int)(lpbi)->biBitCount) \
|
||||||
: (int)(lpbi)->biClrUsed)
|
: (int)(lpbi)->biClrUsed)
|
||||||
|
|
||||||
#define DibXYN(lpbi,pb,x,y,n) (LPVOID)( \
|
#define wxDibXYN(lpbi,pb,x,y,n) (LPVOID)( \
|
||||||
(BYTE _huge *)(pb) + \
|
(BYTE _huge *)(pb) + \
|
||||||
(UINT)((UINT)(x) * (UINT)(n) / 8u) + \
|
(UINT)((UINT)(x) * (UINT)(n) / 8u) + \
|
||||||
((DWORD)DibWidthBytesN(lpbi,n) * (DWORD)(UINT)(y)))
|
((DWORD)wxDibWidthBytesN(lpbi,n) * (DWORD)(UINT)(y)))
|
||||||
|
|
||||||
#define DibXY(lpbi,x,y) DibXYN(lpbi,DibPtr(lpbi),x,y,(lpbi)->biBitCount)
|
#define wxDibXY(lpbi,x,y) wxDibXYN(lpbi,wxDibPtr(lpbi),x,y,(lpbi)->biBitCount)
|
||||||
|
|
||||||
#define FixBitmapInfo(lpbi) if ((lpbi)->biSizeImage == 0) \
|
#define wxFixBitmapInfo(lpbi) if ((lpbi)->biSizeImage == 0) \
|
||||||
(lpbi)->biSizeImage = DibSizeImage(lpbi); \
|
(lpbi)->biSizeImage = wxDibSizeImage(lpbi); \
|
||||||
if ((lpbi)->biClrUsed == 0) \
|
if ((lpbi)->biClrUsed == 0) \
|
||||||
(lpbi)->biClrUsed = DibNumColors(lpbi);
|
(lpbi)->biClrUsed = wxDibNumColors(lpbi);
|
||||||
|
|
||||||
// if ((lpbi)->biCompression == BI_BITFIELDS && (lpbi)->biClrUsed == 0)
|
// if ((lpbi)->biCompression == BI_BITFIELDS && (lpbi)->biClrUsed == 0)
|
||||||
// ; // (lpbi)->biClrUsed = 3;
|
// ; // (lpbi)->biClrUsed = 3;
|
||||||
|
|
||||||
#define DibInfo(pDIB) ((BITMAPINFO FAR *)(pDIB))
|
#define wxDibInfo(pDIB) ((BITMAPINFO FAR *)(pDIB))
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user