Documentation ¶
Index ¶
Constants ¶
const FrameSize = 3
FrameSize is the number of frames that FuncStack should trace back from.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
Delete deletes the closure pointer from the registry while also checking for any existing signal handler associated with the given callback ID. If a signal handler is found, then its behavior is similar to DisconnectSignal.
func DisconnectSignal ¶
func DisconnectSignal(handle uint)
DisconnectSignal removes both the signal and the closure associated with it from the internal registry. Since this function will also remove the closure itself from the internal registry, Gtk's disconnect functions should be called first.
func RegisterSignal ¶
RegisterSignal registers the given signal handle to be associated with the closure pointer. This association allows the closure to be removed as well when the signal removal is requested from the user using DisconnectSignal.
Types ¶
type FuncStack ¶
FuncStack wraps a function value and provides function frames containing the caller trace for debugging.
func NewFuncStack ¶
NewFuncStack creates a new FuncStack. It panics if fn is not a function. The given frameSkip is added 2, meaning the first frame from 0 will start from the caller of NewFuncStack.
func NewIdleFuncStack ¶
NewIdleFuncStack works akin to NewFuncStack, but it also validates the given function type for the correct acceptable signatures for SourceFunc while also caching the checks.
func (FuncStack) IsValid ¶
IsValid returns true if the given FuncStack is not a zero-value i.e. valid.
func (FuncStack) TryRepanic ¶
func (fs FuncStack) TryRepanic()
TryRepanic attempts to recover a panic. If successful, it will re-panic with the trace, or none if there is already one.