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 FromGlibContainerAsVec<*mut _GdkAtom, *mut *mut _GdkAtom> for Atom
impl FromGlibContainerAsVec<*mut _GdkAtom, *mut *mut _GdkAtom> for Atom
unsafe fn from_glib_none_num_as_vec(ptr: *mut GdkAtom, num: usize) -> Vec<Self>
unsafe fn from_glib_container_num_as_vec(
ptr: *mut GdkAtom,
num: usize
) -> Vec<Self>
unsafe fn from_glib_full_num_as_vec(ptr: *mut GdkAtom, num: usize) -> Vec<Self>
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
sourceunsafe fn from_glib_borrow(ptr: GdkAtom) -> Borrowed<Atom>
unsafe fn from_glib_borrow(ptr: GdkAtom) -> Borrowed<Atom>
Safety Read more
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 GlibPtrDefault for Atom
impl GlibPtrDefault for Atom
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_none(&self) -> Stash<'a, GdkAtom, Atom>
fn to_glib_none(&self) -> Stash<'a, GdkAtom, Atom>
Transfer: none. Read more
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
sourceimpl<'a> ToGlibPtrMut<'a, *mut *mut _GdkAtom> for Atom
impl<'a> ToGlibPtrMut<'a, *mut *mut _GdkAtom> for Atom
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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