diff options
| author | Manolo Gouy <Manolo> | 2016-04-15 14:49:46 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-04-15 14:49:46 +0000 |
| commit | b1f8f3e2aa377e5ef15f47a36f159b8f48cc5cef (patch) | |
| tree | 98e955d94082c4d1278aa7264b774780882fbaa8 /src | |
| parent | d683841f9f1932f871862096619cff486272528e (diff) | |
Move platform-dependent implementations of Fl::clipboard_contains() to the Fl_System_Driver class
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11616 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl.cxx | 5 | ||||
| -rw-r--r-- | src/Fl_cocoa.mm | 2 | ||||
| -rw-r--r-- | src/Fl_win32.cxx | 2 | ||||
| -rw-r--r-- | src/Fl_x.cxx | 2 | ||||
| -rw-r--r-- | src/drivers/Darwin/Fl_Darwin_System_Driver.H | 1 | ||||
| -rw-r--r-- | src/drivers/WinAPI/Fl_WinAPI_System_Driver.H | 2 | ||||
| -rw-r--r-- | src/drivers/X11/Fl_X11_System_Driver.H | 2 |
7 files changed, 13 insertions, 3 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index 4fd93e474..9f0fadfe8 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1938,6 +1938,11 @@ void Fl::copy(const char *stuff, int len, int clipboard, const char *type) { Fl::system_driver()->copy(stuff, len, clipboard, type); } +int Fl::clipboard_contains(const char *type) +{ + return Fl::system_driver()->clipboard_contains(type); +} + // // End of "$Id$". // diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index edd7d8820..0dc20f6b2 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -3510,7 +3510,7 @@ void Fl_Darwin_System_Driver::paste(Fl_Widget &receiver, int clipboard, const ch receiver.handle(FL_PASTE); } -int Fl::clipboard_contains(const char *type) { +int Fl_Darwin_System_Driver::clipboard_contains(const char *type) { NSString *found = nil; if (strcmp(type, Fl::clipboard_plain_text) == 0) { found = [[NSPasteboard generalPasteboard] availableTypeFromArray:[NSArray arrayWithObjects:UTF8_pasteboard_type, @"public.utf16-plain-text", @"com.apple.traditional-mac-plain-text", nil]]; diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 32e7b83e4..2be565f6b 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -822,7 +822,7 @@ void Fl_WinAPI_System_Driver::paste(Fl_Widget &receiver, int clipboard, const ch } } -int Fl::clipboard_contains(const char *type) +int Fl_WinAPI_System_Driver::clipboard_contains(const char *type) { int retval = 0; if (!OpenClipboard(NULL)) return 0; diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 8adc37999..b6672b269 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -828,7 +828,7 @@ void Fl_X11_System_Driver::paste(Fl_Widget &receiver, int clipboard, const char fl_xid(Fl::first_window()), fl_event_time); } -int Fl::clipboard_contains(const char *type) +int Fl_X11_System_Driver::clipboard_contains(const char *type) { XEvent event; Atom actual; int format; unsigned long count, remaining, i = 0; diff --git a/src/drivers/Darwin/Fl_Darwin_System_Driver.H b/src/drivers/Darwin/Fl_Darwin_System_Driver.H index 43aef846f..b7971453d 100644 --- a/src/drivers/Darwin/Fl_Darwin_System_Driver.H +++ b/src/drivers/Darwin/Fl_Darwin_System_Driver.H @@ -71,6 +71,7 @@ public: virtual const char *filename_name(const char *buf); 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); }; #endif // FL_DARWIN_SYSTEM_DRIVER_H diff --git a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H index 2950efa14..0fe3d9b94 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H +++ b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H @@ -108,6 +108,8 @@ public: virtual void copy(const char *stuff, int len, int clipboard, const char *type); // this one is implemented in Fl_win32.cxx 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); }; #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 c0a790917..920b1ad0a 100644 --- a/src/drivers/X11/Fl_X11_System_Driver.H +++ b/src/drivers/X11/Fl_X11_System_Driver.H @@ -51,6 +51,8 @@ public: virtual void copy(const char *stuff, int len, int clipboard, const char *type); // this one is in Fl_x.cxx 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); }; #endif /* FL_X11_SYSTEM_DRIVER_H */ |
