Gsf.ClipData¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
object |
r |
Class Details¶
- class Gsf.ClipData(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(format, data_blob)¶
- Parameters:
format (
Gsf.ClipFormat
) – Format for the data inside the data_blobdata_blob (
Gsf.Blob
) – Object which holds the binary contents for theGsf.ClipData
- Returns:
A newly-created
Gsf.ClipData
.- Return type:
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 useGObject.Object.unref
() to dispose of that data blob when you are done with it.- Return type:
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:
Queries the clipboard data format of a
Gsf.ClipData
. The format refers to the data blob inside the self; useGsf.ClipData.get_data_blob
() to get that data blob.
- get_windows_clipboard_format()¶
- Raises:
- 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 caseGsf.ClipFormatWindows.ERROR
will be returned.- Return type:
Queries the Windows clipboard data format for a
Gsf.ClipData
. The self must have been created withGsf.ClipFormat.WINDOWS_CLIPBOARD
.
- peek_real_data(ret_size)¶
- Parameters:
ret_size (
int
) – Location to return the size of the returned data buffer.- Raises:
- Returns:
Pointer to the real clipboard data. The size in bytes of this buffer is returned in the ret_size argument.
- Return type:
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 toGsf.Blob.new
() prior to creating the self. For example, if the data is inGsf.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.