[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/macfns.c
From: |
YAMAMOTO Mitsuharu |
Subject: |
[Emacs-diffs] Changes to emacs/src/macfns.c |
Date: |
Sun, 07 May 2006 08:05:02 +0000 |
Index: emacs/src/macfns.c
diff -u emacs/src/macfns.c:1.82 emacs/src/macfns.c:1.83
--- emacs/src/macfns.c:1.82 Mon May 1 02:51:38 2006
+++ emacs/src/macfns.c Sun May 7 08:05:02 2006
@@ -2013,6 +2013,22 @@
#endif
}
+static void
+mac_set_font (f, arg, oldval)
+ struct frame *f;
+ Lisp_Object arg, oldval;
+{
+ x_set_font (f, arg, oldval);
+#if USE_MAC_FONT_PANEL
+ if (FRAME_MAC_DISPLAY_INFO (f)->x_focus_frame == f)
+ {
+ BLOCK_INPUT;
+ mac_set_font_info_for_selection (f);
+ UNBLOCK_INPUT;
+ }
+#endif
+}
+
/* Subroutines of creating a frame. */
@@ -2213,8 +2229,10 @@
#if TARGET_API_MAC_CARBON
CreateNewWindow (kDocumentWindowClass,
kWindowStandardDocumentAttributes
- /* | kWindowToolbarButtonAttribute */,
- &r, &FRAME_MAC_WINDOW (f));
+#ifdef MAC_OSX
+ | kWindowToolbarButtonAttribute
+#endif
+ , &r, &FRAME_MAC_WINDOW (f));
if (FRAME_MAC_WINDOW (f))
{
SetWRefCon (FRAME_MAC_WINDOW (f), (long) f->output_data.mac);
@@ -4469,6 +4487,43 @@
#endif
/***********************************************************************
+ Fonts
+ ***********************************************************************/
+
+DEFUN ("mac-clear-font-name-table", Fmac_clear_font_name_table,
+ Smac_clear_font_name_table, 0, 0, 0,
+ doc: /* Clear the font name table. */)
+ ()
+{
+ check_mac ();
+ mac_clear_font_name_table ();
+ return Qnil;
+}
+
+#if USE_MAC_FONT_PANEL
+DEFUN ("mac-set-font-panel-visibility", Fmac_set_font_panel_visibility,
+ Smac_set_font_panel_visibility, 1, 1, 0,
+ doc: /* Set the font panel visibile if and only if VISIBLE is non-nil.
+This is for internal use only. Use `mac-font-panel-mode' instead. */)
+ (visible)
+ Lisp_Object visible;
+{
+ OSStatus err = noErr;
+
+ check_mac ();
+
+ BLOCK_INPUT;
+ if (NILP (visible) == (FPIsFontPanelVisible () == true))
+ err = FPShowHideFontPanel ();
+ UNBLOCK_INPUT;
+
+ if (err != noErr)
+ error ("Cannot change visibility of the font panel");
+ return Qnil;
+}
+#endif
+
+/***********************************************************************
Initialization
***********************************************************************/
@@ -4484,7 +4539,7 @@
x_set_border_width,
x_set_cursor_color,
x_set_cursor_type,
- x_set_font,
+ mac_set_font,
x_set_foreground_color,
x_set_icon_name,
0, /* MAC_TODO: x_set_icon_type, */
@@ -4660,7 +4715,7 @@
load_font_func = x_load_font;
find_ccl_program_func = x_find_ccl_program;
query_font_func = x_query_font;
- set_frame_fontset_func = x_set_font;
+ set_frame_fontset_func = mac_set_font;
check_window_system_func = check_mac;
hourglass_atimer = NULL;
@@ -4679,6 +4734,10 @@
#if TARGET_API_MAC_CARBON
defsubr (&Sx_file_dialog);
#endif
+ defsubr (&Smac_clear_font_name_table);
+#if USE_MAC_FONT_PANEL
+ defsubr (&Smac_set_font_panel_visibility);
+#endif
}
/* arch-tag: d7591289-f374-4377-b245-12f5dbbb8edc
- [Emacs-diffs] Changes to emacs/src/macfns.c,
YAMAMOTO Mitsuharu <=