From bc509d32eb741e5d3876eaaf0abd270cf68cd3b4 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Thu, 6 Jan 2011 10:24:58 +0000 Subject: Fix STR #2504 (first part). Replaced HAVE _CAIRO by FLTK_HAVE_CAIRO and USE_CAIRO by FLTK_USE_CAIRO everywhere. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8198 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- cairo/Fl_Cairo.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'cairo') diff --git a/cairo/Fl_Cairo.cxx b/cairo/Fl_Cairo.cxx index ff759e94b..66d955d18 100644 --- a/cairo/Fl_Cairo.cxx +++ b/cairo/Fl_Cairo.cxx @@ -27,10 +27,13 @@ #include -#ifdef HAVE_CAIRO +#ifdef FLTK_HAVE_CAIRO #include #include #include +#ifdef __APPLE__ +#include +#endif // static Fl module initialization : Fl_Cairo_State Fl::cairo_state_; ///< contains all necesary info for current cairo context mapping @@ -41,7 +44,7 @@ Fl_Cairo_State Fl::cairo_state_; ///< contains all necesary info for current cai // Fl_Cairo_State class impl void Fl_Cairo_State::autolink(bool b) { -#ifdef USE_CAIRO +#ifdef FLTK_USE_CAIRO autolink_ = b; #else Fl::fatal("In Fl::autolink(bool) : Cairo autolink() feature is only " @@ -116,7 +119,7 @@ cairo_t * Fl::cairo_make_current(void *gc) { #elif defined(__APPLE_QUARTZ__) if (fl_window) { Rect portRect; - GetPortBounds(GetWindowPort( fl_window ), &portRect); + GetPortBounds(GetWindowPort( Fl_X::i(Fl_Window::current())->window_ref() ), &portRect); W = portRect.right-portRect.left; H = portRect.bottom-portRect.top; } @@ -159,7 +162,7 @@ cairo_t * Fl::cairo_make_current(void *gc, int W, int H) { // just don't leave the libfltk_cairo lib empty to avoid warnings #include FL_EXPORT int fltk_cairo_dummy() { return 1;} -#endif // HAVE_CAIRO +#endif // FLTK_HAVE_CAIRO // // End of "$Id$" . -- cgit v1.2.3