diff options
| author | Pierre Ossman <ossman@cendio.se> | 2013-09-11 12:54:40 +0000 |
|---|---|---|
| committer | Pierre Ossman <ossman@cendio.se> | 2013-09-11 12:54:40 +0000 |
| commit | 1d6cc80d591568fb05dcd0373b53f108ef06326f (patch) | |
| tree | b146baa80a03e2ed826c478b232bc989c6ce0e64 /FL | |
| parent | f410352c7c2d90e62dc709af0a19a856b20620e9 (diff) | |
STR 2636. Add ability to get notifications whenever the
clipboard changes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9974 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl.H | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -109,6 +109,9 @@ typedef int (*Fl_Args_Handler)(int argc, char **argv, int &i); \see Fl::event_dispatch(Fl_Event_Dispatch) */ typedef int (*Fl_Event_Dispatch)(int event, Fl_Window *w); +/** Signature of add_clipboard_notify functions passed as parameters */ +typedef void (*Fl_Clipboard_Notify_Handler)(int source, void *data); + /** @} */ /* group callback_functions */ @@ -750,6 +753,19 @@ public: */ static void paste(Fl_Widget &receiver, int source /*=0*/); // platform dependent /** + FLTK will call the registered callback whenever there is a change to the + selection buffer or the clipboard. The source argument indicates which + of the two has changed. Only changes by other applications are reported. + \note Some systems require polling to monitor the clipboard and may + therefore have some delay in detecting changes. + */ + static void add_clipboard_notify(Fl_Clipboard_Notify_Handler h, void *data = 0); + /** + Stop calling the specified callback when there are changes to the selection + buffer or the clipboard. + */ + static void remove_clipboard_notify(Fl_Clipboard_Notify_Handler h); + /** Initiate a Drag And Drop operation. The selection buffer should be filled with relevant data before calling this method. FLTK will then initiate the system wide drag and drop handling. Dropped data |
