summaryrefslogtreecommitdiff
path: root/src/Fl_mac.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2010-03-29 10:35:00 +0000
committerMatthias Melcher <fltk@matthiasm.com>2010-03-29 10:35:00 +0000
commit941901e273319ce152523af7fa079a6f5cf89d68 (patch)
tree9d70b82fa54d81607a0022f14a0518c47805a796 /src/Fl_mac.cxx
parentb77071a3de3593ea482aa7ea0a442c7fc888a2e2 (diff)
OS X: removed all Carbon and Quickdraw references. Starting with 1.3, we only support Cocoa and Quartz.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7351 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_mac.cxx')
-rw-r--r--src/Fl_mac.cxx13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/Fl_mac.cxx b/src/Fl_mac.cxx
index 4cd3f9eff..c7c72a7d8 100644
--- a/src/Fl_mac.cxx
+++ b/src/Fl_mac.cxx
@@ -2442,10 +2442,8 @@ void Fl_Window::resize(int X,int Y,int W,int H) {
*/
void Fl_Window::make_current()
{
-#ifdef __APPLE_QUARTZ__
OSStatus err;
Fl_X::q_release_context();
-#endif
if ( !fl_window_region )
fl_window_region = NewRgn();
fl_window = i->xid;
@@ -2479,29 +2477,26 @@ void Fl_Window::make_current()
DisposeRgn( r );
}
-#ifdef __APPLE_QUARTZ__
err = QDBeginCGContext(GetWindowPort(i->xid), &i->gc);
if (err!=noErr)
fprintf(stderr, "Error %d in QDBeginCGContext\n", (int)err);
fl_gc = i->gc;
CGContextSaveGState(fl_gc);
Fl_X::q_fill_context();
-#if defined(USE_CAIRO) && defined (__APPLE_QUARTZ__)
+#if defined(USE_CAIRO)
if (Fl::cairo_autolink_context()) Fl::cairo_make_current(this); // capture gc changes automatically to update the cairo context adequately
#endif
-#endif
fl_clip_region( 0 );
SetPortClipRegion( GetWindowPort(i->xid), fl_window_region );
-#if defined(__APPLE_QUARTZ__) && defined(USE_CAIRO)
+#if defined(USE_CAIRO)
// update the cairo_t context
if (Fl::cairo_autolink_context()) Fl::cairo_make_current(this);
#endif
}
// helper function to manage the current CGContext fl_gc
-#ifdef __APPLE_QUARTZ__
extern Fl_Color fl_color_;
extern class Fl_Font_Descriptor *fl_fontsize;
extern void fl_font(class Fl_Font_Descriptor*);
@@ -2545,7 +2540,7 @@ void Fl_X::q_release_context(Fl_X *x) {
fprintf(stderr, "Error %d in QDEndCGContext\n", (int)err);
}
fl_gc = 0;
-#if defined(USE_CAIRO) && defined (__APPLE_QUARTZ__)
+#if defined(USE_CAIRO)
if (Fl::cairo_autolink_context()) Fl::cairo_make_current((Fl_Window*) 0); // capture gc changes automatically to update the cairo context adequately
#endif
}
@@ -2569,8 +2564,6 @@ void Fl_X::q_end_image() {
CGContextRestoreGState(fl_gc);
}
-#endif
-
////////////////////////////////////////////////////////////////
// Copy & Paste fltk implementation.
////////////////////////////////////////////////////////////////