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/font.h | |
| 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/font.h')
| -rw-r--r-- | src/font.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/font.h b/src/font.h index ffed0461ff7..dfb58686182 100644 --- a/src/font.h +++ b/src/font.h | |||
| @@ -527,7 +527,7 @@ struct font_driver | |||
| 527 | 527 | ||
| 528 | This and the following `match' are the only APIs that allocate | 528 | This and the following `match' are the only APIs that allocate |
| 529 | font-entities. */ | 529 | font-entities. */ |
| 530 | Lisp_Object (*list) (Lisp_Object frame, Lisp_Object font_spec); | 530 | Lisp_Object (*list) (struct frame *frame, Lisp_Object font_spec); |
| 531 | 531 | ||
| 532 | /* Return a font-entity most closely matching with FONT_SPEC on | 532 | /* Return a font-entity most closely matching with FONT_SPEC on |
| 533 | FRAME. Which font property to consider, and how to calculate the | 533 | FRAME. Which font property to consider, and how to calculate the |
| @@ -536,12 +536,12 @@ struct font_driver | |||
| 536 | 536 | ||
| 537 | The properties that the font-entity has is the same as `list' | 537 | The properties that the font-entity has is the same as `list' |
| 538 | method. */ | 538 | method. */ |
| 539 | Lisp_Object (*match) (Lisp_Object frame, Lisp_Object font_spec); | 539 | Lisp_Object (*match) (struct frame *f, Lisp_Object spec); |
| 540 | 540 | ||
| 541 | /* Optional. | 541 | /* Optional. |
| 542 | List available families. The value is a list of family names | 542 | List available families. The value is a list of family names |
| 543 | (symbols). */ | 543 | (symbols). */ |
| 544 | Lisp_Object (*list_family) (Lisp_Object frame); | 544 | Lisp_Object (*list_family) (struct frame *f); |
| 545 | 545 | ||
| 546 | /* Optional (if FONT_EXTRA_INDEX is not Lisp_Save_Value). | 546 | /* Optional (if FONT_EXTRA_INDEX is not Lisp_Save_Value). |
| 547 | Free FONT_EXTRA_INDEX field of FONT_ENTITY. */ | 547 | Free FONT_EXTRA_INDEX field of FONT_ENTITY. */ |
| @@ -742,8 +742,7 @@ extern Lisp_Object font_style_symbolic (Lisp_Object font, | |||
| 742 | bool for_face); | 742 | bool for_face); |
| 743 | 743 | ||
| 744 | extern bool font_match_p (Lisp_Object spec, Lisp_Object font); | 744 | extern bool font_match_p (Lisp_Object spec, Lisp_Object font); |
| 745 | extern Lisp_Object font_list_entities (Lisp_Object frame, | 745 | extern Lisp_Object font_list_entities (struct frame *, Lisp_Object); |
| 746 | Lisp_Object spec); | ||
| 747 | 746 | ||
| 748 | extern Lisp_Object font_get_name (Lisp_Object font_object); | 747 | extern Lisp_Object font_get_name (Lisp_Object font_object); |
| 749 | extern Lisp_Object font_spec_from_name (Lisp_Object font_name); | 748 | extern Lisp_Object font_spec_from_name (Lisp_Object font_name); |