A value that indicates the color mode of a top level interface.
capi
top-level-interface-color-mode interface => color-mode
setf (top-level-interface-color-mode interface) color-mode => color-mode
interface⇩ |
An interface instance. |
color-mode | nil , a keyword or a string. |
color-mode | nil , a keyword or a string. |
The accessor top-level-interface-color-mode
reads or sets the Appearance of interface on Cocoa. top-level-interface-color-mode
has no effect on other platforms.
If color-mode is nil
then interface is displayed in the Appearance specified by the System Preferences.
Otherwise, when color-mode is non-nil, it specifies that interface has its own Appearance, overriding the System Preferences.
When color-mode is a keyword, it must be one of the keywords in the following table, and it is mapped to the specified Cocoa appearance name.
Keyword | Cocoa appearance name |
---|---|
|
|
|
|
Any other keyword will signal an error.
When color-mode is a string, it specifies the name of a Cocoa appearance, and it is looked up by calling the appearanceNamed:
method of the Cocoa NSAppearance
class. It is your responsibility to pass a valid string. If appearanceNamed:
fails to find the appearance, a warning is signalled and the color-mode is ignored.
top-level-interface-color-mode-callback is called when macOS changes the Appearance.
top-level-interface-color-mode
returns the desired color mode. Call top-level-interface-dark-mode-p to determine if interface is currently in dark mode.
For an example of using color-mode and color-mode-callback, see:
(example-edit-file "capi/applications/interface-color-mode")
top-level-interface-color-mode-callback
top-level-interface-dark-mode-p
CAPI User Guide and Reference Manual (Unix version) - 01 Dec 2021 19:32:42