summaryrefslogtreecommitdiff
path: root/pango/pangowin32-private.h
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2000-07-15 01:06:08 +0000
committerTor Lillqvist <tml@src.gnome.org>2000-07-15 01:06:08 +0000
commit932fe1e3da39b3d8febfca65f6ca5312f0397ed1 (patch)
treed5583d408b5af1a4ed899a78937fc76ed46c442d /pango/pangowin32-private.h
parentd4fb416c99d0066aafed26306a421a7bd22289e3 (diff)
downloadpango-932fe1e3da39b3d8febfca65f6ca5312f0397ed1.tar.gz
pango/pangowin32.h pango/pangowin32-private.h pango/pangowin32-fontcache.c
2000-07-15 Tor Lillqvist <tml@iki.fi> * pango/pangowin32.h * pango/pangowin32-private.h * pango/pangowin32-fontcache.c * pango/pangowin32-fontmap.c * modules/basic/basic-win32.c * examples/viewer-win32.c * examples/pangowin32.aliases: New files. Start of a Win32 implementation. Does not work yet. * configure.in: Chek for dirent.h and unistd.h. * pango/pango-utils.h * pango/pango-utils.c (pango_get_sysconf_subdirectory, pango_get_lib_subdirectory): New functions, for better portability, to enable installation-time choice of directory (on Windows) instead of compile-time. Use these instead of SYSCONFDIR "/pango" and LIBDIR "/pango". (pango_split_file_list): Fix comment, the function splits on searchpath separators, not commas. Use G_SEARCHPATH_SEPARATOR_S for portability. Don't try to expand '~' as home directory on Windows. (read_config): Use pango_get_sysconf_subdirectory(). * pango/modules.c (read_modules): Use pango_get_sysconf_subdirectory(). Don't crash if a module file cannot be opened. * pango/querymodules.c: Include config.h Conditionalize inclusion of dirent.h and unistd.h. Use platform-specific shared library extension. Use pango_get_lib_subdirectory().
Diffstat (limited to 'pango/pangowin32-private.h')
-rw-r--r--pango/pangowin32-private.h91
1 files changed, 91 insertions, 0 deletions
diff --git a/pango/pangowin32-private.h b/pango/pangowin32-private.h
new file mode 100644
index 00000000..9d748798
--- /dev/null
+++ b/pango/pangowin32-private.h
@@ -0,0 +1,91 @@
+/* Pango
+ * pangowin32-private.h:
+ *
+ * Copyright (C) 1999 Red Hat Software
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __PANGOWIN32_PRIVATE_H__
+#define __PANGOWIN32_PRIVATE_H__
+
+#include "pango-modules.h"
+#include "pangowin32.h"
+
+#ifndef FS_VIETNAMESE
+#define FS_VIETNAMESE 0x100
+#endif
+
+#define PANGO_NOTE(x) x
+
+typedef struct _PangoWin32Font PangoWin32Font;
+typedef struct _PangoWin32FontEntry PangoWin32FontEntry;
+typedef struct _PangoWin32SubfontInfo PangoWin32SubfontInfo;
+
+struct _PangoWin32Font
+{
+ PangoFont font;
+
+ LOGFONT *fonts;
+ int n_fonts;
+ int size;
+
+ /* hash table mapping from Unicode subranges to array of PangoWin32Subfont
+ * ids, of length n_fonts
+ */
+ GHashTable *subfonts_by_subrange;
+
+ PangoWin32SubfontInfo **subfonts;
+
+ int n_subfonts;
+ int max_subfonts;
+
+ GSList *metrics_by_lang;
+
+ PangoFontMap *fontmap;
+ /* If TRUE, font is in cache of recently unused fonts and not otherwise
+ * in use.
+ */
+ gboolean in_cache;
+
+ PangoWin32FontEntry *entry; /* Used to remove cached fonts */
+};
+
+PangoWin32Font *pango_win32_font_new (PangoFontMap *fontmap,
+ const LOGFONT *lfp,
+ int n_fonts,
+ int size);
+PangoMap * pango_win32_get_shaper_map (const char *lang);
+gboolean pango_win32_logfont_has_subrange (PangoFontMap *fontmap,
+ LOGFONT *lfp,
+ PangoWin32UnicodeSubrange subrange);
+LOGFONT * pango_win32_make_matching_logfont (PangoFontMap *fontmap,
+ LOGFONT *lfp,
+ int size);
+PangoCoverage * pango_win32_font_entry_get_coverage (PangoWin32FontEntry *entry,
+ PangoFont *font,
+ const char *lang);
+void pango_win32_font_entry_remove (PangoWin32FontEntry *entry,
+ PangoFont *font);
+
+void pango_win32_fontmap_cache_add (PangoFontMap *fontmap,
+ PangoWin32Font *xfont);
+void pango_win32_fontmap_cache_remove (PangoFontMap *fontmap,
+ PangoWin32Font *xfont);
+
+extern HDC pango_win32_hdc;
+
+#endif /* __PANGOWIN32_PRIVATE_H__ */