]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/gdiimage.cpp
Unicode compilation fixes
[wxWidgets.git] / src / os2 / gdiimage.cpp
index b4dc31cd009c0736f5dc04258f38b532e050c016..0d21c81be07966255c235c9ee2e20b5dcf27fe97 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        msw/gdiimage.cpp
+// Name:        src/os2/gdiimage.cpp
 // Purpose:     wxGDIImage implementation
 // Author:      Vadim Zeitlin
 // Modified by:
 // Purpose:     wxGDIImage implementation
 // Author:      Vadim Zeitlin
 // Modified by:
 
 #ifndef WX_PRECOMP
     #include "wx/string.h"
 
 #ifndef WX_PRECOMP
     #include "wx/string.h"
+    #include "wx/app.h"
 #endif // WX_PRECOMP
 
 #include "wx/os2/private.h"
 #endif // WX_PRECOMP
 
 #include "wx/os2/private.h"
-#include "wx/app.h"
 #include "wx/os2/gdiimage.h"
 
 #include "wx/listimpl.cpp"
 #include "wx/os2/gdiimage.h"
 
 #include "wx/listimpl.cpp"
-WX_DEFINE_LIST(wxGDIImageHandlerList);
+WX_DEFINE_LIST(wxGDIImageHandlerList)
 
 // ----------------------------------------------------------------------------
 // private classes
 
 // ----------------------------------------------------------------------------
 // private classes
@@ -113,14 +113,14 @@ public:
 
     // creating and saving icons is not supported
     virtual bool Create( wxGDIImage* WXUNUSED(pImage)
 
     // creating and saving icons is not supported
     virtual bool Create( wxGDIImage* WXUNUSED(pImage)
-                        ,void*       WXUNUSED(pData)
+                        ,const void* WXUNUSED(pData)
                         ,long        WXUNUSED(lFlags)
                         ,int         WXUNUSED(nWidth)
                         ,int         WXUNUSED(nHeight)
                         ,int         WXUNUSED(nDepth) = 1
                        )
     {
                         ,long        WXUNUSED(lFlags)
                         ,int         WXUNUSED(nWidth)
                         ,int         WXUNUSED(nHeight)
                         ,int         WXUNUSED(nDepth) = 1
                        )
     {
-        return(FALSE);
+        return false;
     }
 
     virtual bool Save( wxGDIImage*     WXUNUSED(pImage)
     }
 
     virtual bool Save( wxGDIImage*     WXUNUSED(pImage)
@@ -128,7 +128,7 @@ public:
                       ,int             WXUNUSED(nType)
                      )
     {
                       ,int             WXUNUSED(nType)
                      )
     {
-        return(FALSE);
+        return false;
     }
     virtual bool Load( wxGDIImage*     pImage
                       ,const wxString& rName
     }
     virtual bool Load( wxGDIImage*     pImage
                       ,const wxString& rName
@@ -139,7 +139,7 @@ public:
                      )
     {
         wxIcon*                     pIcon = wxDynamicCast(pImage, wxIcon);
                      )
     {
         wxIcon*                     pIcon = wxDynamicCast(pImage, wxIcon);
-        wxCHECK_MSG(pIcon, FALSE, _T("wxIconHandler only works with icons"));
+        wxCHECK_MSG(pIcon, false, _T("wxIconHandler only works with icons"));
 
         return LoadIcon( pIcon
                         ,rName
 
         return LoadIcon( pIcon
                         ,rName
@@ -241,7 +241,7 @@ bool wxGDIImage::FreeResource( bool WXUNUSED(bForce) )
     return true;
 }
 
     return true;
 }
 
-WXHANDLE wxGDIImage::GetResourceHandle()
+WXHANDLE wxGDIImage::GetResourceHandle() const
 {
     return GetHandle();
 }
 {
     return GetHandle();
 }
@@ -395,7 +395,7 @@ bool wxBMPFileHandler::LoadFile( wxBitmap*       pBitmap,
                                  int             WXUNUSED(nDesiredWidth),
                                  int             WXUNUSED(nDesiredHeight) )
 {
                                  int             WXUNUSED(nDesiredWidth),
                                  int             WXUNUSED(nDesiredHeight) )
 {
-#if wxUSE_IMAGE_LOADING_IN_OS2
+#if defined(wxUSE_IMAGE_LOADING_IN_OS2) && wxUSE_IMAGE_LOADING_IN_OS2
     wxPalette* pPalette = NULL;
 
     bool bSuccess = false; /* wxLoadIntoBitmap( WXSTRINGCAST rName
     wxPalette* pPalette = NULL;
 
     bool bSuccess = false; /* wxLoadIntoBitmap( WXSTRINGCAST rName
@@ -422,7 +422,7 @@ bool wxBMPFileHandler::SaveFile( wxBitmap*        pBitmap,
                                  int              WXUNUSED(nType),
                                  const wxPalette* pPal )
 {
                                  int              WXUNUSED(nType),
                                  const wxPalette* pPal )
 {
-#if wxUSE_IMAGE_LOADING_IN_OS2
+#if defined(wxUSE_IMAGE_LOADING_IN_OS2) && wxUSE_IMAGE_LOADING_IN_OS2
     wxPalette* pActualPalette = (wxPalette *)pPal;
 
     if (!pActualPalette)
     wxPalette* pActualPalette = (wxPalette *)pPal;
 
     if (!pActualPalette)
@@ -450,7 +450,7 @@ bool wxICOFileHandler::LoadIcon( wxIcon*         pIcon,
                                  int             WXUNUSED(nDesiredWidth),
                                  int             WXUNUSED(nDesiredHeight) )
 {
                                  int             WXUNUSED(nDesiredWidth),
                                  int             WXUNUSED(nDesiredHeight) )
 {
-#if wxUSE_RESOURCE_LOADING_IN_OS2
+#if defined(wxUSE_RESOURCE_LOADING_IN_OS2) && wxUSE_RESOURCE_LOADING_IN_OS2
     pIcon->UnRef();
 
     return false;
     pIcon->UnRef();
 
     return false;