Hi Axel,

I have multi-processese framework like Google Chrome, below is screenshot:

http://farm5.static.flickr.com/4137/4747331678_441d6eb8ec_b.jpg

UI is is render in parent processes with GtkSocket, so all keyPress
event is handle by parent top-level window, i will send key DBus message
to child process if current key is not handle by parent process Window.

In my screenshot, up is webkit browser, down is editor. All those sub-module is 
running in child
process. In editor, i can use some APIs emulate insert key after i receive key
message from DBus. But WebKitGTK+ haven't open APIs let me do some *insert key*
event. So i need propagate key event on WebKit widget in child process.

For propagate key event on child widget, i found three functions: 

    gtk_propagate_event 
(http://library.gnome.org/devel/gtk/unstable/gtk3-General.html#gtk-propagate-event)
    gtk_widget_event    
(http://library.gnome.org/devel/gtk/unstable/GtkWidget.html#gtk-widget-event)
    gtk_main_do_event   
(http://library.gnome.org/devel/gtk/unstable/gtk3-General.html#gtk-main-do-event)

And gtk_main_do_event is right method to synthesize event in child process 
widget.

For my situation, i need convection Key (include attribute eventRelease,
eventSent, eventTime...etc) from ParentProcess to ChildProcess by DBus,
then use "mainDoEvent :: Event -> IO ()" propagate key event with WebKit
child process.

So my question is how to binding gtk_main_do_event ? 
Looks I should use Graphics.UI.Gtk.Gdk.Events.Event and not EventM.

Thanks!

  -- Andy





------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Reply via email to