Package org.gnome.glib
Class HookList
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.glib.HookList
-
Constructor Summary
ConstructorDescriptionHookList()
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 TypeMethodDescriptionvoid
clear()
Removes all theGHook
elements from aGHookList
.static MemoryLayout
The memory layout of the native struct.void
init
(int hookSize) Initializes aGHookList
.void
invoke
(boolean mayRecurse) Calls all of theGHook
functions in aGHookList
.void
invokeCheck
(boolean mayRecurse) Calls all of theGHook
functions in aGHookList
.void
marshal
(boolean mayRecurse, HookMarshaller marshaller) Calls a function on each validGHook
.void
marshalCheck
(boolean mayRecurse, HookCheckMarshaller marshaller) Calls a function on each validGHook
and destroys it if the function returnsfalse
.Read the value of the fielddummy
.Read the value of the fielddummy3
.Read the value of the fieldfinalize_hook
.Read the value of the fieldhooks
.int
Read the value of the fieldseq_id
.void
writeDummy
(MemorySegment[] dummy, Arena _arena) Write a value in the fielddummy
.void
writeDummy3
(MemorySegment dummy3) Write a value in the fielddummy3
.void
writeFinalizeHook
(HookFinalizeFunc finalizeHook, Arena _arena) Write a value in the fieldfinalize_hook
.void
writeHooks
(Hook hooks) Write a value in the fieldhooks
.void
writeSeqId
(int seqId) Write a value in the fieldseq_id
.Methods inherited from class io.github.jwharm.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 fieldseqId
hooks
- value for the fieldhooks
dummy3
- value for the fielddummy3
finalizeHook
- value for the fieldfinalizeHook
dummy
- value for the fielddummy
arena
- 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 fieldseqId
hooks
- value for the fieldhooks
dummy3
- value for the fielddummy3
finalizeHook
- value for the fieldfinalizeHook
dummy
- 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
_arena
- to control the memory allocation scope
-
clear
public void clear()Removes all theGHook
elements from aGHookList
. -
init
public void init(int hookSize) Initializes aGHookList
. This must be called before theGHookList
is used.- Parameters:
hookSize
- the size of each element in theGHookList
, typicallysizeof (GHook)
.
-
invoke
public void invoke(boolean mayRecurse) Calls all of theGHook
functions in aGHookList
.- Parameters:
mayRecurse
-true
if 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 theGHook
functions in aGHookList
. Any function which returnsfalse
is removed from theGHookList
.- Parameters:
mayRecurse
-true
if 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
-true
if 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 validGHook
and destroys it if the function returnsfalse
.- Parameters:
mayRecurse
-true
if 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
-