I want to make a terminal module (data structure and methods) and want
to use them in more instances.
terminal1 = terminalNew ......
terminal2 = terminalNew ......
I need some callbacks for example to get "insert-text" events and i use
the onBufferInsertText to define the callback function
terminalNew :: IO Terminal
terminalNew = do
connectId <- onBufferInsertText textbuffer callback
But the callback function must have this signature:
TextIter -> String -> IO ()
and I don't know how i can decide for which object the function was
I have read the gtk+ doc and the callback has there this signature:
void user_function (GtkTextBuffer *textbuffer,
Here is possible to supply object specific data through user_data.
But how can i do it in Gtk2hs?