Interface Settings.ChangeEventCallback

All Superinterfaces:
FunctionPointer
Enclosing class:
Settings
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface Settings.ChangeEventCallback extends FunctionPointer

Functional interface declaration of the ChangeEventCallback callback.

See Also:
  • Method Details

    • run

      boolean run(@Nullable Quark @Nullable [] keys)

      Emitted once per change event that affects this settings object.

      You should connect to this signal only if you are interested in viewing groups of changes before they are split out into multiple emissions of the Gio.Settings::changed signal. For most use cases it is more appropriate to use the Gio.Settings::changed signal.

      In the event that the change event applies to one or more specified keys, keys will be an array of GLib.Quarks of length nKeys. In the event that the change event applies to the Settings object as a whole (ie: potentially every key has been changed) then keys will be NULL and nKeys will be 0.

      The default handler for this signal invokes the Gio.Settings::changed signal for each affected key. If any other connected handler returns true then this default functionality will be suppressed.

    • upcall

      default int upcall(MemorySegment sourceSettings, MemorySegment keys, int nKeys)
      The upcall method is called from native code. The parameters are marshaled and run(Quark[]) is executed.
    • toCallback

      default MemorySegment toCallback(Arena arena)
      Creates a native function pointer to the upcall(MemorySegment, MemorySegment, int) method.
      Specified by:
      toCallback in interface FunctionPointer
      Parameters:
      arena - the arena in which the function pointer is allocated
      Returns:
      the native function pointer