pub struct Atom(/* private fields */);Expand description
An opaque type representing a string as an index into a table of strings on the X server.
Implementations§
Source§impl Atom
impl Atom
Sourcepub fn intern(atom_name: &str) -> Atom
pub fn intern(atom_name: &str) -> Atom
Finds or creates an atom corresponding to a given string.
§atom_name
a string.
§only_if_exists
if true, GDK is allowed to not create a new atom, but
just return GDK_NONE if the requested atom doesn’t already
exists. Currently, the flag is ignored, since checking the
existance of an atom is as expensive as creating it.
§Returns
the atom corresponding to atom_name.
Sourcepub fn name(self) -> GString
pub fn name(self) -> GString
Determines the string corresponding to an atom.
§Returns
a newly-allocated string containing the string
corresponding to self. When you are done with the
return value, you should free it using g_free().
pub fn value(self) -> usize
Trait Implementations§
impl Copy for Atom
impl Eq for Atom
impl StructuralPartialEq for Atom
Source§impl<'a> ToGlibContainerFromSlice<'a, *const *mut _GdkAtom> for Atom
impl<'a> ToGlibContainerFromSlice<'a, *const *mut _GdkAtom> for Atom
type Storage = (Vec<Stash<'a, *mut _GdkAtom, Atom>>, Option<Vec<*mut _GdkAtom>>)
fn to_glib_none_from_slice(t: &'a [Atom]) -> (*const GdkAtom, Self::Storage)
fn to_glib_container_from_slice( t: &'a [Atom], ) -> (*const GdkAtom, Self::Storage)
fn to_glib_full_from_slice(_: &[Atom]) -> *const GdkAtom
Source§impl<'a> ToGlibContainerFromSlice<'a, *mut *mut _GdkAtom> for Atom
impl<'a> ToGlibContainerFromSlice<'a, *mut *mut _GdkAtom> for Atom
type Storage = (Vec<Stash<'a, *mut _GdkAtom, Atom>>, Option<Vec<*mut _GdkAtom>>)
fn to_glib_none_from_slice(t: &'a [Atom]) -> (*mut GdkAtom, Self::Storage)
fn to_glib_container_from_slice(t: &'a [Atom]) -> (*mut GdkAtom, Self::Storage)
fn to_glib_full_from_slice(_: &[Atom]) -> *mut GdkAtom
impl TransparentPtrType for Atom
Auto Trait Implementations§
impl !Send for Atom
impl !Sync for Atom
impl Freeze for Atom
impl RefUnwindSafe for Atom
impl Unpin for Atom
impl UnsafeUnpin for Atom
impl UnwindSafe for Atom
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more