Class: Gsf::ClipData

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Constructor Details

#initialize(format, data_blob) ⇒ Gsf::ClipData

Creates a new Gsf::ClipData object. This function acquires a reference to the data_blob, so you should unref the blob on your own if you no longer need it directly.

Parameters:

  • format (Gsf::ClipFormat)

    Format for the data inside the data_blob

  • data_blob (Gsf::Blob)

    Object which holds the binary contents for the Gsf::ClipData

Instance Method Details

#data_blobGsf::Blob

Queries the data blob that actually stores a Gsf::ClipData's binary data. binary data. You must use g_object_unref() to dispose of that data blob when you are done with it.

Returns:

  • (Gsf::Blob)

    A new reference to the Gsf::Blob that stores this clip_data's

#formatGsf::ClipFormat

Queries the clipboard data format of a Gsf::ClipData. The format refers to the data blob inside the clip_data; use gsf_clip_data_get_data_blob() to get that data blob.

Returns:

  • (Gsf::ClipFormat)

    The format in which the Gsf::ClipData's data blob is stored.

#peek_real_data(ret_size) ⇒ GObject

Queries a pointer directly to the clipboard data of a Gsf::ClipData. The resulting pointer is not necessarily the same data pointer that was passed to gsf_blob_new() prior to creating the clip_data. For example, if the data is in #GSF_CLIP_FORMAT_WINDOWS_CLIPBOARD format, then it will have extra header bytes in front of the actual metafile data. This function will skip over those header bytes if necessary and return a pointer to the "real" data. buffer is returned in the ret_size argument.

Parameters:

  • ret_size (Integer)

    Location to return the size of the returned data buffer.

Returns:

  • (GObject)

    Pointer to the real clipboard data. The size in bytes of this

#windows_clipboard_formatGsf::ClipFormatWindows

Queries the Windows clipboard data format for a Gsf::ClipData. The clip_data must have been created with #GSF_CLIP_FORMAT_WINDOWS_CLIPBOARD. Possible errors: #GSF_ERROR_INVALID_DATA if the data blob in the clip_data is smaller than it should be; in this case GSF_CLIP_FORMAT_WINDOWS_ERROR will be returned.

Returns: