From d01c9cdf5b000fa7565351bcf4602f2fbad08b83 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Sat, 18 Dec 2010 22:31:01 +0000 Subject: Mac OS: replaced several global functions by new member functions of Mac OS-specific Fl_X class. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8055 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/fl_cursor.cxx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/fl_cursor.cxx') diff --git a/src/fl_cursor.cxx b/src/fl_cursor.cxx index b063acd98..aa37141b6 100644 --- a/src/fl_cursor.cxx +++ b/src/fl_cursor.cxx @@ -134,11 +134,10 @@ void Fl_Window::cursor(Fl_Cursor c, Fl_Color c1, Fl_Color c2) { # error "Either __LITTLE_ENDIAN__ or __BIG_ENDIAN__ must be defined" #endif -extern void *MACSetCursor(Fl_Cursor c); extern Fl_Offscreen fl_create_offscreen_with_alpha(int w, int h); -CGContextRef CreateHelpImage(void) +CGContextRef Fl_X::help_cursor_image(void) { int w = 20, h = 20; Fl_Offscreen off = fl_create_offscreen_with_alpha(w, h); @@ -152,7 +151,7 @@ CGContextRef CreateHelpImage(void) return (CGContextRef)off; } -CGContextRef CreateNoneImage(void) +CGContextRef Fl_X::none_cursor_image(void) { int w = 20, h = 20; Fl_Offscreen off = fl_create_offscreen_with_alpha(w, h); @@ -163,7 +162,7 @@ CGContextRef CreateNoneImage(void) return (CGContextRef)off; } -CGContextRef CreateWatchImage(void) +CGContextRef Fl_X::watch_cursor_image(void) { int w, h, r = 5; w = 2*r+6; @@ -188,7 +187,7 @@ CGContextRef CreateWatchImage(void) return (CGContextRef)off; } -CGContextRef CreateNESWImage(void) +CGContextRef Fl_X::nesw_cursor_image(void) { int c = 7, r = 2*c; int w = r, h = r; @@ -208,7 +207,7 @@ CGContextRef CreateNESWImage(void) return (CGContextRef)off; } -CGContextRef CreateNWSEImage(void) +CGContextRef Fl_X::nwse_cursor_image(void) { int c = 7, r = 2*c; int w = r, h = r; @@ -232,10 +231,7 @@ void Fl_Window::cursor(Fl_Cursor c, Fl_Color, Fl_Color) { if (c == FL_CURSOR_DEFAULT) { c = cursor_default; } - void *cursor = MACSetCursor( c ); - if (i) { - i->cursor = cursor; - } + if (i) i->set_cursor(c); } #else -- cgit v1.2.3