diff options
| author | Joakim Verona | 2011-07-25 01:52:58 +0200 |
|---|---|---|
| committer | Joakim Verona | 2011-07-25 01:52:58 +0200 |
| commit | b60646c64ead035bff3e5ba925f768f36964f661 (patch) | |
| tree | 087aad947e1d067ed5172260217c4646c941a021 | |
| parent | 32feb900b6bbe2e2898984ace501fbb6ed234d49 (diff) | |
| download | emacs-b60646c64ead035bff3e5ba925f768f36964f661.tar.gz emacs-b60646c64ead035bff3e5ba925f768f36964f661.zip | |
non-functional xey send
| -rw-r--r-- | README.xwidget | 39 | ||||
| -rw-r--r-- | src/xwidget.c | 14 |
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. | |||
| 297 | There is an attempt to provide an api to send keyboard events to an | 297 | There is an attempt to provide an api to send keyboard events to an |
| 298 | xwidget, but it doesnt currently work very well. | 298 | xwidget, but it doesnt currently work very well. |
| 299 | 299 | ||
| 300 | try gtk event creation instead since that works fine in the webkit osr code. | 300 | *** TODO try gtk event creation instead |
| 301 | 301 | since that works fine in the webkit osr code. | |
| 302 | but, oh no, that didn't work for some reason. | ||
| 303 | the event seems to receive the event but then the embedded widgets | ||
| 304 | hangs. | ||
| 305 | |||
| 306 | |||
| 307 | *** TODO examine some library to synthesise events | ||
| 308 | xdotool | ||
| 309 | xte xautomation | ||
| 310 | crikey | ||
| 311 | libxdo | ||
| 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 | ||
| 795 | while webkit clearly has the best traction as an embeddee, the | 805 | while webkit clearly has the best traction as an embeddee, the |
| 796 | offscreen rendering issues makes it interesting to see what ff brings | 806 | offscreen rendering issues makes it interesting to see what ff brings |
| 797 | to the table. turns out webkit has as good offscreen support as anyone. | 807 | to the table. |
| 808 | |||
| 809 | turned out webkit has as good offscreen support as anyone, see I went | ||
| 810 | with 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. | |||
| 865 | the really cool ideas would need Emacs DOM integration, which is not | 878 | the really cool ideas would need Emacs DOM integration, which is not |
| 866 | easy. | 879 | easy. |
| 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 |
| 871 | http://webkitgtk.org/reference/webkitgtk-webkitwebview.html#WebKitWebView-document-load-finished | 884 | http://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. | |||
| 878 | prints hello to stdout but theres no way to catch stdout from webkit I | 891 | prints hello to stdout but theres no way to catch stdout from webkit I |
| 879 | think other than receiving the signal. | 892 | think 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] |
| 884 | while its possible to support plugins in the webkit xwidget, flash has | 896 | while its possible to support plugins in the webkit xwidget, flash has |
| 885 | issues on 64 bit, and slows down emacs to a halt with off screen | 897 | issues 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 | |||
| 893 | simply use this api: | 905 | simply use this api: |
| 894 | http://webkitgtk.org/reference/WebKitWebPluginDatabase.html | 906 | http://webkitgtk.org/reference/WebKitWebPluginDatabase.html |
| 895 | 907 | ||
| 896 | 908 | *** TODO webkit downloads | |
| 897 | ** TODO webkit downloads | ||
| 898 | when clicking a download link in Webkit Emacs should take over and handle it | 909 | when clicking a download link in Webkit Emacs should take over and handle it |
| 899 | from there. Probably need signals. There are Emacs libraries to | 910 | from there. Probably need signals. There are Emacs libraries to |
| 900 | download things, with wget etc. | 911 | download things, with wget etc. |
| 901 | "download-requested" | 912 | "download-requested" |
| 902 | ** TODO webkit alt-text not handled | 913 | *** TODO webkit alt-text not handled |
| 903 | XKCD use image-title to display a cartoon comment. These mysteriously | 914 | XKCD use image-title to display a cartoon comment. These mysteriously |
| 904 | don't work ATM. Other mouseovers work though. Maybe webkit tries to | 915 | don't work ATM. Other mouseovers work though. Maybe webkit tries to |
| 905 | open a new window or something, which wont work. | 916 | open a new window or something, which wont work. |
| 906 | 917 | ||
| 907 | ** TODO isearch in webkit buffers | 918 | *** TODO webkit isearch in webkit buffers |
| 908 | have a look at how docview solves it | 919 | have a look at how docview solves it |
| 909 | webkit_web_view_search_text () | 920 | webkit_web_view_search_text () |
| 910 | ** TODO webkit relative references doesn't work | 921 | *** TODO webkit relative references doesn't work |
| 911 | probably because we handle scrolling in a non-standard way | 922 | probably because we handle scrolling in a non-standard way |
| 912 | ** TODO webkit width adjustment handling issue | 923 | *** TODO webkit width adjustment handling issue |
| 913 | since there are so many levels of clipping and whatnot in xwidgets | 924 | since there are so many levels of clipping and whatnot in xwidgets |
| 914 | sizing issues are difficult. | 925 | sizing issues are difficult. |
| 915 | 926 | ||
| @@ -935,8 +946,6 @@ and then try resizing Epiphany. | |||
| 935 | fine-tuning to reduce flicker. | 946 | fine-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 | } |