// Created: ??/??/98
// RCS-ID: $Id$
// Copyright: (c) AUTHOR
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.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"
#endif
#define INCL_PM
#define INCL_GPI
-#include <os2.h>
#include "assert.h"
{
} // end of wxPalette::~wxPalette
-bool wxPalette::FreeResource(
- bool bForce
-)
+bool wxPalette::FreeResource( bool WXUNUSED(bForce) )
{
if ( M_PALETTEDATA && M_PALETTEDATA->m_hPalette)
{
::GpiSelectPalette(M_PALETTEDATA->m_hPS, NULLHANDLE);
::GpiDeletePalette((HPAL)M_PALETTEDATA->m_hPalette);
}
- return TRUE;
+ return true;
} // end of wxPalette::FreeResource
-bool wxPalette::Create(
- int n
-, const unsigned char* pRed
-, const unsigned char* pGreen
-, const unsigned char* pBlue
-)
+bool wxPalette::Create( int n,
+ const unsigned char* pRed,
+ const unsigned char* pGreen,
+ const unsigned char* pBlue )
{
PULONG pualTable;
m_refData = new wxPaletteRefData;
pualTable = new ULONG[n];
if (!pualTable)
- return(FALSE);
+ return false;
for (int i = 0; i < n; i ++)
{
,pualTable
);
delete [] pualTable;
- return TRUE;
+ return true;
} // end of wxPalette::Create
int wxPalette::GetPixel(
//
// Now loop through and find the matching entry
//
- for (int i = 0; i < ulNumEntries; i++)
+ ULONG i;
+ for (i = 0; i < ulNumEntries; i++)
{
if (pualTable[i] == ulRGB)
{
- bFound = TRUE;
+ bFound = true;
break;
}
}
::GpiSelectPalette(M_PALETTEDATA->m_hPS, M_PALETTEDATA->m_hPalette);
M_PALETTEDATA->m_hPS = hPS;
} // end of wxPalette::SetHPALETTE
-