#include "wx/msw/gdiimage.h"
#include "wx/bitmap.h"
+#include "wx/listimpl.cpp"
+WX_DEFINE_LIST(wxGDIImageHandlerList);
+
+
#ifdef __WIN16__
# include "wx/msw/curico.h"
#endif // __WIN16__
// implementation
// ============================================================================
-wxList wxGDIImage::ms_handlers;
+wxGDIImageHandlerList wxGDIImage::ms_handlers;
// ----------------------------------------------------------------------------
// wxGDIImage functions forwarded to wxGDIImageRefData
wxGDIImageHandler *wxGDIImage::FindHandler(const wxString& name)
{
- wxNode *node = ms_handlers.GetFirst();
+ wxGDIImageHandlerList::Node *node = ms_handlers.GetFirst();
while ( node )
{
- wxGDIImageHandler *handler = (wxGDIImageHandler *)node->GetData();
+ wxGDIImageHandler *handler = node->GetData();
if ( handler->GetName() == name )
return handler;
node = node->GetNext();
wxGDIImageHandler *wxGDIImage::FindHandler(const wxString& extension,
long type)
{
- wxNode *node = ms_handlers.GetFirst();
+ wxGDIImageHandlerList::Node *node = ms_handlers.GetFirst();
while ( node )
{
- wxGDIImageHandler *handler = (wxGDIImageHandler *)node->GetData();
+ wxGDIImageHandler *handler = node->GetData();
if ( (handler->GetExtension() = extension) &&
(type == -1 || handler->GetType() == type) )
{
wxGDIImageHandler *wxGDIImage::FindHandler(long type)
{
- wxNode *node = ms_handlers.GetFirst();
+ wxGDIImageHandlerList::Node *node = ms_handlers.GetFirst();
while ( node )
{
- wxGDIImageHandler *handler = (wxGDIImageHandler *)node->GetData();
+ wxGDIImageHandler *handler = node->GetData();
if ( handler->GetType() == type )
return handler;
void wxGDIImage::CleanUpHandlers()
{
- wxNode *node = ms_handlers.GetFirst();
+ wxGDIImageHandlerList::Node *node = ms_handlers.GetFirst();
while ( node )
{
- wxGDIImageHandler *handler = (wxGDIImageHandler *)node->GetData();
- wxNode *next = node->GetNext();
+ wxGDIImageHandler *handler = node->GetData();
+ wxGDIImageHandlerList::Node *next = node->GetNext();
delete handler;
delete node;
node = next;