removing dependancy on mac headers from public wx headers (eventually adding wx/

mac/private and typecasts)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Gilles Depeyrot
2002-01-06 15:48:16 +00:00
parent bcaba9a036
commit 88fe14c06f
2 changed files with 10 additions and 8 deletions

View File

@@ -39,6 +39,7 @@
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/mac/pnghand.h" #include "wx/mac/pnghand.h"
#include "wx/mac/pngread.h" #include "wx/mac/pngread.h"
#include "wx/mac/private.h"
extern "C" { extern "C" {
#include "png.h" #include "png.h"
@@ -116,7 +117,7 @@ wxPNGReader::Create(int width, int height, int depth, int colortype)
if (lpbi) if (lpbi)
{ {
wxMacDestroyGWorld( lpbi ) ; wxMacDestroyGWorld( (GWorldPtr) lpbi ) ;
} }
lpbi = wxMacCreateGWorld( Width , Height , Depth); lpbi = wxMacCreateGWorld( Width , Height , Depth);
if (lpbi) if (lpbi)
@@ -135,7 +136,7 @@ wxPNGReader::~wxPNGReader ( )
{ {
delete[] RawImage ; delete[] RawImage ;
if (lpbi) { if (lpbi) {
wxMacDestroyGWorld( lpbi ) ; wxMacDestroyGWorld( (GWorldPtr) lpbi ) ;
} }
delete m_palette; delete m_palette;
} }
@@ -258,7 +259,7 @@ wxPNGReader::SetPalette(int n, rgb_color_struct *rgb_struct)
void wxPNGReader::NullData() void wxPNGReader::NullData()
{ {
if (lpbi) { if (lpbi) {
wxMacDestroyGWorld( lpbi ) ; wxMacDestroyGWorld( (GWorldPtr) lpbi ) ;
} }
delete m_palette; delete m_palette;
lpbi = NULL; lpbi = NULL;
@@ -512,7 +513,7 @@ bool wxPNGReader::ReadFile(char * ImageFileName)
GetGWorld( &origPort , &origDevice ) ; GetGWorld( &origPort , &origDevice ) ;
// ignore shapedc // ignore shapedc
SetGWorld( lpbi , NULL ) ; SetGWorld( (GWorldPtr) lpbi , NULL ) ;
do do
{ {
// (unsigned char *)iter.GetRow(); // (unsigned char *)iter.GetRow();

View File

@@ -39,6 +39,7 @@
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/mac/pnghand.h" #include "wx/mac/pnghand.h"
#include "wx/mac/pngread.h" #include "wx/mac/pngread.h"
#include "wx/mac/private.h"
extern "C" { extern "C" {
#include "png.h" #include "png.h"
@@ -116,7 +117,7 @@ wxPNGReader::Create(int width, int height, int depth, int colortype)
if (lpbi) if (lpbi)
{ {
wxMacDestroyGWorld( lpbi ) ; wxMacDestroyGWorld( (GWorldPtr) lpbi ) ;
} }
lpbi = wxMacCreateGWorld( Width , Height , Depth); lpbi = wxMacCreateGWorld( Width , Height , Depth);
if (lpbi) if (lpbi)
@@ -135,7 +136,7 @@ wxPNGReader::~wxPNGReader ( )
{ {
delete[] RawImage ; delete[] RawImage ;
if (lpbi) { if (lpbi) {
wxMacDestroyGWorld( lpbi ) ; wxMacDestroyGWorld( (GWorldPtr) lpbi ) ;
} }
delete m_palette; delete m_palette;
} }
@@ -258,7 +259,7 @@ wxPNGReader::SetPalette(int n, rgb_color_struct *rgb_struct)
void wxPNGReader::NullData() void wxPNGReader::NullData()
{ {
if (lpbi) { if (lpbi) {
wxMacDestroyGWorld( lpbi ) ; wxMacDestroyGWorld( (GWorldPtr) lpbi ) ;
} }
delete m_palette; delete m_palette;
lpbi = NULL; lpbi = NULL;
@@ -512,7 +513,7 @@ bool wxPNGReader::ReadFile(char * ImageFileName)
GetGWorld( &origPort , &origDevice ) ; GetGWorld( &origPort , &origDevice ) ;
// ignore shapedc // ignore shapedc
SetGWorld( lpbi , NULL ) ; SetGWorld( (GWorldPtr) lpbi , NULL ) ;
do do
{ {
// (unsigned char *)iter.GetRow(); // (unsigned char *)iter.GetRow();