diff options
| author | Manolo Gouy <Manolo> | 2011-01-06 10:24:58 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2011-01-06 10:24:58 +0000 |
| commit | bc509d32eb741e5d3876eaaf0abd270cf68cd3b4 (patch) | |
| tree | 54dc5262309cd9a5d89812f6f3ac42439ffc2f2e /cairo | |
| parent | ead3432f9b9629f201bba47e1b3fbf25d487eba8 (diff) | |
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
Diffstat (limited to 'cairo')
| -rw-r--r-- | cairo/Fl_Cairo.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
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 <config.h> -#ifdef HAVE_CAIRO +#ifdef FLTK_HAVE_CAIRO #include <FL/Fl.H> #include <FL/x.H> #include <FL/Fl_Window.H> +#ifdef __APPLE__ +#include <Carbon/Carbon.h> +#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/Fl_Export.H> FL_EXPORT int fltk_cairo_dummy() { return 1;} -#endif // HAVE_CAIRO +#endif // FLTK_HAVE_CAIRO // // End of "$Id$" . |
