+}
+
+#if wxUSE_IMAGE
+wxCursor::wxCursor(const wxString& cursor_file,
+ wxBitmapType type,
+ int hotSpotX, int hotSpotY)
+{
+ wxImage img;
+ if (!img.LoadFile(cursor_file, type))
+ return;
+
+ // eventually set the hotspot:
+ if (!img.HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_X))
+ img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, hotSpotX);
+ if (!img.HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y))
+ img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, hotSpotY);
+
+ InitFromImage(img);
+}
+
+wxCursor::wxCursor(const wxImage& img)
+{
+ InitFromImage(img);
+}
+#endif
+
+wxCursor::wxCursor(const char bits[], int width, int height,
+ int hotSpotX, int hotSpotY,
+ const char maskBits[], const wxColour *fg, const wxColour *bg)
+{
+ if (!maskBits)
+ maskBits = bits;
+ if (!fg)
+ fg = wxBLACK;
+ if (!bg)
+ bg = wxWHITE;
+ if (hotSpotX < 0 || hotSpotX >= width)
+ hotSpotX = 0;
+ if (hotSpotY < 0 || hotSpotY >= height)
+ hotSpotY = 0;
+
+ GdkBitmap *data = gdk_bitmap_create_from_data( wxGetRootWindow()->window, (gchar *) bits, width, height );
+ GdkBitmap *mask = gdk_bitmap_create_from_data( wxGetRootWindow()->window, (gchar *) maskBits, width, height);