summaryrefslogtreecommitdiff
path: root/src/fl_scroll_area.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2004-08-25 00:20:27 +0000
committerMatthias Melcher <fltk@matthiasm.com>2004-08-25 00:20:27 +0000
commit8327822026ac50dc9e20823988b0f53bc143b7ba (patch)
tree864e83d7482fa6414d48621a16b677246e49f8ae /src/fl_scroll_area.cxx
parent522f98d5230e78f983ffcc8f05391c060661cf1a (diff)
Updated config stuff to allow for --enable-quartz ofr Mac OS X which in
turn defined USE_QUARTZ to 1 and defines __APPLE_QUARTZ__. If Quartz is not disabled, it will define __APPLE_QD__ for Quickdraw. I also replaced all relevand #ifdef __APPLE__ with #ifdef __APPLE_QD__ #elif defined(__APPLE_QUARTZ__). This does not affect the compile at this time and both version will generate the same Quickdraw code. I will start to replace all QD calls with Quartz calls for the remainder of the week until I can completely remove all QD calls from the Quartz branch. Thanks to Robert Smith for a great initial Quartz implementation. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3782 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_scroll_area.cxx')
-rw-r--r--src/fl_scroll_area.cxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/fl_scroll_area.cxx b/src/fl_scroll_area.cxx
index e22e91788..b6a4a1ccc 100644
--- a/src/fl_scroll_area.cxx
+++ b/src/fl_scroll_area.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_scroll_area.cxx,v 1.4.2.3.2.6 2004/04/11 04:39:00 easysw Exp $"
+// "$Id: fl_scroll_area.cxx,v 1.4.2.3.2.7 2004/08/25 00:20:27 matthiaswm Exp $"
//
// Scrolling routines for the Fast Light Tool Kit (FLTK).
//
@@ -27,6 +27,7 @@
// a "callback" which is called to draw rectangular areas that are moved
// into the drawing area.
+#include <config.h>
#include <FL/Fl.H>
#include <FL/x.H>
@@ -102,7 +103,15 @@ void fl_scroll(int X, int Y, int W, int H, int dx, int dy,
if (temp > limit) {
draw_area(data, dest_x, dest_y + src_h - temp + limit, src_w, temp - limit);
}
-#elif defined(__APPLE__)
+#elif defined(__APPLE_QD__)
+ Rect src = { src_y, src_x, src_y+src_h, src_x+src_w };
+ Rect dst = { dest_y, dest_x, dest_y+src_h, dest_x+src_w };
+ static RGBColor bg = { 0xffff, 0xffff, 0xffff }; RGBBackColor( &bg );
+ static RGBColor fg = { 0x0000, 0x0000, 0x0000 }; RGBForeColor( &fg );
+ CopyBits( GetPortBitMapForCopyBits( GetWindowPort(fl_window) ),
+ GetPortBitMapForCopyBits( GetWindowPort(fl_window) ), &src, &dst, srcCopy, 0L);
+#elif defined(__APPLE_QUARTZ__)
+#warning
Rect src = { src_y, src_x, src_y+src_h, src_x+src_w };
Rect dst = { dest_y, dest_x, dest_y+src_h, dest_x+src_w };
static RGBColor bg = { 0xffff, 0xffff, 0xffff }; RGBBackColor( &bg );
@@ -127,5 +136,5 @@ void fl_scroll(int X, int Y, int W, int H, int dx, int dy,
}
//
-// End of "$Id: fl_scroll_area.cxx,v 1.4.2.3.2.6 2004/04/11 04:39:00 easysw Exp $".
+// End of "$Id: fl_scroll_area.cxx,v 1.4.2.3.2.7 2004/08/25 00:20:27 matthiaswm Exp $".
//