diff options
| author | Manolo Gouy <Manolo> | 2016-04-15 15:01:27 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-04-15 15:01:27 +0000 |
| commit | 397a3b83bf431e8bd00bbfb3c34ba4813fc55152 (patch) | |
| tree | 85d8b85021bd302aec804baa537168c441f4a701 /src | |
| parent | b1f8f3e2aa377e5ef15f47a36f159b8f48cc5cef (diff) | |
Move platform-dependent implementations of fl_clipboard_notify_changes() to the Fl_System_Driver class
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11617 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl.cxx | 6 | ||||
| -rw-r--r-- | src/Fl_cocoa.mm | 4 | ||||
| -rw-r--r-- | src/Fl_win32.cxx | 2 | ||||
| -rw-r--r-- | src/Fl_x.cxx | 2 | ||||
| -rw-r--r-- | src/drivers/WinAPI/Fl_WinAPI_System_Driver.H | 2 | ||||
| -rw-r--r-- | src/drivers/X11/Fl_X11_System_Driver.H | 2 |
6 files changed, 8 insertions, 10 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index 9f0fadfe8..1527b5f72 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -447,8 +447,6 @@ struct Clipboard_Notify { static struct Clipboard_Notify *clip_notify_list = NULL; -extern void fl_clipboard_notify_change(); // in Fl_<platform>.cxx - void Fl::add_clipboard_notify(Fl_Clipboard_Notify_Handler h, void *data) { struct Clipboard_Notify *node; @@ -462,7 +460,7 @@ void Fl::add_clipboard_notify(Fl_Clipboard_Notify_Handler h, void *data) { clip_notify_list = node; - fl_clipboard_notify_change(); + Fl::system_driver()->clipboard_notify_change(); } void Fl::remove_clipboard_notify(Fl_Clipboard_Notify_Handler h) { @@ -475,7 +473,7 @@ void Fl::remove_clipboard_notify(Fl_Clipboard_Notify_Handler h) { *prev = node->next; delete node; - fl_clipboard_notify_change(); + Fl::system_driver()->clipboard_notify_change(); return; } diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 0dc20f6b2..da4e627b9 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -3352,10 +3352,6 @@ static int fl_selection_buffer_length[2]; extern void fl_trigger_clipboard_notify(int source); -void fl_clipboard_notify_change() { - // No need to do anything here... -} - static void clipboard_check(void) { static NSInteger oldcount = -1; diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 2be565f6b..f830442e2 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -892,7 +892,7 @@ void fl_clipboard_notify_retarget(HWND wnd) { fl_clipboard_notify_target(fl_xid(Fl::first_window())); } -void fl_clipboard_notify_change() { +void Fl_WinAPI_System_Driver::clipboard_notify_change() { // untarget clipboard monitor if no handlers are registered if (clipboard_wnd != NULL && fl_clipboard_notify_empty()) { fl_clipboard_notify_untarget(clipboard_wnd); diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index b6672b269..d4a1f4f12 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -1116,7 +1116,7 @@ static void handle_clipboard_timestamp(int clipboard, Time time) fl_trigger_clipboard_notify(clipboard); } -void fl_clipboard_notify_change() { +void Fl_X11_System_Driver::clipboard_notify_change() { // Reset the timestamps if we've going idle so that you don't // get a bogus immediate trigger next time they're activated. if (fl_clipboard_notify_empty()) { diff --git a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H index 0fe3d9b94..ce6a9d5c0 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H +++ b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H @@ -110,6 +110,8 @@ public: virtual void paste(Fl_Widget &receiver, int clipboard, const char *type); // this one is implemented in Fl_win32.cxx virtual int clipboard_contains(const char *type); + // this one is implemented in Fl_win32.cxx + virtual void clipboard_notify_change(); }; #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 920b1ad0a..085dc1790 100644 --- a/src/drivers/X11/Fl_X11_System_Driver.H +++ b/src/drivers/X11/Fl_X11_System_Driver.H @@ -53,6 +53,8 @@ public: virtual void paste(Fl_Widget &receiver, int clipboard, const char *type); // this one is in Fl_x.cxx virtual int clipboard_contains(const char *type); + // this one is in Fl_x.cxx + virtual void clipboard_notify_change(); }; #endif /* FL_X11_SYSTEM_DRIVER_H */ |
