Method

GtkClipboardwait_for_text

Declaration [src]

gchar*
gtk_clipboard_wait_for_text (
  GtkClipboard* clipboard
)

Description [src]

Requests the contents of the clipboard as text and converts the result to UTF-8 if necessary. This function waits for the data to be received using the main loop, so events, timeouts, etc, may be dispatched during the wait.

Return value

Type: gchar*

A newly-allocated UTF-8 string which must be freed with g_free(), or NULL if retrieving the selection data failed. (This could happen for various reasons, in particular if the clipboard was empty or if the contents of the clipboard could not be converted into text form.)

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The return value can be NULL.
The value is a NUL terminated UTF-8 string.