On Unix, a second clipboard<%> object, the-x-selection-clipboard, manages the content of the system-wide X11 selection. If the 'GRacket:selectionAsClipboard preference preference (see Preferences) is set to a non-zero true value, however, then the-clipboard is always the same as the-x-selection-clipboard, and the system-wide X11 clipboard is not used.
On Windows and Mac OS, the-x-selection-clipboard is always the same as the-clipboard.
Data can be entered into a clipboard in one of two ways: by setting the current clipboard string or byte string, or by installing a clipboard-client% object. When a client is installed, requests for clipboard data are directed to the client.
Generic data is always retrieved from the clipboard as a byte string. When retrieving clipboard data, a data type string specifies the format of the data string. The availability of different clipboard formats is determined by the current clipboard owner.
method
(send a-clipboard get-clipboard-bitmap time)
→ (or/c (is-a?/c bitmap%) #f) time : exact-integer?
See get-clipboard-data for information on eventspaces and the current clipboard client.
See Cut and Paste Time Stamps for a discussion of the time argument. If time is outside the platform-specific range of times, an exn:fail:contract exception is raised.
method
(send a-clipboard get-clipboard-data format time) → (or/c bytes? string? #f) format : string? time : exact-integer?
If the clipboard client is associated to an eventspace that is not the current one, the data is retrieved through a callback event in the client’s eventspace. If no result is available within one second, the request is abandoned and #f is returned.
See add-type in clipboard-client% for information on format.
See Cut and Paste Time Stamps for a discussion of the time argument. If time is outside the platform-specific range of times, an exn:fail:contract exception is raised.
method
(send a-clipboard get-clipboard-string time) → string?
time : exact-integer?
See get-clipboard-data for information on eventspaces and the current clipboard client.
See Cut and Paste Time Stamps for a discussion of the time argument. If time is outside the platform-specific range of times, an exn:fail:contract exception is raised.
method
(send a-clipboard same-clipboard-client? owner) → boolean?
owner : (is-a?/c clipboard-client%)
method
(send a-clipboard set-clipboard-bitmap new-bitmap time) → void? new-bitmap : (is-a?/c bitmap%) time : exact-integer?
See Cut and Paste Time Stamps for a discussion of the time argument. If time is outside the platform-specific range of times, an exn:fail:contract exception is raised.
method
(send a-clipboard set-clipboard-client new-owner time) → void? new-owner : (is-a?/c clipboard-client%) time : exact-integer?
See Cut and Paste Time Stamps for a discussion of the time argument. If time is outside the platform-specific range of times, an exn:fail:contract exception is raised.
method
(send a-clipboard set-clipboard-string new-text time) → void? new-text : string? time : exact-integer?