diff options
| author | Dmitry Antipov | 2013-08-01 14:33:25 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-08-01 14:33:25 +0400 |
| commit | fdb396e222923dc98d46c170381c6b33dc1e8d99 (patch) | |
| tree | 9cf9c6074b8386eec0f9e7d0e610b98447894d4a /src/nsfont.m | |
| parent | 2f935d86fd7aa551e2c61d71c14a1c1a8b3ba707 (diff) | |
| download | emacs-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.m | 16 |
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 | ||
| 622 | static Lisp_Object nsfont_get_cache (FRAME_PTR frame); | 622 | static Lisp_Object nsfont_get_cache (FRAME_PTR frame); |
| 623 | static Lisp_Object nsfont_list (Lisp_Object frame, Lisp_Object font_spec); | 623 | static Lisp_Object nsfont_list (struct frame *, Lisp_Object); |
| 624 | static Lisp_Object nsfont_match (Lisp_Object frame, Lisp_Object font_spec); | 624 | static Lisp_Object nsfont_match (struct frame *, Lisp_Object); |
| 625 | static Lisp_Object nsfont_list_family (Lisp_Object frame); | 625 | static Lisp_Object nsfont_list_family (struct frame *); |
| 626 | static Lisp_Object nsfont_open (FRAME_PTR f, Lisp_Object font_entity, | 626 | static Lisp_Object nsfont_open (FRAME_PTR f, Lisp_Object font_entity, |
| 627 | int pixel_size); | 627 | int pixel_size); |
| 628 | static void nsfont_close (FRAME_PTR f, struct font *font); | 628 | static 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) */ |
| 681 | static Lisp_Object | 681 | static Lisp_Object |
| 682 | nsfont_list (Lisp_Object frame, Lisp_Object font_spec) | 682 | nsfont_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(). */ |
| 692 | static Lisp_Object | 692 | static Lisp_Object |
| 693 | nsfont_match (Lisp_Object frame, Lisp_Object font_spec) | 693 | nsfont_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). */ |
| 701 | static Lisp_Object | 701 | static Lisp_Object |
| 702 | nsfont_list_family (Lisp_Object frame) | 702 | nsfont_list_family (struct frame *f) |
| 703 | { | 703 | { |
| 704 | Lisp_Object list = Qnil; | 704 | Lisp_Object list = Qnil; |
| 705 | NSEnumerator *families; | 705 | NSEnumerator *families; |