summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2016-04-19 22:45:22 +0000
committerMatthias Melcher <fltk@matthiasm.com>2016-04-19 22:45:22 +0000
commit769d151a121ac849a365a509d644c3328738970a (patch)
tree65aab2b83a8ca4b678088b06e8771053c10943d7 /FL
parentcd4498021e9623da828b3fb8344bc4db35675efe (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 'FL')
-rw-r--r--FL/Fl.H3
-rw-r--r--FL/Fl_System_Driver.H6
-rw-r--r--FL/porting.H13
3 files changed, 7 insertions, 15 deletions
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 <FL/Fl_Export.H>
-#include <FL/Fl_System_Driver.H> // for FL_SOCKET
+#include <FL/platform_types.h> // for FL_SOCKET
#ifdef FLTK_HAVE_CAIRO
# include <FL/Fl_Cairo.H>
#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 <FL/Fl.H>
#include <FL/Fl_Export.H>
-#include <FL/platform_types.h>
#include <FL/filename.H>
#include <FL/Fl_Preferences.H>
#include <stdio.h>
@@ -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: