From 769d151a121ac849a365a509d644c3328738970a Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Tue, 19 Apr 2016 22:45:22 +0000 Subject: 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 --- FL/Fl.H | 3 ++- FL/Fl_System_Driver.H | 6 +++++- FL/porting.H | 13 ------------- 3 files changed, 7 insertions(+), 15 deletions(-) (limited to 'FL') diff --git a/FL/Fl.H b/FL/Fl.H index 9c472a29b..b8f606d15 100644 --- a/FL/Fl.H +++ b/FL/Fl.H @@ -25,7 +25,7 @@ #include -#include // for FL_SOCKET +#include // for FL_SOCKET #ifdef FLTK_HAVE_CAIRO # include #endif @@ -50,6 +50,7 @@ class Fl_Window; class Fl_Image; struct Fl_Label; class Fl_Screen_Driver; +class Fl_System_Driver; // Pointers you can use to change FLTK to a foreign language. // Note: Similar pointers are defined in FL/fl_ask.H and src/fl_ask.cxx diff --git a/FL/Fl_System_Driver.H b/FL/Fl_System_Driver.H index 32796b386..4a6b4e2fc 100644 --- a/FL/Fl_System_Driver.H +++ b/FL/Fl_System_Driver.H @@ -24,8 +24,8 @@ #ifndef FL_SYSTEM_DRIVER_H #define FL_SYSTEM_DRIVER_H +#include #include -#include #include #include #include @@ -202,6 +202,10 @@ public: virtual int clipboard_contains(const char *type) {return 0;} // implement to support paste-from-clipboard 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_SYSTEM_DRIVER_H diff --git a/FL/porting.H b/FL/porting.H index 8bc02ad48..26504b77c 100644 --- a/FL/porting.H +++ b/FL/porting.H @@ -43,19 +43,6 @@ typedef void *Fl_Offscreen; struct XPoint { int x, y; }; struct XRectangle {int x, y, width, height;}; -//typedef float CGFloat; - -inline Fl_Region XRectangleRegion(int x, int y, int w, int h) { - // write code here - return 0L; -} - -inline void XDestroyRegion(Fl_Region r) { - // write code here -} - -extern void *fl_default_cursor; - inline void fl_open_callback(void (*)(const char *)) {} // This object contains all platform-specific stuff about a window: -- cgit v1.2.3