]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/palette.cpp
Disable symbols visibility support for the Clang compiler.
[wxWidgets.git] / src / os2 / palette.cpp
index dd48397fc91c7cea3d9203de3af09d7fe000b290..55f41907bcd4c06726f00fadec061c70c0f2bec3 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        palette.cpp
+// Name:        src/os2/palette.cpp
 // Purpose:     wxPalette
 // Author:      AUTHOR
 // Modified by:
 // Purpose:     wxPalette
 // Author:      AUTHOR
 // Modified by:
 #include "wx/wxprec.h"
 
 #ifndef WX_PRECOMP
 #include "wx/wxprec.h"
 
 #ifndef WX_PRECOMP
-#include <stdio.h>
-#include "wx/defs.h"
-#include "wx/setup.h"
-#include "wx/string.h"
-#include "wx/os2/private.h"
-#include "wx/palette.h"
-#include "wx/app.h"
+    #include <stdio.h>
+    #include "wx/string.h"
+    #include "wx/os2/private.h"
+    #include "wx/palette.h"
+    #include "wx/app.h"
 #endif
 
 #define INCL_PM
 #endif
 
 #define INCL_PM
@@ -106,22 +104,30 @@ bool wxPalette::Create( int n,
     return true;
 } // end of wxPalette::Create
 
     return true;
 } // end of wxPalette::Create
 
-int wxPalette::GetPixel(
-  const unsigned char               cRed
-, const unsigned char               cGreen
-, const unsigned char               cBlue
-) const
+wxGDIRefData *wxPalette::CreateGDIRefData() const
 {
 {
-    bool                            bFound = FALSE;
-    PULONG                          pualTable = NULL;
-    ULONG                           ulNumEntries;
-    ULONG                           ulRGB = (PC_RESERVED * 16777216) +
-                                            ((int)cRed * 65536) +
-                                            ((int)cGreen * 256) +
-                                             (int)cBlue;
+    return new wxPaletteRefData;
+}
+
+wxGDIRefData *wxPalette::CloneGDIRefData(const wxGDIRefData *data) const
+{
+    return new wxPaletteRefData(*static_cast<const wxPaletteRefData *>(data));
+}
+
+int wxPalette::GetPixel( unsigned char cRed,
+                         unsigned char cGreen,
+                         unsigned char cBlue) const
+{
+    bool    bFound = false;
+    PULONG  pualTable = NULL;
+    ULONG   ulNumEntries;
+    ULONG   ulRGB = (PC_RESERVED * 16777216) +
+                    ((int)cRed * 65536) +
+                    ((int)cGreen * 256) +
+                    (int)cBlue;
 
     if (!m_refData)
 
     if (!m_refData)
-        return FALSE;
+        return wxNOT_FOUND;
 
     //
     // Get number of entries first
 
     //
     // Get number of entries first
@@ -159,26 +165,24 @@ int wxPalette::GetPixel(
         }
     }
     if (!bFound)
         }
     }
     if (!bFound)
-        return 0;
+        return wxNOT_FOUND;
     return (i + 1);
 } // end of wxPalette::GetPixel
 
     return (i + 1);
 } // end of wxPalette::GetPixel
 
-bool wxPalette::GetRGB(
-  int                               nIndex
-, unsigned char*                    pRed
-, unsigned char*                    pGreen
-, unsigned char*                    pBlue
-) const
+bool wxPalette::GetRGB( int nIndex,
+                        unsigned char* pRed,
+                        unsigned char* pGreen,
+                        unsigned char* pBlue) const
 {
     PULONG                          pualTable = NULL;
     RGB2                            vRGB;
     ULONG                           ulNumEntries;
 
     if (!m_refData)
 {
     PULONG                          pualTable = NULL;
     RGB2                            vRGB;
     ULONG                           ulNumEntries;
 
     if (!m_refData)
-        return FALSE;
+        return false;
 
     if (nIndex < 0 || nIndex > 255)
 
     if (nIndex < 0 || nIndex > 255)
-        return FALSE;
+        return false;
     //
     // Get number of entries first
     //
     //
     // Get number of entries first
     //
@@ -207,7 +211,7 @@ bool wxPalette::GetRGB(
     *pBlue  = vRGB.bBlue;
     *pGreen = vRGB.bGreen;
     *pRed   = vRGB.bRed;
     *pBlue  = vRGB.bBlue;
     *pGreen = vRGB.bGreen;
     *pRed   = vRGB.bRed;
-    return TRUE;
+    return true;
 } // end of wxPalette::GetRGB
 
 void wxPalette::SetHPALETTE(
 } // end of wxPalette::GetRGB
 
 void wxPalette::SetHPALETTE(