Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
BuilderScope
is an interface to provide support to Builder
, primarily
for looking up programming-language-specific values for strings that are
given in a Builder
UI file.
The primary intended audience is bindings that want to provide deeper integration
of Builder
into the language.
A BuilderScope
instance may be used with multiple Builder
objects, even
at once.
By default, GTK will use its own implementation of BuilderScope
for the C
language which can be created via builderCScopeNew
.
BuilderCScope
instances use symbols explicitly added to builder
with prior calls to builderCScopeAddCallbackSymbol
. If developers want
to do that, they are encouraged to create their own scopes for that purpose.
In the case that symbols are not explicitly added; GTK will uses Module
’s
introspective features (by opening the module Nothing
) to look at the application’s
symbol table. From here it tries to match the signal function names given in the
interface description with symbols in the application.
Note that unless builderCScopeAddCallbackSymbol
is called for
all signal callbacks which are referenced by the loaded XML, this
functionality will require that Module
be supported on the platform.
Synopsis
- newtype BuilderScope = BuilderScope (ManagedPtr BuilderScope)
- class (GObject o, IsDescendantOf BuilderScope o) => IsBuilderScope o
- toBuilderScope :: (MonadIO m, IsBuilderScope o) => o -> m BuilderScope
Exported types
newtype BuilderScope Source #
Memory-managed wrapper type.
Instances
Eq BuilderScope Source # | |
Defined in GI.Gtk.Interfaces.BuilderScope (==) :: BuilderScope -> BuilderScope -> Bool # (/=) :: BuilderScope -> BuilderScope -> Bool # | |
IsGValue BuilderScope Source # | Convert |
Defined in GI.Gtk.Interfaces.BuilderScope toGValue :: BuilderScope -> IO GValue # fromGValue :: GValue -> IO BuilderScope # | |
ManagedPtrNewtype BuilderScope Source # | |
Defined in GI.Gtk.Interfaces.BuilderScope | |
TypedObject BuilderScope Source # | |
Defined in GI.Gtk.Interfaces.BuilderScope | |
GObject BuilderScope Source # | |
Defined in GI.Gtk.Interfaces.BuilderScope | |
HasParentTypes BuilderScope Source # | |
Defined in GI.Gtk.Interfaces.BuilderScope | |
type ParentTypes BuilderScope Source # | |
Defined in GI.Gtk.Interfaces.BuilderScope |
class (GObject o, IsDescendantOf BuilderScope o) => IsBuilderScope o Source #
Type class for types which can be safely cast to BuilderScope
, for instance with toBuilderScope
.
Instances
(GObject o, IsDescendantOf BuilderScope o) => IsBuilderScope o Source # | |
Defined in GI.Gtk.Interfaces.BuilderScope |
toBuilderScope :: (MonadIO m, IsBuilderScope o) => o -> m BuilderScope Source #
Cast to BuilderScope
, for types for which this is known to be safe. For general casts, use castTo
.