Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: GHookList

[12:7] extends: object

The #GHookList struct represents a list of hook functions.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • GHookList (Handle = null)

    Creates a new HookList by wrapping a native handle or another wrapper.

    • @p Handle is the native handle or another wrapper whose handle to adopt.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • clear ()

    Removes all the #GHook elements from a #GHookList.

    • @r None.
  • init (int hook_size)

    Initializes a #GHookList. This must be called before the #GHookList is used.

    • @p hook_size is the size of each element in the #GHookList, typically sizeof (GHook)..
    • @r None.
  • invoke (bool may_recurse)

    Calls all of the #GHook functions in a #GHookList.

    • @p may_recurse is %TRUE if functions which are already running (e.g. in another thread) can be called. If set to %FALSE, these are skipped.
    • @r None.
  • invoke_check (bool may_recurse)

    Calls all of the #GHook functions in a #GHookList. Any function which returns %FALSE is removed from the #GHookList.

    • @p may_recurse is %TRUE if functions which are already running (e.g. in another thread) can be called. If set to %FALSE, these are skipped.
    • @r None.
  • marshal (bool may_recurse, marshal_data)

    Calls a function on each valid #GHook.

    • @p may_recurse is %TRUE if hooks which are currently running (e.g. in another thread) are considered valid. If set to %FALSE, these are skipped.
    • @p marshaller is the function to call for each #GHook.
    • @p marshal_data is data to pass to @marshaller.
    • @r None.
  • marshal_check (bool may_recurse, marshal_data)

    Calls a function on each valid #GHook and destroys it if the function returns %FALSE.

    • @p may_recurse is %TRUE if hooks which are currently running (e.g. in another thread) are considered valid. If set to %FALSE, these are skipped.
    • @p marshaller is the function to call for each #GHook.
    • @p marshal_data is data to pass to @marshaller.
    • @r None.