Package ch.bailu.gtk.gtk
Class BuilderCScope
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.gtk.BuilderCScope
- All Implemented Interfaces:
PointerInterface
A `GtkBuilderScope` implementation for the C language.
`GtkBuilderCScope` instances use symbols explicitly added to @builder
with prior calls to [method@Gtk.BuilderCScope.add_callback_symbol].
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
`GModule`’s introspective features (by opening the module %NULL) 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 [method@Gtk.BuilderCScope.add_callback_symbol] is
called for all signal callbacks which are referenced by the loaded XML,
this functionality will require that `GModule` be supported on the platform.
`GtkBuilderCScope` instances use symbols explicitly added to @builder
with prior calls to [method@Gtk.BuilderCScope.add_callback_symbol].
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
`GModule`’s introspective features (by opening the module %NULL) 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 [method@Gtk.BuilderCScope.add_callback_symbol] is
called for all signal callbacks which are referenced by the loaded XML,
this functionality will require that `GModule` be supported on the platform.
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Field Summary
Fields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Constructor Summary
ConstructorDescriptionCreates a new `GtkBuilderCScope` object to use with future
`GtkBuilder` instances.BuilderCScope
(PointerContainer pointer) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCallbackSymbol
(Str callback_name, BuilderCScope.OnCallback callback_symbol) Adds the @callback_symbol to the scope of @builder under the
given @callback_name.void
addCallbackSymbol
(String callback_name, BuilderCScope.OnCallback callback_symbol) Adds the @callback_symbol to the scope of @builder under the
given @callback_name.void
addCallbackSymbols
(Str first_callback_name, BuilderCScope.OnCallback first_callback_symbol, Object... _elipse) A convenience function to add many callbacks.void
addCallbackSymbols
(String first_callback_name, BuilderCScope.OnCallback first_callback_symbol, Object... _elipse) A convenience function to add many callbacks.Implements interfaceBuilderScope
.static ClassHandler
static int
static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
Methods inherited from class ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Constructor Details
-
BuilderCScope
-
BuilderCScope
public BuilderCScope()Creates a new `GtkBuilderCScope` object to use with future
`GtkBuilder` instances.
Calling this function is only necessary if you want to add
custom callbacks via [method@Gtk.BuilderCScope.add_callback_symbol].
-
-
Method Details
-
getClassHandler
-
addCallbackSymbol
Adds the @callback_symbol to the scope of @builder under the
given @callback_name.
Using this function overrides the behavior of
[method@Gtk.Builder.create_closure] for any callback symbols that
are added. Using this method allows for better encapsulation as it
does not require that callback symbols be declared in the global
namespace.- Parameters:
callback_name
- The name of the callback, as expected in the XMLcallback_symbol
- The callback pointer
-
addCallbackSymbol
Adds the @callback_symbol to the scope of @builder under the
given @callback_name.
Using this function overrides the behavior of
[method@Gtk.Builder.create_closure] for any callback symbols that
are added. Using this method allows for better encapsulation as it
does not require that callback symbols be declared in the global
namespace.- Parameters:
callback_name
- The name of the callback, as expected in the XMLcallback_symbol
- The callback pointer
-
addCallbackSymbols
public void addCallbackSymbols(@Nonnull Str first_callback_name, BuilderCScope.OnCallback first_callback_symbol, Object... _elipse) A convenience function to add many callbacks.
This is equivalent to calling [method@Gtk.BuilderCScope.add_callback_symbol]
for each symbol.- Parameters:
first_callback_name
- The name of the callback, as expected in the XMLfirst_callback_symbol
- The callback pointer_elipse
- A list of callback name and callback symbol pairs terminated with %NULL
-
addCallbackSymbols
public void addCallbackSymbols(String first_callback_name, BuilderCScope.OnCallback first_callback_symbol, Object... _elipse) A convenience function to add many callbacks.
This is equivalent to calling [method@Gtk.BuilderCScope.add_callback_symbol]
for each symbol.- Parameters:
first_callback_name
- The name of the callback, as expected in the XMLfirst_callback_symbol
- The callback pointer_elipse
- A list of callback name and callback symbol pairs terminated with %NULL
-
asBuilderScope
Implements interfaceBuilderScope
. Call this to get access to interface functions.- Returns:
BuilderScope
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-