summaryrefslogtreecommitdiff
path: root/src/nsfns.m
diff options
context:
space:
mode:
authorAlan Third <alan@idiocy.org>2017-12-24 15:40:03 +0000
committerAlan Third <alan@idiocy.org>2018-01-07 20:38:26 +0000
commit1daac66a6eedbcbfa32ab920b5c579872d989517 (patch)
tree6c273e0c588b7e7d949b1c0a1b6f10fde2fe5e94 /src/nsfns.m
parent9a220bbd94f427279dd1130f9fe6524f8a012ef2 (diff)
downloademacs-1daac66a6eedbcbfa32ab920b5c579872d989517.tar.gz
Add macOS character-palette (bug#29837)
* lisp/ns-win.el (ns-do-show-character-palette): New function. * src/nsfns.m (Sns_show_character_palette): New function. * src/nsterm.m (EmacsView::insertText): Handle NSAttributedString.
Diffstat (limited to 'src/nsfns.m')
-rw-r--r--src/nsfns.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/nsfns.m b/src/nsfns.m
index 3ede63f9854..c8b30246268 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -3135,6 +3135,19 @@ position (0, 0) of the selected frame's terminal. */)
(pt.y - screen.frame.origin.y)));
}
+DEFUN ("ns-show-character-palette",
+ Fns_show_character_palette,
+ Sns_show_character_palette, 0, 0, 0,
+ doc: /* Show the macOS character palette. */)
+ (void)
+{
+ struct frame *f = SELECTED_FRAME ();
+ EmacsView *view = FRAME_NS_VIEW (f);
+ [NSApp orderFrontCharacterPalette:view];
+
+ return Qnil;
+}
+
/* ==========================================================================
Class implementations
@@ -3326,6 +3339,7 @@ be used as the image of the icon representing the frame. */);
defsubr (&Sns_frame_restack);
defsubr (&Sns_set_mouse_absolute_pixel_position);
defsubr (&Sns_mouse_absolute_pixel_position);
+ defsubr (&Sns_show_character_palette);
defsubr (&Sx_display_mm_width);
defsubr (&Sx_display_mm_height);
defsubr (&Sx_display_screens);