summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorGreg Ercolano <erco@seriss.com>2013-09-13 22:57:30 +0000
committerGreg Ercolano <erco@seriss.com>2013-09-13 22:57:30 +0000
commit4e6779bc49c2603a18b147d355524dccf6e01cb6 (patch)
treef2c9507572413013a988e39a7ea57bfdcb22db6c /FL
parent3baf5e0d584039df7c1296cb899b96ba457d411e (diff)
Added code example for ossman's new add_clipboard_notify(),
and updated CHANGES. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9976 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl.H14
1 files changed, 14 insertions, 0 deletions
diff --git a/FL/Fl.H b/FL/Fl.H
index 3ca7b7068..52270e94d 100644
--- a/FL/Fl.H
+++ b/FL/Fl.H
@@ -756,6 +756,20 @@ public:
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.
+
+ Example:
+ \code
+ void clip_callback(int source, void *data) {
+ if ( source == 0 ) printf("CLIP CALLBACK: selection buffer changed\n");
+ if ( source == 1 ) printf("CLIP CALLBACK: clipboard changed\n");
+ }
+ [..]
+ int main() {
+ [..]
+ Fl::add_clipboard_notify(clip_callback);
+ [..]
+ }
+ \endcode
\note Some systems require polling to monitor the clipboard and may
therefore have some delay in detecting changes.
*/