Class HookList

All Implemented Interfaces:
PointerInterface

public class HookList extends Record
The #GHookList struct represents a list of hook functions.

https://docs.gtk.org/glib/struct.HookList.html

  • Field Details

  • Constructor Details

  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • setFieldSeqId

      public void setFieldSeqId(long seq_id)
      the next free #GHook id
    • getFieldSeqId

      public long getFieldSeqId()
      the next free #GHook id
    • setFieldHookSize

      public void setFieldHookSize(int hook_size)
      the size of the #GHookList elements, in bytes
    • getFieldHookSize

      public int getFieldHookSize()
      the size of the #GHookList elements, in bytes
    • setFieldIsSetup

      public void setFieldIsSetup(int is_setup)
      1 if the #GHookList has been initialized
    • getFieldIsSetup

      public int getFieldIsSetup()
      1 if the #GHookList has been initialized
    • setFieldHooks

      public void setFieldHooks(Hook hooks)
      the first #GHook element in the list
    • getFieldHooks

      public Hook getFieldHooks()
      the first #GHook element in the list
    • setFieldDummy3

      public void setFieldDummy3(Pointer dummy3)
      unused
    • getFieldDummy3

      public Pointer getFieldDummy3()
      unused
    • setFieldFinalizeHook

      public void setFieldFinalizeHook(HookList.OnHookFinalizeFunc finalize_hook)
      the function to call to finalize a #GHook element.
      The default behaviour is to call the hooks @destroy function
      See HookList.OnHookFinalizeFunc.onHookFinalizeFunc(ch.bailu.gtk.lib.handler.CallbackHandler, ch.bailu.gtk.glib.HookList, ch.bailu.gtk.glib.Hook)
    • getFieldFinalizeHook

      public ch.bailu.gtk.glib.JnaHookList.OnHookFinalizeFunc getFieldFinalizeHook()
      the function to call to finalize a #GHook element.
      The default behaviour is to call the hooks @destroy function
      See HookList.OnHookFinalizeFunc.onHookFinalizeFunc(ch.bailu.gtk.lib.handler.CallbackHandler, ch.bailu.gtk.glib.HookList, ch.bailu.gtk.glib.Hook)
    • clear

      public void clear()
      Removes all the #GHook elements from a #GHookList.
    • init

      public void init(int hook_size)
      Initializes a #GHookList.
      This must be called before the #GHookList is used.
      Parameters:
      hook_size - the size of each element in the #GHookList, typically `sizeof (GHook)`.
    • invoke

      public void invoke(boolean may_recurse)
      Calls all of the #GHook functions in a #GHookList.
      Parameters:
      may_recurse - %TRUE if functions which are already running (e.g. in another thread) can be called. If set to %FALSE, these are skipped
    • invokeCheck

      public void invokeCheck(boolean may_recurse)
      Calls all of the #GHook functions in a #GHookList.
      Any function which returns %FALSE is removed from the #GHookList.
      Parameters:
      may_recurse - %TRUE if functions which are already running (e.g. in another thread) can be called. If set to %FALSE, these are skipped
    • marshal

      public void marshal(boolean may_recurse, HookList.OnHookMarshaller marshaller, @Nullable Pointer marshal_data)
      Calls a function on each valid #GHook.
      Parameters:
      may_recurse - %TRUE if hooks which are currently running (e.g. in another thread) are considered valid. If set to %FALSE, these are skipped
      marshaller - the function to call for each #GHook
      marshal_data - data to pass to @marshaller
    • marshalCheck

      public void marshalCheck(boolean may_recurse, HookList.OnHookCheckMarshaller marshaller, @Nullable Pointer marshal_data)
      Calls a function on each valid #GHook and destroys it if the
      function returns %FALSE.
      Parameters:
      may_recurse - %TRUE if hooks which are currently running (e.g. in another thread) are considered valid. If set to %FALSE, these are skipped
      marshaller - the function to call for each #GHook
      marshal_data - data to pass to @marshaller