gimpclipboard

gimpclipboard

Synopsis

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);
gboolean            gimp_clipboard_has_curve            (Gimp *gimp);
GimpBuffer *        gimp_clipboard_get_buffer           (Gimp *gimp);
gchar *             gimp_clipboard_get_svg              (Gimp *gimp,
                                                         gsize *svg_length);
GimpCurve *         gimp_clipboard_get_curve            (Gimp *gimp);
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);
void                gimp_clipboard_set_curve            (Gimp *gimp,
                                                         GimpCurve *curve);

Description

Details

gimp_clipboard_init ()

void                gimp_clipboard_init                 (Gimp *gimp);


gimp_clipboard_exit ()

void                gimp_clipboard_exit                 (Gimp *gimp);


gimp_clipboard_has_buffer ()

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.

gimp :

pointer to Gimp

Returns :

TRUE if there's image data in the clipboard, FALSE otherwise

gimp_clipboard_has_svg ()

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.

gimp :

pointer to Gimp

Returns :

TRUE if there's SVG data in the clipboard, FALSE otherwise

gimp_clipboard_has_curve ()

gboolean            gimp_clipboard_has_curve            (Gimp *gimp);

Tests if there's curve 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.

gimp :

pointer to Gimp

Returns :

TRUE if there's curve data in the clipboard, FALSE otherwise

gimp_clipboard_get_buffer ()

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.

gimp :

pointer to Gimp

Returns :

a reference to a GimpBuffer or NULL if there's no image data

gimp_clipboard_get_svg ()

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.

gimp :

pointer to Gimp

svg_length :

returns the size of the SVG stream in bytes

Returns :

a reference to a GimpBuffer or NULL if there's no image data

gimp_clipboard_get_curve ()

GimpCurve *         gimp_clipboard_get_curve            (Gimp *gimp);

Retrieves curve data from GDK_SELECTION_CLIPBOARD or from the global curve buffer of gimp.

The returned curve needs to be unref'ed when it's no longer needed.

gimp :

pointer to Gimp

Returns :

a reference to a GimpCurve or NULL if there's no curve data

gimp_clipboard_set_buffer ()

void                gimp_clipboard_set_buffer           (Gimp *gimp,
                                                         GimpBuffer *buffer);

Offers the buffer in GDK_SELECTION_CLIPBOARD.

gimp :

pointer to Gimp

buffer :

a GimpBuffer, or NULL.

gimp_clipboard_set_svg ()

void                gimp_clipboard_set_svg              (Gimp *gimp,
                                                         const gchar *svg);

Offers SVG data in GDK_SELECTION_CLIPBOARD.

gimp :

pointer to Gimp

svg :

a string containing the SVG data, or NULL

gimp_clipboard_set_text ()

void                gimp_clipboard_set_text             (Gimp *gimp,
                                                         const gchar *text);

Offers text in GDK_SELECTION_CLIPBOARD and GDK_SELECTION_PRIMARY.

gimp :

pointer to Gimp

text :

a NULL-terminated string in UTF-8 encoding

gimp_clipboard_set_curve ()

void                gimp_clipboard_set_curve            (Gimp *gimp,
                                                         GimpCurve *curve);

Offers curve data in GDK_SELECTION_CLIPBOARD.

gimp :

pointer to Gimp

curve :

a GimpCurve, or NULL