#include "wx/bitmap.h"
#include "wx/icon.h"
#include "wx/log.h"
+#include "wx/control.h"
#include <Xm/Xm.h>
#include "wx/motif/private.h"
// TODO: correct symbol, path?
-#if USE_XPM
+#if wxUSE_XPM
#include <X11/xpm.h>
#endif
// Create from XPM data
static wxControl* sg_Control = NULL;
-wxBitmap::wxBitmap(const char **data, wxControl* control)
+wxBitmap::wxBitmap(char **data, wxControl* control)
{
// Pass the control to the Create function using a global
sg_Control = control;
return TRUE;
}
-#if USE_XPM
+#if wxUSE_XPM
class WXDLLEXPORT wxXPMFileHandler: public wxBitmapHandler
{
DECLARE_DYNAMIC_CLASS(wxXPMFileHandler)
bool wxXPMFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
int desiredWidth, int desiredHeight)
{
- Display *dpy = wxGetDisplay();
+ Display *dpy = (Display*) wxGetDisplay();
M_BITMAPHANDLERDATA->m_display = (WXDisplay*) dpy;
XpmAttributes xpmAttr;
XpmFreeAttributes(&xpmAttr);
M_BITMAPHANDLERDATA->m_ok = TRUE;
+ return TRUE;
} else
{
// XpmDebugError(errorStatus, name);
{
DECLARE_DYNAMIC_CLASS(wxXPMDataHandler)
public:
- inline wxXBMDataHandler()
+ inline wxXPMDataHandler()
{
m_name = "XPM data";
m_extension = "xpm";
M_BITMAPHANDLERDATA->m_depth = 1;
M_BITMAPHANDLERDATA->m_freePixmap = TRUE;
- Display *dpy = wxGetDisplay();
+ Display *dpy = (Display*) wxGetDisplay();
M_BITMAPHANDLERDATA->m_display = (WXDisplay*) dpy;
XpmAttributes xpmAttr;
// XPM is considered standard for Moif, although it can be omitted if absolutely
// necessary.
-#if USE_XPM
+#if wxUSE_XPM
AddHandler(new wxXPMFileHandler);
AddHandler(new wxXPMDataHandler);
#endif