diff options
Diffstat (limited to 'src/drivers')
| -rw-r--r-- | src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.cxx | 11 | ||||
| -rw-r--r-- | src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H | 9 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.cxx b/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.cxx index 372ee38ec..af36b1fd1 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.cxx +++ b/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.cxx @@ -297,4 +297,15 @@ Fl_RGB_Image* Fl_Cocoa_Gl_Window_Driver::capture_gl_rectangle(int x, int y, int return img; } +class Fl_Gl_Cocoa_Plugin : public Fl_Cocoa_Plugin { +public: + Fl_Gl_Cocoa_Plugin() : Fl_Cocoa_Plugin(name()) { } + virtual const char *name() { return "gl.cocoa.fltk.org"; } + virtual void resize(Fl_Gl_Window *glw, int x, int y, int w, int h) { + glw->Fl_Gl_Window::resize(x, y, w, h); + } +}; + +static Fl_Gl_Cocoa_Plugin Gl_Cocoa_Plugin; + #endif // HAVE_GL diff --git a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H index 4bc7d3783..3003e3904 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H +++ b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H @@ -24,6 +24,7 @@ #define FL_COCOA_WINDOW_DRIVER_H #include "../../Fl_Window_Driver.H" +#include <FL/Fl_Plugin.H> #include <ApplicationServices/ApplicationServices.h> class Fl_Image; @@ -163,4 +164,12 @@ public: NSImage *icon_image; }; +class Fl_Cocoa_Plugin : public Fl_Plugin { +public: + Fl_Cocoa_Plugin(const char *pluginName) : Fl_Plugin(klass(), pluginName) { } + virtual const char *klass() { return "fltk:cocoa"; } + virtual const char *name() = 0; + virtual void resize(Fl_Gl_Window *glw, int x, int y, int w, int h) = 0; +}; + #endif // FL_COCOA_WINDOW_DRIVER_H |
