X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/155ecd4c4221d3bbc7aa93d472d11948f21d21ab..da6f998486f1070e205f2e0a54f22a1b67cb32a4:/src/os2/cursor.cpp diff --git a/src/os2/cursor.cpp b/src/os2/cursor.cpp index 24fbc16ea1..bf5bc9c84f 100644 --- a/src/os2/cursor.cpp +++ b/src/os2/cursor.cpp @@ -4,7 +4,6 @@ // Author: David Webster // Modified by: // Created: 10/13/99 -// RCS-ID: $Id$ // Copyright: (c) David Webster // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -21,6 +20,7 @@ #include "wx/app.h" #include "wx/icon.h" #include "wx/image.h" + #include "wx/log.h" #endif #include "wx/os2/private.h" @@ -53,15 +53,6 @@ wxCursor::wxCursor(void) { } -wxCursor::wxCursor(const char WXUNUSED(bits)[], - int WXUNUSED(width), - int WXUNUSED(height), - int WXUNUSED(hotSpotX), - int WXUNUSED(hotSpotY), - const char WXUNUSED(maskBits)[]) -{ -} - wxCursor::wxCursor(const wxImage& rImage) { wxImage vImage32 = rImage.Scale(32,32); @@ -94,7 +85,7 @@ wxCursor::wxCursor(const wxImage& rImage) } // end of wxCursor::wxCursor wxCursor::wxCursor( const wxString& WXUNUSED(rsCursorFile), - long lFlags, + wxBitmapType type, int WXUNUSED(nHotSpotX), int WXUNUSED(nHotSpotY) ) { @@ -103,17 +94,19 @@ wxCursor::wxCursor( const wxString& WXUNUSED(rsCursorFile), pRefData = new wxCursorRefData; m_refData = pRefData; pRefData->m_bDestroyCursor = false; - if (lFlags == wxBITMAP_TYPE_CUR_RESOURCE) + if (type == wxBITMAP_TYPE_CUR_RESOURCE) { pRefData->m_hCursor = (WXHCURSOR) ::WinLoadPointer( HWND_DESKTOP ,0 - ,(ULONG)lFlags // if OS/2 this should be the resource Id + ,(ULONG)type // if OS/2 this should be the resource Id ); } + else + wxLogError("Invalid cursor bitmap type '%d'", type); } // end of wxCursor::wxCursor // Cursors by stock number -wxCursor::wxCursor(int nCursorType) +void wxCursor::InitFromStock(wxStockCursor nCursorType) { wxCursorRefData* pRefData = new wxCursorRefData; @@ -308,7 +301,7 @@ void wxSetCursor(const wxCursor& cursor) { extern wxCursor *g_globalCursor; - if ( cursor.Ok() && cursor.GetHCURSOR() ) + if ( cursor.IsOk() && cursor.GetHCURSOR() ) { // ::SetCursor((HCURSOR) cursor.GetHCURSOR());