summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx2
-rw-r--r--src/drivers/Cocoa/Fl_Cocoa_Window_Driver.h8
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Display_Device.cxx80
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Display_Device.h35
4 files changed, 9 insertions, 116 deletions
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx
index e18d4aa82..c9be0375e 100644
--- a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx
+++ b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx
@@ -21,6 +21,8 @@
#include "Fl_Cocoa_Window_Driver.h"
+// Fl_Cocoa_Window_Driver
+
//
// End of "$Id$".
//
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.h b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.h
index a7af18625..67d4f3d5a 100644
--- a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.h
+++ b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.h
@@ -25,7 +25,7 @@
#ifndef FL_COCOA_WINDOW_DRIVER_H
#define FL_COCOA_WINDOW_DRIVER_H
-#include <FL/Fl_Graphics_Driver.H>
+#include <FL/x.H>
/*
Move everything here that manages the native window interface.
@@ -42,6 +42,12 @@
? where do we handle the interface between OpenGL/DirectX and Cocoa/WIN32/Glx?
*/
+class FL_EXPORT Fl_Cocoa_Window_Driver : public Fl_X
+{
+public:
+};
+
+
#endif // FL_COCOA_WINDOW_DRIVER_H
diff --git a/src/drivers/Quartz/Fl_Quartz_Display_Device.cxx b/src/drivers/Quartz/Fl_Quartz_Display_Device.cxx
index d397cd005..36a54dc57 100644
--- a/src/drivers/Quartz/Fl_Quartz_Display_Device.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Display_Device.cxx
@@ -19,102 +19,22 @@
// FIXME: implement this
#if 0
-#include <FL/Fl.H>
-#include <FL/Fl_Device.H>
-#include <FL/Fl_Image.H>
-
-#include "config_lib.h"
-#ifdef FL_CFG_GFX_QUARTZ
-#include "drivers/Quartz/Fl_Quartz_Graphics_Driver.h"
-#endif
-
-#if defined(WIN32) || defined(__APPLE__)
-#elif defined(FL_PORTING)
-# pragma message "FL_PORTING: instantiate and implement various device drivers here"
-#else
-#endif
-
-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(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";
-#endif
-#if !(defined(__APPLE__) || defined(WIN32))
-#if defined(FL_PORTING)
-# pragma message "FL_PORTING: instantiate the main graphics driver here"
-#else
-const char *Fl_Xlib_Graphics_Driver::class_id = "Fl_Xlib_Graphics_Driver";
-#endif
-#endif
-
-
-/** \brief Make this surface the current drawing surface.
- This surface will receive all future graphics requests. */
-void Fl_Surface_Device::set_current(void)
-{
- fl_graphics_driver = _driver;
- _surface = this;
-}
-
-FL_EXPORT Fl_Graphics_Driver *fl_graphics_driver; // the current target device of graphics operations
-Fl_Surface_Device* Fl_Surface_Device::_surface; // the current target surface of graphics operations
-
-const Fl_Graphics_Driver::matrix Fl_Graphics_Driver::m0 = {1, 0, 0, 1, 0, 0};
-
-Fl_Graphics_Driver::Fl_Graphics_Driver() {
- font_ = 0;
- size_ = 0;
- sptr=0; rstackptr=0;
- rstack[0] = NULL;
- fl_clip_state_number=0;
- m = m0;
- fl_matrix = &m;
- p = (XPOINT *)0;
- font_descriptor_ = NULL;
- p_size = 0;
-};
-
-void Fl_Graphics_Driver::text_extents(const char*t, int n, int& dx, int& dy, int& w, int& h)
-{
- w = (int)width(t, n);
- h = - height();
- dx = 0;
- dy = descent();
-}
/** A constructor that sets the graphics driver used by the display */
Fl_Display_Device::Fl_Display_Device(Fl_Graphics_Driver *graphics_driver) : Fl_Surface_Device(graphics_driver) {
this->set_current();
};
-
/** Returns the platform display device. */
Fl_Display_Device *Fl_Display_Device::display_device() {
static Fl_Display_Device *display = new Fl_Display_Device(new
-#if defined(__APPLE__)
- Fl_Quartz_Graphics_Driver
-#elif defined(WIN32)
- Fl_GDI_Graphics_Driver
-#elif defined(FL_PORTING)
-# pragma message "FL_PORTING: instantiate your display driver here"
Fl_XXX_Graphics_Driver
-#else
- Fl_Xlib_Graphics_Driver
-#endif
);
return display;
};
-Fl_Surface_Device *Fl_Surface_Device::default_surface()
-{
- return Fl_Display_Device::display_device();
-}
-
-
Fl_Display_Device *Fl_Display_Device::_display = Fl_Display_Device::display_device();
#endif
diff --git a/src/drivers/Quartz/Fl_Quartz_Display_Device.h b/src/drivers/Quartz/Fl_Quartz_Display_Device.h
index 221b80478..15724cc84 100644
--- a/src/drivers/Quartz/Fl_Quartz_Display_Device.h
+++ b/src/drivers/Quartz/Fl_Quartz_Display_Device.h
@@ -26,41 +26,6 @@
#define FL_QUARTZ_DISPLAY_DEVICE_H
// FIXME: implement this
-#if 0
-#include <FL/x.H>
-#include <FL/Fl_Plugin.H>
-#include <FL/Fl_Image.H>
-#include <FL/Fl_Bitmap.H>
-#include <FL/Fl_Pixmap.H>
-#include <FL/Fl_RGB_Image.H>
-#include <stdlib.h>
-
-/**
- A display to which the computer can draw.
- When the program begins running, an Fl_Display_Device instance has been created and made the current drawing surface.
- There is no need to create any other object of this class.
- */
-class FL_EXPORT Fl_Display_Device : public Fl_Surface_Device {
- friend class Fl_Quartz_Graphics_Driver;
- static Fl_Display_Device *_display; // the platform display device
-#ifdef __APPLE__
- friend class Fl_X;
- friend class Fl_Graphics_Driver;
- static bool high_res_window_; //< true when drawing to a window of a retina display (Mac OS X only)
- static bool high_resolution() {return high_res_window_;}
-#elif defined(WIN32)
-#elif defined(FL_PORTING)
-# pragma message "FL_PORTING: implement functions for extra high res drawing if your platform supports it"
-#else
-#endif
-public:
- static const char *class_id;
- const char *class_name() {return class_id;};
- Fl_Display_Device(Fl_Graphics_Driver *graphics_driver);
- static Fl_Display_Device *display_device();
-};
-
-#endif
#endif // FL_QUARTZ_DISPLAY_DEVICE_H