summaryrefslogtreecommitdiff
path: root/src/xftfont.c
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2014-07-03 16:20:00 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2014-07-03 16:20:00 +0400
commit60ab579771527dcc29547119f2c1b7099eda4d55 (patch)
tree8804ef001fbd3b73845b9f5dc690dd188054a6f6 /src/xftfont.c
parent95268e987c484b98aac3de54cf91d65db16f4c22 (diff)
downloademacs-60ab579771527dcc29547119f2c1b7099eda4d55.tar.gz
Use convenient alists to manage per-frame font driver-specific data.
* frame.h (struct frame): Rename font_data_list to... [HAVE_XFT || HAVE_FREETYPE]: ... font_data, which is a Lisp_Object now. * font.h (struct font_data_list): Remove; no longer need a special data type. (font_put_frame_data, font_get_frame_data) [HAVE_XFT || HAVE_FREETYPE]: Adjust prototypes. * font.c (font_put_frame_data, font_get_frame_data) [HAVE_XFT || HAVE_FREETYPE]: Prefer alist functions to ad-hoc list management. * xftfont.c (xftfont_get_xft_draw, xftfont_end_for_frame): Related users changed. * ftxfont.c (ftxfont_get_gcs, ftxfont_end_for_frame): Likewise. Prefer convenient xmalloc and xfree.
Diffstat (limited to 'src/xftfont.c')
-rw-r--r--src/xftfont.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/xftfont.c b/src/xftfont.c
index 2b4ec065734..bd3f2c92142 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -593,7 +593,7 @@ xftfont_text_extents (struct font *font, unsigned int *code, int nglyphs, struct
static XftDraw *
xftfont_get_xft_draw (struct frame *f)
{
- XftDraw *xft_draw = font_get_frame_data (f, &xftfont_driver);
+ XftDraw *xft_draw = font_get_frame_data (f, Qxft);
if (! xft_draw)
{
@@ -604,7 +604,7 @@ xftfont_get_xft_draw (struct frame *f)
FRAME_X_COLORMAP (f));
unblock_input ();
eassert (xft_draw != NULL);
- font_put_frame_data (f, &xftfont_driver, xft_draw);
+ font_put_frame_data (f, Qxft, xft_draw);
}
return xft_draw;
}
@@ -680,14 +680,14 @@ xftfont_end_for_frame (struct frame *f)
/* Don't do anything if display is dead */
if (FRAME_X_DISPLAY (f) == NULL) return 0;
- xft_draw = font_get_frame_data (f, &xftfont_driver);
+ xft_draw = font_get_frame_data (f, Qxft);
if (xft_draw)
{
block_input ();
XftDrawDestroy (xft_draw);
unblock_input ();
- font_put_frame_data (f, &xftfont_driver, NULL);
+ font_put_frame_data (f, Qxft, NULL);
}
return 0;
}