pub struct TargetList { /* private fields */ }Expand description
A TargetList-struct is a reference counted list
of GtkTargetPair and should be treated as
opaque.
GLib type: Shared boxed type with reference counted clone semantics.
Implementations§
Source§impl TargetList
impl TargetList
Sourcepub fn as_ptr(&self) -> *mut GtkTargetList
pub fn as_ptr(&self) -> *mut GtkTargetList
Return the inner pointer to the underlying C value.
Sourcepub unsafe fn from_glib_ptr_borrow(ptr: &*mut GtkTargetList) -> &Self
pub unsafe fn from_glib_ptr_borrow(ptr: &*mut GtkTargetList) -> &Self
Borrows the underlying C value.
Source§impl TargetList
impl TargetList
Sourcepub fn add(&self, target: &Atom, flags: u32, info: u32)
pub fn add(&self, target: &Atom, flags: u32, info: u32)
Appends another target to a TargetList.
§target
the interned atom representing the target
§flags
the flags for this target
§info
an ID that will be passed back to the application
Sourcepub fn add_image_targets(&self, info: u32, writable: bool)
pub fn add_image_targets(&self, info: u32, writable: bool)
Appends the image targets supported by SelectionData to
the target list. All targets are added with the same info.
§info
an ID that will be passed back to the application
§writable
whether to add only targets for which GTK+ knows how to convert a pixbuf into the format
Sourcepub fn add_rich_text_targets(
&self,
info: u32,
deserializable: bool,
buffer: &impl IsA<TextBuffer>,
)
pub fn add_rich_text_targets( &self, info: u32, deserializable: bool, buffer: &impl IsA<TextBuffer>, )
Appends the rich text targets registered with
gtk_text_buffer_register_serialize_format() or
gtk_text_buffer_register_deserialize_format() to the target list. All
targets are added with the same info.
§info
an ID that will be passed back to the application
§deserializable
if true, then deserializable rich text formats
will be added, serializable formats otherwise.
§buffer
a TextBuffer.
Sourcepub fn add_text_targets(&self, info: u32)
pub fn add_text_targets(&self, info: u32)
Appends the text targets supported by SelectionData to
the target list. All targets are added with the same info.
§info
an ID that will be passed back to the application
Sourcepub fn add_uri_targets(&self, info: u32)
pub fn add_uri_targets(&self, info: u32)
Appends the URI targets supported by SelectionData to
the target list. All targets are added with the same info.
Since 3.24.37, this includes the application/vnd.portal.files target when possible, to allow sending files between sandboxed apps via the FileTransfer portal.
§info
an ID that will be passed back to the application
Source§impl TargetList
impl TargetList
Sourcepub fn new(targets: &[TargetEntry]) -> Self
pub fn new(targets: &[TargetEntry]) -> Self
Creates a new TargetList from an array of TargetEntry.
§targets
Pointer to an array
of TargetEntry
§Returns
the new TargetList.
Trait Implementations§
Source§impl Clone for TargetList
impl Clone for TargetList
Source§impl Debug for TargetList
impl Debug for TargetList
impl Eq for TargetList
Source§impl From<TargetList> for Value
impl From<TargetList> for Value
Source§fn from(s: TargetList) -> Self
fn from(s: TargetList) -> Self
Source§impl HasParamSpec for TargetList
impl HasParamSpec for TargetList
type ParamSpec = ParamSpecBoxed
Source§type SetValue = TargetList
type SetValue = TargetList
type BuilderFn = fn(&str) -> ParamSpecBoxedBuilder<'_, TargetList>
fn param_spec_builder() -> Self::BuilderFn
Source§impl Hash for TargetList
impl Hash for TargetList
Source§impl Ord for TargetList
impl Ord for TargetList
Source§fn cmp(&self, other: &TargetList) -> Ordering
fn cmp(&self, other: &TargetList) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for TargetList
impl PartialEq for TargetList
Source§impl PartialOrd for TargetList
impl PartialOrd for TargetList
Source§impl StaticType for TargetList
impl StaticType for TargetList
Source§fn static_type() -> Type
fn static_type() -> Type
Self.