Author: manolo
Date: 2012-03-16 08:54:38 -0700 (Fri, 16 Mar 2012)
New Revision: 9286
Log:
Minor code reordering
Modified:
branches/branch-3.0/include/fltk3/Device.h
branches/branch-3.0/src/fltk3/Device.cxx
branches/branch-3.0/src/fltk3/cocoa.mm
branches/branch-3.0/src/fltk3/win32.cxx
branches/branch-3.0/src/fltk3/x11.cxx
Modified: branches/branch-3.0/include/fltk3/Device.h
===================================================================
--- branches/branch-3.0/include/fltk3/Device.h 2012-03-14 16:14:53 UTC (rev
9285)
+++ branches/branch-3.0/include/fltk3/Device.h 2012-03-16 15:54:38 UTC (rev
9286)
@@ -64,7 +64,7 @@
namespace fltk3 {
class GraphicsDriver;
- /** \brief Points to the driver that currently receives all graphics
requests */
+ /** Pointer to the fltk3::GraphicsDriver object that currently handles all
graphics operation */
FLTK3_EXPORT extern GraphicsDriver *graphics_driver;
/**
Modified: branches/branch-3.0/src/fltk3/Device.cxx
===================================================================
--- branches/branch-3.0/src/fltk3/Device.cxx 2012-03-14 16:14:53 UTC (rev
9285)
+++ branches/branch-3.0/src/fltk3/Device.cxx 2012-03-16 15:54:38 UTC (rev
9286)
@@ -29,6 +29,11 @@
#include <fltk3/Device.h>
#include <fltk3/Image.h>
+// Pointer to the fltk3::GraphicsDriver object that currently handles all
graphics operations
+FLTK3_EXPORT fltk3::GraphicsDriver *fltk3::graphics_driver;
+fltk3::SurfaceDevice* fltk3::SurfaceDevice::_surface; // the current target
surface of graphics operations
+fltk3::DisplayDevice *fltk3::DisplayDevice::_display; // the platform display
+
/** \brief Use this drawing surface for future graphics requests. */
void fltk3::SurfaceDevice::set_current(void)
{
@@ -77,6 +82,8 @@
Gestalt( gestaltSystemVersionBugFix, &versionBugFix );
fl_mac_os_version = versionMajor * 10000 + versionMinor * 100 +
versionBugFix;
#endif
+ this->set_current();
+ _display = this;
};
//
Modified: branches/branch-3.0/src/fltk3/cocoa.mm
===================================================================
--- branches/branch-3.0/src/fltk3/cocoa.mm 2012-03-14 16:14:53 UTC (rev
9285)
+++ branches/branch-3.0/src/fltk3/cocoa.mm 2012-03-16 15:54:38 UTC (rev
9286)
@@ -89,9 +89,6 @@
static fltk3::QuartzGraphicsDriver fl_quartz_driver;
static fltk3::DisplayDevice fl_quartz_display(&fl_quartz_driver);
-FLTK3_EXPORT fltk3::GraphicsDriver *fltk3::graphics_driver =
(fltk3::GraphicsDriver*)&fl_quartz_driver; // the current target device of
graphics operations
-fltk3::SurfaceDevice* fltk3::SurfaceDevice::_surface =
(fltk3::SurfaceDevice*)&fl_quartz_display; // the current target surface of
graphics operations
-fltk3::DisplayDevice *fltk3::DisplayDevice::_display = &fl_quartz_display; //
the platform display
// public variables
CGContextRef fl_gc = 0;
Modified: branches/branch-3.0/src/fltk3/win32.cxx
===================================================================
--- branches/branch-3.0/src/fltk3/win32.cxx 2012-03-14 16:14:53 UTC (rev
9285)
+++ branches/branch-3.0/src/fltk3/win32.cxx 2012-03-16 15:54:38 UTC (rev
9286)
@@ -94,9 +94,6 @@
static fltk3::GDIGraphicsDriver fl_gdi_driver;
static fltk3::DisplayDevice fl_gdi_display(&fl_gdi_driver);
-FLTK3_EXPORT fltk3::GraphicsDriver *fltk3::graphics_driver =
(fltk3::GraphicsDriver*)&fl_gdi_driver; // the current target driver of
graphics operations
-fltk3::SurfaceDevice* fltk3::SurfaceDevice::_surface =
(fltk3::SurfaceDevice*)&fl_gdi_display; // the current target surface of
graphics operations
-fltk3::DisplayDevice *fltk3::DisplayDevice::_display = &fl_gdi_display; // the
platform display
// dynamic wsock dll handling api:
#if defined(__CYGWIN__) && !defined(SOCKET)
Modified: branches/branch-3.0/src/fltk3/x11.cxx
===================================================================
--- branches/branch-3.0/src/fltk3/x11.cxx 2012-03-14 16:14:53 UTC (rev
9285)
+++ branches/branch-3.0/src/fltk3/x11.cxx 2012-03-16 15:54:38 UTC (rev
9286)
@@ -64,9 +64,6 @@
static fltk3::XlibGraphicsDriver fl_xlib_driver;
static fltk3::DisplayDevice fl_xlib_display(&fl_xlib_driver);
-FLTK3_EXPORT fltk3::GraphicsDriver *fltk3::graphics_driver =
(fltk3::GraphicsDriver*)&fl_xlib_driver; // the current target device of
graphics operations
-fltk3::SurfaceDevice* fltk3::SurfaceDevice::_surface =
(fltk3::SurfaceDevice*)&fl_xlib_display; // the current target surface of
graphics operations
-fltk3::DisplayDevice *fltk3::DisplayDevice::_display = &fl_xlib_display;// the
platform display
////////////////////////////////////////////////////////////////
// interface to poll/select call:
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit