Package org.gnome.glib
Class HookList
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.glib.HookList
-
Constructor Summary
ConstructorsConstructorDescriptionHookList()Allocate a new HookList.HookList(int seqId, Hook hooks, MemorySegment dummy3, HookFinalizeFunc finalizeHook, MemorySegment[] dummy) Allocate a new HookList with the fields set to the provided values.HookList(int seqId, Hook hooks, MemorySegment dummy3, HookFinalizeFunc finalizeHook, MemorySegment[] dummy, Arena arena) Allocate a new HookList with the fields set to the provided values.Allocate a new HookList.HookList(MemorySegment address) Create a HookList proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Removes all theGHookelements from aGHookList.static MemoryLayoutThe memory layout of the native struct.voidinit(int hookSize) Initializes aGHookList.voidinvoke(boolean mayRecurse) Calls all of theGHookfunctions in aGHookList.voidinvokeCheck(boolean mayRecurse) Calls all of theGHookfunctions in aGHookList.voidmarshal(boolean mayRecurse, @Nullable HookMarshaller marshaller) Calls a function on each validGHook.voidmarshalCheck(boolean mayRecurse, @Nullable HookCheckMarshaller marshaller) Calls a function on each validGHookand destroys it if the function returnsfalse.@Nullable MemorySegment @Nullable []Read the value of the fielddummy.Read the value of the fielddummy3.@Nullable HookFinalizeFuncRead the value of the fieldfinalize_hook.Read the value of the fieldhooks.intRead the value of the fieldseq_id.voidwriteDummy(@Nullable MemorySegment @Nullable [] dummy, Arena _arena) Write a value in the fielddummy.voidwriteDummy3(MemorySegment dummy3) Write a value in the fielddummy3.voidwriteFinalizeHook(@Nullable HookFinalizeFunc finalizeHook, Arena _arena) Write a value in the fieldfinalize_hook.voidwriteHooks(Hook hooks) Write a value in the fieldhooks.voidwriteSeqId(int seqId) Write a value in the fieldseq_id.Methods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
HookList
Create a HookList proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
HookList
Allocate a new HookList.- Parameters:
arena- to control the memory allocation scope
-
HookList
public HookList()Allocate a new HookList. The memory is allocated withArena.ofAuto(). -
HookList
public HookList(int seqId, Hook hooks, MemorySegment dummy3, HookFinalizeFunc finalizeHook, MemorySegment[] dummy, Arena arena) Allocate a new HookList with the fields set to the provided values.- Parameters:
seqId- value for the fieldseqIdhooks- value for the fieldhooksdummy3- value for the fielddummy3finalizeHook- value for the fieldfinalizeHookdummy- value for the fielddummyarena- to control the memory allocation scope
-
HookList
public HookList(int seqId, Hook hooks, MemorySegment dummy3, HookFinalizeFunc finalizeHook, MemorySegment[] dummy) Allocate a new HookList with the fields set to the provided values. The memory is allocated withArena.ofAuto().- Parameters:
seqId- value for the fieldseqIdhooks- value for the fieldhooksdummy3- value for the fielddummy3finalizeHook- value for the fieldfinalizeHookdummy- value for the fielddummy
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readSeqId
public int readSeqId()Read the value of the fieldseq_id.- Returns:
- The value of the field
seq_id
-
writeSeqId
public void writeSeqId(int seqId) Write a value in the fieldseq_id.- Parameters:
seqId- The new value for the fieldseq_id
-
readHooks
-
writeHooks
Write a value in the fieldhooks.- Parameters:
hooks- The new value for the fieldhooks
-
readDummy3
Read the value of the fielddummy3.- Returns:
- The value of the field
dummy3
-
writeDummy3
Write a value in the fielddummy3.- Parameters:
dummy3- The new value for the fielddummy3
-
readFinalizeHook
Read the value of the fieldfinalize_hook.- Returns:
- The value of the field
finalize_hook
-
writeFinalizeHook
Write a value in the fieldfinalize_hook.- Parameters:
finalizeHook- The new value for the fieldfinalize_hook_arena- to control the memory allocation scope
-
readDummy
Read the value of the fielddummy.- Returns:
- The value of the field
dummy
-
writeDummy
Write a value in the fielddummy.- Parameters:
dummy- The new value for the fielddummy
-
clear
public void clear()Removes all theGHookelements from aGHookList. -
init
public void init(int hookSize) Initializes aGHookList. This must be called before theGHookListis used.- Parameters:
hookSize- the size of each element in theGHookList, typicallysizeof (GHook).
-
invoke
public void invoke(boolean mayRecurse) Calls all of theGHookfunctions in aGHookList.- Parameters:
mayRecurse-trueif functions which are already running (e.g. in another thread) can be called. If set tofalse, these are skipped
-
invokeCheck
public void invokeCheck(boolean mayRecurse) Calls all of theGHookfunctions in aGHookList. Any function which returnsfalseis removed from theGHookList.- Parameters:
mayRecurse-trueif functions which are already running (e.g. in another thread) can be called. If set tofalse, these are skipped
-
marshal
Calls a function on each validGHook.- Parameters:
mayRecurse-trueif hooks which are currently running (e.g. in another thread) are considered valid. If set tofalse, these are skippedmarshaller- the function to call for eachGHook
-
marshalCheck
Calls a function on each validGHookand destroys it if the function returnsfalse.- Parameters:
mayRecurse-trueif hooks which are currently running (e.g. in another thread) are considered valid. If set tofalse, these are skippedmarshaller- the function to call for eachGHook
-