gi-gdk-3.0.20: Gdk bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.Gdk.Structs.Atom

Contents

Description

An opaque type representing a string as an index into a table of strings on the X server.

Synopsis

Exported types

newtype Atom Source #

Memory-managed wrapper type.

Constructors

Atom (ManagedPtr Atom) 
Instances
WrappedPtr Atom Source # 
Instance details

Defined in GI.Gdk.Structs.Atom

noAtom :: Maybe Atom Source #

A convenience alias for Nothing :: Maybe Atom.

Methods

intern

atomIntern Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

atomName: a string.

-> Bool

onlyIfExists: 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.

-> m Atom

Returns: the atom corresponding to atomName.

Finds or creates an atom corresponding to a given string.

internStaticString

atomInternStaticString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

atomName: a static string

-> m Atom

Returns: the atom corresponding to atomName

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

atomName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Atom

atom: a Atom.

-> m Text

Returns: a newly-allocated string containing the string corresponding to atom. When you are done with the return value, you should free it using free.

Determines the string corresponding to an atom.