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
This commit is contained in:
parent
3baf5e0d58
commit
4e6779bc49
4
CHANGES
4
CHANGES
@ -13,6 +13,10 @@ CHANGES IN FLTK 1.3.3
|
||||
- Fixed various Mac specific opengl issues (STR #2944)
|
||||
- Added new method Fl_Widget::top_window() (STR #2948)
|
||||
- Added new method Fl_Widget::top_window_offset() (part of STR #2944)
|
||||
- Added ability to get notifications whenever the clipboard changes (STR#2636)
|
||||
New methods:
|
||||
Fl::add_clipboard_notify(Fl_Clipboard_Notify_Handler h, void *data = 0)
|
||||
Fl::remove_clipboard_notify(Fl_Clipboard_Notify_Handler h)
|
||||
|
||||
CHANGES IN FLTK 1.3.2
|
||||
|
||||
|
14
FL/Fl.H
14
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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user