aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.xwidget39
-rw-r--r--src/xwidget.c14
2 files changed, 34 insertions, 19 deletions
diff --git a/README.xwidget b/README.xwidget
index cee891931d2..bb058f3b73c 100644
--- a/README.xwidget
+++ b/README.xwidget
@@ -297,8 +297,18 @@ an actual emacs bug manifesting without optimizations.
297There is an attempt to provide an api to send keyboard events to an 297There is an attempt to provide an api to send keyboard events to an
298xwidget, but it doesnt currently work very well. 298xwidget, but it doesnt currently work very well.
299 299
300try gtk event creation instead since that works fine in the webkit osr code. 300*** TODO try gtk event creation instead
301 301since that works fine in the webkit osr code.
302but, oh no, that didn't work for some reason.
303the event seems to receive the event but then the embedded widgets
304hangs.
305
306
307*** TODO examine some library to synthesise events
308xdotool
309xte xautomation
310crikey
311libxdo
302** DONE remove the special-case for when the minibuffer is 312** DONE remove the special-case for when the minibuffer is
303 active. I added some code to reduce the annoying problem display artefacts 313 active. I added some code to reduce the annoying problem display artefacts
304 when making the minibuffer the selected window. This made xwidgets in the 314 when making the minibuffer the selected window. This made xwidgets in the
@@ -794,7 +804,10 @@ http://hg.mozilla.org/incubator/embedding/file/29ac0fe51754/gtk/tests/test.cpp
794 804
795while webkit clearly has the best traction as an embeddee, the 805while webkit clearly has the best traction as an embeddee, the
796offscreen rendering issues makes it interesting to see what ff brings 806offscreen rendering issues makes it interesting to see what ff brings
797to the table. turns out webkit has as good offscreen support as anyone. 807to the table.
808
809turned out webkit has as good offscreen support as anyone, see I went
810with that in the end.
798 811
799 812
800*** DONE text field support 813*** DONE text field support
@@ -865,8 +878,8 @@ simple and extensible, and compatible with other Emacs packages.
865the really cool ideas would need Emacs DOM integration, which is not 878the really cool ideas would need Emacs DOM integration, which is not
866easy. 879easy.
867 880
868 881** webkit related
869** TODO support webkit signals 882*** TODO webkit support webkit signals
870*** TODO particularily document-load-finished 883*** TODO particularily document-load-finished
871http://webkitgtk.org/reference/webkitgtk-webkitwebview.html#WebKitWebView-document-load-finished 884http://webkitgtk.org/reference/webkitgtk-webkitwebview.html#WebKitWebView-document-load-finished
872*** TODO console messages 885*** TODO console messages
@@ -878,8 +891,7 @@ because maybe we can make a simple JS REPL that way.
878prints hello to stdout but theres no way to catch stdout from webkit I 891prints hello to stdout but theres no way to catch stdout from webkit I
879think other than receiving the signal. 892think other than receiving the signal.
880 893
881 894*** DONE webkit flashkiller by default
882** DONE webkit flashkiller by default
883 CLOSED: [2011-07-19 Tue 14:27] 895 CLOSED: [2011-07-19 Tue 14:27]
884while its possible to support plugins in the webkit xwidget, flash has 896while its possible to support plugins in the webkit xwidget, flash has
885issues on 64 bit, and slows down emacs to a halt with off screen 897issues on 64 bit, and slows down emacs to a halt with off screen
@@ -893,23 +905,22 @@ http://stackoverflow.com/questions/4885513/prevent-flash-in-cocoa-webview
893simply use this api: 905simply use this api:
894http://webkitgtk.org/reference/WebKitWebPluginDatabase.html 906http://webkitgtk.org/reference/WebKitWebPluginDatabase.html
895 907
896 908*** TODO webkit downloads
897** TODO webkit downloads
898when clicking a download link in Webkit Emacs should take over and handle it 909when clicking a download link in Webkit Emacs should take over and handle it
899from there. Probably need signals. There are Emacs libraries to 910from there. Probably need signals. There are Emacs libraries to
900download things, with wget etc. 911download things, with wget etc.
901"download-requested" 912"download-requested"
902** TODO webkit alt-text not handled 913*** TODO webkit alt-text not handled
903XKCD use image-title to display a cartoon comment. These mysteriously 914XKCD use image-title to display a cartoon comment. These mysteriously
904don't work ATM. Other mouseovers work though. Maybe webkit tries to 915don't work ATM. Other mouseovers work though. Maybe webkit tries to
905open a new window or something, which wont work. 916open a new window or something, which wont work.
906 917
907** TODO isearch in webkit buffers 918*** TODO webkit isearch in webkit buffers
908have a look at how docview solves it 919have a look at how docview solves it
909webkit_web_view_search_text () 920webkit_web_view_search_text ()
910** TODO webkit relative references doesn't work 921*** TODO webkit relative references doesn't work
911probably because we handle scrolling in a non-standard way 922probably because we handle scrolling in a non-standard way
912** TODO webkit width adjustment handling issue 923*** TODO webkit width adjustment handling issue
913since there are so many levels of clipping and whatnot in xwidgets 924since there are so many levels of clipping and whatnot in xwidgets
914sizing issues are difficult. 925sizing issues are difficult.
915 926
@@ -935,8 +946,6 @@ and then try resizing Epiphany.
935fine-tuning to reduce flicker. 946fine-tuning to reduce flicker.
936 947
937** TODO xwidget allow loading from string from emacs 948** TODO xwidget allow loading from string from emacs
938
939
940** TODO xwidgets doesn't work during bootstrap all of a sudden 949** TODO xwidgets doesn't work during bootstrap all of a sudden
941 950
942* old notes from x_draw_xwidget_glyph_string 951* old notes from x_draw_xwidget_glyph_string
diff --git a/src/xwidget.c b/src/xwidget.c
index b362ca55a1f..6732fad02d5 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -790,6 +790,7 @@ DEFUN ("xwidget-send-keyboard-event", Fxwidget_send_keyboard_event, Sxwidget_sen
790 ) 790 )
791 (Lisp_Object xwidget, Lisp_Object keydescriptor) 791 (Lisp_Object xwidget, Lisp_Object keydescriptor)
792{ 792{
793 //TODO this code crashes and ive tried many different strategies
793 int keyval = 0x058; //X 794 int keyval = 0x058; //X
794 char *keystring = ""; 795 char *keystring = "";
795 796
@@ -798,11 +799,16 @@ DEFUN ("xwidget-send-keyboard-event", Fxwidget_send_keyboard_event, Sxwidget_sen
798 GdkEventKey* ev = (GdkEventKey*)gdk_event_new(GDK_KEY_PRESS); 799 GdkEventKey* ev = (GdkEventKey*)gdk_event_new(GDK_KEY_PRESS);
799 ev->window = gtk_widget_get_window(xw->widget_osr); 800 ev->window = gtk_widget_get_window(xw->widget_osr);
800 ev->keyval = keyval; 801 ev->keyval = keyval;
801 gdk_event_put((GdkEvent*)ev); 802 ev->time = 0;
803 GdkDeviceManager* manager = gdk_display_get_device_manager(gdk_window_get_display(ev->window));
804 gdk_event_set_device (ev, gdk_device_manager_get_client_pointer(manager));
805 //gdk_event_put((GdkEvent*)ev);
806 g_signal_emit_by_name(ev->window,"key-press-event", ev);
802 ev->type = GDK_KEY_RELEASE; 807 ev->type = GDK_KEY_RELEASE;
803 gdk_event_put((GdkEvent*)ev); 808 //gdk_event_put((GdkEvent*)ev);
804 gtk_main_do_event(ev); 809 g_signal_emit_by_name(ev->window,"key-release-event", ev);
805 gdk_event_free((GdkEvent*)ev); 810 //gtk_main_do_event(ev);
811 //gdk_event_free((GdkEvent*)ev);
806 812
807 return Qnil; 813 return Qnil;
808} 814}