Method

GtkClipboardwait_for_targets

since: 2.4

Declaration [src]

gboolean
gtk_clipboard_wait_for_targets (
  GtkClipboard* clipboard,
  GdkAtom** targets,
  gint* n_targets
)

Description [src]

Returns a list of targets that are present on the clipboard, or NULL if there aren’t any targets available. The returned list must be freed with g_free(). This function waits for the data to be received using the main loop, so events, timeouts, etc, may be dispatched during the wait.

Available since: 2.4

Parameters

targets

Type: An array of GdkAtom*

Location to store an array of targets. The result stored here must be freed with g_free().

The argument will be set by the function.
The length of the array is specified in the n_targets argument.
The caller of the method takes ownership of the returned data container, but not the data inside it.
n_targets

Type: gint*

Location to store number of items in targets.

The argument will be set by the function.

Return value

Type: gboolean

TRUE if any targets are present on the clipboard, otherwise FALSE.