From 1daac66a6eedbcbfa32ab920b5c579872d989517 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sun, 24 Dec 2017 15:40:03 +0000 Subject: 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. --- src/nsfns.m | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/nsfns.m') 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); -- cgit v1.2.1