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 ClassesNested 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
ConstructorsConstructorDescriptionCreates a new `GtkBuilderCScope` object to use with future
`GtkBuilder` instances.BuilderCScope(PointerContainer pointer) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCallbackSymbol(Str callback_name, BuilderCScope.OnCallback callback_symbol) Adds the @callback_symbol to the scope of @builder under the
given @callback_name.voidaddCallbackSymbol(String callback_name, BuilderCScope.OnCallback callback_symbol) Adds the @callback_symbol to the scope of @builder under the
given @callback_name.voidaddCallbackSymbols(Str first_callback_name, BuilderCScope.OnCallback first_callback_symbol, Object... _elipse) A convenience function to add many callbacks.voidaddCallbackSymbols(String first_callback_name, BuilderCScope.OnCallback first_callback_symbol, Object... _elipse) A convenience function to add many callbacks.Implements interfaceBuilderScope.static ClassHandlerstatic intstatic longstatic TypeSystem.TypeSizestatic longstatic TypeSystem.TypeSizeMethods 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, weakUnrefMethods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacksMethods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNullMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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()
-