Class SignalHandler

java.lang.Object
ch.bailu.gtk.lib.handler.SignalHandler

public class SignalHandler extends Object
GTK Signal (Callback) resource Stores java reference to callback in a hash map Provides functions to disconnect and free signal (with callback)
  • Constructor Details

    • SignalHandler

      public SignalHandler(Pointer instance, String detailedSignal, com.sun.jna.Callback callback)
  • Method Details

    • disconnect

      public void disconnect(String detailedSignal)
      Disconnect signal and free java reference to callback if detailedSignal (signal name) are equal
      Parameters:
      detailedSignal - the signal name, for example "clicked"
    • disconnect

      public void disconnect()
      Disconnect signal and free java reference to callback
    • disconnect

      public static void disconnect(Pointer instance)
      disconnect all signals of instance and free java references of callbacks
      Parameters:
      instance - the instance
    • disconnect

      public static void disconnect(Pointer instance, String detailedSignal)
      Disconnect all signals of instance with detailedSignal (signal name) and free java references of callbacks
      Parameters:
      instance - disconnect all signals of this instance
      detailedSignal - the signal name, for example "clicked"
    • getDetailedSignal

      public String getDetailedSignal()
      Get signal name (detailedSignal) of this signal
      Returns:
      the signal name, for example: "clicked"
    • getInstance

      public Pointer getInstance()
      Return instance this signal belongs to
      Returns:
      instance
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • dump

      public static void dump(PrintStream out)
      Dump resources (contents of internal map as text) to stream
      Parameters:
      out - stream