Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
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)
- 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
Eq Atom Source # | |
BoxedPtr Atom Source # | |
Defined in GI.Gdk.Structs.Atom boxedPtrCopy :: Atom -> IO Atom boxedPtrFree :: Atom -> IO () | |
ManagedPtrNewtype Atom Source # | |
Defined in GI.Gdk.Structs.Atom toManagedPtr :: Atom -> ManagedPtr Atom |
Methods
Click to display all available methods, including inherited ones
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