Gsf.ClipData

g GObject.Object GObject.Object Gsf.ClipData Gsf.ClipData GObject.Object->Gsf.ClipData

Subclasses:None

Methods

Inherited:GObject.Object (37)
Structs:GObject.ObjectClass (5)
class new (format, data_blob)
  get_data_blob ()
  get_format ()
  get_windows_clipboard_format ()
  peek_real_data (ret_size)

Virtual Methods

Inherited:GObject.Object (7)

Properties

None

Signals

Inherited:GObject.Object (1)

Fields

Inherited:GObject.Object (1)
Name Type Access Description
object GObject.Object r  

Class Details

class Gsf.ClipData(**kwargs)
Bases:GObject.Object
Abstract:No
Structure:Gsf.ClipDataClass
classmethod new(format, data_blob)
Parameters:
Returns:

A newly-created Gsf.ClipData.

Return type:

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.

get_data_blob()
Returns:A new reference to the Gsf.Blob that stores this self’s binary data. You must use GObject.Object.unref() to dispose of that data blob when you are done with it.
Return type:Gsf.Blob

Queries the data blob that actually stores a Gsf.ClipData’s binary data.

get_format()
Returns:The format in which the Gsf.ClipData’s data blob is stored.
Return type:Gsf.ClipFormat

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

get_windows_clipboard_format()
Raises:GLib.Error
Returns:A Gsf.ClipFormatWindows value.

Possible errors: Gsf.Error.INVALID_DATA if the data blob in the self is smaller than it should be; in this case Gsf.ClipFormatWindows.ERROR will be returned.

Return type:Gsf.ClipFormatWindows

Queries the Windows clipboard data format for a Gsf.ClipData. The self must have been created with Gsf.ClipFormat.WINDOWS_CLIPBOARD.

peek_real_data(ret_size)
Parameters:ret_size (int) – Location to return the size of the returned data buffer.
Raises:GLib.Error
Returns:Pointer to the real clipboard data. The size in bytes of this buffer is returned in the ret_size argument.
Return type:object or None

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 self. For example, if the data is in Gsf.ClipFormat.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.