]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/carbon/cursor.h
use GlobalPtrLock (modified to allow not initializing it if the ptr is NULL) in wxGet...
[wxWidgets.git] / include / wx / mac / carbon / cursor.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/mac/carbon/cursor.h
3 // Purpose: wxCursor class
4 // Author: Stefan Csomor
5 // Modified by:
6 // Created: 1998-01-01
7 // RCS-ID: $Id$
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_CURSOR_H_
13 #define _WX_CURSOR_H_
14
15 #include "wx/bitmap.h"
16
17 // Cursor
18 class WXDLLEXPORT wxCursor : public wxGDIObject
19 {
20 public:
21 wxCursor();
22
23 wxCursor(const char bits[], int width, int height,
24 int hotSpotX = -1, int hotSpotY = -1,
25 const char maskBits[] = NULL);
26
27 wxCursor(const wxImage & image) ;
28 wxCursor(const char* const* bits);
29 wxCursor(const wxString& name, long flags = wxBITMAP_TYPE_MACCURSOR_RESOURCE,
30 int hotSpotX = 0, int hotSpotY = 0);
31
32 wxCursor(int cursor_type);
33 virtual ~wxCursor();
34
35 bool CreateFromXpm(const char* const* bits);
36
37 void MacInstall() const ;
38
39 void SetHCURSOR(WXHCURSOR cursor);
40 WXHCURSOR GetHCURSOR() const;
41
42 private:
43 virtual wxGDIRefData *CreateGDIRefData() const;
44 virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
45
46 void CreateFromImage(const wxImage & image) ;
47
48 DECLARE_DYNAMIC_CLASS(wxCursor)
49 };
50
51 extern WXDLLEXPORT void wxSetCursor(const wxCursor& cursor);
52
53 #endif // _WX_CURSOR_H_