diff options
author | Camil Staps | 2019-11-01 18:41:10 +0100 |
---|---|---|
committer | Camil Staps | 2019-11-01 18:41:10 +0100 |
commit | 0497dfb79211aa1e64304fa446d230c41ca73daa (patch) | |
tree | cc29910a32b81db4430aff1a74172174039e9c25 /src/Gtk/Widgets/Sheet/Signal.icl | |
parent | Remove dependency on supporting C code (diff) |
Cleanup and add documentation
Diffstat (limited to 'src/Gtk/Widgets/Sheet/Signal.icl')
-rw-r--r-- | src/Gtk/Widgets/Sheet/Signal.icl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Gtk/Widgets/Sheet/Signal.icl b/src/Gtk/Widgets/Sheet/Signal.icl index 6de4209..d08f4dd 100644 --- a/src/Gtk/Widgets/Sheet/Signal.icl +++ b/src/Gtk/Widgets/Sheet/Signal.icl @@ -18,7 +18,7 @@ where TraverseHandler _ -> "traverse" signalHandler handler = case handler of DeactivateHandler f -> SHI_Int_Int_Bool f - EnterPressedHandler f -> SHI_Pointer_Bool \_ -> not <$> f + EnterPressedHandler f -> SHI_Pointer_Bool \_ -> (\p -> p=:StopPropagation) <$> f SheetActivateHandler f -> SHI_Int_Int_Bool \r c -> f r c >>| pure True TraverseHandler f -> SHI_Int_Int_Pointer_Pointer_Bool \oldrow oldcol newrowp newcolp -> let newrow = readInt4S newrowp 0; newcol = readInt4S newcolp 0 in @@ -35,3 +35,7 @@ where appWorld (forceEval (writeInt4 newrowp 0 row)) >>| appWorld (forceEval (writeInt4 newcolp 0 col)) >>| pure True) + +instance tune w GtkSheetSignalHandler | gtkWidget w +where + tune handler widget = installSignalHandler handler widget |