Package ch.bailu.gtk.glib
Klasse Hook
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.glib.Hook
- Alle implementierten Schnittstellen:
PointerInterface
The #GHook struct represents a single hook function in a #GHookList.
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic interfacestatic interfacestatic interface -
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final Stringdata which is passed to func when this hook is invokedstatic final Stringthe default @finalize_hook function of a #GHookList calls
this member of the hook that is being finalized
SeeHook.OnDestroyNotify.onDestroyNotify(ch.bailu.gtk.lib.handler.CallbackHandler, ch.bailu.gtk.type.Pointer)static final Stringflags which are set for this hook.static final Stringthe function to call when this hook is invoked.static final Stringthe id of this hook, which is unique within its liststatic final Stringpointer to the next hook in the liststatic final Stringpointer to the previous hook in the liststatic final Stringthe reference count of this hook -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic HookAllocates space for a #GHook and initializes it.intcompareIds(Hook sibling) Compares the ids of two #GHook elements, returning a negative value
if the second id is greater than the first.static booleanDestroys a #GHook, given its ID.static voiddestroyLink(HookList hook_list, Hook hook) Removes one #GHook from a #GHookList, marking it
inactive and calling g_hook_unref() on it.static Hookfind(HookList hook_list, boolean need_valids, Hook.OnHookFindFunc func, Pointer data) Finds a #GHook in a #GHookList using the given function to
test for a match.static HookFinds a #GHook in a #GHookList with the given data.static HookFinds a #GHook in a #GHookList with the given function.static HookfindFuncData(HookList hook_list, boolean need_valids, Pointer func, Pointer data) Finds a #GHook in a #GHookList with the given function and data.static HookfirstValid(HookList hook_list, boolean may_be_in_call) Returns the first #GHook in a #GHookList which has not been destroyed.static voidCalls the #GHookList @finalize_hook function if it exists,
and frees the memory allocated for the #GHook.static HookReturns the #GHook with the given id, or %NULL if it is not found.static ClassHandlerdata which is passed to func when this hook is invokedch.bailu.gtk.glib.JnaHook.OnDestroyNotifythe default @finalize_hook function of a #GHookList calls
this member of the hook that is being finalized
SeeHook.OnDestroyNotify.onDestroyNotify(ch.bailu.gtk.lib.handler.CallbackHandler, ch.bailu.gtk.type.Pointer)intflags which are set for this hook.the function to call when this hook is invoked.longthe id of this hook, which is unique within its listpointer to the next hook in the listpointer to the previous hook in the listintthe reference count of this hookstatic voidinsertBefore(HookList hook_list, Hook sibling, Hook hook) Inserts a #GHook into a #GHookList, before a given #GHook.static voidinsertSorted(HookList hook_list, Hook hook, Hook.OnHookCompareFunc func) Inserts a #GHook into a #GHookList, sorted by the given function.static HookReturns the next #GHook in a #GHookList which has not been destroyed.static voidPrepends a #GHook on the start of a #GHookList.static HookIncrements the reference count for a #GHook.voidsetFieldData(Pointer data) data which is passed to func when this hook is invokedvoidsetFieldDestroy(Hook.OnDestroyNotify destroy) the default @finalize_hook function of a #GHookList calls
this member of the hook that is being finalized
SeeHook.OnDestroyNotify.onDestroyNotify(ch.bailu.gtk.lib.handler.CallbackHandler, ch.bailu.gtk.type.Pointer)voidsetFieldFlags(int flags) flags which are set for this hook.voidsetFieldFunc(Pointer func) the function to call when this hook is invoked.voidsetFieldHookId(long hook_id) the id of this hook, which is unique within its listvoidsetFieldNext(Hook next) pointer to the next hook in the listvoidsetFieldPrev(Hook prev) pointer to the previous hook in the listvoidsetFieldRefCount(int ref_count) the reference count of this hookstatic voidDecrements the reference count of a #GHook.Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacksVon Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNullVon Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitVon Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Felddetails
-
DATA
data which is passed to func when this hook is invoked- Siehe auch:
-
NEXT
pointer to the next hook in the list- Siehe auch:
-
PREV
pointer to the previous hook in the list- Siehe auch:
-
REF_COUNT
the reference count of this hook- Siehe auch:
-
HOOK_ID
the id of this hook, which is unique within its list- Siehe auch:
-
FLAGS
flags which are set for this hook. See #GHookFlagMask for
predefined flags- Siehe auch:
-
FUNC
the function to call when this hook is invoked. The possible
signatures for this function are #GHookFunc and #GHookCheckFunc- Siehe auch:
-
DESTROY
the default @finalize_hook function of a #GHookList calls
this member of the hook that is being finalized
SeeHook.OnDestroyNotify.onDestroyNotify(ch.bailu.gtk.lib.handler.CallbackHandler, ch.bailu.gtk.type.Pointer)- Siehe auch:
-
-
Konstruktordetails
-
Hook
-
Hook
public Hook()
-
-
Methodendetails
-
getClassHandler
-
setFieldData
data which is passed to func when this hook is invoked -
getFieldData
data which is passed to func when this hook is invoked -
setFieldNext
pointer to the next hook in the list -
getFieldNext
pointer to the next hook in the list -
setFieldPrev
pointer to the previous hook in the list -
getFieldPrev
pointer to the previous hook in the list -
setFieldRefCount
public void setFieldRefCount(int ref_count) the reference count of this hook -
getFieldRefCount
public int getFieldRefCount()the reference count of this hook -
setFieldHookId
public void setFieldHookId(long hook_id) the id of this hook, which is unique within its list -
getFieldHookId
public long getFieldHookId()the id of this hook, which is unique within its list -
setFieldFlags
public void setFieldFlags(int flags) flags which are set for this hook. See #GHookFlagMask for
predefined flags -
getFieldFlags
public int getFieldFlags()flags which are set for this hook. See #GHookFlagMask for
predefined flags -
setFieldFunc
the function to call when this hook is invoked. The possible
signatures for this function are #GHookFunc and #GHookCheckFunc -
getFieldFunc
the function to call when this hook is invoked. The possible
signatures for this function are #GHookFunc and #GHookCheckFunc -
setFieldDestroy
the default @finalize_hook function of a #GHookList calls
this member of the hook that is being finalized
SeeHook.OnDestroyNotify.onDestroyNotify(ch.bailu.gtk.lib.handler.CallbackHandler, ch.bailu.gtk.type.Pointer) -
getFieldDestroy
public ch.bailu.gtk.glib.JnaHook.OnDestroyNotify getFieldDestroy()the default @finalize_hook function of a #GHookList calls
this member of the hook that is being finalized
SeeHook.OnDestroyNotify.onDestroyNotify(ch.bailu.gtk.lib.handler.CallbackHandler, ch.bailu.gtk.type.Pointer) -
compareIds
Compares the ids of two #GHook elements, returning a negative value
if the second id is greater than the first.- Parameter:
sibling- a #GHook to compare with @new_hook- Gibt zurück:
- a value <= 0 if the id of @sibling is >= the id of @new_hook
-
alloc
Allocates space for a #GHook and initializes it.- Parameter:
hook_list- a #GHookList- Gibt zurück:
- a new #GHook
-
destroy
Destroys a #GHook, given its ID.- Parameter:
hook_list- a #GHookListhook_id- a hook ID- Gibt zurück:
- %TRUE if the #GHook was found in the #GHookList and destroyed
-
destroyLink
Removes one #GHook from a #GHookList, marking it
inactive and calling g_hook_unref() on it.- Parameter:
hook_list- a #GHookListhook- the #GHook to remove
-
find
public static Hook find(@Nonnull HookList hook_list, boolean need_valids, Hook.OnHookFindFunc func, @Nullable Pointer data) Finds a #GHook in a #GHookList using the given function to
test for a match.- Parameter:
hook_list- a #GHookListneed_valids- %TRUE if #GHook elements which have been destroyed should be skippedfunc- the function to call for each #GHook, which should return %TRUE when the #GHook has been founddata- the data to pass to @func- Gibt zurück:
- the found #GHook or %NULL if no matching #GHook is found
-
findData
public static Hook findData(@Nonnull HookList hook_list, boolean need_valids, @Nullable Pointer data) Finds a #GHook in a #GHookList with the given data.- Parameter:
hook_list- a #GHookListneed_valids- %TRUE if #GHook elements which have been destroyed should be skippeddata- the data to find- Gibt zurück:
- the #GHook with the given @data or %NULL if no matching #GHook is found
-
findFunc
public static Hook findFunc(@Nonnull HookList hook_list, boolean need_valids, @Nullable Pointer func) Finds a #GHook in a #GHookList with the given function.- Parameter:
hook_list- a #GHookListneed_valids- %TRUE if #GHook elements which have been destroyed should be skippedfunc- the function to find- Gibt zurück:
- the #GHook with the given @func or %NULL if no matching #GHook is found
-
findFuncData
public static Hook findFuncData(@Nonnull HookList hook_list, boolean need_valids, @Nonnull Pointer func, @Nullable Pointer data) Finds a #GHook in a #GHookList with the given function and data.- Parameter:
hook_list- a #GHookListneed_valids- %TRUE if #GHook elements which have been destroyed should be skippedfunc- the function to finddata- the data to find- Gibt zurück:
- the #GHook with the given @func and @data or %NULL if no matching #GHook is found
-
firstValid
Returns the first #GHook in a #GHookList which has not been destroyed.
The reference count for the #GHook is incremented, so you must call
g_hook_unref() to restore it when no longer needed. (Or call
g_hook_next_valid() if you are stepping through the #GHookList.)- Parameter:
hook_list- a #GHookListmay_be_in_call- %TRUE if hooks which are currently running (e.g. in another thread) are considered valid. If set to %FALSE, these are skipped- Gibt zurück:
- the first valid #GHook, or %NULL if none are valid
-
free
Calls the #GHookList @finalize_hook function if it exists,
and frees the memory allocated for the #GHook.- Parameter:
hook_list- a #GHookListhook- the #GHook to free
-
get
Returns the #GHook with the given id, or %NULL if it is not found.- Parameter:
hook_list- a #GHookListhook_id- a hook id- Gibt zurück:
- the #GHook with the given id, or %NULL if it is not found
-
insertBefore
public static void insertBefore(@Nonnull HookList hook_list, @Nullable Hook sibling, @Nonnull Hook hook) Inserts a #GHook into a #GHookList, before a given #GHook.- Parameter:
hook_list- a #GHookListsibling- the #GHook to insert the new #GHook beforehook- the #GHook to insert
-
insertSorted
public static void insertSorted(@Nonnull HookList hook_list, @Nonnull Hook hook, Hook.OnHookCompareFunc func) Inserts a #GHook into a #GHookList, sorted by the given function.- Parameter:
hook_list- a #GHookListhook- the #GHook to insertfunc- the comparison function used to sort the #GHook elements
-
nextValid
public static Hook nextValid(@Nonnull HookList hook_list, @Nonnull Hook hook, boolean may_be_in_call) Returns the next #GHook in a #GHookList which has not been destroyed.
The reference count for the #GHook is incremented, so you must call
g_hook_unref() to restore it when no longer needed. (Or continue to call
g_hook_next_valid() until %NULL is returned.)- Parameter:
hook_list- a #GHookListhook- the current #GHookmay_be_in_call- %TRUE if hooks which are currently running (e.g. in another thread) are considered valid. If set to %FALSE, these are skipped- Gibt zurück:
- the next valid #GHook, or %NULL if none are valid
-
prepend
Prepends a #GHook on the start of a #GHookList.- Parameter:
hook_list- a #GHookListhook- the #GHook to add to the start of @hook_list
-
ref
Increments the reference count for a #GHook.- Parameter:
hook_list- a #GHookListhook- the #GHook to increment the reference count of- Gibt zurück:
- the @hook that was passed in (since 2.6)
-
unref
Decrements the reference count of a #GHook.
If the reference count falls to 0, the #GHook is removed
from the #GHookList and g_hook_free() is called to free it.- Parameter:
hook_list- a #GHookListhook- the #GHook to unref
-