request_rich_text


Description:

[ Version ( since = "2.10" ) ]
public void request_rich_text (TextBuffer buffer, ClipboardRichTextReceivedFunc callback)

Requests the contents of the clipboard as rich text.

When the rich text is later received, callback will be called.

The text parameter to callback will contain the resulting rich text if the request succeeded, or null if it failed. The length parameter will contain text’s length. This function can fail for various reasons, in particular if the clipboard was empty or if the contents of the clipboard could not be converted into rich text form.

Parameters:

this

a Clipboard

buffer

a TextBuffer

callback

a function to call when the text is received, or the retrieval fails. (It will always be called one way or the other.)

user_data

user data to pass to callback.