git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16165
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#include "wx/confbase.h"
#include "wx/fileconf.h"
#include "wx/cmdline.h"
#include "wx/confbase.h"
#include "wx/fileconf.h"
#include "wx/cmdline.h"
#ifdef __WXX11__
#include "wx/x11/reparent.h"
#ifdef __WXX11__
#include "wx/x11/reparent.h"
- int type = wxDetermineImageType(m_emulatorBackgroundBitmapName);
- if (type == -1)
+ wxBitmapType type = wxDetermineImageType(m_emulatorBackgroundBitmapName);
+ if (type == wxBITMAP_TYPE_INVALID)
return FALSE;
if (!m_emulatorBackgroundBitmap.LoadFile(m_emulatorBackgroundBitmapName, type))
return FALSE;
if (!m_emulatorBackgroundBitmap.LoadFile(m_emulatorBackgroundBitmapName, type))
}
// Returns the image type, or -1, determined from the extension.
}
// Returns the image type, or -1, determined from the extension.
-int wxDetermineImageType(const wxString& filename)
+wxBitmapType wxDetermineImageType(const wxString& filename)
{
wxString path, name, ext;
{
wxString path, name, ext;
ext.MakeLower();
if (ext == "jpg" || ext == "jpeg")
return wxBITMAP_TYPE_JPEG;
ext.MakeLower();
if (ext == "jpg" || ext == "jpeg")
return wxBITMAP_TYPE_JPEG;
return wxBITMAP_TYPE_GIF;
return wxBITMAP_TYPE_GIF;
return wxBITMAP_TYPE_BMP;
return wxBITMAP_TYPE_BMP;
return wxBITMAP_TYPE_PNG;
return wxBITMAP_TYPE_PNG;
return wxBITMAP_TYPE_PCX;
return wxBITMAP_TYPE_PCX;
- else if (ext == "tif" || ext == "tiff")
+ if (ext == "tif" || ext == "tiff")
return wxBITMAP_TYPE_TIF;
return wxBITMAP_TYPE_TIF;
+
+ return wxBITMAP_TYPE_INVALID;
}
// Convert a colour to a 6-digit hex string
}
// Convert a colour to a 6-digit hex string
};
// Returns the image type, or -1, determined from the extension.
};
// Returns the image type, or -1, determined from the extension.
-int wxDetermineImageType(const wxString& filename);
+wxBitmapType wxDetermineImageType(const wxString& filename);
// Convert a colour to a 6-digit hex string
wxString wxColourToHexString(const wxColour& col);
// Convert a colour to a 6-digit hex string
wxString wxColourToHexString(const wxColour& col);