pub struct Atom(_);
Expand description
An opaque type representing a string as an index into a table of strings on the X server.
Implementations
sourceimpl 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
sourceimpl FromGlibPtrArrayContainerAsVec<*mut _GdkAtom, *mut *mut _GdkAtom> for Atom
impl FromGlibPtrArrayContainerAsVec<*mut _GdkAtom, *mut *mut _GdkAtom> for Atom
unsafe fn from_glib_none_as_vec(ptr: *mut GdkAtom) -> Vec<Self>
unsafe fn from_glib_container_as_vec(ptr: *mut GdkAtom) -> Vec<Self>
unsafe fn from_glib_full_as_vec(ptr: *mut GdkAtom) -> Vec<Self>
sourceimpl FromGlibPtrBorrow<*mut _GdkAtom> for Atom
impl FromGlibPtrBorrow<*mut _GdkAtom> for Atom
sourceimpl FromGlibPtrFull<*mut _GdkAtom> for Atom
impl FromGlibPtrFull<*mut _GdkAtom> for Atom
sourceunsafe fn from_glib_full(_: GdkAtom) -> Atom
unsafe fn from_glib_full(_: GdkAtom) -> Atom
Safety Read more
sourceimpl FromGlibPtrNone<*mut _GdkAtom> for Atom
impl FromGlibPtrNone<*mut _GdkAtom> for Atom
sourceunsafe fn from_glib_none(ptr: GdkAtom) -> Atom
unsafe fn from_glib_none(ptr: GdkAtom) -> Atom
Safety Read more
sourceimpl<'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>, Global>, Option<Vec<*mut _GdkAtom, Global>>)
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
sourceimpl<'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>, Global>, Option<Vec<*mut _GdkAtom, Global>>)
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
sourceimpl<'a> ToGlibPtr<'a, *mut _GdkAtom> for Atom
impl<'a> ToGlibPtr<'a, *mut _GdkAtom> for Atom
type Storage = ()
sourcefn to_glib_container(&'a self) -> Stash<'a, P, Self>
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
Transfer: container. Read more
sourcefn to_glib_full(&self) -> P
fn to_glib_full(&self) -> P
Transfer: full. Read more
impl Copy for Atom
impl Eq for Atom
impl StructuralEq for Atom
impl StructuralPartialEq for Atom
Auto Trait Implementations
impl RefUnwindSafe for Atom
impl !Send for Atom
impl !Sync for Atom
impl Unpin for Atom
impl UnwindSafe for Atom
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more