aboutsummaryrefslogtreecommitdiffstats
path: root/src/nsfont.m
diff options
context:
space:
mode:
authorDmitry Antipov2013-08-01 14:33:25 +0400
committerDmitry Antipov2013-08-01 14:33:25 +0400
commitfdb396e222923dc98d46c170381c6b33dc1e8d99 (patch)
tree9cf9c6074b8386eec0f9e7d0e610b98447894d4a /src/nsfont.m
parent2f935d86fd7aa551e2c61d71c14a1c1a8b3ba707 (diff)
downloademacs-fdb396e222923dc98d46c170381c6b33dc1e8d99.tar.gz
emacs-fdb396e222923dc98d46c170381c6b33dc1e8d99.zip
Avoid redundant Lisp_Object <-> struct frame conversions in font API.
* font.h (struct font_driver): Change list, match, and list_family functions to accept struct frame * as first arg. * font.c (font_score, font_compare, font_sort_entities): Remove prototypes. (font_sort_entities, font_list_entities, font_select_entity): (font_find_for_lface, Flist_fonts, Ffont_family_list): Adjust to match font API change. * xfont.c (xfont_list, xfont_match, xfont_list_family): * ftfont.c (ftfont_list, ftfont_match, ftfont_list_family): * ftxfont.c (ftxfont_list, ftxfont_match): * xftfont.c (xftfont_list, xftfont_match): * nsfont.m (nsfont_list, nsfont_match, nsfont_list_family): * w32font.c (w32font_list, w32font_match, w32font_list): (w32font_list_internal, w32_font_match_internal): Likewise. * xfaces.c (Fx_family_fonts): Adjust user.
Diffstat (limited to 'src/nsfont.m')
-rw-r--r--src/nsfont.m16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nsfont.m b/src/nsfont.m
index df7ef0bb0bc..26a80624f7c 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -620,9 +620,9 @@ ns_findfonts (Lisp_Object font_spec, BOOL isMatch)
620 620
621 621
622static Lisp_Object nsfont_get_cache (FRAME_PTR frame); 622static Lisp_Object nsfont_get_cache (FRAME_PTR frame);
623static Lisp_Object nsfont_list (Lisp_Object frame, Lisp_Object font_spec); 623static Lisp_Object nsfont_list (struct frame *, Lisp_Object);
624static Lisp_Object nsfont_match (Lisp_Object frame, Lisp_Object font_spec); 624static Lisp_Object nsfont_match (struct frame *, Lisp_Object);
625static Lisp_Object nsfont_list_family (Lisp_Object frame); 625static Lisp_Object nsfont_list_family (struct frame *);
626static Lisp_Object nsfont_open (FRAME_PTR f, Lisp_Object font_entity, 626static Lisp_Object nsfont_open (FRAME_PTR f, Lisp_Object font_entity,
627 int pixel_size); 627 int pixel_size);
628static void nsfont_close (FRAME_PTR f, struct font *font); 628static void nsfont_close (FRAME_PTR f, struct font *font);
@@ -679,9 +679,9 @@ nsfont_get_cache (FRAME_PTR frame)
679 weight, slant, width, size (0 if scalable), 679 weight, slant, width, size (0 if scalable),
680 dpi, spacing, avgwidth (0 if scalable) */ 680 dpi, spacing, avgwidth (0 if scalable) */
681static Lisp_Object 681static Lisp_Object
682nsfont_list (Lisp_Object frame, Lisp_Object font_spec) 682nsfont_list (struct frame *f, Lisp_Object font_spec)
683{ 683{
684 return ns_findfonts (font_spec, NO); 684 return ns_findfonts (font_spec, NO);
685} 685}
686 686
687 687
@@ -690,16 +690,16 @@ nsfont_list (Lisp_Object frame, Lisp_Object font_spec)
690 `face-font-selection-order' is ignored here. 690 `face-font-selection-order' is ignored here.
691 Properties to be considered are same as for list(). */ 691 Properties to be considered are same as for list(). */
692static Lisp_Object 692static Lisp_Object
693nsfont_match (Lisp_Object frame, Lisp_Object font_spec) 693nsfont_match (struct frame *f, Lisp_Object font_spec)
694{ 694{
695 return ns_findfonts(font_spec, YES); 695 return ns_findfonts (font_spec, YES);
696} 696}
697 697
698 698
699/* List available families. The value is a list of family names 699/* List available families. The value is a list of family names
700 (symbols). */ 700 (symbols). */
701static Lisp_Object 701static Lisp_Object
702nsfont_list_family (Lisp_Object frame) 702nsfont_list_family (struct frame *f)
703{ 703{
704 Lisp_Object list = Qnil; 704 Lisp_Object list = Qnil;
705 NSEnumerator *families; 705 NSEnumerator *families;