]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/carbon/cursor.h
avoid GCC warning about type-punned pointer breaking strict aliasing rules
[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 **bits) ;
29 wxCursor(char **bits) ;
30 wxCursor(const wxString& name, long flags = wxBITMAP_TYPE_MACCURSOR_RESOURCE,
31 int hotSpotX = 0, int hotSpotY = 0);
32
33 wxCursor(int cursor_type);
34 virtual ~wxCursor();
35
36 bool CreateFromXpm(const char **bits) ;
37
38 void MacInstall() const ;
39
40 void SetHCURSOR(WXHCURSOR cursor);
41 WXHCURSOR GetHCURSOR() const;
42
43 private:
44 virtual wxGDIRefData *CreateGDIRefData() const;
45 virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
46
47 void CreateFromImage(const wxImage & image) ;
48
49 DECLARE_DYNAMIC_CLASS(wxCursor)
50 };
51
52 extern WXDLLEXPORT void wxSetCursor(const wxCursor& cursor);
53
54 #endif // _WX_CURSOR_H_