Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
An opaque type representing a string as an index into a table of strings on the X server.
- newtype Atom = Atom (ManagedPtr Atom)
- noAtom :: Maybe Atom
- atomIntern :: (HasCallStack, MonadIO m) => Text -> Bool -> m Atom
- atomInternStaticString :: (HasCallStack, MonadIO m) => Text -> m Atom
- data AtomNameMethodInfo
- atomName :: (HasCallStack, MonadIO m) => Atom -> m Text
Exported types
WrappedPtr Atom Source # | |
((~) * info (ResolveAtomMethod t Atom), MethodInfo * info Atom p) => IsLabel t (Atom -> p) Source # | |
((~) * info (ResolveAtomMethod t Atom), MethodInfo * info Atom p) => IsLabelProxy t (Atom -> p) Source # | |
HasAttributeList * Atom Source # | |
((~) * signature (m Text), MonadIO m) => MethodInfo * AtomNameMethodInfo Atom signature Source # | |
type AttributeList Atom Source # | |
Methods
intern
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Bool |
|
-> m Atom | Returns: the atom corresponding to |
Finds or creates an atom corresponding to a given string.
internStaticString
atomInternStaticString Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m Atom | Returns: the atom corresponding to |
Finds or creates an atom corresponding to a given string.
Note that this function is identical to atomIntern
except
that if a new Atom
is created the string itself is used rather
than a copy. This saves memory, but can only be used if the string
will always exist. It can be used with statically
allocated strings in the main program, but not with statically
allocated memory in dynamically loaded modules, if you expect to
ever unload the module again (e.g. do not use this function in
GTK+ theme engines).
Since: 2.10
name
data AtomNameMethodInfo Source #
((~) * signature (m Text), MonadIO m) => MethodInfo * AtomNameMethodInfo Atom signature Source # | |