diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2016-02-09 12:33:49 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2016-02-09 12:33:49 +0000 |
| commit | dee0f5a82452da4334f269ceaee01f2d3df01bc0 (patch) | |
| tree | 623342a10087b340f301490b4bc7fc4cfc0bea8c /src/drivers | |
| parent | 99a6faa5131f95cedf978484000fcefec3e6dff4 (diff) | |
Strip Graphics Driver related ifdefs.
- removed more ifdef's from the graphics drivers
- moved functionality into the driver files themselves
- updated CMakeList.txt
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11137 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers')
| -rw-r--r-- | src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx | 42 | ||||
| -rw-r--r-- | src/drivers/Quartz/Fl_Quartz_Display_Device.cxx | 5 | ||||
| -rw-r--r-- | src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx | 15 | ||||
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx | 39 |
4 files changed, 92 insertions, 9 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx new file mode 100644 index 000000000..6e782b2b5 --- /dev/null +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx @@ -0,0 +1,42 @@ +// +// "$Id$" +// +// Rectangle drawing routines for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2016 by Bill Spitzak and others. +// +// This library is free software. Distribution and use rights are outlined in +// the file "COPYING" which should have been included with this file. If this +// file is missing or damaged, see the license at: +// +// http://www.fltk.org/COPYING.php +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + + +#include <config.h> +#include "../../config_lib.h" +#include "Fl_GDI_Graphics_Driver.h" + + +const char *Fl_GDI_Graphics_Driver::class_id = "Fl_GDI_Graphics_Driver"; + +// FIXME: move to printer graphics driver +const char *Fl_GDI_Printer_Graphics_Driver::class_id = "Fl_GDI_Printer_Graphics_Driver"; + +/* + * By linking this module, the following static method will instatiate the + * MSWindows GDI Graphics driver as the main display driver. + */ +Fl_Graphics_Driver *Fl_Graphics_Driver::newMainGraphicsDriver() +{ + return new Fl_GDI_Graphics_Driver(); +} + + +// +// End of "$Id$". +// diff --git a/src/drivers/Quartz/Fl_Quartz_Display_Device.cxx b/src/drivers/Quartz/Fl_Quartz_Display_Device.cxx index df0eaba5d..d397cd005 100644 --- a/src/drivers/Quartz/Fl_Quartz_Display_Device.cxx +++ b/src/drivers/Quartz/Fl_Quartz_Display_Device.cxx @@ -38,11 +38,6 @@ const char *Fl_Device::class_id = "Fl_Device"; const char *Fl_Surface_Device::class_id = "Fl_Surface_Device"; const char *Fl_Display_Device::class_id = "Fl_Display_Device"; const char *Fl_Graphics_Driver::class_id = "Fl_Graphics_Driver"; -#if defined(__APPLE__) || defined(FL_DOXYGEN) -# ifndef FL_DOXYGEN - bool Fl_Display_Device::high_res_window_ = false; -# endif -#endif #if defined(WIN32) || defined(FL_DOXYGEN) const char *Fl_GDI_Graphics_Driver::class_id = "Fl_GDI_Graphics_Driver"; const char *Fl_GDI_Printer_Graphics_Driver::class_id = "Fl_GDI_Printer_Graphics_Driver"; diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx index 3e0f8e319..f2d68eaa1 100644 --- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx +++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx @@ -18,13 +18,22 @@ #include "../../config_lib.h" -#ifdef FL_CFG_GFX_QUARTZ - #include "Fl_Quartz_Graphics_Driver.h" const char *Fl_Quartz_Graphics_Driver::class_id = "Fl_Quartz_Graphics_Driver"; + +/* + * By linking this module, the following static method will instatiate the + * OS X Quartz Graphics driver as the main display driver. + */ +Fl_Graphics_Driver *Fl_Graphics_Driver::newMainGraphicsDriver() +{ + return new Fl_Quartz_Graphics_Driver(); +} + + Fl_Offscreen Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha(int w, int h) { void *data = calloc(w*h,4); CGColorSpaceRef lut = CGColorSpaceCreateDeviceRGB(); @@ -34,8 +43,6 @@ Fl_Offscreen Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha(int w, int h } -#endif // FL_CFG_GFX_QUARTZ - // // End of "$Id$". // diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx new file mode 100644 index 000000000..0385413f1 --- /dev/null +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx @@ -0,0 +1,39 @@ +// +// "$Id$" +// +// Rectangle drawing routines for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2012 by Bill Spitzak and others. +// +// This library is free software. Distribution and use rights are outlined in +// the file "COPYING" which should have been included with this file. If this +// file is missing or damaged, see the license at: +// +// http://www.fltk.org/COPYING.php +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + + +#include <config.h> +#include "../../config_lib.h" +#include "Fl_Xlib_Graphics_Driver.h" + + +const char *Fl_Xlib_Graphics_Driver::class_id = "Fl_Xlib_Graphics_Driver"; + + +/* + * By linking this module, the following static method will instatiate the + * X11 Xlib Graphics driver as the main display driver. + */ +Fl_Graphics_Driver *Fl_Graphics_Driver::newMainGraphicsDriver() +{ + return new Fl_Xlib_Graphics_Driver(); +} + +// +// End of "$Id$". +// |
