Struct gtk::SelectionData [−][src]
pub struct SelectionData(_);
Implementations
Retrieves the length of the raw data of the selection.
Returns
the length of the data of the selection.
Gets the contents of the selection data as a gdk_pixbuf::Pixbuf
.
Returns
if the selection data
contained a recognized image type and it could be converted to a
gdk_pixbuf::Pixbuf
, a newly allocated pixbuf is returned, otherwise
None
. If the result is non-None
it must be freed with
g_object_unref()
.
Gets the contents of self
as an array of targets.
This can be used to interpret the results of getting
the standard TARGETS target that is always supplied for
any selection.
Returns
true
if self
contains a valid
array of targets, otherwise false
.
targets
location to store an array of targets. The result stored
here must be freed with g_free()
.
Stores new data into a SelectionData
object. Should
only be called from a selection handler callback.
Zero-terminates the stored data.
type_
the type of selection data
format
format (number of bits in a unit)
data
pointer to the data (will be copied)
Sets the contents of the selection from a gdk_pixbuf::Pixbuf
The pixbuf is converted to the form determined by
self
->target.
pixbuf
Returns
true
if the selection was successfully set,
otherwise false
.
Given a SelectionData
object holding a list of targets,
determines if any of the targets in targets
can be used to
provide a gdk_pixbuf::Pixbuf
.
writable
whether to accept only targets for which GTK+ knows how to convert a pixbuf into the format
Returns
true
if self
holds a list of targets,
and a suitable target for images is included, otherwise false
.
Given a SelectionData
object holding a list of targets,
determines if any of the targets in targets
can be used to
provide rich text.
buffer
Returns
true
if self
holds a list of targets,
and a suitable target for rich text is included,
otherwise false
.
Given a SelectionData
object holding a list of targets,
determines if any of the targets in targets
can be used to
provide text.
Returns
true
if self
holds a list of targets,
and a suitable target for text is included, otherwise false
.
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.
Returns
true
if self
holds a list of targets,
and a suitable target for URI lists is included, otherwise false
.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Returns the type identifier of Self
.
Auto Trait Implementations
impl RefUnwindSafe for SelectionData
impl !Send for SelectionData
impl !Sync for SelectionData
impl Unpin for SelectionData
impl UnwindSafe for SelectionData
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<'a, T, C> FromValueOptional<'a> for T where
C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError>,
T: FromValue<'a, Checker = C>,