Determines if a top level interface is displayed in dark mode.
capi
top-level-interface-dark-mode-p interface => dark-mode-p
interface⇩ |
An interface instance. |
dark-mode-p |
A Boolean. |
The function top-level-interface-dark-mode-p
returns true if interface is currently displayed in dark mode and false otherwise. If interface is not displayed, top-level-interface-dark-mode-p
returns false.
On Cocoa, interface is in dark mode if the name of its effective Appearance contains "dark" (ignoring case). That works for the standard appearances, but may not work for user defined ones.
On Microsoft Windows running Windows 10 or later, LispWorks checks the registry for the mode using the key "AppsUseLightTheme"
in "HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionThemesPersonalize"
.
On GTK+ 2 and Microsoft Windows before Windows 10, interface is in dark mode if its default background color is dark, which is checked summing the RGB values and comparing with 1.5.
On GTK+ 3, LispWorks uses the color-scheme from the gsettings object with schema_id
"org.gnome.desktop.interface"
to check for the mode, which gives the setting on the machine that LispWorks runs on. You can also override it using force-dark-mode.
(example-edit-file "capi/applications/interface-color-mode")
CAPI User Guide and Reference Manual (Windows version) - 18 Feb 2025 15:35:34