Class GObjects
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Mask containing the bits ofGParamSpec
.flags which are reserved for GLib.static final int
GParamFlags
value alias forParamFlags.STATIC_NAME
|ParamFlags.STATIC_NICK
|ParamFlags.STATIC_BLURB
.static final int
Minimum shift count to be used for user defined flags, to be stored inGParamSpec
.flags.static final int
A mask for allGSignalFlags
bits.static final int
A mask for allGSignalMatchType
bits.static final long
A bit in the type number that's supposed to be left untouched.static final int
An integer constant that represents the number of identifiers reserved for types that are assigned at compile-time.static final int
Shift value used in converting numbers to type IDs.static final int
First fundamental type number to create a new fundamental type id with G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE.static final int
Last fundamental type number reserved for BSE.static final int
First fundamental type number to create a new fundamental type id with G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib.static final int
Last fundamental type number reserved for GLib.static final int
First available fundamental type number to create new fundamental type id with G_TYPE_MAKE_FUNDAMENTAL().static final int
The maximal number ofGTypeCValues
which can be collected for a singleGValue
.static final int
For string values, indicates that the string contained is canonical and will exist for the duration of the process.static final int
If passed to G_VALUE_COLLECT(), allocated data won't be copied but used verbatim. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MemorySegment
boxedCopy
(Type boxedType, MemorySegment srcBoxed) Provide a copy of a boxed structuresrcBoxed
which is of typeboxedType
.static void
boxedFree
(Type boxedType, MemorySegment boxed) Free the boxed structureboxed
which is of typeboxedType
.static Type
boxedTypeRegisterStatic
(String name, BoxedCopyFunc boxedCopy, BoxedFreeFunc boxedFree) This function creates a newG_TYPE_BOXED
derived type id for a new boxed type with namename
.static void
clearObject
(GObject[] objectPtr) Clears a reference to aGObject
.static void
clearSignalHandler
(MemorySegment handlerIdPtr, GObject instance) Disconnects a handler frominstance
so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.static void
enumCompleteTypeInfo
(Type gEnumType, TypeInfo info, EnumValue[] constValues) This function is meant to be called from thecomplete_type_info
function of aGTypePlugin
implementation, as in the following example:static EnumValue
enumGetValue
(EnumClass enumClass, int value) Returns theGEnumValue
for a value.static EnumValue
enumGetValueByName
(EnumClass enumClass, String name) Looks up aGEnumValue
by name.static EnumValue
enumGetValueByNick
(EnumClass enumClass, String nick) Looks up aGEnumValue
by nickname.static Type
enumRegisterStatic
(String name, EnumValue[] constStaticValues) Registers a new static enumeration type with the namename
.static String
enumToString
(Type gEnumType, int value) Pretty-printsvalue
in the form of the enum’s name.static void
flagsCompleteTypeInfo
(Type gFlagsType, TypeInfo info, FlagsValue[] constValues) This function is meant to be called from the complete_type_info() function of aGTypePlugin
implementation, see the example for g_enum_complete_type_info() above.static FlagsValue
flagsGetFirstValue
(FlagsClass flagsClass, int value) Returns the firstGFlagsValue
which is set invalue
.static FlagsValue
flagsGetValueByName
(FlagsClass flagsClass, String name) Looks up aGFlagsValue
by name.static FlagsValue
flagsGetValueByNick
(FlagsClass flagsClass, String nick) Looks up aGFlagsValue
by nickname.static Type
flagsRegisterStatic
(String name, FlagsValue[] constStaticValues) Registers a new static flags type with the namename
.static String
flagsToString
(Type flagsType, int value) Pretty-printsvalue
in the form of the flag names separated by|
and sorted.static Type
static void
static ParamSpec
paramSpecBoolean
(String name, @Nullable String nick, @Nullable String blurb, boolean defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecBoolean
instance specifying aG_TYPE_BOOLEAN
property.static ParamSpec
paramSpecBoolean
(String name, @Nullable String nick, @Nullable String blurb, boolean defaultValue, ParamFlags... flags) Creates a newGParamSpecBoolean
instance specifying aG_TYPE_BOOLEAN
property.static ParamSpec
paramSpecBoxed
(String name, @Nullable String nick, @Nullable String blurb, Type boxedType, Set<ParamFlags> flags) Creates a newGParamSpecBoxed
instance specifying aG_TYPE_BOXED
derived property.static ParamSpec
paramSpecBoxed
(String name, @Nullable String nick, @Nullable String blurb, Type boxedType, ParamFlags... flags) Creates a newGParamSpecBoxed
instance specifying aG_TYPE_BOXED
derived property.static ParamSpec
paramSpecChar
(String name, @Nullable String nick, @Nullable String blurb, byte minimum, byte maximum, byte defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecChar
instance specifying aG_TYPE_CHAR
property.static ParamSpec
paramSpecChar
(String name, @Nullable String nick, @Nullable String blurb, byte minimum, byte maximum, byte defaultValue, ParamFlags... flags) Creates a newGParamSpecChar
instance specifying aG_TYPE_CHAR
property.static ParamSpec
paramSpecDouble
(String name, @Nullable String nick, @Nullable String blurb, double minimum, double maximum, double defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecDouble
instance specifying aG_TYPE_DOUBLE
property.static ParamSpec
paramSpecDouble
(String name, @Nullable String nick, @Nullable String blurb, double minimum, double maximum, double defaultValue, ParamFlags... flags) Creates a newGParamSpecDouble
instance specifying aG_TYPE_DOUBLE
property.static ParamSpec
paramSpecEnum
(String name, @Nullable String nick, @Nullable String blurb, Type enumType, int defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecEnum
instance specifying aG_TYPE_ENUM
property.static ParamSpec
paramSpecEnum
(String name, @Nullable String nick, @Nullable String blurb, Type enumType, int defaultValue, ParamFlags... flags) Creates a newGParamSpecEnum
instance specifying aG_TYPE_ENUM
property.static ParamSpec
paramSpecFlags
(String name, @Nullable String nick, @Nullable String blurb, Type flagsType, int defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecFlags
instance specifying aG_TYPE_FLAGS
property.static ParamSpec
paramSpecFlags
(String name, @Nullable String nick, @Nullable String blurb, Type flagsType, int defaultValue, ParamFlags... flags) Creates a newGParamSpecFlags
instance specifying aG_TYPE_FLAGS
property.static ParamSpec
paramSpecFloat
(String name, @Nullable String nick, @Nullable String blurb, float minimum, float maximum, float defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecFloat
instance specifying aG_TYPE_FLOAT
property.static ParamSpec
paramSpecFloat
(String name, @Nullable String nick, @Nullable String blurb, float minimum, float maximum, float defaultValue, ParamFlags... flags) Creates a newGParamSpecFloat
instance specifying aG_TYPE_FLOAT
property.static ParamSpec
paramSpecGtype
(String name, @Nullable String nick, @Nullable String blurb, Type isAType, Set<ParamFlags> flags) Creates a newGParamSpecGType
instance specifying aG_TYPE_GTYPE
property.static ParamSpec
paramSpecGtype
(String name, @Nullable String nick, @Nullable String blurb, Type isAType, ParamFlags... flags) Creates a newGParamSpecGType
instance specifying aG_TYPE_GTYPE
property.static ParamSpec
paramSpecInt
(String name, @Nullable String nick, @Nullable String blurb, int minimum, int maximum, int defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecInt
instance specifying aG_TYPE_INT
property.static ParamSpec
paramSpecInt
(String name, @Nullable String nick, @Nullable String blurb, int minimum, int maximum, int defaultValue, ParamFlags... flags) Creates a newGParamSpecInt
instance specifying aG_TYPE_INT
property.static ParamSpec
paramSpecInt64
(String name, @Nullable String nick, @Nullable String blurb, long minimum, long maximum, long defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecInt64
instance specifying aG_TYPE_INT64
property.static ParamSpec
paramSpecInt64
(String name, @Nullable String nick, @Nullable String blurb, long minimum, long maximum, long defaultValue, ParamFlags... flags) Creates a newGParamSpecInt64
instance specifying aG_TYPE_INT64
property.static ParamSpec
paramSpecLong
(String name, @Nullable String nick, @Nullable String blurb, int minimum, int maximum, int defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecLong
instance specifying aG_TYPE_LONG
property.static ParamSpec
paramSpecLong
(String name, @Nullable String nick, @Nullable String blurb, int minimum, int maximum, int defaultValue, ParamFlags... flags) Creates a newGParamSpecLong
instance specifying aG_TYPE_LONG
property.static ParamSpec
paramSpecObject
(String name, @Nullable String nick, @Nullable String blurb, Type objectType, Set<ParamFlags> flags) Creates a newGParamSpecBoxed
instance specifying aG_TYPE_OBJECT
derived property.static ParamSpec
paramSpecObject
(String name, @Nullable String nick, @Nullable String blurb, Type objectType, ParamFlags... flags) Creates a newGParamSpecBoxed
instance specifying aG_TYPE_OBJECT
derived property.static ParamSpec
paramSpecOverride
(String name, ParamSpec overridden) Creates a new property of typeGParamSpecOverride
.static ParamSpec
paramSpecParam
(String name, @Nullable String nick, @Nullable String blurb, Type paramType, Set<ParamFlags> flags) Creates a newGParamSpecParam
instance specifying aG_TYPE_PARAM
property.static ParamSpec
paramSpecParam
(String name, @Nullable String nick, @Nullable String blurb, Type paramType, ParamFlags... flags) Creates a newGParamSpecParam
instance specifying aG_TYPE_PARAM
property.static ParamSpec
paramSpecPointer
(String name, @Nullable String nick, @Nullable String blurb, Set<ParamFlags> flags) Creates a newGParamSpecPointer
instance specifying a pointer property.static ParamSpec
paramSpecPointer
(String name, @Nullable String nick, @Nullable String blurb, ParamFlags... flags) Creates a newGParamSpecPointer
instance specifying a pointer property.static ParamSpec
paramSpecString
(String name, @Nullable String nick, @Nullable String blurb, @Nullable String defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecString
instance.static ParamSpec
paramSpecString
(String name, @Nullable String nick, @Nullable String blurb, @Nullable String defaultValue, ParamFlags... flags) Creates a newGParamSpecString
instance.static ParamSpec
paramSpecUchar
(String name, @Nullable String nick, @Nullable String blurb, byte minimum, byte maximum, byte defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecUChar
instance specifying aG_TYPE_UCHAR
property.static ParamSpec
paramSpecUchar
(String name, @Nullable String nick, @Nullable String blurb, byte minimum, byte maximum, byte defaultValue, ParamFlags... flags) Creates a newGParamSpecUChar
instance specifying aG_TYPE_UCHAR
property.static ParamSpec
paramSpecUint
(String name, @Nullable String nick, @Nullable String blurb, int minimum, int maximum, int defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecUInt
instance specifying aG_TYPE_UINT
property.static ParamSpec
paramSpecUint
(String name, @Nullable String nick, @Nullable String blurb, int minimum, int maximum, int defaultValue, ParamFlags... flags) Creates a newGParamSpecUInt
instance specifying aG_TYPE_UINT
property.static ParamSpec
paramSpecUint64
(String name, @Nullable String nick, @Nullable String blurb, long minimum, long maximum, long defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecUInt64
instance specifying aG_TYPE_UINT64
property.static ParamSpec
paramSpecUint64
(String name, @Nullable String nick, @Nullable String blurb, long minimum, long maximum, long defaultValue, ParamFlags... flags) Creates a newGParamSpecUInt64
instance specifying aG_TYPE_UINT64
property.static ParamSpec
paramSpecUlong
(String name, @Nullable String nick, @Nullable String blurb, int minimum, int maximum, int defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecULong
instance specifying aG_TYPE_ULONG
property.static ParamSpec
paramSpecUlong
(String name, @Nullable String nick, @Nullable String blurb, int minimum, int maximum, int defaultValue, ParamFlags... flags) Creates a newGParamSpecULong
instance specifying aG_TYPE_ULONG
property.static ParamSpec
paramSpecUnichar
(String name, @Nullable String nick, @Nullable String blurb, int defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecUnichar
instance specifying aG_TYPE_UINT
property.static ParamSpec
paramSpecUnichar
(String name, @Nullable String nick, @Nullable String blurb, int defaultValue, ParamFlags... flags) Creates a newGParamSpecUnichar
instance specifying aG_TYPE_UINT
property.static ParamSpec
paramSpecValueArray
(String name, @Nullable String nick, @Nullable String blurb, ParamSpec elementSpec, Set<ParamFlags> flags) Creates a newGParamSpecValueArray
instance specifying aG_TYPE_VALUE_ARRAY
property.static ParamSpec
paramSpecValueArray
(String name, @Nullable String nick, @Nullable String blurb, ParamSpec elementSpec, ParamFlags... flags) Creates a newGParamSpecValueArray
instance specifying aG_TYPE_VALUE_ARRAY
property.static ParamSpec
paramSpecVariant
(String name, @Nullable String nick, @Nullable String blurb, VariantType type, @Nullable Variant defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecVariant
instance specifying aGVariant
property.static ParamSpec
paramSpecVariant
(String name, @Nullable String nick, @Nullable String blurb, VariantType type, @Nullable Variant defaultValue, ParamFlags... flags) Creates a newGParamSpecVariant
instance specifying aGVariant
property.static Type
paramTypeRegisterStatic
(String name, ParamSpecTypeInfo pspecInfo) Registersname
as the name of a new static type derived fromG_TYPE_PARAM
.static boolean
paramValueConvert
(ParamSpec pspec, Value srcValue, Value destValue, boolean strictValidation) TransformssrcValue
intodestValue
if possible, and then validatesdestValue
, in order for it to conform topspec
.static boolean
paramValueDefaults
(ParamSpec pspec, Value value) Checks whethervalue
contains the default value as specified inpspec
.static boolean
paramValueIsValid
(ParamSpec pspec, Value value) Return whether the contents ofvalue
comply with the specifications set out bypspec
.static int
paramValuesCmp
(ParamSpec pspec, Value value1, Value value2) Comparesvalue1
withvalue2
according topspec
, and return -1, 0 or +1, ifvalue1
is found to be less than, equal to or greater thanvalue2
, respectively.static void
paramValueSetDefault
(ParamSpec pspec, Value value) Setsvalue
to its default value as specified inpspec
.static boolean
paramValueValidate
(ParamSpec pspec, Value value) Ensures that the contents ofvalue
comply with the specifications set out bypspec
.static Type
Creates a newG_TYPE_POINTER
derived type id for a new pointer type with namename
.static boolean
signalAccumulatorFirstWins
(SignalInvocationHint ihint, Value returnAccu, Value handlerReturn, @Nullable MemorySegment dummy) A predefinedGSignalAccumulator
for signals intended to be used as a hook for application code to provide a particular value.static boolean
signalAccumulatorTrueHandled
(SignalInvocationHint ihint, Value returnAccu, Value handlerReturn, @Nullable MemorySegment dummy) A predefinedGSignalAccumulator
for signals that return a boolean values.static int
signalAddEmissionHook
(int signalId, Quark detail, SignalEmissionHook hookFunc) Adds an emission hook for a signal, which will get called for any emission of that signal, independent of the instance.static void
signalChainFromOverridden
(Value[] instanceAndParams, Value returnValue) Calls the original class closure of a signal.static void
signalChainFromOverriddenHandler
(TypeInstance instance, Object... varargs) Calls the original class closure of a signal.static int
signalConnectClosure
(GObject instance, String detailedSignal, Closure closure, boolean after) Connects a closure to a signal for a particular object.static int
signalConnectClosureById
(GObject instance, int signalId, Quark detail, Closure closure, boolean after) Connects a closure to a signal for a particular object.static int
signalConnectData
(GObject instance, String detailedSignal, Callback cHandler, @Nullable ClosureNotify destroyData, Set<ConnectFlags> connectFlags) Connects aGCallback
function to a signal for a particular object.static int
signalConnectData
(GObject instance, String detailedSignal, Callback cHandler, @Nullable ClosureNotify destroyData, ConnectFlags... connectFlags) Connects aGCallback
function to a signal for a particular object.static int
signalConnectObject
(TypeInstance instance, String detailedSignal, Callback cHandler, @Nullable GObject gobject, Set<ConnectFlags> connectFlags) This is similar to g_signal_connect_data(), but uses a closure which ensures that thegobject
stays alive during the call tocHandler
by temporarily adding a reference count togobject
.static int
signalConnectObject
(TypeInstance instance, String detailedSignal, Callback cHandler, @Nullable GObject gobject, ConnectFlags... connectFlags) This is similar to g_signal_connect_data(), but uses a closure which ensures that thegobject
stays alive during the call tocHandler
by temporarily adding a reference count togobject
.static void
signalEmit
(GObject instance, int signalId, Quark detail, Object... varargs) Emits a signal.static void
signalEmitByName
(GObject instance, String detailedSignal, Object... varargs) Emits a signal.static void
signalEmitv
(Value[] instanceAndParams, int signalId, Quark detail, @Nullable Value returnValue) Emits a signal.static SignalInvocationHint
signalGetInvocationHint
(GObject instance) Returns the invocation hint of the innermost signal emission of instance.static void
signalHandlerBlock
(GObject instance, int handlerId) Blocks a handler of an instance so it will not be called during any signal emissions unless it is unblocked again.static void
signalHandlerDisconnect
(GObject instance, int handlerId) Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.static int
signalHandlerFind
(GObject instance, Set<SignalMatchType> mask, int signalId, Quark detail, @Nullable Closure closure, @Nullable MemorySegment func, @Nullable MemorySegment data) Finds the first signal handler that matches certain selection criteria.static int
signalHandlerFind
(GObject instance, SignalMatchType mask, int signalId, Quark detail, @Nullable Closure closure, @Nullable MemorySegment func, @Nullable MemorySegment data) Finds the first signal handler that matches certain selection criteria.static boolean
signalHandlerIsConnected
(GObject instance, int handlerId) Returns whetherhandlerId
is the ID of a handler connected toinstance
.static int
signalHandlersBlockMatched
(GObject instance, Set<SignalMatchType> mask, int signalId, Quark detail, @Nullable Closure closure, @Nullable MemorySegment func, @Nullable MemorySegment data) Blocks all handlers on an instance that match a certain selection criteria.static int
signalHandlersBlockMatched
(GObject instance, SignalMatchType mask, int signalId, Quark detail, @Nullable Closure closure, @Nullable MemorySegment func, @Nullable MemorySegment data) Blocks all handlers on an instance that match a certain selection criteria.static void
signalHandlersDestroy
(GObject instance) Destroy all signal handlers of a type instance.static int
signalHandlersDisconnectMatched
(GObject instance, Set<SignalMatchType> mask, int signalId, Quark detail, @Nullable Closure closure, @Nullable MemorySegment func, @Nullable MemorySegment data) Disconnects all handlers on an instance that match a certain selection criteria.static int
signalHandlersDisconnectMatched
(GObject instance, SignalMatchType mask, int signalId, Quark detail, @Nullable Closure closure, @Nullable MemorySegment func, @Nullable MemorySegment data) Disconnects all handlers on an instance that match a certain selection criteria.static int
signalHandlersUnblockMatched
(GObject instance, Set<SignalMatchType> mask, int signalId, Quark detail, @Nullable Closure closure, @Nullable MemorySegment func, @Nullable MemorySegment data) Unblocks all handlers on an instance that match a certain selection criteria.static int
signalHandlersUnblockMatched
(GObject instance, SignalMatchType mask, int signalId, Quark detail, @Nullable Closure closure, @Nullable MemorySegment func, @Nullable MemorySegment data) Unblocks all handlers on an instance that match a certain selection criteria.static void
signalHandlerUnblock
(GObject instance, int handlerId) Undoes the effect of a previous g_signal_handler_block() call.static boolean
signalHasHandlerPending
(GObject instance, int signalId, Quark detail, boolean mayBeBlocked) Returns whether there are any handlers connected toinstance
for the given signal id and detail.static boolean
signalIsValidName
(String name) Validate a signal name.static int[]
signalListIds
(Type itype) Lists the signals by id that a certain instance or interface type created.static int
signalLookup
(String name, Type itype) Given the name of the signal and the type of object it connects to, gets the signal's identifying integer.static String
signalName
(int signalId) Given the signal's identifier, finds its name.static int
signalNew
(String signalName, Type itype, Set<SignalFlags> signalFlags, int classOffset, @Nullable SignalAccumulator accumulator, @Nullable SignalCMarshaller cMarshaller, Type returnType, int nParams, Object... varargs) Creates a new signal.static int
signalNew
(String signalName, Type itype, SignalFlags signalFlags, int classOffset, @Nullable SignalAccumulator accumulator, @Nullable SignalCMarshaller cMarshaller, Type returnType, int nParams, Object... varargs) Creates a new signal.static int
signalNewClassHandler
(String signalName, Type itype, Set<SignalFlags> signalFlags, @Nullable Callback classHandler, @Nullable SignalAccumulator accumulator, @Nullable SignalCMarshaller cMarshaller, Type returnType, int nParams, Object... varargs) Creates a new signal.static int
signalNewClassHandler
(String signalName, Type itype, SignalFlags signalFlags, @Nullable Callback classHandler, @Nullable SignalAccumulator accumulator, @Nullable SignalCMarshaller cMarshaller, Type returnType, int nParams, Object... varargs) Creates a new signal.static int
signalNewv
(String signalName, Type itype, Set<SignalFlags> signalFlags, @Nullable Closure classClosure, @Nullable SignalAccumulator accumulator, @Nullable SignalCMarshaller cMarshaller, Type returnType, @Nullable Type[] paramTypes) Creates a new signal.static int
signalNewv
(String signalName, Type itype, SignalFlags signalFlags, @Nullable Closure classClosure, @Nullable SignalAccumulator accumulator, @Nullable SignalCMarshaller cMarshaller, Type returnType, @Nullable Type[] paramTypes) Creates a new signal.static void
signalOverrideClassClosure
(int signalId, Type instanceType, Closure classClosure) Overrides the class closure (i.e.static void
signalOverrideClassHandler
(String signalName, Type instanceType, Callback classHandler) Overrides the class closure (i.e.static boolean
signalParseName
(String detailedSignal, Type itype, Out<Integer> signalIdP, Quark detailP, boolean forceDetailQuark) Internal function to parse a signal name into itssignalId
anddetail
quark.static void
signalQuery
(int signalId, SignalQuery query) Queries the signal system for in-depth information about a specific signal.static void
signalRemoveEmissionHook
(int signalId, int hookId) Deletes an emission hook.static void
signalStopEmission
(GObject instance, int signalId, Quark detail) Stops a signal's current emission.static void
signalStopEmissionByName
(GObject instance, String detailedSignal) Stops a signal's current emission.static Closure
signalTypeCclosureNew
(Type itype, int structOffset) Creates a new closure which invokes the function found at the offsetstructOffset
in the class structure of the interface or classed type identified byitype
.static String
strdupValueContents
(Value value) Return a newly allocated string, which describes the contents of aGValue
.static void
typeAddClassCacheFunc
(@Nullable MemorySegment cacheData, TypeClassCacheFunc cacheFunc) Adds aGTypeClassCacheFunc
to be called before the reference count of a class goes from one to zero.static void
typeAddClassPrivate
(Type classType, long privateSize) Registers a private class structure for a classed type; when the class is allocated, the private structures for the class and all of its parent types are allocated sequentially in the same memory block as the public structures, and are zero-filled.static int
typeAddInstancePrivate
(Type classType, long privateSize) static void
typeAddInterfaceCheck
(@Nullable MemorySegment checkData, TypeInterfaceCheckFunc checkFunc) Adds a function to be called after an interface vtable is initialized for any class (i.e.static void
typeAddInterfaceDynamic
(Type instanceType, Type interfaceType, TypePlugin plugin) AddsinterfaceType
to the dynamicinstanceType
.static void
typeAddInterfaceStatic
(Type instanceType, Type interfaceType, InterfaceInfo info) AddsinterfaceType
to the staticinstanceType
.static TypeClass
typeCheckClassCast
(TypeClass gClass, Type isAType) static boolean
typeCheckClassIsA
(TypeClass gClass, Type isAType) static boolean
typeCheckInstance
(TypeInstance instance) Private helper function to aid implementation of the G_TYPE_CHECK_INSTANCE() macro.static TypeInstance
typeCheckInstanceCast
(TypeInstance instance, Type ifaceType) static boolean
typeCheckInstanceIsA
(TypeInstance instance, Type ifaceType) static boolean
typeCheckInstanceIsFundamentallyA
(TypeInstance instance, Type fundamentalType) static boolean
typeCheckIsValueType
(Type type) static boolean
typeCheckValue
(Value value) static boolean
typeCheckValueHolds
(Value value, Type type) static Type[]
typeChildren
(Type type) Return a newly allocated and 0-terminated array of type IDs, listing the child types oftype
.static TypeInstance
typeCreateInstance
(Type type) Creates and initializes an instance oftype
iftype
is valid and can be instantiated.static TypeInterface
typeDefaultInterfacePeek
(Type gType) If the interface typegType
is currently in use, returns its default interface vtable.static TypeInterface
typeDefaultInterfaceRef
(Type gType) Increments the reference count for the interface typegType
, and returns the default interface vtable for the type.static void
Decrements the reference count for the type corresponding to the interface default vtablegIface
.static int
Returns the length of the ancestry of the passed in type.static void
typeEnsure
(Type type) Ensures that the indicatedtype
has been registered with the type system, and its _class_init() method has been run.static void
typeFreeInstance
(TypeInstance instance) Frees an instance of a type, returning it to the instance pool for the type, if there is one.static Type
typeFromName
(String name) Look up the type ID from a given type name, returning 0 if no type has been registered under this name (this is the preferred method to find out by name whether a specific type has been registered yet).static Type
typeFundamental
(Type typeId) Internal function, used to extract the fundamental type ID portion.static Type
Returns the next free fundamental type id which can be used to register a new fundamental type with g_type_register_fundamental().static int
typeGetInstanceCount
(Type type) Returns the number of instances allocated of the particular type; this is only available if GLib is built with debugging support and theinstance-count
debug flag is set (by setting theGOBJECT_DEBUG
variable to includeinstance-count
).static TypePlugin
typeGetPlugin
(Type type) Returns theGTypePlugin
structure fortype
.static MemorySegment
typeGetQdata
(Type type, Quark quark) Obtains data which has previously been attached totype
with g_type_set_qdata().static int
Returns an opaque serial number that represents the state of the set of registered types.static void
typeInit()
Deprecated.the type system is now initialised automaticallystatic void
typeInitWithDebugFlags
(Set<TypeDebugFlags> debugFlags) Deprecated.the type system is now initialised automaticallystatic void
typeInitWithDebugFlags
(TypeDebugFlags... debugFlags) Deprecated.the type system is now initialised automaticallystatic Type[]
typeInterfaces
(Type type) Return a newly allocated and 0-terminated array of type IDs, listing the interface types thattype
conforms to.static boolean
IfisAType
is a derivable type, check whethertype
is a descendant ofisAType
.static String
Get the unique name that is assigned to a type ID.static String
typeNameFromClass
(TypeClass gClass) static String
typeNameFromInstance
(TypeInstance instance) static Type
typeNextBase
(Type leafType, Type rootType) Given aleafType
and arootType
which is contained in its ancestry, return the type thatrootType
is the immediate parent of.static Type
typeParent
(Type type) Return the direct parent type of the passed in type.static Quark
Get the corresponding quark of the type IDs name.static void
Queries the type system for information about a specific type.static Type
typeRegisterDynamic
(Type parentType, String typeName, TypePlugin plugin, Set<TypeFlags> flags) RegisterstypeName
as the name of a new dynamic type derived fromparentType
.static Type
typeRegisterDynamic
(Type parentType, String typeName, TypePlugin plugin, TypeFlags... flags) RegisterstypeName
as the name of a new dynamic type derived fromparentType
.static Type
typeRegisterFundamental
(Type typeId, String typeName, TypeInfo info, TypeFundamentalInfo finfo, Set<TypeFlags> flags) RegisterstypeId
as the predefined identifier andtypeName
as the name of a fundamental type.static Type
typeRegisterFundamental
(Type typeId, String typeName, TypeInfo info, TypeFundamentalInfo finfo, TypeFlags... flags) RegisterstypeId
as the predefined identifier andtypeName
as the name of a fundamental type.static Type
RegisterstypeName
as the name of a new static type derived fromparentType
.static Type
typeRegisterStatic
(Type parentType, String typeName, TypeInfo info, TypeFlags... flags) RegisterstypeName
as the name of a new static type derived fromparentType
.static Type
typeRegisterStaticSimple
(Type parentType, String typeName, int classSize, ClassInitFunc classInit, int instanceSize, InstanceInitFunc instanceInit, Set<TypeFlags> flags) RegisterstypeName
as the name of a new static type derived fromparentType
.static Type
typeRegisterStaticSimple
(Type parentType, String typeName, int classSize, ClassInitFunc classInit, int instanceSize, InstanceInitFunc instanceInit, TypeFlags... flags) RegisterstypeName
as the name of a new static type derived fromparentType
.static void
typeRemoveClassCacheFunc
(@Nullable MemorySegment cacheData, TypeClassCacheFunc cacheFunc) Removes a previously installedGTypeClassCacheFunc
.static void
typeRemoveInterfaceCheck
(@Nullable MemorySegment checkData, TypeInterfaceCheckFunc checkFunc) Removes an interface check function added with g_type_add_interface_check().static void
typeSetQdata
(Type type, Quark quark, @Nullable MemorySegment data) Attaches arbitrary data to a type.static boolean
typeTestFlags
(Type type, int flags) static Type
-
Field Details
-
PARAM_MASK
public static final int PARAM_MASKMask containing the bits ofGParamSpec
.flags which are reserved for GLib.- See Also:
-
PARAM_STATIC_STRINGS
public static final int PARAM_STATIC_STRINGSGParamFlags
value alias forParamFlags.STATIC_NAME
|ParamFlags.STATIC_NICK
|ParamFlags.STATIC_BLURB
.It is recommended to use this for all properties by default, as it allows for internal performance improvements in GObject.
It is very rare that a property would have a dynamically constructed name, nickname or blurb.
Since 2.13.0
- See Also:
-
PARAM_USER_SHIFT
public static final int PARAM_USER_SHIFTMinimum shift count to be used for user defined flags, to be stored inGParamSpec
.flags. The maximum allowed is 10.- See Also:
-
SIGNAL_FLAGS_MASK
public static final int SIGNAL_FLAGS_MASKA mask for allGSignalFlags
bits.- See Also:
-
SIGNAL_MATCH_MASK
public static final int SIGNAL_MATCH_MASKA mask for allGSignalMatchType
bits.- See Also:
-
TYPE_FLAG_RESERVED_ID_BIT
public static final long TYPE_FLAG_RESERVED_ID_BITA bit in the type number that's supposed to be left untouched.- See Also:
-
TYPE_FUNDAMENTAL_MAX
public static final int TYPE_FUNDAMENTAL_MAXAn integer constant that represents the number of identifiers reserved for types that are assigned at compile-time.- See Also:
-
TYPE_FUNDAMENTAL_SHIFT
public static final int TYPE_FUNDAMENTAL_SHIFTShift value used in converting numbers to type IDs.- See Also:
-
TYPE_RESERVED_BSE_FIRST
public static final int TYPE_RESERVED_BSE_FIRSTFirst fundamental type number to create a new fundamental type id with G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE.- See Also:
-
TYPE_RESERVED_BSE_LAST
public static final int TYPE_RESERVED_BSE_LASTLast fundamental type number reserved for BSE.- See Also:
-
TYPE_RESERVED_GLIB_FIRST
public static final int TYPE_RESERVED_GLIB_FIRSTFirst fundamental type number to create a new fundamental type id with G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib.- See Also:
-
TYPE_RESERVED_GLIB_LAST
public static final int TYPE_RESERVED_GLIB_LASTLast fundamental type number reserved for GLib.- See Also:
-
TYPE_RESERVED_USER_FIRST
public static final int TYPE_RESERVED_USER_FIRSTFirst available fundamental type number to create new fundamental type id with G_TYPE_MAKE_FUNDAMENTAL().- See Also:
-
VALUE_COLLECT_FORMAT_MAX_LENGTH
public static final int VALUE_COLLECT_FORMAT_MAX_LENGTHThe maximal number ofGTypeCValues
which can be collected for a singleGValue
.- See Also:
-
VALUE_INTERNED_STRING
public static final int VALUE_INTERNED_STRINGFor string values, indicates that the string contained is canonical and will exist for the duration of the process. See g_value_set_interned_string().- See Also:
-
VALUE_NOCOPY_CONTENTS
public static final int VALUE_NOCOPY_CONTENTSIf passed to G_VALUE_COLLECT(), allocated data won't be copied but used verbatim. This does not affect ref-counted types like objects. This does not affect usage of g_value_copy(), the data will be copied if it is not ref-counted.- See Also:
-
-
Constructor Details
-
GObjects
public GObjects()
-
-
Method Details
-
javagi$ensureInitialized
public static void javagi$ensureInitialized() -
boxedCopy
Provide a copy of a boxed structuresrcBoxed
which is of typeboxedType
.- Parameters:
boxedType
- The type ofsrcBoxed
.srcBoxed
- The boxed structure to be copied.- Returns:
- The newly created copy of the boxed structure.
-
boxedFree
Free the boxed structureboxed
which is of typeboxedType
.- Parameters:
boxedType
- The type ofboxed
.boxed
- The boxed structure to be freed.
-
boxedTypeRegisterStatic
public static Type boxedTypeRegisterStatic(String name, BoxedCopyFunc boxedCopy, BoxedFreeFunc boxedFree) This function creates a newG_TYPE_BOXED
derived type id for a new boxed type with namename
.Boxed type handling functions have to be provided to copy and free opaque boxed structures of this type.
For the general case, it is recommended to use G_DEFINE_BOXED_TYPE() instead of calling g_boxed_type_register_static() directly. The macro will create the appropriate
*_get_type()
function for the boxed type.- Parameters:
name
- Name of the new boxed type.boxedCopy
- Boxed structure copy function.boxedFree
- Boxed structure free function.- Returns:
- New
G_TYPE_BOXED
derived type id forname
.
-
clearObject
Clears a reference to aGObject
.objectPtr
must not benull
.If the reference is
null
then this function does nothing. Otherwise, the reference count of the object is decreased and the pointer is set tonull
.A macro is also included that allows this function to be used without pointer casts.
- Parameters:
objectPtr
- a pointer to aGObject
reference
-
clearSignalHandler
Disconnects a handler frominstance
so it will not be called during any future or currently ongoing emissions of the signal it has been connected to. ThehandlerIdPtr
is then set to zero, which is never a valid handler ID value (see g_signal_connect()).If the handler ID is 0 then this function does nothing.
There is also a macro version of this function so that the code will be inlined.
- Parameters:
handlerIdPtr
- A pointer to a handler ID (of typegulong
) of the handler to be disconnected.instance
- The instance to remove the signal handler from. This pointer may benull
or invalid, if the handler ID is zero.
-
enumCompleteTypeInfo
This function is meant to be called from thecomplete_type_info
function of aGTypePlugin
implementation, as in the following example:static void my_enum_complete_type_info (GTypePlugin *plugin, GType g_type, GTypeInfo *info, GTypeValueTable *value_table) { static const GEnumValue values[] = { { MY_ENUM_FOO, "MY_ENUM_FOO", "foo" }, { MY_ENUM_BAR, "MY_ENUM_BAR", "bar" }, { 0, NULL, NULL } }; g_enum_complete_type_info (type, info, values); }
- Parameters:
gEnumType
- the type identifier of the type being completedinfo
- theGTypeInfo
struct to be filled inconstValues
- An array ofGEnumValue
structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
-
enumGetValue
-
enumGetValueByName
-
enumGetValueByNick
-
enumRegisterStatic
Registers a new static enumeration type with the namename
.It is normally more convenient to let [glib-mkenums][glib-mkenums], generate a my_enum_get_type() function from a usual C enumeration definition than to write one yourself using g_enum_register_static().
- Parameters:
name
- A nul-terminated string used as the name of the new type.constStaticValues
- An array ofGEnumValue
structs for the possible enumeration values. The array is terminated by a struct with all members being 0. GObject keeps a reference to the data, so it cannot be stack-allocated.- Returns:
- The new type identifier.
-
enumToString
Pretty-printsvalue
in the form of the enum’s name.This is intended to be used for debugging purposes. The format of the output may change in the future.
- Parameters:
gEnumType
- the type identifier of aGEnumClass
typevalue
- the value- Returns:
- a newly-allocated text string
-
flagsCompleteTypeInfo
This function is meant to be called from the complete_type_info() function of aGTypePlugin
implementation, see the example for g_enum_complete_type_info() above.- Parameters:
gFlagsType
- the type identifier of the type being completedinfo
- theGTypeInfo
struct to be filled inconstValues
- An array ofGFlagsValue
structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
-
flagsGetFirstValue
Returns the firstGFlagsValue
which is set invalue
.- Parameters:
flagsClass
- aGFlagsClass
value
- the value- Returns:
- the first
GFlagsValue
which is set invalue
, ornull
if none is set
-
flagsGetValueByName
Looks up aGFlagsValue
by name.- Parameters:
flagsClass
- aGFlagsClass
name
- the name to look up- Returns:
- the
GFlagsValue
with namename
, ornull
if there is no flag with that name
-
flagsGetValueByNick
Looks up aGFlagsValue
by nickname.- Parameters:
flagsClass
- aGFlagsClass
nick
- the nickname to look up- Returns:
- the
GFlagsValue
with nicknamenick
, ornull
if there is no flag with that nickname
-
flagsRegisterStatic
Registers a new static flags type with the namename
.It is normally more convenient to let [glib-mkenums][glib-mkenums] generate a my_flags_get_type() function from a usual C enumeration definition than to write one yourself using g_flags_register_static().
- Parameters:
name
- A nul-terminated string used as the name of the new type.constStaticValues
- An array ofGFlagsValue
structs for the possible flags values. The array is terminated by a struct with all members being 0. GObject keeps a reference to the data, so it cannot be stack-allocated.- Returns:
- The new type identifier.
-
flagsToString
Pretty-printsvalue
in the form of the flag names separated by|
and sorted. Any extra bits will be shown at the end as a hexadecimal number.This is intended to be used for debugging purposes. The format of the output may change in the future.
- Parameters:
flagsType
- the type identifier of aGFlagsClass
typevalue
- the value- Returns:
- a newly-allocated text string
-
gtypeGetType
-
paramSpecBoolean
public static ParamSpec paramSpecBoolean(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, boolean defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecBoolean
instance specifying aG_TYPE_BOOLEAN
property. In many cases, it may be more appropriate to use an enum with g_param_spec_enum(), both to improve code clarity by using explicitly named values, and to allow for more values to be added in future without breaking API.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecBoolean
public static ParamSpec paramSpecBoolean(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, boolean defaultValue, ParamFlags... flags) Creates a newGParamSpecBoolean
instance specifying aG_TYPE_BOOLEAN
property. In many cases, it may be more appropriate to use an enum with g_param_spec_enum(), both to improve code clarity by using explicitly named values, and to allow for more values to be added in future without breaking API.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecBoxed
public static ParamSpec paramSpecBoxed(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, Type boxedType, Set<ParamFlags> flags) Creates a newGParamSpecBoxed
instance specifying aG_TYPE_BOXED
derived property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedboxedType
-G_TYPE_BOXED
derived type of this propertyflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecBoxed
public static ParamSpec paramSpecBoxed(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, Type boxedType, ParamFlags... flags) Creates a newGParamSpecBoxed
instance specifying aG_TYPE_BOXED
derived property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedboxedType
-G_TYPE_BOXED
derived type of this propertyflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecChar
public static ParamSpec paramSpecChar(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, byte minimum, byte maximum, byte defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecChar
instance specifying aG_TYPE_CHAR
property.- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedminimum
- minimum value for the property specifiedmaximum
- maximum value for the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecChar
public static ParamSpec paramSpecChar(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, byte minimum, byte maximum, byte defaultValue, ParamFlags... flags) Creates a newGParamSpecChar
instance specifying aG_TYPE_CHAR
property.- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedminimum
- minimum value for the property specifiedmaximum
- maximum value for the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecDouble
public static ParamSpec paramSpecDouble(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, double minimum, double maximum, double defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecDouble
instance specifying aG_TYPE_DOUBLE
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedminimum
- minimum value for the property specifiedmaximum
- maximum value for the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecDouble
public static ParamSpec paramSpecDouble(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, double minimum, double maximum, double defaultValue, ParamFlags... flags) Creates a newGParamSpecDouble
instance specifying aG_TYPE_DOUBLE
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedminimum
- minimum value for the property specifiedmaximum
- maximum value for the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecEnum
public static ParamSpec paramSpecEnum(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, Type enumType, int defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecEnum
instance specifying aG_TYPE_ENUM
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedenumType
- aGType
derived fromG_TYPE_ENUM
defaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecEnum
public static ParamSpec paramSpecEnum(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, Type enumType, int defaultValue, ParamFlags... flags) Creates a newGParamSpecEnum
instance specifying aG_TYPE_ENUM
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedenumType
- aGType
derived fromG_TYPE_ENUM
defaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecFlags
public static ParamSpec paramSpecFlags(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, Type flagsType, int defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecFlags
instance specifying aG_TYPE_FLAGS
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedflagsType
- aGType
derived fromG_TYPE_FLAGS
defaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecFlags
public static ParamSpec paramSpecFlags(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, Type flagsType, int defaultValue, ParamFlags... flags) Creates a newGParamSpecFlags
instance specifying aG_TYPE_FLAGS
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedflagsType
- aGType
derived fromG_TYPE_FLAGS
defaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecFloat
public static ParamSpec paramSpecFloat(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, float minimum, float maximum, float defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecFloat
instance specifying aG_TYPE_FLOAT
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedminimum
- minimum value for the property specifiedmaximum
- maximum value for the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecFloat
public static ParamSpec paramSpecFloat(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, float minimum, float maximum, float defaultValue, ParamFlags... flags) Creates a newGParamSpecFloat
instance specifying aG_TYPE_FLOAT
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedminimum
- minimum value for the property specifiedmaximum
- maximum value for the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecGtype
public static ParamSpec paramSpecGtype(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, Type isAType, Set<ParamFlags> flags) Creates a newGParamSpecGType
instance specifying aG_TYPE_GTYPE
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedisAType
- aGType
whose subtypes are allowed as values of the property (useG_TYPE_NONE
for any type)flags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecGtype
public static ParamSpec paramSpecGtype(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, Type isAType, ParamFlags... flags) Creates a newGParamSpecGType
instance specifying aG_TYPE_GTYPE
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedisAType
- aGType
whose subtypes are allowed as values of the property (useG_TYPE_NONE
for any type)flags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecInt
public static ParamSpec paramSpecInt(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, int minimum, int maximum, int defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecInt
instance specifying aG_TYPE_INT
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedminimum
- minimum value for the property specifiedmaximum
- maximum value for the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecInt
public static ParamSpec paramSpecInt(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, int minimum, int maximum, int defaultValue, ParamFlags... flags) Creates a newGParamSpecInt
instance specifying aG_TYPE_INT
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedminimum
- minimum value for the property specifiedmaximum
- maximum value for the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecInt64
public static ParamSpec paramSpecInt64(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, long minimum, long maximum, long defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecInt64
instance specifying aG_TYPE_INT64
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedminimum
- minimum value for the property specifiedmaximum
- maximum value for the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecInt64
public static ParamSpec paramSpecInt64(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, long minimum, long maximum, long defaultValue, ParamFlags... flags) Creates a newGParamSpecInt64
instance specifying aG_TYPE_INT64
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedminimum
- minimum value for the property specifiedmaximum
- maximum value for the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecLong
public static ParamSpec paramSpecLong(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, int minimum, int maximum, int defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecLong
instance specifying aG_TYPE_LONG
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedminimum
- minimum value for the property specifiedmaximum
- maximum value for the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecLong
public static ParamSpec paramSpecLong(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, int minimum, int maximum, int defaultValue, ParamFlags... flags) Creates a newGParamSpecLong
instance specifying aG_TYPE_LONG
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedminimum
- minimum value for the property specifiedmaximum
- maximum value for the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecObject
public static ParamSpec paramSpecObject(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, Type objectType, Set<ParamFlags> flags) Creates a newGParamSpecBoxed
instance specifying aG_TYPE_OBJECT
derived property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedobjectType
-G_TYPE_OBJECT
derived type of this propertyflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecObject
public static ParamSpec paramSpecObject(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, Type objectType, ParamFlags... flags) Creates a newGParamSpecBoxed
instance specifying aG_TYPE_OBJECT
derived property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedobjectType
-G_TYPE_OBJECT
derived type of this propertyflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecOverride
Creates a new property of typeGParamSpecOverride
. This is used to direct operations to another paramspec, and will not be directly useful unless you are implementing a new base type similar to GObject.- Parameters:
name
- the name of the property.overridden
- The property that is being overridden- Returns:
- the newly created
GParamSpec
-
paramSpecParam
public static ParamSpec paramSpecParam(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, Type paramType, Set<ParamFlags> flags) Creates a newGParamSpecParam
instance specifying aG_TYPE_PARAM
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedparamType
- aGType
derived fromG_TYPE_PARAM
flags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecParam
public static ParamSpec paramSpecParam(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, Type paramType, ParamFlags... flags) Creates a newGParamSpecParam
instance specifying aG_TYPE_PARAM
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedparamType
- aGType
derived fromG_TYPE_PARAM
flags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecPointer
public static ParamSpec paramSpecPointer(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, Set<ParamFlags> flags) Creates a newGParamSpecPointer
instance specifying a pointer property. Where possible, it is better to use g_param_spec_object() or g_param_spec_boxed() to expose memory management information.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecPointer
public static ParamSpec paramSpecPointer(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, ParamFlags... flags) Creates a newGParamSpecPointer
instance specifying a pointer property. Where possible, it is better to use g_param_spec_object() or g_param_spec_boxed() to expose memory management information.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecString
public static ParamSpec paramSpecString(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, @Nullable @Nullable String defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecString
instance.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecString
public static ParamSpec paramSpecString(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, @Nullable @Nullable String defaultValue, ParamFlags... flags) Creates a newGParamSpecString
instance.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecUchar
public static ParamSpec paramSpecUchar(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, byte minimum, byte maximum, byte defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecUChar
instance specifying aG_TYPE_UCHAR
property.- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedminimum
- minimum value for the property specifiedmaximum
- maximum value for the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecUchar
public static ParamSpec paramSpecUchar(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, byte minimum, byte maximum, byte defaultValue, ParamFlags... flags) Creates a newGParamSpecUChar
instance specifying aG_TYPE_UCHAR
property.- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedminimum
- minimum value for the property specifiedmaximum
- maximum value for the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecUint
public static ParamSpec paramSpecUint(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, int minimum, int maximum, int defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecUInt
instance specifying aG_TYPE_UINT
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedminimum
- minimum value for the property specifiedmaximum
- maximum value for the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecUint
public static ParamSpec paramSpecUint(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, int minimum, int maximum, int defaultValue, ParamFlags... flags) Creates a newGParamSpecUInt
instance specifying aG_TYPE_UINT
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedminimum
- minimum value for the property specifiedmaximum
- maximum value for the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecUint64
public static ParamSpec paramSpecUint64(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, long minimum, long maximum, long defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecUInt64
instance specifying aG_TYPE_UINT64
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedminimum
- minimum value for the property specifiedmaximum
- maximum value for the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecUint64
public static ParamSpec paramSpecUint64(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, long minimum, long maximum, long defaultValue, ParamFlags... flags) Creates a newGParamSpecUInt64
instance specifying aG_TYPE_UINT64
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedminimum
- minimum value for the property specifiedmaximum
- maximum value for the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecUlong
public static ParamSpec paramSpecUlong(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, int minimum, int maximum, int defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecULong
instance specifying aG_TYPE_ULONG
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedminimum
- minimum value for the property specifiedmaximum
- maximum value for the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecUlong
public static ParamSpec paramSpecUlong(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, int minimum, int maximum, int defaultValue, ParamFlags... flags) Creates a newGParamSpecULong
instance specifying aG_TYPE_ULONG
property.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedminimum
- minimum value for the property specifiedmaximum
- maximum value for the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecUnichar
public static ParamSpec paramSpecUnichar(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, int defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecUnichar
instance specifying aG_TYPE_UINT
property.GValue
structures for this property can be accessed with g_value_set_uint() and g_value_get_uint().See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecUnichar
public static ParamSpec paramSpecUnichar(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, int defaultValue, ParamFlags... flags) Creates a newGParamSpecUnichar
instance specifying aG_TYPE_UINT
property.GValue
structures for this property can be accessed with g_value_set_uint() and g_value_get_uint().See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifieddefaultValue
- default value for the property specifiedflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecValueArray
public static ParamSpec paramSpecValueArray(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, ParamSpec elementSpec, Set<ParamFlags> flags) Creates a newGParamSpecValueArray
instance specifying aG_TYPE_VALUE_ARRAY
property.G_TYPE_VALUE_ARRAY
is aG_TYPE_BOXED
type, as such,GValue
structures for this property can be accessed with g_value_set_boxed() and g_value_get_boxed().See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedelementSpec
- aGParamSpec
describing the elements contained in arrays of this property, may benull
flags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecValueArray
public static ParamSpec paramSpecValueArray(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, ParamSpec elementSpec, ParamFlags... flags) Creates a newGParamSpecValueArray
instance specifying aG_TYPE_VALUE_ARRAY
property.G_TYPE_VALUE_ARRAY
is aG_TYPE_BOXED
type, as such,GValue
structures for this property can be accessed with g_value_set_boxed() and g_value_get_boxed().See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedelementSpec
- aGParamSpec
describing the elements contained in arrays of this property, may benull
flags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecVariant
public static ParamSpec paramSpecVariant(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, VariantType type, @Nullable @Nullable Variant defaultValue, Set<ParamFlags> flags) Creates a newGParamSpecVariant
instance specifying aGVariant
property.If
defaultValue
is floating, it is consumed.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedtype
- aGVariantType
defaultValue
- aGVariant
of typetype
to use as the default value, ornull
flags
- flags for the property specified- Returns:
- the newly created
GParamSpec
-
paramSpecVariant
public static ParamSpec paramSpecVariant(String name, @Nullable @Nullable String nick, @Nullable @Nullable String blurb, VariantType type, @Nullable @Nullable Variant defaultValue, ParamFlags... flags) Creates a newGParamSpecVariant
instance specifying aGVariant
property.If
defaultValue
is floating, it is consumed.See g_param_spec_internal() for details on property names.
- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedtype
- aGVariantType
defaultValue
- aGVariant
of typetype
to use as the default value, ornull
flags
- flags for the property specified- Returns:
- the newly created
GParamSpec
-
paramTypeRegisterStatic
Registersname
as the name of a new static type derived fromG_TYPE_PARAM
.The type system uses the information contained in the
GParamSpecTypeInfo
structure pointed to byinfo
to manage theGParamSpec
type and its instances.- Parameters:
name
- 0-terminated string used as the name of the newGParamSpec
type.pspecInfo
- TheGParamSpecTypeInfo
for thisGParamSpec
type.- Returns:
- The new type identifier.
-
paramValueConvert
public static boolean paramValueConvert(ParamSpec pspec, Value srcValue, Value destValue, boolean strictValidation) TransformssrcValue
intodestValue
if possible, and then validatesdestValue
, in order for it to conform topspec
. IfstrictValidation
istrue
this function will only succeed if the transformeddestValue
complied topspec
without modifications.See also g_value_type_transformable(), g_value_transform() and g_param_value_validate().
- Parameters:
pspec
- a validGParamSpec
srcValue
- sourceGValue
destValue
- destinationGValue
of correct type forpspec
strictValidation
-true
requiresdestValue
to conform topspec
without modifications- Returns:
true
if transformation and validation were successful,false
otherwise anddestValue
is left untouched.
-
paramValueDefaults
-
paramValueIsValid
Return whether the contents ofvalue
comply with the specifications set out bypspec
.- Parameters:
pspec
- a validGParamSpec
value
- aGValue
of correct type forpspec
- Returns:
- whether the contents of
value
comply with the specifications set out bypspec
.
-
paramValueSetDefault
-
paramValueValidate
Ensures that the contents ofvalue
comply with the specifications set out bypspec
. For example, aGParamSpecInt
might require that integers stored invalue
may not be smaller than -42 and not be greater than +42. Ifvalue
contains an integer outside of this range, it is modified accordingly, so the resulting value will fit into the range -42 .. +42.- Parameters:
pspec
- a validGParamSpec
value
- aGValue
of correct type forpspec
- Returns:
- whether modifying
value
was necessary to ensure validity
-
paramValuesCmp
Comparesvalue1
withvalue2
according topspec
, and return -1, 0 or +1, ifvalue1
is found to be less than, equal to or greater thanvalue2
, respectively.- Parameters:
pspec
- a validGParamSpec
value1
- aGValue
of correct type forpspec
value2
- aGValue
of correct type forpspec
- Returns:
- -1, 0 or +1, for a less than, equal to or greater than result
-
pointerTypeRegisterStatic
-
signalAccumulatorFirstWins
public static boolean signalAccumulatorFirstWins(SignalInvocationHint ihint, Value returnAccu, Value handlerReturn, @Nullable @Nullable MemorySegment dummy) A predefinedGSignalAccumulator
for signals intended to be used as a hook for application code to provide a particular value. Usually only one such value is desired and multiple handlers for the same signal don't make much sense (except for the case of the default handler defined in the class structure, in which case you will usually want the signal connection to override the class handler).This accumulator will use the return value from the first signal handler that is run as the return value for the signal and not run any further handlers (ie: the first handler "wins").
- Parameters:
ihint
- standardGSignalAccumulator
parameterreturnAccu
- standardGSignalAccumulator
parameterhandlerReturn
- standardGSignalAccumulator
parameterdummy
- standardGSignalAccumulator
parameter- Returns:
- standard
GSignalAccumulator
result
-
signalAccumulatorTrueHandled
public static boolean signalAccumulatorTrueHandled(SignalInvocationHint ihint, Value returnAccu, Value handlerReturn, @Nullable @Nullable MemorySegment dummy) A predefinedGSignalAccumulator
for signals that return a boolean values. The behavior that this accumulator gives is that a return oftrue
stops the signal emission: no further callbacks will be invoked, while a return offalse
allows the emission to continue. The idea here is that atrue
return indicates that the callback handled the signal, and no further handling is needed.- Parameters:
ihint
- standardGSignalAccumulator
parameterreturnAccu
- standardGSignalAccumulator
parameterhandlerReturn
- standardGSignalAccumulator
parameterdummy
- standardGSignalAccumulator
parameter- Returns:
- standard
GSignalAccumulator
result
-
signalAddEmissionHook
Adds an emission hook for a signal, which will get called for any emission of that signal, independent of the instance. This is possible only for signals which don't haveSignalFlags.NO_HOOKS
flag set.- Parameters:
signalId
- the signal identifier, as returned by g_signal_lookup().detail
- the detail on which to call the hook.hookFunc
- aGSignalEmissionHook
function.- Returns:
- the hook id, for later use with g_signal_remove_emission_hook().
-
signalChainFromOverridden
Calls the original class closure of a signal. This function should only be called from an overridden class closure; see g_signal_override_class_closure() and g_signal_override_class_handler().- Parameters:
instanceAndParams
- the argument list of the signal emission. The first element in the array is aGValue
for the instance the signal is being emitted on. The rest are any arguments to be passed to the signal.returnValue
- Location for the return value.
-
signalChainFromOverriddenHandler
Calls the original class closure of a signal. This function should only be called from an overridden class closure; see g_signal_override_class_closure() and g_signal_override_class_handler().- Parameters:
instance
- the instance the signal is being emitted on.varargs
- parameters to be passed to the parent class closure, followed by a location for the return value. If the return type of the signal isG_TYPE_NONE
, the return value location can be omitted.
-
signalConnectClosure
public static int signalConnectClosure(GObject instance, String detailedSignal, Closure closure, boolean after) Connects a closure to a signal for a particular object.If
closure
is a floating reference (see g_closure_sink()), this function takes ownership ofclosure
.This function cannot fail. If the given signal doesn’t exist, a critical warning is emitted.
- Parameters:
instance
- the instance to connect to.detailedSignal
- a string of the form "signal-name::detail".closure
- the closure to connect.after
- whether the handler should be called before or after the default handler of the signal.- Returns:
- the handler ID (always greater than 0)
-
signalConnectClosureById
public static int signalConnectClosureById(GObject instance, int signalId, Quark detail, Closure closure, boolean after) Connects a closure to a signal for a particular object.If
closure
is a floating reference (see g_closure_sink()), this function takes ownership ofclosure
.This function cannot fail. If the given signal doesn’t exist, a critical warning is emitted.
- Parameters:
instance
- the instance to connect to.signalId
- the id of the signal.detail
- the detail.closure
- the closure to connect.after
- whether the handler should be called before or after the default handler of the signal.- Returns:
- the handler ID (always greater than 0)
-
signalConnectData
public static int signalConnectData(GObject instance, String detailedSignal, Callback cHandler, @Nullable @Nullable ClosureNotify destroyData, Set<ConnectFlags> connectFlags) Connects aGCallback
function to a signal for a particular object. Similar to g_signal_connect(), but allows to provide aGClosureNotify
for the data which will be called when the signal handler is disconnected and no longer used. SpecifyconnectFlags
if you need..._after()
or..._swapped()
variants of this function.This function cannot fail. If the given signal doesn’t exist, a critical warning is emitted.
- Parameters:
instance
- the instance to connect to.detailedSignal
- a string of the form "signal-name::detail".cHandler
- theGCallback
to connect.destroyData
- aGClosureNotify
fordata
.connectFlags
- a combination ofGConnectFlags
.- Returns:
- the handler ID (always greater than 0)
-
signalConnectData
public static int signalConnectData(GObject instance, String detailedSignal, Callback cHandler, @Nullable @Nullable ClosureNotify destroyData, ConnectFlags... connectFlags) Connects aGCallback
function to a signal for a particular object. Similar to g_signal_connect(), but allows to provide aGClosureNotify
for the data which will be called when the signal handler is disconnected and no longer used. SpecifyconnectFlags
if you need..._after()
or..._swapped()
variants of this function.This function cannot fail. If the given signal doesn’t exist, a critical warning is emitted.
- Parameters:
instance
- the instance to connect to.detailedSignal
- a string of the form "signal-name::detail".cHandler
- theGCallback
to connect.destroyData
- aGClosureNotify
fordata
.connectFlags
- a combination ofGConnectFlags
.- Returns:
- the handler ID (always greater than 0)
-
signalConnectObject
public static int signalConnectObject(TypeInstance instance, String detailedSignal, Callback cHandler, @Nullable @Nullable GObject gobject, Set<ConnectFlags> connectFlags) This is similar to g_signal_connect_data(), but uses a closure which ensures that thegobject
stays alive during the call tocHandler
by temporarily adding a reference count togobject
.When the
gobject
is destroyed the signal handler will be automatically disconnected. Note that this is not currently threadsafe (ie: emitting a signal whilegobject
is being destroyed in another thread is not safe).- Parameters:
instance
- the instance to connect to.detailedSignal
- a string of the form "signal-name::detail".cHandler
- theGCallback
to connect.gobject
- the object to pass as data tocHandler
.connectFlags
- a combination ofGConnectFlags
.- Returns:
- the handler id.
-
signalConnectObject
public static int signalConnectObject(TypeInstance instance, String detailedSignal, Callback cHandler, @Nullable @Nullable GObject gobject, ConnectFlags... connectFlags) This is similar to g_signal_connect_data(), but uses a closure which ensures that thegobject
stays alive during the call tocHandler
by temporarily adding a reference count togobject
.When the
gobject
is destroyed the signal handler will be automatically disconnected. Note that this is not currently threadsafe (ie: emitting a signal whilegobject
is being destroyed in another thread is not safe).- Parameters:
instance
- the instance to connect to.detailedSignal
- a string of the form "signal-name::detail".cHandler
- theGCallback
to connect.gobject
- the object to pass as data tocHandler
.connectFlags
- a combination ofGConnectFlags
.- Returns:
- the handler id.
-
signalEmit
Emits a signal. Signal emission is done synchronously. The method will only return control after all handlers are called or signal emission was stopped.Note that g_signal_emit() resets the return value to the default if no handlers are connected, in contrast to g_signal_emitv().
- Parameters:
instance
- the instance the signal is being emitted on.signalId
- the signal iddetail
- the detailvarargs
- parameters to be passed to the signal, followed by a location for the return value. If the return type of the signal isG_TYPE_NONE
, the return value location can be omitted.
-
signalEmitByName
Emits a signal. Signal emission is done synchronously. The method will only return control after all handlers are called or signal emission was stopped.Note that g_signal_emit_by_name() resets the return value to the default if no handlers are connected, in contrast to g_signal_emitv().
- Parameters:
instance
- the instance the signal is being emitted on.detailedSignal
- a string of the form "signal-name::detail".varargs
- parameters to be passed to the signal, followed by a location for the return value. If the return type of the signal isG_TYPE_NONE
, the return value location can be omitted. The number of parameters to pass to this function is defined when creating the signal.
-
signalEmitv
public static void signalEmitv(Value[] instanceAndParams, int signalId, Quark detail, @Nullable @Nullable Value returnValue) Emits a signal. Signal emission is done synchronously. The method will only return control after all handlers are called or signal emission was stopped.Note that g_signal_emitv() doesn't change
returnValue
if no handlers are connected, in contrast to g_signal_emit() and g_signal_emit_valist().- Parameters:
instanceAndParams
- argument list for the signal emission. The first element in the array is aGValue
for the instance the signal is being emitted on. The rest are any arguments to be passed to the signal.signalId
- the signal iddetail
- the detailreturnValue
- Location to store the return value of the signal emission. This must be provided if the specified signal returns a value, but may be ignored otherwise.
-
signalGetInvocationHint
Returns the invocation hint of the innermost signal emission of instance.- Parameters:
instance
- the instance to query- Returns:
- the invocation hint of the innermost
signal emission, or
null
if not found.
-
signalHandlerBlock
Blocks a handler of an instance so it will not be called during any signal emissions unless it is unblocked again. Thus "blocking" a signal handler means to temporarily deactivate it, a signal handler has to be unblocked exactly the same amount of times it has been blocked before to become active again.The
handlerId
has to be a valid signal handler id, connected to a signal ofinstance
.- Parameters:
instance
- The instance to block the signal handler of.handlerId
- Handler id of the handler to be blocked.
-
signalHandlerDisconnect
Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to. ThehandlerId
becomes invalid and may be reused.The
handlerId
has to be a valid signal handler id, connected to a signal ofinstance
.- Parameters:
instance
- The instance to remove the signal handler from.handlerId
- Handler id of the handler to be disconnected.
-
signalHandlerFind
public static int signalHandlerFind(GObject instance, Set<SignalMatchType> mask, int signalId, Quark detail, @Nullable @Nullable Closure closure, @Nullable @Nullable MemorySegment func, @Nullable @Nullable MemorySegment data) Finds the first signal handler that matches certain selection criteria. The criteria mask is passed as an OR-ed combination ofGSignalMatchType
flags, and the criteria values are passed as arguments. The matchmask
has to be non-0 for successful matches. If no handler was found, 0 is returned.- Parameters:
instance
- The instance owning the signal handler to be found.mask
- Mask indicating which ofsignalId
,detail
,closure
,func
and/ordata
the handler has to match.signalId
- Signal the handler has to be connected to.detail
- Signal detail the handler has to be connected to.closure
- The closure the handler will invoke.func
- The C closure callback of the handler (useless for non-C closures).data
- The closure data of the handler's closure.- Returns:
- A valid non-0 signal handler id for a successful match.
-
signalHandlerFind
public static int signalHandlerFind(GObject instance, SignalMatchType mask, int signalId, Quark detail, @Nullable @Nullable Closure closure, @Nullable @Nullable MemorySegment func, @Nullable @Nullable MemorySegment data) Finds the first signal handler that matches certain selection criteria. The criteria mask is passed as an OR-ed combination ofGSignalMatchType
flags, and the criteria values are passed as arguments. The matchmask
has to be non-0 for successful matches. If no handler was found, 0 is returned.- Parameters:
instance
- The instance owning the signal handler to be found.mask
- Mask indicating which ofsignalId
,detail
,closure
,func
and/ordata
the handler has to match.signalId
- Signal the handler has to be connected to.detail
- Signal detail the handler has to be connected to.closure
- The closure the handler will invoke.func
- The C closure callback of the handler (useless for non-C closures).data
- The closure data of the handler's closure.- Returns:
- A valid non-0 signal handler id for a successful match.
-
signalHandlerIsConnected
Returns whetherhandlerId
is the ID of a handler connected toinstance
.- Parameters:
instance
- The instance where a signal handler is sought.handlerId
- the handler ID.- Returns:
- whether
handlerId
identifies a handler connected toinstance
.
-
signalHandlerUnblock
Undoes the effect of a previous g_signal_handler_block() call. A blocked handler is skipped during signal emissions and will not be invoked, unblocking it (for exactly the amount of times it has been blocked before) reverts its "blocked" state, so the handler will be recognized by the signal system and is called upon future or currently ongoing signal emissions (since the order in which handlers are called during signal emissions is deterministic, whether the unblocked handler in question is called as part of a currently ongoing emission depends on how far that emission has proceeded yet).The
handlerId
has to be a valid id of a signal handler that is connected to a signal ofinstance
and is currently blocked.- Parameters:
instance
- The instance to unblock the signal handler of.handlerId
- Handler id of the handler to be unblocked.
-
signalHandlersBlockMatched
public static int signalHandlersBlockMatched(GObject instance, Set<SignalMatchType> mask, int signalId, Quark detail, @Nullable @Nullable Closure closure, @Nullable @Nullable MemorySegment func, @Nullable @Nullable MemorySegment data) Blocks all handlers on an instance that match a certain selection criteria.The criteria mask is passed as a combination of
GSignalMatchType
flags, and the criteria values are passed as arguments. A handler must match on all flags set inmask
to be blocked (i.e. the match is conjunctive).Passing at least one of the
SignalMatchType.ID
,SignalMatchType.CLOSURE
,SignalMatchType.FUNC
orSignalMatchType.DATA
match flags is required for successful matches. If no handlers were found, 0 is returned, the number of blocked handlers otherwise.Support for
SignalMatchType.ID
was added in GLib 2.78.- Parameters:
instance
- The instance to block handlers from.mask
- Mask indicating which ofsignalId
,detail
,closure
,func
and/ordata
the handlers have to match.signalId
- Signal the handlers have to be connected to.detail
- Signal detail the handlers have to be connected to.closure
- The closure the handlers will invoke.func
- The C closure callback of the handlers (useless for non-C closures).data
- The closure data of the handlers' closures.- Returns:
- The number of handlers that matched.
-
signalHandlersBlockMatched
public static int signalHandlersBlockMatched(GObject instance, SignalMatchType mask, int signalId, Quark detail, @Nullable @Nullable Closure closure, @Nullable @Nullable MemorySegment func, @Nullable @Nullable MemorySegment data) Blocks all handlers on an instance that match a certain selection criteria.The criteria mask is passed as a combination of
GSignalMatchType
flags, and the criteria values are passed as arguments. A handler must match on all flags set inmask
to be blocked (i.e. the match is conjunctive).Passing at least one of the
SignalMatchType.ID
,SignalMatchType.CLOSURE
,SignalMatchType.FUNC
orSignalMatchType.DATA
match flags is required for successful matches. If no handlers were found, 0 is returned, the number of blocked handlers otherwise.Support for
SignalMatchType.ID
was added in GLib 2.78.- Parameters:
instance
- The instance to block handlers from.mask
- Mask indicating which ofsignalId
,detail
,closure
,func
and/ordata
the handlers have to match.signalId
- Signal the handlers have to be connected to.detail
- Signal detail the handlers have to be connected to.closure
- The closure the handlers will invoke.func
- The C closure callback of the handlers (useless for non-C closures).data
- The closure data of the handlers' closures.- Returns:
- The number of handlers that matched.
-
signalHandlersDestroy
Destroy all signal handlers of a type instance. This function is an implementation detail of theGObject
dispose implementation, and should not be used outside of the type system.- Parameters:
instance
- The instance whose signal handlers are destroyed
-
signalHandlersDisconnectMatched
public static int signalHandlersDisconnectMatched(GObject instance, Set<SignalMatchType> mask, int signalId, Quark detail, @Nullable @Nullable Closure closure, @Nullable @Nullable MemorySegment func, @Nullable @Nullable MemorySegment data) Disconnects all handlers on an instance that match a certain selection criteria.The criteria mask is passed as a combination of
GSignalMatchType
flags, and the criteria values are passed as arguments. A handler must match on all flags set inmask
to be disconnected (i.e. the match is conjunctive).Passing at least one of the
SignalMatchType.ID
,SignalMatchType.CLOSURE
,SignalMatchType.FUNC
orSignalMatchType.DATA
match flags is required for successful matches. If no handlers were found, 0 is returned, the number of disconnected handlers otherwise.Support for
SignalMatchType.ID
was added in GLib 2.78.- Parameters:
instance
- The instance to remove handlers from.mask
- Mask indicating which ofsignalId
,detail
,closure
,func
and/ordata
the handlers have to match.signalId
- Signal the handlers have to be connected to.detail
- Signal detail the handlers have to be connected to.closure
- The closure the handlers will invoke.func
- The C closure callback of the handlers (useless for non-C closures).data
- The closure data of the handlers' closures.- Returns:
- The number of handlers that matched.
-
signalHandlersDisconnectMatched
public static int signalHandlersDisconnectMatched(GObject instance, SignalMatchType mask, int signalId, Quark detail, @Nullable @Nullable Closure closure, @Nullable @Nullable MemorySegment func, @Nullable @Nullable MemorySegment data) Disconnects all handlers on an instance that match a certain selection criteria.The criteria mask is passed as a combination of
GSignalMatchType
flags, and the criteria values are passed as arguments. A handler must match on all flags set inmask
to be disconnected (i.e. the match is conjunctive).Passing at least one of the
SignalMatchType.ID
,SignalMatchType.CLOSURE
,SignalMatchType.FUNC
orSignalMatchType.DATA
match flags is required for successful matches. If no handlers were found, 0 is returned, the number of disconnected handlers otherwise.Support for
SignalMatchType.ID
was added in GLib 2.78.- Parameters:
instance
- The instance to remove handlers from.mask
- Mask indicating which ofsignalId
,detail
,closure
,func
and/ordata
the handlers have to match.signalId
- Signal the handlers have to be connected to.detail
- Signal detail the handlers have to be connected to.closure
- The closure the handlers will invoke.func
- The C closure callback of the handlers (useless for non-C closures).data
- The closure data of the handlers' closures.- Returns:
- The number of handlers that matched.
-
signalHandlersUnblockMatched
public static int signalHandlersUnblockMatched(GObject instance, Set<SignalMatchType> mask, int signalId, Quark detail, @Nullable @Nullable Closure closure, @Nullable @Nullable MemorySegment func, @Nullable @Nullable MemorySegment data) Unblocks all handlers on an instance that match a certain selection criteria.The criteria mask is passed as a combination of
GSignalMatchType
flags, and the criteria values are passed as arguments. A handler must match on all flags set inmask
to be unblocked (i.e. the match is conjunctive).Passing at least one of the
SignalMatchType.ID
,SignalMatchType.CLOSURE
,SignalMatchType.FUNC
orSignalMatchType.DATA
match flags is required for successful matches. If no handlers were found, 0 is returned, the number of unblocked handlers otherwise. The match criteria should not apply to any handlers that are not currently blocked.Support for
SignalMatchType.ID
was added in GLib 2.78.- Parameters:
instance
- The instance to unblock handlers from.mask
- Mask indicating which ofsignalId
,detail
,closure
,func
and/ordata
the handlers have to match.signalId
- Signal the handlers have to be connected to.detail
- Signal detail the handlers have to be connected to.closure
- The closure the handlers will invoke.func
- The C closure callback of the handlers (useless for non-C closures).data
- The closure data of the handlers' closures.- Returns:
- The number of handlers that matched.
-
signalHandlersUnblockMatched
public static int signalHandlersUnblockMatched(GObject instance, SignalMatchType mask, int signalId, Quark detail, @Nullable @Nullable Closure closure, @Nullable @Nullable MemorySegment func, @Nullable @Nullable MemorySegment data) Unblocks all handlers on an instance that match a certain selection criteria.The criteria mask is passed as a combination of
GSignalMatchType
flags, and the criteria values are passed as arguments. A handler must match on all flags set inmask
to be unblocked (i.e. the match is conjunctive).Passing at least one of the
SignalMatchType.ID
,SignalMatchType.CLOSURE
,SignalMatchType.FUNC
orSignalMatchType.DATA
match flags is required for successful matches. If no handlers were found, 0 is returned, the number of unblocked handlers otherwise. The match criteria should not apply to any handlers that are not currently blocked.Support for
SignalMatchType.ID
was added in GLib 2.78.- Parameters:
instance
- The instance to unblock handlers from.mask
- Mask indicating which ofsignalId
,detail
,closure
,func
and/ordata
the handlers have to match.signalId
- Signal the handlers have to be connected to.detail
- Signal detail the handlers have to be connected to.closure
- The closure the handlers will invoke.func
- The C closure callback of the handlers (useless for non-C closures).data
- The closure data of the handlers' closures.- Returns:
- The number of handlers that matched.
-
signalHasHandlerPending
public static boolean signalHasHandlerPending(GObject instance, int signalId, Quark detail, boolean mayBeBlocked) Returns whether there are any handlers connected toinstance
for the given signal id and detail.If
detail
is 0 then it will only match handlers that were connected without detail. Ifdetail
is non-zero then it will match handlers connected both without detail and with the given detail. This is consistent with how a signal emitted withdetail
would be delivered to those handlers.Since 2.46 this also checks for a non-default class closure being installed, as this is basically always what you want.
One example of when you might use this is when the arguments to the signal are difficult to compute. A class implementor may opt to not emit the signal if no one is attached anyway, thus saving the cost of building the arguments.
- Parameters:
instance
- the object whose signal handlers are sought.signalId
- the signal id.detail
- the detail.mayBeBlocked
- whether blocked handlers should count as match.- Returns:
true
if a handler is connected to the signal,false
otherwise.
-
signalIsValidName
Validate a signal name. This can be useful for dynamically-generated signals which need to be validated at run-time before actually trying to create them.See
signalNew(java.lang.String, org.gnome.glib.Type, java.util.Set<org.gnome.gobject.SignalFlags>, int, org.gnome.gobject.SignalAccumulator, org.gnome.gobject.SignalCMarshaller, org.gnome.glib.Type, int, java.lang.Object...)
for details of the rules for valid names. The rules for signal names are the same as those for property names.- Parameters:
name
- the canonical name of the signal- Returns:
true
ifname
is a valid signal name,false
otherwise.
-
signalListIds
Lists the signals by id that a certain instance or interface type created. Further information about the signals can be acquired through g_signal_query().- Parameters:
itype
- Instance or interface type.- Returns:
- Newly allocated array of signal IDs.
-
signalLookup
Given the name of the signal and the type of object it connects to, gets the signal's identifying integer. Emitting the signal by number is somewhat faster than using the name each time.Also tries the ancestors of the given type.
The type class passed as
itype
must already have been instantiated (for example, using g_type_class_ref()) for this function to work, as signals are always installed during class initialization.See g_signal_new() for details on allowed signal names.
- Parameters:
name
- the signal's name.itype
- the type that the signal operates on.- Returns:
- the signal's identifying number, or 0 if no signal was found.
-
signalName
Given the signal's identifier, finds its name.Two different signals may have the same name, if they have differing types.
- Parameters:
signalId
- the signal's identifying number.- Returns:
- the signal name, or
null
if the signal number was invalid.
-
signalNew
public static int signalNew(String signalName, Type itype, Set<SignalFlags> signalFlags, int classOffset, @Nullable @Nullable SignalAccumulator accumulator, @Nullable @Nullable SignalCMarshaller cMarshaller, Type returnType, int nParams, Object... varargs) Creates a new signal. (This is usually done in the class initializer.)A signal name consists of segments consisting of ASCII letters and digits, separated by either the
-
or_
character. The first character of a signal name must be a letter. Names which violate these rules lead to undefined behaviour. These are the same rules as for property naming (see g_param_spec_internal()).When registering a signal and looking up a signal, either separator can be used, but they cannot be mixed. Using
-
is considerably more efficient. Using_
is discouraged.If 0 is used for
classOffset
subclasses cannot override the class handler in their class_init method by doing super_class->signal_handler = my_signal_handler. Instead they will have to use g_signal_override_class_handler().If
cMarshaller
isnull
, g_cclosure_marshal_generic() will be used as the marshaller for this signal. In some simple cases, g_signal_new() will use a more optimized c_marshaller and va_marshaller for the signal instead of g_cclosure_marshal_generic().If
cMarshaller
is non-null
, you need to also specify a va_marshaller using g_signal_set_va_marshaller() or the generic va_marshaller will be used.- Parameters:
signalName
- the name for the signalitype
- the type this signal pertains to. It will also pertain to types which are derived from this type.signalFlags
- a combination ofGSignalFlags
specifying detail of when the default handler is to be invoked. You should at least specifySignalFlags.RUN_FIRST
orSignalFlags.RUN_LAST
.classOffset
- The offset of the function pointer in the class structure for this type. Used to invoke a class method generically. Pass 0 to not associate a class method slot with this signal.accumulator
- the accumulator for this signal; may benull
.cMarshaller
- the function to translate arrays of parameter values to signal emissions into C language callback invocations ornull
.returnType
- the type of return value, orG_TYPE_NONE
for a signal without a return value.nParams
- the number of parameter types to follow.varargs
- a list of types, one for each parameter.- Returns:
- the signal id
-
signalNew
public static int signalNew(String signalName, Type itype, SignalFlags signalFlags, int classOffset, @Nullable @Nullable SignalAccumulator accumulator, @Nullable @Nullable SignalCMarshaller cMarshaller, Type returnType, int nParams, Object... varargs) Creates a new signal. (This is usually done in the class initializer.)A signal name consists of segments consisting of ASCII letters and digits, separated by either the
-
or_
character. The first character of a signal name must be a letter. Names which violate these rules lead to undefined behaviour. These are the same rules as for property naming (see g_param_spec_internal()).When registering a signal and looking up a signal, either separator can be used, but they cannot be mixed. Using
-
is considerably more efficient. Using_
is discouraged.If 0 is used for
classOffset
subclasses cannot override the class handler in their class_init method by doing super_class->signal_handler = my_signal_handler. Instead they will have to use g_signal_override_class_handler().If
cMarshaller
isnull
, g_cclosure_marshal_generic() will be used as the marshaller for this signal. In some simple cases, g_signal_new() will use a more optimized c_marshaller and va_marshaller for the signal instead of g_cclosure_marshal_generic().If
cMarshaller
is non-null
, you need to also specify a va_marshaller using g_signal_set_va_marshaller() or the generic va_marshaller will be used.- Parameters:
signalName
- the name for the signalitype
- the type this signal pertains to. It will also pertain to types which are derived from this type.signalFlags
- a combination ofGSignalFlags
specifying detail of when the default handler is to be invoked. You should at least specifySignalFlags.RUN_FIRST
orSignalFlags.RUN_LAST
.classOffset
- The offset of the function pointer in the class structure for this type. Used to invoke a class method generically. Pass 0 to not associate a class method slot with this signal.accumulator
- the accumulator for this signal; may benull
.cMarshaller
- the function to translate arrays of parameter values to signal emissions into C language callback invocations ornull
.returnType
- the type of return value, orG_TYPE_NONE
for a signal without a return value.nParams
- the number of parameter types to follow.varargs
- a list of types, one for each parameter.- Returns:
- the signal id
-
signalNewClassHandler
public static int signalNewClassHandler(String signalName, Type itype, Set<SignalFlags> signalFlags, @Nullable @Nullable Callback classHandler, @Nullable @Nullable SignalAccumulator accumulator, @Nullable @Nullable SignalCMarshaller cMarshaller, Type returnType, int nParams, Object... varargs) Creates a new signal. (This is usually done in the class initializer.)This is a variant of g_signal_new() that takes a C callback instead of a class offset for the signal's class handler. This function doesn't need a function pointer exposed in the class structure of an object definition, instead the function pointer is passed directly and can be overridden by derived classes with g_signal_override_class_closure() or g_signal_override_class_handler() and chained to with g_signal_chain_from_overridden() or g_signal_chain_from_overridden_handler().
See g_signal_new() for information about signal names.
If c_marshaller is
null
, g_cclosure_marshal_generic() will be used as the marshaller for this signal.- Parameters:
signalName
- the name for the signalitype
- the type this signal pertains to. It will also pertain to types which are derived from this type.signalFlags
- a combination ofGSignalFlags
specifying detail of when the default handler is to be invoked. You should at least specifySignalFlags.RUN_FIRST
orSignalFlags.RUN_LAST
.classHandler
- aGCallback
which acts as class implementation of this signal. Used to invoke a class method generically. Passnull
to not associate a class method with this signal.accumulator
- the accumulator for this signal; may benull
.cMarshaller
- the function to translate arrays of parameter values to signal emissions into C language callback invocations ornull
.returnType
- the type of return value, orG_TYPE_NONE
for a signal without a return value.nParams
- the number of parameter types to follow.varargs
- a list of types, one for each parameter.- Returns:
- the signal id
-
signalNewClassHandler
public static int signalNewClassHandler(String signalName, Type itype, SignalFlags signalFlags, @Nullable @Nullable Callback classHandler, @Nullable @Nullable SignalAccumulator accumulator, @Nullable @Nullable SignalCMarshaller cMarshaller, Type returnType, int nParams, Object... varargs) Creates a new signal. (This is usually done in the class initializer.)This is a variant of g_signal_new() that takes a C callback instead of a class offset for the signal's class handler. This function doesn't need a function pointer exposed in the class structure of an object definition, instead the function pointer is passed directly and can be overridden by derived classes with g_signal_override_class_closure() or g_signal_override_class_handler() and chained to with g_signal_chain_from_overridden() or g_signal_chain_from_overridden_handler().
See g_signal_new() for information about signal names.
If c_marshaller is
null
, g_cclosure_marshal_generic() will be used as the marshaller for this signal.- Parameters:
signalName
- the name for the signalitype
- the type this signal pertains to. It will also pertain to types which are derived from this type.signalFlags
- a combination ofGSignalFlags
specifying detail of when the default handler is to be invoked. You should at least specifySignalFlags.RUN_FIRST
orSignalFlags.RUN_LAST
.classHandler
- aGCallback
which acts as class implementation of this signal. Used to invoke a class method generically. Passnull
to not associate a class method with this signal.accumulator
- the accumulator for this signal; may benull
.cMarshaller
- the function to translate arrays of parameter values to signal emissions into C language callback invocations ornull
.returnType
- the type of return value, orG_TYPE_NONE
for a signal without a return value.nParams
- the number of parameter types to follow.varargs
- a list of types, one for each parameter.- Returns:
- the signal id
-
signalNewv
public static int signalNewv(String signalName, Type itype, Set<SignalFlags> signalFlags, @Nullable @Nullable Closure classClosure, @Nullable @Nullable SignalAccumulator accumulator, @Nullable @Nullable SignalCMarshaller cMarshaller, Type returnType, @Nullable @Nullable Type[] paramTypes) Creates a new signal. (This is usually done in the class initializer.)See g_signal_new() for details on allowed signal names.
If c_marshaller is
null
, g_cclosure_marshal_generic() will be used as the marshaller for this signal.- Parameters:
signalName
- the name for the signalitype
- the type this signal pertains to. It will also pertain to types which are derived from this typesignalFlags
- a combination ofGSignalFlags
specifying detail of when the default handler is to be invoked. You should at least specifySignalFlags.RUN_FIRST
orSignalFlags.RUN_LAST
classClosure
- The closure to invoke on signal emission; may benull
accumulator
- the accumulator for this signal; may benull
cMarshaller
- the function to translate arrays of parameter values to signal emissions into C language callback invocations ornull
returnType
- the type of return value, orG_TYPE_NONE
for a signal without a return valueparamTypes
- an array of types, one for each parameter (may benull
ifnParams
is zero)- Returns:
- the signal id
-
signalNewv
public static int signalNewv(String signalName, Type itype, SignalFlags signalFlags, @Nullable @Nullable Closure classClosure, @Nullable @Nullable SignalAccumulator accumulator, @Nullable @Nullable SignalCMarshaller cMarshaller, Type returnType, @Nullable @Nullable Type[] paramTypes) Creates a new signal. (This is usually done in the class initializer.)See g_signal_new() for details on allowed signal names.
If c_marshaller is
null
, g_cclosure_marshal_generic() will be used as the marshaller for this signal.- Parameters:
signalName
- the name for the signalitype
- the type this signal pertains to. It will also pertain to types which are derived from this typesignalFlags
- a combination ofGSignalFlags
specifying detail of when the default handler is to be invoked. You should at least specifySignalFlags.RUN_FIRST
orSignalFlags.RUN_LAST
classClosure
- The closure to invoke on signal emission; may benull
accumulator
- the accumulator for this signal; may benull
cMarshaller
- the function to translate arrays of parameter values to signal emissions into C language callback invocations ornull
returnType
- the type of return value, orG_TYPE_NONE
for a signal without a return valueparamTypes
- an array of types, one for each parameter (may benull
ifnParams
is zero)- Returns:
- the signal id
-
signalOverrideClassClosure
public static void signalOverrideClassClosure(int signalId, Type instanceType, Closure classClosure) Overrides the class closure (i.e. the default handler) for the given signal for emissions on instances ofinstanceType
.instanceType
must be derived from the type to which the signal belongs.See g_signal_chain_from_overridden() and g_signal_chain_from_overridden_handler() for how to chain up to the parent class closure from inside the overridden one.
- Parameters:
signalId
- the signal idinstanceType
- the instance type on which to override the class closure for the signal.classClosure
- the closure.
-
signalOverrideClassHandler
public static void signalOverrideClassHandler(String signalName, Type instanceType, Callback classHandler) Overrides the class closure (i.e. the default handler) for the given signal for emissions on instances ofinstanceType
with callbackclassHandler
.instanceType
must be derived from the type to which the signal belongs.See g_signal_chain_from_overridden() and g_signal_chain_from_overridden_handler() for how to chain up to the parent class closure from inside the overridden one.
- Parameters:
signalName
- the name for the signalinstanceType
- the instance type on which to override the class handler for the signal.classHandler
- the handler.
-
signalParseName
public static boolean signalParseName(String detailedSignal, Type itype, Out<Integer> signalIdP, Quark detailP, boolean forceDetailQuark) Internal function to parse a signal name into itssignalId
anddetail
quark.- Parameters:
detailedSignal
- a string of the form "signal-name::detail".itype
- The interface/instance type that introduced "signal-name".signalIdP
- Location to store the signal id.detailP
- Location to store the detail quark.forceDetailQuark
-true
forces creation of aGQuark
for the detail.- Returns:
- Whether the signal name could successfully be parsed and
signalIdP
anddetailP
contain valid return values.
-
signalQuery
Queries the signal system for in-depth information about a specific signal. This function will fill in a user-provided structure to hold signal-specific information. If an invalid signal id is passed in, thesignalId
member of theGSignalQuery
is 0. All members filled into theGSignalQuery
structure should be considered constant and have to be left untouched.- Parameters:
signalId
- The signal id of the signal to query information for.query
- A user provided structure that is filled in with constant values upon success.
-
signalRemoveEmissionHook
public static void signalRemoveEmissionHook(int signalId, int hookId) Deletes an emission hook.- Parameters:
signalId
- the id of the signalhookId
- the id of the emission hook, as returned by g_signal_add_emission_hook()
-
signalStopEmission
Stops a signal's current emission.This will prevent the default method from running, if the signal was
SignalFlags.RUN_LAST
and you connected normally (i.e. without the "after" flag).Prints a warning if used on a signal which isn't being emitted.
- Parameters:
instance
- the object whose signal handlers you wish to stop.signalId
- the signal identifier, as returned by g_signal_lookup().detail
- the detail which the signal was emitted with.
-
signalStopEmissionByName
Stops a signal's current emission.This is just like g_signal_stop_emission() except it will look up the signal id for you.
- Parameters:
instance
- the object whose signal handlers you wish to stop.detailedSignal
- a string of the form "signal-name::detail".
-
signalTypeCclosureNew
Creates a new closure which invokes the function found at the offsetstructOffset
in the class structure of the interface or classed type identified byitype
.- Parameters:
itype
- theGType
identifier of an interface or classed typestructOffset
- the offset of the member function ofitype
's class structure which is to be invoked by the new closure- Returns:
- a floating reference to a new
GCClosure
-
strdupValueContents
Return a newly allocated string, which describes the contents of aGValue
. The main purpose of this function is to describeGValue
contents for debugging output, the way in which the contents are described may change between different GLib versions.- Parameters:
value
-GValue
which contents are to be described.- Returns:
- Newly allocated string.
-
typeAddClassCacheFunc
public static void typeAddClassCacheFunc(@Nullable @Nullable MemorySegment cacheData, TypeClassCacheFunc cacheFunc) Adds aGTypeClassCacheFunc
to be called before the reference count of a class goes from one to zero. This can be used to prevent premature class destruction. All installedGTypeClassCacheFunc
functions will be chained until one of them returnstrue
. The functions have to check the class id passed in to figure whether they actually want to cache the class of this type, since all classes are routed through the sameGTypeClassCacheFunc
chain.- Parameters:
cacheData
- data to be passed tocacheFunc
cacheFunc
- aGTypeClassCacheFunc
-
typeAddClassPrivate
Registers a private class structure for a classed type; when the class is allocated, the private structures for the class and all of its parent types are allocated sequentially in the same memory block as the public structures, and are zero-filled.This function should be called in the type's get_type() function after the type is registered. The private structure can be retrieved using the G_TYPE_CLASS_GET_PRIVATE() macro.
- Parameters:
classType
- GType of a classed typeprivateSize
- size of private structure
-
typeAddInstancePrivate
-
typeAddInterfaceCheck
public static void typeAddInterfaceCheck(@Nullable @Nullable MemorySegment checkData, TypeInterfaceCheckFunc checkFunc) Adds a function to be called after an interface vtable is initialized for any class (i.e. after theinterfaceInit
member ofGInterfaceInfo
has been called).This function is useful when you want to check an invariant that depends on the interfaces of a class. For instance, the implementation of
GObject
uses this facility to check that an object implements all of the properties that are defined on its interfaces.- Parameters:
checkData
- data to pass tocheckFunc
checkFunc
- function to be called after each interface is initialized
-
typeAddInterfaceDynamic
public static void typeAddInterfaceDynamic(Type instanceType, Type interfaceType, TypePlugin plugin) AddsinterfaceType
to the dynamicinstanceType
. The information contained in theGTypePlugin
structure pointed to byplugin
is used to manage the relationship.- Parameters:
instanceType
-GType
value of an instantiatable typeinterfaceType
-GType
value of an interface typeplugin
-GTypePlugin
structure to retrieve theGInterfaceInfo
from
-
typeAddInterfaceStatic
public static void typeAddInterfaceStatic(Type instanceType, Type interfaceType, InterfaceInfo info) AddsinterfaceType
to the staticinstanceType
. The information contained in theGInterfaceInfo
structure pointed to byinfo
is used to manage the relationship.- Parameters:
instanceType
-GType
value of an instantiatable typeinterfaceType
-GType
value of an interface typeinfo
-GInterfaceInfo
structure for this (instanceType
,interfaceType
) combination
-
typeCheckClassCast
-
typeCheckClassIsA
-
typeCheckInstance
Private helper function to aid implementation of the G_TYPE_CHECK_INSTANCE() macro.- Parameters:
instance
- a validGTypeInstance
structure- Returns:
true
ifinstance
is valid,false
otherwise
-
typeCheckInstanceCast
-
typeCheckInstanceIsA
-
typeCheckInstanceIsFundamentallyA
public static boolean typeCheckInstanceIsFundamentallyA(TypeInstance instance, Type fundamentalType) -
typeCheckIsValueType
-
typeCheckValue
-
typeCheckValueHolds
-
typeChildren
-
typeCreateInstance
Creates and initializes an instance oftype
iftype
is valid and can be instantiated. The type system only performs basic allocation and structure setups for instances: actual instance creation should happen through functions supplied by the type's fundamental type implementation. So use of g_type_create_instance() is reserved for implementers of fundamental types only. E.g. instances of theGObject
hierarchy should be created via g_object_new() and never directly through g_type_create_instance() which doesn't handle things like singleton objects or object construction.The extended members of the returned instance are guaranteed to be filled with zeros.
Note: Do not use this function, unless you're implementing a fundamental type. Also language bindings should not use this function, but g_object_new() instead.
- Parameters:
type
- an instantiatable type to create an instance for- Returns:
- an allocated and initialized instance, subject to further treatment by the fundamental type implementation
-
typeDefaultInterfacePeek
If the interface typegType
is currently in use, returns its default interface vtable.- Parameters:
gType
- an interface type- Returns:
- the default
vtable for the interface, or
null
if the type is not currently in use
-
typeDefaultInterfaceRef
Increments the reference count for the interface typegType
, and returns the default interface vtable for the type.If the type is not currently in use, then the default vtable for the type will be created and initialized by calling the base interface init and default vtable init functions for the type (the
baseInit
andclassInit
members ofGTypeInfo
). Calling g_type_default_interface_ref() is useful when you want to make sure that signals and properties for an interface have been installed.- Parameters:
gType
- an interface type- Returns:
- the default vtable for the interface; call g_type_default_interface_unref() when you are done using the interface.
-
typeDefaultInterfaceUnref
Decrements the reference count for the type corresponding to the interface default vtablegIface
. If the type is dynamic, then when no one is using the interface and all references have been released, the finalize function for the interface's default vtable (theclassFinalize
member ofGTypeInfo
) will be called.- Parameters:
gIface
- the default vtable structure for an interface, as returned by g_type_default_interface_ref()
-
typeDepth
Returns the length of the ancestry of the passed in type. This includes the type itself, so that e.g. a fundamental type has depth 1.- Parameters:
type
- aGType
- Returns:
- the depth of
type
-
typeEnsure
Ensures that the indicatedtype
has been registered with the type system, and its _class_init() method has been run.In theory, simply calling the type's _get_type() method (or using the corresponding macro) is supposed take care of this. However, _get_type() methods are often marked
G_GNUC_CONST
for performance reasons, even though this is technically incorrect (sinceG_GNUC_CONST
requires that the function not have side effects, which _get_type() methods do on the first call). As a result, if you write a bare call to a _get_type() macro, it may get optimized out by the compiler. Using g_type_ensure() guarantees that the type's _get_type() method is called.- Parameters:
type
- aGType
-
typeFreeInstance
Frees an instance of a type, returning it to the instance pool for the type, if there is one.Like g_type_create_instance(), this function is reserved for implementors of fundamental types.
- Parameters:
instance
- an instance of a type
-
typeFromName
Look up the type ID from a given type name, returning 0 if no type has been registered under this name (this is the preferred method to find out by name whether a specific type has been registered yet).- Parameters:
name
- type name to look up- Returns:
- corresponding type ID or 0
-
typeFundamental
-
typeFundamentalNext
Returns the next free fundamental type id which can be used to register a new fundamental type with g_type_register_fundamental(). The returned type ID represents the highest currently registered fundamental type identifier.- Returns:
- the next available fundamental type ID to be registered, or 0 if the type system ran out of fundamental type IDs
-
typeGetInstanceCount
Returns the number of instances allocated of the particular type; this is only available if GLib is built with debugging support and theinstance-count
debug flag is set (by setting theGOBJECT_DEBUG
variable to includeinstance-count
).- Parameters:
type
- aGType
- Returns:
- the number of instances allocated of the given type; if instance counts are not available, returns 0.
-
typeGetPlugin
Returns theGTypePlugin
structure fortype
.- Parameters:
type
-GType
to retrieve the plugin for- Returns:
- the corresponding plugin
if
type
is a dynamic type,null
otherwise
-
typeGetQdata
Obtains data which has previously been attached totype
with g_type_set_qdata().Note that this does not take subtyping into account; data attached to one type with g_type_set_qdata() cannot be retrieved from a subtype using g_type_get_qdata().
- Parameters:
type
- aGType
quark
- aGQuark
id to identify the data- Returns:
- the data, or
null
if no data was found
-
typeGetTypeRegistrationSerial
public static int typeGetTypeRegistrationSerial()Returns an opaque serial number that represents the state of the set of registered types. Any time a type is registered this serial changes, which means you can cache information based on type lookups (such as g_type_from_name()) and know if the cache is still valid at a later time by comparing the current serial with the one at the type lookup.- Returns:
- An unsigned int, representing the state of type registrations
-
typeInit
Deprecated.the type system is now initialised automaticallyThis function used to initialise the type system. Since GLib 2.36, the type system is initialised automatically and this function does nothing. -
typeInitWithDebugFlags
Deprecated.the type system is now initialised automaticallyThis function used to initialise the type system with debugging flags. Since GLib 2.36, the type system is initialised automatically and this function does nothing.If you need to enable debugging features, use the
GOBJECT_DEBUG
environment variable.- Parameters:
debugFlags
- bitwise combination ofGTypeDebugFlags
values for debugging purposes
-
typeInitWithDebugFlags
Deprecated.the type system is now initialised automaticallyThis function used to initialise the type system with debugging flags. Since GLib 2.36, the type system is initialised automatically and this function does nothing.If you need to enable debugging features, use the
GOBJECT_DEBUG
environment variable.- Parameters:
debugFlags
- bitwise combination ofGTypeDebugFlags
values for debugging purposes
-
typeInterfaces
Return a newly allocated and 0-terminated array of type IDs, listing the interface types thattype
conforms to.- Parameters:
type
- the type to list interface types for- Returns:
- Newly allocated and 0-terminated array of interface types, free with g_free()
-
typeIsA
IfisAType
is a derivable type, check whethertype
is a descendant ofisAType
. IfisAType
is an interface, check whethertype
conforms to it.- Parameters:
type
- type to check ancestry forisAType
- possible ancestor oftype
or interface thattype
could conform to- Returns:
true
iftype
is aisAType
-
typeName
Get the unique name that is assigned to a type ID. Note that this function (like all other GType API) cannot cope with invalid type IDs.G_TYPE_INVALID
may be passed to this function, as may be any other validly registered type ID, but randomized type IDs should not be passed in and will most likely lead to a crash.- Parameters:
type
- type to return name for- Returns:
- static type name or
null
-
typeNameFromClass
-
typeNameFromInstance
-
typeNextBase
Given aleafType
and arootType
which is contained in its ancestry, return the type thatrootType
is the immediate parent of. In other words, this function determines the type that is derived directly fromrootType
which is also a base class ofleafType
. Given a root type and a leaf type, this function can be used to determine the types and order in which the leaf type is descended from the root type.- Parameters:
leafType
- descendant ofrootType
and the type to be returnedrootType
- immediate parent of the returned type- Returns:
- immediate child of
rootType
and ancestor ofleafType
-
typeParent
-
typeQname
-
typeQuery
Queries the type system for information about a specific type.This function will fill in a user-provided structure to hold type-specific information. If an invalid
GType
is passed in, thetype
member of theGTypeQuery
is 0. All members filled into theGTypeQuery
structure should be considered constant and have to be left untouched.Since GLib 2.78, this function allows queries on dynamic types. Previously it only supported static types.
- Parameters:
type
-GType
of a static, classed typequery
- a user provided structure that is filled in with constant values upon success
-
typeRegisterDynamic
public static Type typeRegisterDynamic(Type parentType, String typeName, TypePlugin plugin, Set<TypeFlags> flags) RegisterstypeName
as the name of a new dynamic type derived fromparentType
. The type system uses the information contained in theGTypePlugin
structure pointed to byplugin
to manage the type and its instances (if not abstract). The value offlags
determines the nature (e.g. abstract or not) of the type.- Parameters:
parentType
- type from which this type will be derivedtypeName
- 0-terminated string used as the name of the new typeplugin
-GTypePlugin
structure to retrieve theGTypeInfo
fromflags
- bitwise combination ofGTypeFlags
values- Returns:
- the new type identifier or
G_TYPE_INVALID
if registration failed
-
typeRegisterDynamic
public static Type typeRegisterDynamic(Type parentType, String typeName, TypePlugin plugin, TypeFlags... flags) RegisterstypeName
as the name of a new dynamic type derived fromparentType
. The type system uses the information contained in theGTypePlugin
structure pointed to byplugin
to manage the type and its instances (if not abstract). The value offlags
determines the nature (e.g. abstract or not) of the type.- Parameters:
parentType
- type from which this type will be derivedtypeName
- 0-terminated string used as the name of the new typeplugin
-GTypePlugin
structure to retrieve theGTypeInfo
fromflags
- bitwise combination ofGTypeFlags
values- Returns:
- the new type identifier or
G_TYPE_INVALID
if registration failed
-
typeRegisterFundamental
public static Type typeRegisterFundamental(Type typeId, String typeName, TypeInfo info, TypeFundamentalInfo finfo, Set<TypeFlags> flags) RegisterstypeId
as the predefined identifier andtypeName
as the name of a fundamental type. IftypeId
is already registered, or a type namedtypeName
is already registered, the behaviour is undefined. The type system uses the information contained in theGTypeInfo
structure pointed to byinfo
and theGTypeFundamentalInfo
structure pointed to byfinfo
to manage the type and its instances. The value offlags
determines additional characteristics of the fundamental type.- Parameters:
typeId
- a predefined type identifiertypeName
- 0-terminated string used as the name of the new typeinfo
-GTypeInfo
structure for this typefinfo
-GTypeFundamentalInfo
structure for this typeflags
- bitwise combination ofGTypeFlags
values- Returns:
- the predefined type identifier
-
typeRegisterFundamental
public static Type typeRegisterFundamental(Type typeId, String typeName, TypeInfo info, TypeFundamentalInfo finfo, TypeFlags... flags) RegisterstypeId
as the predefined identifier andtypeName
as the name of a fundamental type. IftypeId
is already registered, or a type namedtypeName
is already registered, the behaviour is undefined. The type system uses the information contained in theGTypeInfo
structure pointed to byinfo
and theGTypeFundamentalInfo
structure pointed to byfinfo
to manage the type and its instances. The value offlags
determines additional characteristics of the fundamental type.- Parameters:
typeId
- a predefined type identifiertypeName
- 0-terminated string used as the name of the new typeinfo
-GTypeInfo
structure for this typefinfo
-GTypeFundamentalInfo
structure for this typeflags
- bitwise combination ofGTypeFlags
values- Returns:
- the predefined type identifier
-
typeRegisterStatic
public static Type typeRegisterStatic(Type parentType, String typeName, TypeInfo info, Set<TypeFlags> flags) RegisterstypeName
as the name of a new static type derived fromparentType
. The type system uses the information contained in theGTypeInfo
structure pointed to byinfo
to manage the type and its instances (if not abstract). The value offlags
determines the nature (e.g. abstract or not) of the type.- Parameters:
parentType
- type from which this type will be derivedtypeName
- 0-terminated string used as the name of the new typeinfo
-GTypeInfo
structure for this typeflags
- bitwise combination ofGTypeFlags
values- Returns:
- the new type identifier
-
typeRegisterStatic
public static Type typeRegisterStatic(Type parentType, String typeName, TypeInfo info, TypeFlags... flags) RegisterstypeName
as the name of a new static type derived fromparentType
. The type system uses the information contained in theGTypeInfo
structure pointed to byinfo
to manage the type and its instances (if not abstract). The value offlags
determines the nature (e.g. abstract or not) of the type.- Parameters:
parentType
- type from which this type will be derivedtypeName
- 0-terminated string used as the name of the new typeinfo
-GTypeInfo
structure for this typeflags
- bitwise combination ofGTypeFlags
values- Returns:
- the new type identifier
-
typeRegisterStaticSimple
public static Type typeRegisterStaticSimple(Type parentType, String typeName, int classSize, ClassInitFunc classInit, int instanceSize, InstanceInitFunc instanceInit, Set<TypeFlags> flags) RegisterstypeName
as the name of a new static type derived fromparentType
. The value offlags
determines the nature (e.g. abstract or not) of the type. It works by filling aGTypeInfo
struct and calling g_type_register_static().- Parameters:
parentType
- type from which this type will be derivedtypeName
- 0-terminated string used as the name of the new typeclassSize
- size of the class structure (seeGTypeInfo
)classInit
- location of the class initialization function (seeGTypeInfo
)instanceSize
- size of the instance structure (seeGTypeInfo
)instanceInit
- location of the instance initialization function (seeGTypeInfo
)flags
- bitwise combination ofGTypeFlags
values- Returns:
- the new type identifier
-
typeRegisterStaticSimple
public static Type typeRegisterStaticSimple(Type parentType, String typeName, int classSize, ClassInitFunc classInit, int instanceSize, InstanceInitFunc instanceInit, TypeFlags... flags) RegisterstypeName
as the name of a new static type derived fromparentType
. The value offlags
determines the nature (e.g. abstract or not) of the type. It works by filling aGTypeInfo
struct and calling g_type_register_static().- Parameters:
parentType
- type from which this type will be derivedtypeName
- 0-terminated string used as the name of the new typeclassSize
- size of the class structure (seeGTypeInfo
)classInit
- location of the class initialization function (seeGTypeInfo
)instanceSize
- size of the instance structure (seeGTypeInfo
)instanceInit
- location of the instance initialization function (seeGTypeInfo
)flags
- bitwise combination ofGTypeFlags
values- Returns:
- the new type identifier
-
typeRemoveClassCacheFunc
public static void typeRemoveClassCacheFunc(@Nullable @Nullable MemorySegment cacheData, TypeClassCacheFunc cacheFunc) Removes a previously installedGTypeClassCacheFunc
. The cache maintained bycacheFunc
has to be empty when calling g_type_remove_class_cache_func() to avoid leaks.- Parameters:
cacheData
- data that was given when addingcacheFunc
cacheFunc
- aGTypeClassCacheFunc
-
typeRemoveInterfaceCheck
public static void typeRemoveInterfaceCheck(@Nullable @Nullable MemorySegment checkData, TypeInterfaceCheckFunc checkFunc) Removes an interface check function added with g_type_add_interface_check().- Parameters:
checkData
- callback data passed to g_type_add_interface_check()checkFunc
- callback function passed to g_type_add_interface_check()
-
typeSetQdata
Attaches arbitrary data to a type.- Parameters:
type
- aGType
quark
- aGQuark
id to identify the datadata
- the data
-
typeTestFlags
-
variantGetGtype
-