Gets the contents of the selection data as a UTF-8 string.
Returns:
If the selection data contained a recognized text type and it could be converted to UTF-8, a string containing the converted text, otherwise an empty string.
const GtkSelectionData* Gtk::SelectionData::gobj
(
)
const [inline]
GtkSelectionData* Gtk::SelectionData::gobj
(
)
[inline]
GtkSelectionData* Gtk::SelectionData::gobj_copy
(
)
const
SelectionData& Gtk::SelectionData::operator=
(
const SelectionData&
other
)
void Gtk::SelectionData::set
(
const std::string&
type,
const std::string&
data
)
Assign a string of raw data.
Store new data into the Gtk::SelectionData object. Should _only_ by called from a selection handler callback.
Parameters:
type
The type of the selection.
data
A string that contains the data (does not have to be text).
void Gtk::SelectionData::set
(
const std::string&
type,
int
format,
const guint8*
data,
int
length
)
Assign a memory block of raw data.
Store new data into the Gtk::SelectionData object. Should _only_ by called from a selection handler callback. A 0-byte terminates the stored data.
Parameters:
type
The type of the selection.
format
The data format, i.e. the number of bits in a unit.