aboutsummaryrefslogtreecommitdiffstats
path: root/src/nsxwidget.m (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
|
* Improvements to xwidget on macOS (bug#60703)Andrew De Angelis2023-03-021-28/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | * src/nsxwidget.m () ([XwWebView initWithFrame:configuration:xwidget:]) (nsxwidget_init): Fixed memory leaks: when sending an alloc message to an object, send an autorelease message to any objects we won't explictly release. ([XwWebView webView:didFinishNavigation:]): Second string to store in 'store_xwidget_event_string' is "load finished" rather than empty string. ([XwWebView webView:didStartProvisionalNavigation:]) ([XwWebView webView:didReceiveServerRedirectForProvisionalNavigation:]) ([XwWebView webView:didCommitNavigation:]): New functions. (nsxwidget_webkit_estimated_load_progress): New function. (nsxwidget_webkit_stop_loading): New function. * src/xwidget.c (Fxwidget_webkit_estimated_load_progress): Call 'nsxwidget_webkit_estimated_load_progress' if we're on MacOS. (Fxwidget_webkit_stop_loading): Call 'nsxwidget_webkit_stop_loading' if we're on MacOS. (syms_of_xwidget): Define symbol for function. 'xwidget_webkit_estimated_load_progress' if we're on MacOS. * src/nsxwidget.h: Signature for functions 'nsxwidget_webkit_estimated_load_progress' and 'nsxwidget_webkit_stop_loading'. * lisp/xwidget.el (xwidget-webkit-current-url): Message URL rather than return value of 'kill-new' (which is always nil).
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* Fix compiler warnings on Mac OS X 10.12Po Lu2022-05-221-0/+3
| | | | | | | | | | | | * configure.ac: Check for Mac OS X 12 and link with UniformTypeIdentifiers.framework. * src/nsfns.m (IOMasterPort): Define to `IOMainPort' on Mac OS X 12. (ns_implicitly_set_icon_type, Fns_read_file_name): * src/nsxwidget.m: ([XwWebView initWithFrame:configuration:xwidget:]): Fix uses of obsolete things.
* ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
|
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Use new NSString lisp methodsAlan Third2020-12-221-15/+4
| | | | | | | | | | | | | | | | | | * src/nsfont.m (ns_otf_to_script): (ns_registry_to_script): (ns_get_req_script): Use NSString conversion methods. * src/nsimage.m ([EmacsImage allocInitFromFile:]): Use NSString conversion methods. * src/nsmenu.m (ns_menu_show): Use NSString conversion methods. * src/nsselect.m (symbol_to_nsstring): (ns_string_to_pasteboard_internal): Use NSString conversion methods. * src/nsterm.m (ns_term_init): ([EmacsView initFrameFromEmacs:]): Use NSString conversion methods. * src/nsxwidget.m (nsxwidget_webkit_uri): (nsxwidget_webkit_title): (js_to_lisp): Use NSString conversion methods. (build_string_with_nsstr): Functionality replaced by NSString extensions.
* ; Prefer https to http in more URLsStefan Kangas2020-10-241-1/+1
| | | | These were all tested and confirmed working.
* ; Fix typosStefan Kangas2020-09-211-1/+1
|
* ; Minor fix for nsxwidget patchMasahiro Nakamura2020-09-161-2/+2
| | | | | | | | * lisp/xwdget.el (xwidget-webkit-download-dir) (xwidget-webkit-save-as-file): Set version to 28.1 because the patch was introduced in Emacs 28.0.50. * src/nsxwidget.m: Fix typo.
* Fix GC bugs related to uninitialized vectorsPaul Eggert2020-08-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | Avoid problems if GC occurs while initializing a vector. Problem with Fdelete reported by Pip Cet in: https://lists.gnu.org/r/emacs-devel/2020-08/msg00313.html I looked for similar problems elsewhere and found quite a few. * src/coding.c (make_subsidiaries): * src/composite.c (syms_of_composite): * src/font.c (build_style_table, Ffont_get_glyphs): * src/nsselect.m (clean_local_selection_data): * src/nsxwidget.m (js_to_lisp): * src/syntax.c (init_syntax_once): * src/window.c (Fcurrent_window_configuration): * src/xselect.c (selection_data_to_lisp_data) (clean_local_selection_data): Use make_nil_vector instead of make_uninit_vector. * src/fns.c (Fdelete): * src/xwidget.c (webkit_js_to_lisp): Use allocate_nil_vector instead of allocate_vector. * src/search.c (Fnewline_cache_check): Use make_vector instead of make_uninit_vector.
* ; Fix copyright years for recent additionsGlenn Morris2020-08-121-1/+1
|
* Add utility functions and new xwidget commandsSungbin Jo2020-08-121-0/+12
| | | | | | | | | | | | | Co-authored-by: Jaesup Kwak <veshboo@gmail.com> * lisp/xwidget.el (xwidget-webkit-callback): Add case for 'response-callback' event. (xwidget-webkit-download-dir): New variable. (xwidget-webkit-save-as-file): New function. * src/nsxwidget.m (XwWebView::decidePolicyForNavigationResponse): Store download event. * src/xwidget.c src/xwidget.h (store_xwidget_download_callback_event): New function.
* Add utility functions and new xwidget commandsSungbin Jo2020-08-121-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Jaesup Kwak <veshboo@gmail.com> * etc/NEWS: Announce new functions and options. * lisp/xwidget.el (xwidget): New defgroup. (xwidget-webkit-mode-map): Add new keybindings. (xwidget-webkit-scroll-up, xwidget-webkit-scroll-down) (xwidget-webkit-scroll-forward, xwidget-webkit-scroll-backward): Add optional argument to specify specific amounts to scroll down. (xwidget-webkit-scroll-up-line, xwidget-webkit-scroll-down-line): New functions. (xwidget-webkit-scroll-bottom): Fix function to scroll to the bottom of the document. (xwidget-webkit-callback): Use new function to update buffer title even when Javascript is disabled. (xwidget-webkit-bookmark-jump-new-session): New variable. (xwidget-webkit-bookmark-make-record): Modify to use xwidget-webkit to open bookmark that is created in xwidget-webkit. (xwidget-webkit-insert-string): Fix Javascript snippet to not throw Javsscript exceptions. (xwidget-webkit-inside-pixel-width) (xwidget-window-inside-pixel-height): New functions. (xwidget-webkit-adjust-size-to-window): Use new functions. (xwidget-webkit-new-session): Insert invisible URL instead of an empty string to achieve better default behavior. (xwidget-webkit-back, xwidget-webkit-forward, xwidget-webkit-reload) (xwidget-webkit-current-url): Use new functions to enable scrolling even when Javascript is disabled. (xwidget-webkit-copy-selection-as-kill): Remove unnecessary lambda. * src/nsxwidget.h src/nsxwidget.m (nsxwidget_webkit_uri) (nsxwidget_webkit_title, nsxwidget_webkit_goto_history): Add new functions. * src/xwidget.c (Fxwidget_webkit_uri, Fxwidget_webkit_title) (Fxwidget_webkit_goto_history): Add new functions. (syms_of_xwidget): Define new functions.
* Add xwidget support for macOSSungbin Jo2020-08-121-0/+563
Co-authored-by: Jaesup Kwak <veshboo@gmail.com> * configure.ac: Allow '--with-xwidgets' for "${NS_IMPL_COCOA}". * etc/NEWS: Mention new feature. * etc/TODO: Remove done TODO to implement xwidget in NeXTstep port. * lisp/xwidget.el (xwidget-webkit-clone-and-split-below) (xwidget-webkit-clone-and-split-right): New procedures. (xwidget-webkit-callback): Remove call to 'xwidget-webkit-adjust-size-to-window' as adjusting xwidget size is handled in 'x_draw_xwidget_glyph_string'. (xwidget-webkit-enable-plugins): New variable. * nextstep/templates/Info.plist.in: Add 'NSAppTransportSecurity'. * src/Makefile.in: Add nsxwidget.o for compilation. * src/emacs.c (main): Move conditional call to 'syms_of_xwidget'. * src/nsterm.m (ns_draw_glyph_string): Add case for 'XWIDGET_GLYPH'. (note_mouse_movement mouseMoved): Make it easy to resize window by dragging mode-line or vertical separator adjacent to large glyph. * src/nsxwidget.h src/nsxwidget.m: Newly added files, xwidget webkit backend for macOS Cocoa. * src/xwidget.c (Fmake_xwidget, xwidget_init_view) (x_draw_xwidget_glyph_string, xwidget_is_web_view) (Fxwidget_webkit_goto_uri, Fxwidget_webkit_zoom, Fxwidget_resize) (Fxwidget_size_request, Fdelete_xwidget_view, xwidget_end_redisplay) (kill_buffer_xwidgets): Add macOS Cocoa specific functions and code with 'NS_IMPL_COCOA' and guard GTK specific functions and code with 'USE_GTK'. (x_draw_xwidget_glyph_string): Handle adjusting xwidget size. * src/xwidget.h (xwidget, xwidget_view): Add macOS Cocoa specific fields with 'NS_IMPL_COCOA' and guard GTK specific fields with USE_GTK.