Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
An opaque type representing a string as an index into a table of strings on the X server.
Synopsis
- newtype Atom = Atom (ManagedPtr Atom)
- noAtom :: Maybe Atom
- atomIntern :: (HasCallStack, MonadIO m) => Text -> Bool -> m Atom
- atomInternStaticString :: (HasCallStack, MonadIO m) => Text -> m Atom
- atomName :: (HasCallStack, MonadIO m) => Atom -> m Text
Exported types
Memory-managed wrapper type.
Instances
WrappedPtr Atom Source # | |
Defined in GI.Gdk.Structs.Atom wrappedPtrCalloc :: IO (Ptr Atom) # wrappedPtrCopy :: Atom -> IO Atom # |
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