diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2016-04-19 22:45:22 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2016-04-19 22:45:22 +0000 |
| commit | 769d151a121ac849a365a509d644c3328738970a (patch) | |
| tree | 65aab2b83a8ca4b678088b06e8771053c10943d7 /src/drivers | |
| parent | cd4498021e9623da828b3fb8344bc4db35675efe (diff) | |
Virtualized add_fd and remove_fd into System Driver
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11668 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers')
| -rw-r--r-- | src/drivers/Darwin/Fl_Darwin_System_Driver.H | 4 | ||||
| -rw-r--r-- | src/drivers/Pico/Fl_Pico_System_Driver.H | 37 | ||||
| -rw-r--r-- | src/drivers/Pico/Fl_Pico_System_Driver.cxx | 25 | ||||
| -rw-r--r-- | src/drivers/PicoSDL/Fl_PicoSDL_Screen_Driver.cxx | 10 | ||||
| -rw-r--r-- | src/drivers/WinAPI/Fl_WinAPI_System_Driver.H | 4 | ||||
| -rw-r--r-- | src/drivers/X11/Fl_X11_System_Driver.H | 4 |
6 files changed, 75 insertions, 9 deletions
diff --git a/src/drivers/Darwin/Fl_Darwin_System_Driver.H b/src/drivers/Darwin/Fl_Darwin_System_Driver.H index b7971453d..951ceba1c 100644 --- a/src/drivers/Darwin/Fl_Darwin_System_Driver.H +++ b/src/drivers/Darwin/Fl_Darwin_System_Driver.H @@ -72,6 +72,10 @@ public: virtual void copy(const char *stuff, int len, int clipboard, const char *type); virtual void paste(Fl_Widget &receiver, int clipboard, const char *type); virtual int clipboard_contains(const char *type); + virtual void add_fd(int fd, int when, Fl_FD_Handler cb, void* = 0); + virtual void add_fd(int fd, Fl_FD_Handler cb, void* = 0); + virtual void remove_fd(int, int when); + virtual void remove_fd(int); }; #endif // FL_DARWIN_SYSTEM_DRIVER_H diff --git a/src/drivers/Pico/Fl_Pico_System_Driver.H b/src/drivers/Pico/Fl_Pico_System_Driver.H index 8b1378917..aae71e0d0 100644 --- a/src/drivers/Pico/Fl_Pico_System_Driver.H +++ b/src/drivers/Pico/Fl_Pico_System_Driver.H @@ -1 +1,38 @@ +// +// "$Id: Fl_Pico_System_Driver.H 11017 2016-01-20 21:40:12Z matt $" +// +// Definition of Pico system driver +// for the Fast Light Tool Kit (FLTK). +// +// Copyright 2010-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 +// +#ifndef FL_PICO_SYSTEM_DRIVER_H +#define FL_PICO_SYSTEM_DRIVER_H + +#include <FL/Fl_System_Driver.H> + +class Fl_Pico_System_Driver : public Fl_System_Driver { +public: + Fl_Pico_System_Driver() : Fl_System_Driver() {} + virtual void add_fd(int fd, int when, Fl_FD_Handler cb, void* = 0); + virtual void add_fd(int fd, Fl_FD_Handler cb, void* = 0); + virtual void remove_fd(int, int when); + virtual void remove_fd(int); +}; + +#endif /* FL_PICO_SYSTEM_DRIVER_H */ + +// +// End of "$Id: Fl_Pico_System_Driver.H 11017 2016-01-20 21:40:12Z matt $". +// diff --git a/src/drivers/Pico/Fl_Pico_System_Driver.cxx b/src/drivers/Pico/Fl_Pico_System_Driver.cxx index 8b1378917..16f0a27e5 100644 --- a/src/drivers/Pico/Fl_Pico_System_Driver.cxx +++ b/src/drivers/Pico/Fl_Pico_System_Driver.cxx @@ -1 +1,26 @@ +// +// "$Id: Fl_Pico_System_Driver.cxx 11017 2016-01-20 21:40:12Z matt $" +// +// Definition of Pico system driver +// for the Fast Light Tool Kit (FLTK). +// +// Copyright 2010-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 "Fl_Pico_System_Driver.H" +#include "../../flstring.h" + + +// +// End of "$Id: Fl_Pico_System_Driver.H 11017 2016-01-20 21:40:12Z matt $". +// diff --git a/src/drivers/PicoSDL/Fl_PicoSDL_Screen_Driver.cxx b/src/drivers/PicoSDL/Fl_PicoSDL_Screen_Driver.cxx index ef42bacbe..0560d8e7c 100644 --- a/src/drivers/PicoSDL/Fl_PicoSDL_Screen_Driver.cxx +++ b/src/drivers/PicoSDL/Fl_PicoSDL_Screen_Driver.cxx @@ -63,7 +63,7 @@ double Fl_PicoSDL_Screen_Driver::wait(double time_to_wait) Fl_X *i = Fl_X::i(Fl::first_window()); wd->wait_for_expose_value = 0; if ( i->region ) { - XDestroyRegion(i->region); + fl_graphics_driver->XDestroyRegion(i->region); i->region = 0; } window->clear_damage(FL_DAMAGE_ALL); @@ -155,16 +155,8 @@ Fl_X* Fl_X::make(Fl_Window *w) return w->driver()->makeWindow(); } -char fl_show_iconic; Window fl_window; -void Fl::add_fd(int, Fl_FD_Handler, void*) -{ -} - -void Fl::remove_fd(int) -{ -} // // End of "$Id: Fl_PicoSDL_Screen_Driver.cxx 11253 2016-03-01 00:54:21Z matt $". diff --git a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H index ce6a9d5c0..c5b65bbbf 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H +++ b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H @@ -112,6 +112,10 @@ public: virtual int clipboard_contains(const char *type); // this one is implemented in Fl_win32.cxx virtual void clipboard_notify_change(); + virtual void add_fd(int fd, int when, Fl_FD_Handler cb, void* = 0); + virtual void add_fd(int fd, Fl_FD_Handler cb, void* = 0); + virtual void remove_fd(int, int when); + virtual void remove_fd(int); }; #endif // FL_WINAPI_SYSTEM_DRIVER_H diff --git a/src/drivers/X11/Fl_X11_System_Driver.H b/src/drivers/X11/Fl_X11_System_Driver.H index 085dc1790..d11732cab 100644 --- a/src/drivers/X11/Fl_X11_System_Driver.H +++ b/src/drivers/X11/Fl_X11_System_Driver.H @@ -55,6 +55,10 @@ public: virtual int clipboard_contains(const char *type); // this one is in Fl_x.cxx virtual void clipboard_notify_change(); + virtual void add_fd(int fd, int when, Fl_FD_Handler cb, void* = 0); + virtual void add_fd(int fd, Fl_FD_Handler cb, void* = 0); + virtual void remove_fd(int, int when); + virtual void remove_fd(int); }; #endif /* FL_X11_SYSTEM_DRIVER_H */ |
