4 * Copyright (C) 1999 Red Hat Software
5 * Copyright (C) 2000 Tor Lillqvist
6 * Copyright (C) 2001 Alexander Larsson
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
24 #ifndef __PANGOWIN32_H__
25 #define __PANGOWIN32_H__
28 #include <pango/pango-font.h>
29 #include <pango/pango-layout.h>
35 #define _WIN32_WINNT 0x0501 /* To get ClearType-related macros */
40 #define PANGO_RENDER_TYPE_WIN32 "PangoRenderWin32"
42 /* Calls for applications
44 #ifndef PANGO_DISABLE_DEPRECATED
45 PangoContext * pango_win32_get_context (void);
48 void pango_win32_render (HDC hdc,
50 PangoGlyphString *glyphs,
53 void pango_win32_render_layout_line (HDC hdc,
54 PangoLayoutLine *line,
57 void pango_win32_render_layout (HDC hdc,
62 void pango_win32_render_transformed (HDC hdc,
63 const PangoMatrix *matrix,
65 PangoGlyphString *glyphs,
69 #ifdef PANGO_ENABLE_ENGINE
74 #ifndef PANGO_DISABLE_DEPRECATED
75 PangoGlyph pango_win32_get_unknown_glyph (PangoFont *font,
77 #endif /* PANGO_DISABLE_DEPRECATED */
78 gint pango_win32_font_get_glyph_index(PangoFont *font,
81 HDC pango_win32_get_dc (void);
83 gboolean pango_win32_get_debug_flag (void);
85 gboolean pango_win32_font_select_font (PangoFont *font,
87 void pango_win32_font_done_font (PangoFont *font);
88 double pango_win32_font_get_metrics_factor (PangoFont *font);
92 /* API for libraries that want to use PangoWin32 mixed with classic
95 typedef struct _PangoWin32FontCache PangoWin32FontCache;
97 PangoWin32FontCache *pango_win32_font_cache_new (void);
98 void pango_win32_font_cache_free (PangoWin32FontCache *cache);
100 HFONT pango_win32_font_cache_load (PangoWin32FontCache *cache,
101 const LOGFONTA *logfont);
102 HFONT pango_win32_font_cache_loadw (PangoWin32FontCache *cache,
103 const LOGFONTW *logfont);
104 void pango_win32_font_cache_unload (PangoWin32FontCache *cache,
107 PangoFontMap *pango_win32_font_map_for_display (void);
108 void pango_win32_shutdown_display (void);
109 PangoWin32FontCache *pango_win32_font_map_get_font_cache (PangoFontMap *font_map);
111 LOGFONTA *pango_win32_font_logfont (PangoFont *font);
112 LOGFONTW *pango_win32_font_logfontw (PangoFont *font);
114 PangoFontDescription *pango_win32_font_description_from_logfont (const LOGFONTA *lfp);
116 PangoFontDescription *pango_win32_font_description_from_logfontw (const LOGFONTW *lfp);
120 #endif /* __PANGOWIN32_H__ */