aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32term.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ; Fix recently installed changesEli Zaretskii2026-02-111-1/+1
| | | | | | | | | | | | | | * src/w32fns.c (w32_register_for_sleep_notifications) (sleep_notification_callback): Fix signatures. * src/w32term.h (w32_register_for_sleep_notifications): Fix prototype. These changes avoid compilation warnings. * lisp/system-sleep.el: Remove stray non-ASCII character. * doc/lispref/os.texi (System Sleep): Remove non-ASCII character, and fix wording and markup. * etc/NEWS: Fix wording of recently-added entry.
* system-sleep sleep blocker and sleep/wake event package (bug#80348)Stéphane Marks2026-02-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This package provides platform-neutral interfaces to block your system from entering idle sleep and a hook to process pre-sleep and post-wake events. Implementations are for D-Bus on GNU/Linux, macOS/GNUstep, and MS-Windows. * lisp/system-sleep.el: New package. * src/fns.c: Qpre_sleep, Qpost_wake: New DEFSYM. * src/nsfns.m (Fns_block_system_sleep, Fns_unblock_system_sleep) (syms_of_nsfns): New functions. * src/nsterm.m (applicationDidFinishLaunching): Subscribe to pre-sleep and post-wake notifications. (systemWillSleep, systemDidWake): New function. * src/w32fns.c (Fw32_block_system_sleep) (Fw32_unblock_system_sleep, Fw32_system_sleep_block_count) (sleep_notification_callback) (w32_register_for_sleep_notifications): New function. (syms_of_w32fns): Sw32_unblock_system_sleep Sw32_block_system_sleep Sw32_system_sleep_block_count: New defsubr. * src/w32term.h (Fw32_block_system_sleep): New extern. * src/w32term.c (w32_initialize): Call w32_register_for_sleep_notifications. * doc/lispref/os.texi: Document the system-sleep package. * doc/lispref/commands.texi: Update sleep-event special documentation. * etc/NEWS: Announce the new package.
* ; Add 2026 to copyright years.Sean Whitton2026-01-011-1/+1
|
* Remove all traces of MSVC support from MS-Windows codeEli Zaretskii2025-11-271-15/+0
| | | | | | | | | | | | | | | | We dropped support for MSVC long ago, and nowadays only support MinGW for the MS-Windows builds of Emacs. * src/w32term.h: * src/w32fns.c: * src/w32.c: * nt/inc/sys/socket.h: * nt/inc/stdalign.h: * nt/inc/ms-w32.h: Remove MSVC-specific code and preprocessor conditions. * nt/inc/ms-w32.h: Don't redirect Posix functions to MS _FOO equivalents, as MinGW headers do that nowadays better, not necessarily via functions, and do not disable that when __STDC__ is defined.
* Add `toolkit-theme' and 'toolkit-theme-set-functions'Ahmed Khanzada2025-11-221-0/+1
| | | | | | | | | | | | | | | * etc/NEWS: Document `toolkit-theme' and 'toolkit-theme-set-functions' * lisp/frame.el: Add 'toolkit-theme-set-functions' * src/frame.c: Add `toolkit-theme' Elisp variable * src/gtkutil.c: (xg_update_dark_mode_for_all_displays): Set `toolkit-theme' and call 'toolkit-theme-set-functions' * src/w32fns.c: (w32_applytheme): Send WM_EMACS_SET_TOOLKIT_THEME message to Lisp thread. * src/w32term.h: Declare WM_EMACS_SET_TOOLKIT_THEME * src/w32term.c: (w32_read_socket): Receive WM_EMACS_SET_TOOLKIT_THEME message and set `toolkit-theme' and call 'toolkit-theme-set-functions'
* ; Avoid compiler warnings in MinGW buildsEli Zaretskii2025-06-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/w32proc.c (child_proc_count, child_procs) (Vw32_valid_locale_ids, Vw32_valid_codepages): Declare 'static'. * src/w32inevt.c (faked_key): Declare. * src/w32heap.c (data_region_base, data_region_end, heap): Declare. * src/w32console.c (keyboard_handle, current_tty, cost): Declare. * src/w32.c: Declare function pointers 'static'. (excptr, excprec, ctxrec, g_b_init_compare_string_w) (g_b_init_debug_break_process, LookupAccountSid_Name, dir_static) (winsock_lib, _wsa_errlist): Declare. * src/w32uniscribe.c: Declare function pointers 'static'. (uniscribe_available, harfbuzz_available): Declare. * src/w32term.c: Declare function pointers 'static'. (vertical_scroll_bar_min_handle, horizontal_scroll_bar_min_handle) (vertical_scroll_bar_top_border) (vertical_scroll_bar_bottom_border) (horizontal_scroll_bar_left_border) (horizontal_scroll_bar_right_border, last_scroll_bar_drag_pos): Declare 'static'. * src/w32xfns.c (input_available, interrupt_handle, lpHead) (lpTail, nQueue): Declare. * src/w32menu.c: Declare function pointers 'static'. * src/w32term.h (w32_frame_parm_handlers): Declare. * src/w32fns.c: Declare function pointers 'static'. (w32_darkmode, w32_color_map, deferred_msg_head, tip_frame) (tip_timer, tip_last_string, tip_last_frame, tip_last_parms): * src/lisp.h (daemon_type): Declare for WINDOWSNT as well. * nt/cmdproxy.c (escape_char, child, interactive): Declare 'static'. (Bug#78193)
* Update copyright year to 2025Paul Eggert2025-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Improve drag and drop on MS-Windows (bug#3468)Cecilio Pardo2024-10-251-2/+3
| | | | | | | | | | | | | | | Add support for 'dnd-scroll-margin' and 'dnd-indicate-insertion-point' by calling 'dnd-handle-movement' when dragging the mouse. * lisp/term/w32-win.el (w32-drag-n-drop): Call 'dnd-handle-movement' when applicable. * src/w32fns.c (w32_handle_drag_movement): New function, sends a WM_EMACS_DRAGOVER message. (w32_drop_target_DragEnter): Call 'w32_handle_drag_movement'. (w32_drop_target_DragOver): Call 'w32_handle_drag_movement'. * src/w32term.c: (w32_read_socket): Handle WM_EMACS_DRAGOVER, sending a drag-n-drop event. * src/w32term.h: Define new WM_EMACS_DRAGOVER message.
* Implement drag-n-drop for w32 with support for files and textCecilio Pardo2024-10-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Implement drag-n-drop with IDropTarget for MS-Windows. This allows for dropping files or text. * lisp/term/w32-win.el (w32-drag-n-drop): Change to handle files or strings. * src/w32fns.c (process_dropfiles): New function to convert DROPFILES struct to array of strings. (w32_process_dnd_data): New function to process drop data. (w32_try_get_data): Extract data from IDataObject. (w32_createwindow): Assign an IDropTarget to each new frame. (w32_name_of_message): New message. (w32_msg_pump): Changed CoInitialize to OleInitialize, needed by the drag-n-drop functions. (w32_wnd_proc): New struct w32_drop_target, and w32_drop_target_* functions to implement the IDropTarget interface. * src/w32term.c (w32_read_socket): Handle WM_EMACS_DROP and remove WM_EMACS_DROPFILES. * src/w32term.h: New message WM_EMACS_DROP. (Bug#3468) * etc/NEWS: Announce the new feature.
* Enable accessing tool bar with the touch screenPo Lu2024-06-091-0/+4
| | | | | | | | | * src/w32fns.c (w32_createwindow): Reset tool_bar_dwID. * src/w32term.c (w32_read_socket): Reserve touch event sequences that fall on the tool bar for future tool-bar manipulation. * src/w32term.h (struct w32_output) <tool_bar_dwID>: New field.
* Report touch events on MS-WindowsPo Lu2024-06-091-0/+12
| | | | | | | | | | | | | | | | | | | | | * etc/NEWS: Announce change. * src/w32fns.c (RegisterTouchWindow_fn): New function. (w32_createwindow): Assign a base value for touch event identifiers to the frame, and register for touch input. (w32_wnd_proc): Forward WM_TOUCH/WM_TOUCHMOVE messages to the main thread. (globals_of_w32fns): Load RegisterTouchWindow from user32.dll. * src/w32term.c (w32_read_socket) <WM_TOUCH>: Detect WM_TOUCH events, compare and record their touch points with and into the frame's record of their prior state, and report the same to Lisp. (pfnCloseTouchInputHandle, pfnGetTouchInputInfo): New variables. (w32_initialize): Load the above functions from user32.dll. * src/w32term.h (MAX_TOUCH_POINTS): New definition. (struct w32_output) <touch_ids, touch_x, touch_y, touch_base>: New fields.
* Stipple support for MS Windows (bug#71159)Elias G. Perez2024-06-021-0/+1
| | | | | | | | | | | | | | * src/w32term.c (w32_fill_stipple_pattern): New function. (w32_draw_glyph_string_bg_rect w32_draw_stretch_glyph_string) (w32_draw_glyph_string_background): Use new stipple function. * src/w32term.h (w32_bitmap_record): Add stipple value. * src/image.c (image_create_bitmap_from_data): Create stipple bitmap. (image_create_bitmap_from_file): Add suuport for pixmap and create stipple bitmap. (free_bitmap_record): Release stipple. * etc/NEWS: Announce support for stipples in MS-Windows.
* Support built-in thumbnail creation on MS-WindowsEli Zaretskii2024-05-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/w32image.c (get_encoder_clsid, Fw32image_create_thumbnail) (globals_of_w32image, syms_of_w32image): New functions. * src/emacs.c (main): Call 'syms_of_w32image' and 'globals_of_w32image'. * src/w32term.h (syms_of_w32image, globals_of_w32image): Add prototypes. * lisp/image/image-dired.el (image-dired-thumbnail-display-external): Add a fallback for MS-Windows. * lisp/image/image-dired-external.el (image-dired--probe-thumbnail-cmd): New function. (image-dired--check-executable-exists): Call it to verify that "convert" is indeed an Imagemagick program. New argument FUNC specifies a function that can be used as an alternative to running EXECUTABLE. (image-dired-create-thumb-1): Don't call 'image-dired--check-executable-exists' here, ... (image-dired-thumb-queue-run): ...call it here, with 'w32image-create-thumbnail' as the alternative function. If on MS-Windows and no "convert" command, call 'image-dired-create-thumb-2' instead. (image-dired-create-thumb-2): New function. * etc/NEWS: Announce the thumbnail support.
* Fix resetting keyboard hook state on MS-WindowsRaffael Stocker2024-03-141-1/+2
| | | | | | | | | | | | | | | Register session notifications so Emacs is notified when the computer is being locked, as required to reset the low level keyboard hook state. (Bug#69083). * src/w32term.h: * src/w32fns.c (setup_w32_kbdhook, remove_w32_kbdhook) (w32_wnd_proc, globals_of_w32fns, maybe_pass_notification): Register and manage session notifications in GUI Emacs. * src/w32console.c (initialize_w32_display, find_ime_window): * src/w32xfns.c (drain_message_queue): Register notifications and reset keyboard hook state in console Emacs. * src/w32.c (term_ntproc): Un-register session notifications when terminating.
* Merge from savannah/emacs-29Po Lu2024-01-021-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dc4e6b13296 ; Update copyright years in more files 64b37776318 ; Run set-copyright from admin.el 8e1c56ae467 ; Add 2024 to copyright years # Conflicts: # doc/misc/modus-themes.org # doc/misc/texinfo.tex # etc/NEWS # etc/refcards/ru-refcard.tex # etc/themes/modus-operandi-theme.el # etc/themes/modus-themes.el # etc/themes/modus-vivendi-theme.el # lib/alloca.in.h # lib/binary-io.h # lib/c-ctype.h # lib/c-strcasecmp.c # lib/c-strncasecmp.c # lib/careadlinkat.c # lib/cloexec.c # lib/close-stream.c # lib/diffseq.h # lib/dup2.c # lib/filemode.h # lib/fpending.c # lib/fpending.h # lib/fsusage.c # lib/getgroups.c # lib/getloadavg.c # lib/gettext.h # lib/gettime.c # lib/gettimeofday.c # lib/group-member.c # lib/malloc.c # lib/md5-stream.c # lib/md5.c # lib/md5.h # lib/memmem.c # lib/memrchr.c # lib/nanosleep.c # lib/save-cwd.h # lib/sha1.c # lib/sig2str.c # lib/stdlib.in.h # lib/strtoimax.c # lib/strtol.c # lib/strtoll.c # lib/time_r.c # lib/xalloc-oversized.h # lisp/auth-source-pass.el # lisp/emacs-lisp/lisp-mnt.el # lisp/emacs-lisp/timer.el # lisp/info-look.el # lisp/jit-lock.el # lisp/loadhist.el # lisp/mail/rmail.el # lisp/net/ntlm.el # lisp/net/webjump.el # lisp/progmodes/asm-mode.el # lisp/progmodes/project.el # lisp/progmodes/sh-script.el # lisp/textmodes/flyspell.el # lisp/textmodes/reftex-toc.el # lisp/textmodes/reftex.el # lisp/textmodes/tex-mode.el # lisp/url/url-gw.el # m4/alloca.m4 # m4/clock_time.m4 # m4/d-type.m4 # m4/dirent_h.m4 # m4/dup2.m4 # m4/euidaccess.m4 # m4/fchmodat.m4 # m4/filemode.m4 # m4/fsusage.m4 # m4/getgroups.m4 # m4/getloadavg.m4 # m4/getrandom.m4 # m4/gettime.m4 # m4/gettimeofday.m4 # m4/gnulib-common.m4 # m4/group-member.m4 # m4/inttypes.m4 # m4/malloc.m4 # m4/manywarnings.m4 # m4/mempcpy.m4 # m4/memrchr.m4 # m4/mkostemp.m4 # m4/mktime.m4 # m4/nproc.m4 # m4/nstrftime.m4 # m4/pathmax.m4 # m4/pipe2.m4 # m4/pselect.m4 # m4/pthread_sigmask.m4 # m4/readlink.m4 # m4/realloc.m4 # m4/sig2str.m4 # m4/ssize_t.m4 # m4/stat-time.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/stdio_h.m4 # m4/stdlib_h.m4 # m4/stpcpy.m4 # m4/strnlen.m4 # m4/strtoimax.m4 # m4/strtoll.m4 # m4/time_h.m4 # m4/timegm.m4 # m4/timer_time.m4 # m4/timespec.m4 # m4/unistd_h.m4 # m4/warnings.m4 # nt/configure.bat # nt/preprep.c # test/lisp/register-tests.el
| * ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
| |
* | ; Prefer HTTPS to HTTP in more linksStefan Kangas2023-08-021-1/+1
|/
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* Fix display updating inside the minibuffer on MS WindowsPo Lu2022-04-301-0/+1
| | | | | | | | | * src/minibuf.c (read_minibuf): Call `w32_flip_buffers_if_dirty' after changing the cursor position and redisplaying instead of `flush_frame'. (bug#55193) * src/w32term.c (w32_flip_buffers_if_dirty): New function. * src/w32term.h: Update prototypes.
* Implement double buffering on MS WindowsPo Lu2022-04-301-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * etc/NEWS: Announce changes. * src/w32fns.c (w32_set_inhibit_double_buffering): New function. (w32_wnd_proc): (Fx_create_frame): (w32_create_tip_frame): Set `inhibit-double-buffering' parameter. (w32_frame_parm_handlers): Add new handler. * src/w32term.c (w32_show_back_buffer): (w32_release_paint_buffer): New functions. (w32_frame_up_to_date): Show back buffer if applicable. (w32_buffer_flipping_unblocked_hook): New hook. (w32_scroll_run): Use BitBlt to scroll instead of window scrolling functions. (w32_scroll_bar_clear): Don't clear scroll bars when double buffered. (w32_read_socket): Flip buffers after reading input events in some cases. (w32_free_frame_resources): Free back buffer. (w32_create_terminal): Add new hook. * src/w32term.h (struct w32_output): New fields for handling back buffers. * src/w32xfns.c (select_palette): Fix indentation. (get_frame_dc, release_frame_dc): Return back buffer when appropriate and set dirty flag.
* ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
|
* Merge from origin/emacs-27Glenn Morris2021-05-131-1/+1
|\ | | | | | | | | | | | | | | | | | | | | bcd92b5708 (origin/emacs-27) Improve documentation of Hexl mode c233f4eccd ; * etc/NEWS: Fix decoded-time-set-defaults typo. 4c3abb3dd1 Fix compilation errors with latest w32 API headers 127f1f330b Improve doc strings in log-edit.el e36183ff46 ; * etc/TODO (etc/DOC): Update the todo entries. # Conflicts: # etc/NEWS
| * Fix compilation errors with latest w32 API headersEli Zaretskii2021-05-091-1/+1
| | | | | | | | | | | | * src/w32common.h: Rename OS_* to OS_SUBTYPE__*, as w32 API headers started defining OS_NT, which breaks the use of the enumeration. All users changed. (Bug#48303)
| * Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* | Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | ; Fix typosStefan Kangas2020-09-211-1/+1
| |
* | Make use of MS-Windows native image API be selectable at run timeEli Zaretskii2020-04-141-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Minor cleanup in how w32image.o is added to the build when native image APIs are requested. * src/w32gui.h (w32_load_image, w32_can_use_native_image_api) (w32_gdiplus_shutdown): Move prototypes from w32term.h here, since w32.c doesn't include w32term.h. * src/image.c (struct image_type): No need to pass TYPE to the 'valid_p' method. All callers changed. (initialize_image_type) [HAVE_NATIVE_IMAGE_API]: Call 'image_can_use_native_api' before trying image-specific methods. (image_can_use_native_api): New function. (image_types): Remove the native_image_type parts. (syms_of_image): New symbol 'native-image'. (parse_image_spec): Accept native-image "type" for any image type. * src/w32term.c (syms_of_w32term): New variable 'w32-use-native-image-API'. * src/w32image.c: (w32_can_use_native_image_api): New function. (gdiplus_init): Rename from w32_gdiplus_startup. Simplify code. Move the call to GdiplusStartup to a separate function. Use ordinal number for SHCreateMemStream if cannot load it by name. (w32_load_image): Ignore Win32Error status from w32_select_active_frame. Move DEFSYMs from here... * src/image.c (syms_of_image) [HAVE_NATIVE_IMAGE_API]: ...to here. * etc/NEWS: Update the entry about native image API use.
* | Initial version of native image API support for MS-WindowsJuan José García-Ripoll2020-04-141-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/w32image.c: New file. * src/w32term.h: Add prototypes of 'w32_load_image', 'w32_gdiplus_startup', 'w32_gdiplus_shutdown', and 'w32_query_frame_background_color'. * src/w32term.c (w32_query_frame_background_color): No longer static. * src/w32.c (term_ntproc) [HAVE_GDIPLUS]: Call 'w32_gdiplus_shutdown'. * src/image.c (struct image_type) <valid_p>: Accept an additional argument, the image type. All implementations changed. (init_native_image_functions, native_image_p, native_image_load) [HAVE_NATIVE_IMAGE_API]: New methods for "native image type". (initialize_image_type) [HAVE_NATIVE_IMAGE_API]: Call 'init_native_image_functions'. (image_types) [HAVE_NATIVE_IMAGE_API]: Add settings for native image API. (lookup_image_type) [HAVE_NATIVE_IMAGE_API]: Initialize native functions if needed. * lisp/term/w32-win.el (dynamic-library-alist): Add gdiplus and shlwapi. * etc/NEWS: Announce the new feature. * configure.ac (native-image-api): New option, OFF by default. (HAVE_NATIVE_IMAGE_API): If native-image-api is selected, add w32image.o to W32_OBJ.
* | Support toggling native Input Methods on MS-WindowsAlbert2020-04-131-1/+2
|/ | | | | | | | | | | | * src/w32term.h (WM_EMACS_IME_STATUS): New message code. * src/w32fns.c (ImmGetOpenStatus_Proc, ImmSetOpenStatus_Proc): New typedefs. (w32_msg_pump): Handle the WM_EMACS_IME_STATUS message. (Fw32_get_ime_open_status, Fw32_set_ime_open_status): New functions (syms_of_w32fns): Defsubr them. (globals_of_w32fns): Load ImmGetOpenStatus and ImmSetOpenStatus from IMM2.DLL.
* Recalculate default font when switching font backendRobert Pluim2020-03-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | This is an updated version of the patch by Dmitry Antipov <dmantipov@yandex.ru> in <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23386#43>. Fixes Bug#23386 * src/dispextern.h (struct redisplay_interface): New member default_font_parameter. * src/xterm.h: Add prototype for x_default_font_parameter. * src/xterm.c (x_redisplay_interface): Initialize default_font_parameter member. * src/xfns.c (x_default_font_parameter): Make non-static. * src/w32term.h: Add prototype for w32_default_font_parameter * src/w32fns.c (w32_default_font_parameter): Make non-static. * src/w32term.c (w32_redisplay_interface): Initialize default_font_parameter member. * src/nsterm.m (ns_redisplay_interface): Add dummy ns_default_font_parameter (there is currently only one possible font backend on macOS). Initialize default_font_parameter member. * src/frame.c (gui_set_font_backend): Recalculate default font using RIF default_font_parameter to avoid crash when changing font backend.
* Fix removal of frame decorations on Windows (Bug#38705)Martin Rudalics2020-01-021-0/+4
| | | | | | | | * src/w32fns.c (w32_set_undecorated): Actualize f->output_data.w32->dwStyle for subsequent calls of AdjustWindowRect (Bug#38705). * src/w32term.h (struct w32_output): Add comment for dwstyle slot.
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Fixes to build on WindowsMartin Rudalics2019-09-011-0/+1
| | | | | | | | * src/w32fns.c (w32_set_tab_bar_lines, w32_change_tab_bar_height): New functions. * src/w32term.c (w32_create_terminal): Set change_tab_bar_height_hook to w32_change_tab_bar_height.
* Support native image transforms on MS-WindowsEli Zaretskii2019-06-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset also rearranges native image transform code for other platforms to make it cleaner, and also removes the support for native cropping. For the discussions, see https://lists.gnu.org/archive/html/emacs-devel/2019-06/msg00242.html * src/w32term.c (w32_image_rotations_p, transform): New functions. (w32_draw_image_foreground): If image rotation is requested and supported, call PlgBlt to transform the image. (w32_initialize): Populate the PlgBlt function pointer if it is supported. * src/w32term.h (w32_image_rotations_p): Add prototype. * src/dispextern.h (struct image) [HAVE_NTGUI]: New member xform. * src/image.c (compute_image_rotation): Renamed from image_set_rotation. Only compute and returns the rotation angle; leave the matrix calculation for later. Log an error message if the :rotation parameter is not a number. (image_set_crop): Function deleted. We no longer support native cropping, as one can display an image slice instead. (image_set_transform): Compute the transform matrix in its entirety here, in two variants: one for XRender and Cairo, the other for NS and MS-Windows. call compute_image_size and compute_image_rotation internally. (lookup_image) [HAVE_NATIVE_TRANSFORMS]: Call only image_set_transform. No need to pass the transform matrix to image_set_transform. (Fimage_transforms_p): Return a list of transform capabilities rather than a simple boolean. Support TTY frames as well. * src/nsimage.m (setTransform:): Don't invert the matrix, as it is already inverted in image.c. * test/manual/image-transforms-tests.el (test-cropping): State in the text that only ImageMagick supports cropping. * doc/lispref/display.texi (Image Descriptors): Update the documentation of native image transforms. (ImageMagick Images): Move the description of ':crop' here. * etc/NEWS: Minor copyedits of the feature announcement.
* Introduce Emacs_GC struct and typedefAlexander Gramiak2019-05-191-4/+4
| | | | | | | | | | | | | | | | * src/dispextern.h [HAVE_X_WINDOWS]: Alias Emacs_GC to XGCValues. [!HAVE_X_WINDOWS]: Define Emacs_GC, GCForeground, and GCBackground. * src/nsgui.h: * src/w32gui.h:Remove obsolete XGCValues, GC, GCForeground, GCBackground, and GCFont definitions. * src/w32fns.c (w32_make_gc): Do not set unused font field. * src/w32term.c: Use Emacs_GC over XGCValues. Do not set unused font field. * src/xfaces.c: Use Emacs_GC over XGCValues and GC.
* Introduce Emacs_Pixmap typedefAlexander Gramiak2019-05-191-1/+1
| | | | | | | | | | | | | | | | | * src/dispextern.h [HAVE_X_WINDOWS]: Alias Emacs_Pixmap to Pixmap. (image, x_kill_gs_process): Use Emacs_Pixmap over Pixmap. * src/image.c: * src/nsgui.h: * src/nsterm.m: * src/termhooks.h: * src/w32gui.h: * src/w32term.c: * src/w32term.h: * src/xterm.c (x_free_pixmap): Use Emacs_Pixmap over Pixmap. * src/w32gui.h: Remove unused typedef Bitmap.
* Introduce Emacs_Cursor typedefAlexander Gramiak2019-05-191-18/+18
| | | | | | | | | | | | | | * src/dispextern.h [HAVE_X_WINDOWS]: Define Emacs_Cursor alias. Move the No_Cursor definition from xterm.h. (redisplay_interface): Use Emacs_Cursor over Cursor. * src/nsgui.h: * src/nsterm.h: * src/nsterm.m: * src/w32gui.h: * src/w32term.c: * src/xdisp.c: * src/xterm.c (x_define_frame_cursor): Use Emacs_Cursor over Cursor.
* Introduce Emacs_Color struct and typedefAlexander Gramiak2019-05-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | This avoids clashing with the XColor struct from X. * src/dispextern [HAVE_X_WINDOWS]: Define Emacs_Color alias. [!HAVE_X_WINDOWS]: Rename XColor compatibility struct to Emacs_Color. Remove unused fields. * src/gtkutil.c: * src/gtkutil.h: * src/image.c: * src/nsterm.h: * src/nsterm.m: * src/termhooks.h: * src/w32fns.c: * src/w32term.c: * src/w32term.h: * src/xfaces.c: * src/xfns.c: * src/xterm.h: Use Emacs_Color over XColor outside of X-specific sections.
* Convert Free_Pixmap macro into terminal hookAlexander Gramiak2019-05-101-3/+0
| | | | | | | | | | | | | | | | | | * src/termhooks.h (terminal) [HAVE_WINDOW_SYSTEM]: New terminal hook free_pixmap. * src/image.c: Replace Free_Pixmap with free_pixmap. * src/msdos.h (FRAME_X_DISPLAY): * src/nsgui.h (Display): * src/nsterm.h (FRAME_NS_DISPLAY, FRAME_X_DISPLAY, FRAME_X_SCREEN) (FRAME_X_VISUAL): * src/w32term.h (FRAME_X_DISPLAY): Remove unused X-compatibility macros and typedefs. * src/nsterm.m: * src/w32term.c: * src/xterm.c: Implement and set free_pixmap hook.
* Rename x_highlight_frame property to highlight_frameAlexander Gramiak2019-04-261-1/+1
| | | | | | | | | | * src/nsterm.h: * src/nsterm.m: * src/w32term.c: * src/w32term.h: * src/xdisp.c: * src/xterm.c: * src/xterm.h: Rename.
* Add terminal hook defined_color_hookAlexander Gramiak2019-04-261-2/+2
| | | | | | | | | | | | | | | * src/termhooks.h (defined_color_hook): New terminal hook. * src/xterm.c: * src/nsterm.m: * src/term.c: * src/w32term.c: Set defined_color_hook. * src/xfaces.c: Use defined_color_hook. (defined_color): Remove. * src/image.c: Remove redefinitions of x_defined_color, and use defined_color_hook.
* Rename generic x_* identifiersAlexander Gramiak2019-04-261-19/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/image.c: Rename x_* procedures to image_*. * src/frame.c: Rename x_* procedures to gui_*. Rename xrdb_get_resource to gui_display_get_resource. Rename x_get_arg to gui_display_get arg. * src/frame.h: Rename can_x_set_window_size to can_set_window_size. * src/xfaces.c: Rename realize_x_face to realize_gui_face. Rename x_supports_face_attributes_p to gui_supports_face_attributes_p. * src/keyboard.c: * src/lisp.h: * src/nsterm.m: * src/w32term.c: * src/xterm.c: Rename x_get_keysym_name to get_keysym_name. * src/nsfns.c: * src/nsterm.m: Rename x_* procedures to ns_*. * src/w32fns.c: * src/w32term.c: Rename x_* procedures to w32_*. * src/termhooks.h (query_colors, get_focus_frame, focus_frame_hook) (frame_visible_invisible_hook, iconify_frame_hook) (set_window_size_hook, set_frame_offset_hook, set_frame_alpha_hook) (set_new_font_hook, set_bitmap_icon_hook, implicit_set_name_hook) (activate_menubar_hook, change_tool_bar_height_hook) (set_scroll_bar_default_width_hook) (set_scroll_bar_default_height_hook, get_string_resource_hook): New terminal hooks to replace backend-specific x_* procedures. * src/dispextern.h (clear_under_internal_border): New RIF procedure. * src/alloc.c: * src/frame.c: * src/xdisp.c: Use FRAME_OUTPUT_DATA instead of FRAME_X_OUTPUT. * src/frame.c: * src/w32term.c: * src/w32fns.c: Use FRAME_NATIVE_WINDOW instead of FRAME_X_WINDOW.
* Add prefixes to some window system-dependent proceduresAlexander Gramiak2019-04-261-1/+1
| | | | | | | | | | | | | * src/nsterm.m (note_mouse_movement): * src/w32fns.c (construct_console_modifiers): * src/w32inevt.c: * src/w32term.c (frame_highlight, frame_unhighlight) (construct_mouse_click, construct_mouse_wheel, construct_drag_n_drop) (lispy_file_action, queue_notifications, note_mouse_movement): * src/w32term.h: * src/xterm.c (frame_highlight, frame_unhighlight) (construct_mouse_click, note_mouse_movement, get_current_wm_state): Add and use window system prefixes.
* Merge from origin/emacs-26Paul Eggert2018-12-311-1/+1
|\ | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-011-1/+1
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* | More macro renamings for bignumTom Tromey2018-08-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/alloc.c, src/bidi.c, src/buffer.c, src/buffer.h, src/bytecode.c, src/callint.c, src/callproc.c, src/casefiddle.c, src/casetab.c, src/category.c, src/ccl.c, src/character.c, src/character.h, src/charset.c, src/charset.h, src/chartab.c, src/cmds.c, src/coding.c, src/composite.c, src/composite.h, src/data.c, src/dbusbind.c, src/decompress.c, src/dired.c, src/dispextern.h, src/dispnew.c, src/disptab.h, src/doc.c, src/dosfns.c, src/editfns.c, src/emacs-module.c, src/emacs.c, src/eval.c, src/fileio.c, src/floatfns.c, src/fns.c, src/font.c, src/font.h, src/fontset.c, src/frame.c, src/frame.h, src/fringe.c, src/ftcrfont.c, src/ftfont.c, src/gfilenotify.c, src/gnutls.c, src/gtkutil.c, src/image.c, src/indent.c, src/insdel.c, src/intervals.c, src/json.c, src/keyboard.c, src/keymap.c, src/kqueue.c, src/lcms.c, src/lisp.h, src/lread.c, src/macros.c, src/marker.c, src/menu.c, src/minibuf.c, src/msdos.c, src/print.c, src/process.c, src/profiler.c, src/search.c, src/sound.c, src/syntax.c, src/syntax.h, src/sysdep.c, src/term.c, src/termhooks.h, src/textprop.c, src/undo.c, src/w32.c, src/w32console.c, src/w32fns.c, src/w32font.c, src/w32inevt.c, src/w32proc.c, src/w32select.c, src/w32term.c, src/w32term.h, src/w32uniscribe.c, src/window.c, src/xdisp.c, src/xfaces.c, src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c, src/xml.c, src/xrdb.c, src/xselect.c, src/xsettings.c, src/xterm.c, src/xwidget.c Rename XINT->XFIXNUM, XFASTINT->XFIXNAT, XUINT->XUFIXNUM.
* | Fix some tooltip related problemsMartin Rudalics2018-01-181-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace 'tooltip' frame parameter with a 'tooltip' member in the frame structure. For GTK+ builds use 'tip_last_frame' to find the frame for which the currently visible tooltip was made. For modeline help-echoing have tooltips show applicable actions only. * lisp/bindings.el (mode-line-default-help-echo): New function as default value of homonymous option. * src/dispextern.h (tip_frame, tip_window): Remove declarations. * src/frame.c (make_frame): Initialize new frame structure member 'tooltip'. (Fframe_list, other_frames): Rewrite with new macro FRAME_TOOLTIP_P. * src/frame.h (struct frame): New member 'tooltip'. (FRAME_TOOLTIP_P): New macro. * src/gtkutil.c (xg_prepare_tooltip, xg_hide_tooltip): Rewrite using boolean return values. * src/nsfns.m (tip_frame): Remove declaration. * src/w32fns.c (w32_display_monitor_attributes_list) (w32_display_monitor_attributes_list_fallback): Rewrite with new macro FRAME_TOOLTIP_P. (tip_last_string, tip_last_frame, tip_last_parms): New Lisp scalars replacing Lisp vector last_show_tip_args. (x_create_tip_frame): Set new frame's 'tooltip' structure member to true. (x_hide_tip): Additionally test tip_frame for liveness. (Fx_show_tip): Handle last_show_tip_args to tip_last_frame, tip_last_string and tip_last_parms conversion. (syms_of_w32fns): staticpro tip_last_frame, tip_last_string and tip_last_parms instead of last_show_tip_args. * src/w32term.c (w32_read_socket, x_new_font): Rewrite with new macro FRAME_TOOLTIP_P. * src/w32term.h (tip_window): Add external declaration. * src/xdisp.c (x_consider_frame_title, prepare_menu_bars) (should_produce_line_number): Rewrite with new macro FRAME_TOOLTIP_P. (note_mode_line_or_margin_highlight): If `mode-line-default-help-echo' specifies a function, call it to produce help echo string. * src/xfns.c (x_make_monitor_attribute_list) (Fx_display_monitor_attributes_list): Rewrite with new macro FRAME_TOOLTIP_P. (tip_last_string, tip_last_frame, tip_last_parms): New Lisp scalars replacing Lisp vector last_show_tip_args. (x_create_tip_frame): Set new frame's 'tooltip' structure member to true. (x_hide_tip): Rewrite with additional tests of frames for liveness and taking into account that for GTK+ tips the reference frame is now stored in tip_last_frame instead of tip_frame. (Fx_show_tip): Handle last_show_tip_args to tip_last_frame, tip_last_string and tip_last_parms conversion. For GTK+ store FRAME argument in tip_last-frame. (syms_of_xfns): staticpro tip_last_frame, tip_last_string and tip_last_parms instead of last_show_tip_args. * src/xterm.c (x_update_begin, handle_one_xevent, x_new_font) (x_set_window_size): Rewrite with new macro FRAME_TOOLTIP_P. * src/xterm.h (tip_window): Add external declaration. * etc/NEWS: Mention new modeline tooltips behavior.
* Update copyright year to 2018Paul Eggert2018-01-011-1/+1
| | | | Run admin/update-copyright.
* Change vectorlike from struct to unionPaul Eggert2017-11-131-1/+1
| | | | | | | * src/lisp.h (vectorlike_headed): Change from struct to union. All uses changed. Since it has only one member, this does not change semantics. This is designed to simplify future changes needed to fix bugs like Bug#29040. All uses changed.
* Make sure thread stack is properly aligned on MS-WindowsEli Zaretskii2017-10-141-7/+8
| | | | | | | * src/systhread.c: Include w32term.h instead of windows.h. (w32_beginthread_wrapper): Add ALIGN_STACK attribute, to ensure the thread's stack is correctly aligned. * src/w32term.h (ALIGN_STACK): Update commentary.