SelectionData
Object Hierarchy:
Description:
[ CCode ( copy_function = "g_boxed_copy" , free_function = "g_boxed_free" , type_id = "gtk_selection_data_get_type ()" ) ]
[ Compact ]
public class SelectionData
Content:
Methods:
- public void @set (Atom type, int format, uint8[] data)
Stores new data into a SelectionData
object.
- public SelectionData copy ()
Makes a copy of a SelectionData-struct and
its data.
- public void free ()
Frees a SelectionData-struct returned from
copy.
- public unowned uint8[] get_data ()
Retrieves the raw data of the selection.
- public Atom get_data_type ()
Retrieves the data type of the selection.
- public unowned uint8[] get_data_with_length ()
Retrieves the raw data of the selection along with its length.
- public unowned Display get_display ()
Retrieves the display of the selection.
- public int get_format ()
Retrieves the format of the selection.
- public int get_length ()
Retrieves the length of the raw data of the selection.
- public Pixbuf? get_pixbuf ()
Gets the contents of the selection data as a
Pixbuf.
- public Atom get_selection ()
Retrieves the selection Atom of the
selection data.
- public Atom get_target ()
Retrieves the target of the selection.
- public bool get_targets (out Atom[] targets)
Gets the contents of this as an
array of targets.
- public string? get_text ()
Gets the contents of the selection data as a UTF-8 string.
- public string[] get_uris ()
Gets the contents of the selection data as array of URIs.
- public bool set_pixbuf (Pixbuf pixbuf)
Sets the contents of the selection from a Pixbuf
The pixbuf is converted to the form determined by this->target.
- public bool set_text (string str, int len)
Sets the contents of the selection from a UTF-8 encoded string.
- public bool set_uris (string[] uris)
Sets the contents of the selection from a list of URIs.
- public bool targets_include_image (bool writable)
Given a SelectionData object holding a list
of targets, determines if any of the targets in targets
can be used to provide a Pixbuf.
- public bool targets_include_rich_text (TextBuffer buffer)
Given a SelectionData object holding a list
of targets, determines if any of the targets in targets
can be used to provide rich text.
- public bool targets_include_text ()
Given a SelectionData object holding a list
of targets, determines if any of the targets in targets
can be used to provide text.
- public bool targets_include_uri ()
Given a SelectionData object holding a list
of targets, determines if any of the targets in targets
can be used to provide a list or URIs.