Method

GdkClipboardset_content

Declaration [src]

gboolean
gdk_clipboard_set_content (
  GdkClipboard* clipboard,
  GdkContentProvider* provider
)

Description [src]

Sets a new content provider on clipboard.

The clipboard will claim the GdkDisplays resources and advertise these new contents to other applications.

In the rare case of a failure, this function will return FALSE. The clipboard will then continue reporting its old contents and ignore provider.

If the contents are read by either an external application or the clipboards read functions, clipboard will select the best format to transfer the contents and then request that format from provider.

Parameters

provider

Type: GdkContentProvider

The new contents of clipboard or NULL to clear the clipboard.

The argument can be NULL.
The data is owned by the caller of the method.

Return value

Type: gboolean

TRUE if setting the clipboard succeeded.