1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00

Add `toolkit-theme' and 'toolkit-theme-set-functions'

* 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'
This commit is contained in:
Ahmed Khanzada 2025-11-16 20:08:59 -08:00 committed by Eli Zaretskii
parent 1cfd0cf0bd
commit bc0f662573
7 changed files with 54 additions and 0 deletions

View file

@ -3603,6 +3603,13 @@ Emacs when built with the pure GTK toolkit now respects desktop
dark and light modes for drawing a GTK toolbar and widgets,
automatically toggling between them.
---
** toolkit-theme-set-functions called when the toolkit theme is set for Emacs.
When the theme is set on PGTK or MS-Windows builds,
'toolkit-theme-set-functions' is called. Result is stored in var
'toolkit-theme' as either symbol 'dark' or 'light', but may be
expanded to future toolkit-specific symbols in the future.
* Changes in Emacs 31.1 on Non-Free Operating Systems