diff options
| author | Manolo Gouy <Manolo> | 2014-01-07 15:31:28 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2014-01-07 15:31:28 +0000 |
| commit | e543d2c7635affb4e167659c2108b918752997aa (patch) | |
| tree | 392e4dd8f1fa452b45f336af1878e35ed6a3fca9 | |
| parent | 56b7434dd08dc7e55b54ed0ad651704a4bcbd2bf (diff) | |
Cleaner definition under Mac OS of the fl_default_cursor global variable that doesn't hide its type.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10048 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | FL/mac.H | 10 | ||||
| -rw-r--r-- | src/Fl_cocoa.mm | 2 |
2 files changed, 9 insertions, 3 deletions
@@ -49,6 +49,12 @@ typedef CGContextRef Fl_Offscreen; #include <ApplicationServices/ApplicationServices.h> #undef check // because of Fl::check() +#ifdef __OBJC__ +@class NSCursor; +#else +class NSCursor; +#endif // __OBJC__ + typedef CGContextRef Fl_Offscreen; typedef struct flCocoaRegion { @@ -84,7 +90,7 @@ inline void XDestroyRegion(Fl_Region r) { free(r); } } -extern void *fl_default_cursor; +extern NSCursor *fl_default_cursor; // This object contains all mac-specific stuff about a window: // WARNING: this object is highly subject to change! @@ -99,7 +105,7 @@ public: Fl_X *next; // linked tree to support subwindows Fl_X *xidChildren, *xidNext; // more subwindow tree int wait_for_expose; - void *cursor; // is really NSCursor* + NSCursor *cursor; static Fl_X* first; static Fl_X* i(const Fl_Window* w) {return w->i;} static int fake_X_wm(const Fl_Window*,int&,int&,int&,int&,int&); diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index dcf3cf7a4..65705bfb2 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -97,7 +97,7 @@ Fl_Display_Device *Fl_Display_Device::_display = new Fl_Display_Device(new Fl_Qu // public variables CGContextRef fl_gc = 0; -void *fl_default_cursor; // this is really a NSCursor* +NSCursor *fl_default_cursor; void *fl_capture = 0; // (NSWindow*) we need this to compensate for a missing(?) mouse capture bool fl_show_iconic; // true if called from iconize() - shows the next created window in collapsed state //int fl_disable_transient_for; // secret method of removing TRANSIENT_FOR |
