| GIMP Application Reference Manual | ||||
|---|---|---|---|---|
void gimp_clipboard_init (Gimp *gimp); void gimp_clipboard_exit (Gimp *gimp); gboolean gimp_clipboard_has_buffer (Gimp *gimp); gboolean gimp_clipboard_has_svg (Gimp *gimp); GimpBuffer* gimp_clipboard_get_buffer (Gimp *gimp); gchar* gimp_clipboard_get_svg (Gimp *gimp, gsize *svg_length); void gimp_clipboard_set_buffer (Gimp *gimp, GimpBuffer *buffer); void gimp_clipboard_set_svg (Gimp *gimp, const gchar *svg); void gimp_clipboard_set_text (Gimp *gimp, const gchar *text);
gboolean gimp_clipboard_has_buffer (Gimp *gimp);
Tests if there's image data in the clipboard. If the global cut
buffer of gimp is empty, this function checks if there's image
data in GDK_SELECTION_CLIPBOARD. This is done in a main-loop
similar to gtk_clipboard_wait_is_text_available(). The same caveats
apply here.
gboolean gimp_clipboard_has_svg (Gimp *gimp);
Tests if there's SVG data in GDK_SELECTION_CLIPBOARD.
This is done in a main-loop similar to
gtk_clipboard_wait_is_text_available(). The same caveats apply here.
GimpBuffer* gimp_clipboard_get_buffer (Gimp *gimp);
Retrieves either image data from GDK_SELECTION_CLIPBOARD or from
the global cut buffer of gimp.
The returned GimpBuffer needs to be unref'ed when it's no longer needed.
|
pointer to Gimp |
Returns : |
a reference to a GimpBuffer or NULL if there's no
image data
|
gchar* gimp_clipboard_get_svg (Gimp *gimp, gsize *svg_length);
Retrieves SVG data from GDK_SELECTION_CLIPBOARD or from the global
SVG buffer of gimp.
The returned data needs to be freed when it's no longer needed.
|
pointer to Gimp |
|
returns the size of the SVG stream in bytes |
Returns : |
a reference to a GimpBuffer or NULL if there's no
image data
|
void gimp_clipboard_set_buffer (Gimp *gimp, GimpBuffer *buffer);
Offers the buffer in GDK_SELECTION_CLIPBOARD.
|
pointer to Gimp |
|
a GimpBuffer, or NULL.
|
void gimp_clipboard_set_svg (Gimp *gimp, const gchar *svg);
Offers SVG data in GDK_SELECTION_CLIPBOARD.
void gimp_clipboard_set_text (Gimp *gimp, const gchar *text);
Offers text in GDK_SELECTION_CLIPBOARD and GDK_SELECTION_PRIMARY.