Package ch.bailu.gtk.lib.handler
Class SignalHandler
java.lang.Object
ch.bailu.gtk.lib.handler.SignalHandler
GTK Signal (Callback) resource
Stores java reference to callback in a hash map
Provides functions to disconnect and free signal (with callback)
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Default signal callback -
Constructor Summary
ConstructorDescriptionSignalHandler
(Pointer instance, String detailedSignal, com.sun.jna.Callback callback) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Disconnect signal and free java reference to callbackstatic void
disconnect
(Pointer instance) disconnect all signals of instance and free java references of callbacksstatic void
disconnect
(Pointer instance, String detailedSignal) Disconnect all signals of instance with detailedSignal (signal name) and free java references of callbacksvoid
disconnect
(String detailedSignal) Disconnect signal and free java reference to callback if detailedSignal (signal name) are equalstatic void
dump
(PrintStream out) Dump resources (contents of internal map as text) to streamGet signal name (detailedSignal) of this signalReturn instance this signal belongs totoString()
-
Constructor Details
-
SignalHandler
-
-
Method Details
-
disconnect
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
disconnect all signals of instance and free java references of callbacks- Parameters:
instance
- the instance
-
disconnect
Disconnect all signals of instance with detailedSignal (signal name) and free java references of callbacks- Parameters:
instance
- disconnect all signals of this instancedetailedSignal
- the signal name, for example "clicked"
-
getDetailedSignal
Get signal name (detailedSignal) of this signal- Returns:
- the signal name, for example: "clicked"
-
getInstance
Return instance this signal belongs to- Returns:
- instance
-
toString
-
dump
Dump resources (contents of internal map as text) to stream- Parameters:
out
- stream
-