diff options
author | Alan Third <alan@idiocy.org> | 2017-08-20 21:14:47 +0100 |
---|---|---|
committer | Alan Third <alan@idiocy.org> | 2017-08-23 19:57:00 +0100 |
commit | 7baa50eca28ff21497b058fa22656bbb4a447d87 (patch) | |
tree | 248e7eae805b65b76f368f70928cdcfb1a54cb84 /src/frame.c | |
parent | 4309d1574ae86244751600171b605b2b2eca4697 (diff) | |
download | emacs-7baa50eca28ff21497b058fa22656bbb4a447d87.tar.gz |
Add ability to change macOS WM theme (bug#27973)
* src/frame.c (make_frame, frame_parms, syms_of_frame)
[NS_IMPL_COCOA]: Add ns-appearance and ns-transparent-titlebar
options.
* src/frame.h (ns_appearance_type) [NS_IMPL_COCOA]: Add enum to
represent NSAppearance options.
(struct frame) [NS_IMPL_COCOA]: Add ns_appearance and
ns_transparent_titlebar frame parameters.
* src/nsfns.m (ns_frame_parm_handlers) [NS_IMPL_COCOA]: Add
ns_set_appearance and ns_set_transparent_titlebar handlers.
(Sx_create_frame): Handle ns-appearance and ns-transparent-titlebar
frame parameters.
(Qdark): Add new symbol for use with ns-appearance.
* src/nsterm.h (ns_set_appearance, ns_set_transparent_titlebar)
[NS_IMPL_COCOA]: Add prototypes.
* src/nsterm.m (ns_set_appearance, ns_set_transparent_titlebar)
[NS_IMPL_COCOA]: New functions.
(initFrameFromEmacs) [NS_IMPL_COCOA]: Handle ns-appearance and
ns-transparent-titlebar frame parameters.
* doc/lispref/frames.texi (Window Management Parameters): Document
ns-apperance and ns-transparent-titlebar.
Diffstat (limited to 'src/frame.c')
-rw-r--r-- | src/frame.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/frame.c b/src/frame.c index 1e5e4bbdb48..5099f75be4d 100644 --- a/src/frame.c +++ b/src/frame.c @@ -834,6 +834,10 @@ make_frame (bool mini_p) #if ! defined (USE_GTK) && ! defined (HAVE_NS) f->last_tool_bar_item = -1; #endif +#ifdef NS_IMPL_COCOA + f->ns_appearance = ns_appearance_aqua; + f->ns_transparent_titlebar = false; +#endif #endif root_window = make_window (); @@ -3520,6 +3524,10 @@ static const struct frame_parm_table frame_parms[] = {"z-group", SYMBOL_INDEX (Qz_group)}, {"override-redirect", SYMBOL_INDEX (Qoverride_redirect)}, {"no-special-glyphs", SYMBOL_INDEX (Qno_special_glyphs)}, +#ifdef NS_IMPL_COCOA + {"ns-appearance", SYMBOL_INDEX (Qns_appearance)}, + {"ns-transparent-titlebar", SYMBOL_INDEX (Qns_transparent_titlebar)}, +#endif }; #ifdef HAVE_WINDOW_SYSTEM @@ -5646,6 +5654,10 @@ syms_of_frame (void) #ifdef HAVE_NS DEFSYM (Qns_parse_geometry, "ns-parse-geometry"); #endif +#ifdef NS_IMPL_COCOA + DEFSYM (Qns_appearance, "ns-appearance"); + DEFSYM (Qns_transparent_titlebar, "ns-transparent-titlebar"); +#endif DEFSYM (Qalpha, "alpha"); DEFSYM (Qauto_lower, "auto-lower"); |