diff options
Diffstat (limited to 'src/Gtk/Signal.icl')
-rw-r--r-- | src/Gtk/Signal.icl | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/Gtk/Signal.icl b/src/Gtk/Signal.icl index be019b5..fd86293 100644 --- a/src/Gtk/Signal.icl +++ b/src/Gtk/Signal.icl @@ -23,6 +23,7 @@ where DestroyHandler _ -> "destroy" KeyPressHandler _ -> "key-press-event" NextMatchHandler _ -> "next-match" + PopulatePopupHandler _ -> "populate-popup" PreviousMatchHandler _ -> "previous-match" SearchChangedHandler _ -> "search-changed" StopSearchHandler _ -> "stop-search" @@ -34,6 +35,7 @@ where DestroyHandler f -> SHI_Void f KeyPressHandler f -> SHI_Pointer_Bool \ev -> toBool <$> f (GdkEvent ev) NextMatchHandler f -> SHI_Void f + PopulatePopupHandler f -> SHI_Pointer_Void \m -> f (gtkCast m) PreviousMatchHandler f -> SHI_Void f SearchChangedHandler f -> SHI_Void f StopSearchHandler f -> SHI_Void f @@ -55,22 +57,27 @@ installSignalHandler handler widget = where callback handler = case handler of SHI_Void _ -> callback_void - SHI_Int_Int_Bool _ -> callback_int_int_bool + SHI_Pointer_Void _ -> callback_pointer_void SHI_Pointer_Bool _ -> callback_pointer_bool + SHI_Int_Int_Bool _ -> callback_int_int_bool SHI_Int_Int_Pointer_Pointer_Bool _ -> callback_int_int_pointer_pointer_bool callback_void :: Pointer callback_void = code { pushLc handleSignal_void } - callback_int_int_bool :: Pointer - callback_int_int_bool = code { - pushLc handleSignal_int_int_bool + callback_pointer_void :: Pointer + callback_pointer_void = code { + pushLc handleSignal_pointer_void } callback_pointer_bool :: Pointer callback_pointer_bool = code { pushLc handleSignal_pointer_bool } + callback_int_int_bool :: Pointer + callback_int_int_bool = code { + pushLc handleSignal_int_int_bool + } callback_int_int_pointer_pointer_bool :: Pointer callback_int_int_pointer_pointer_bool = code { pushLc handleSignal_int_int_pointer_pointer_bool @@ -141,6 +148,13 @@ handleSignal_void _ id = handleSignal id \h -> case h of -> Just (toInt <$> f) -> Nothing +foreign export handleSignal_pointer_void +handleSignal_pointer_void :: !Pointer !Pointer !Int -> Int +handleSignal_pointer_void _ p id = handleSignal id \h -> case h of + SHI_Pointer_Void f + -> Just (toInt <$> f p) + -> Nothing + foreign export handleSignal_pointer_bool handleSignal_pointer_bool :: !Pointer !Pointer !Int -> Int handleSignal_pointer_bool _ p id = handleSignal id \h -> case h of |