diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-10-30 16:21:41 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-10-30 16:21:41 +0000 |
commit | 717a0b958c4616753798250985558cab328a6837 (patch) | |
tree | fefaf97d67bc6182dd5c0c7ede8df56cdf4a8b98 /pango | |
parent | 09fb943676e06e3ba5fd4d8352a51719006d12b5 (diff) | |
download | pango-717a0b958c4616753798250985558cab328a6837.tar.gz |
Added docs for the publically exported functions in this module, even
Tue Sep 12 10:21:08 2000 Owen Taylor <otaylor@redhat.com>
* pango/modules.c (pango_map_get_entry): Added docs
for the publically exported functions in this module,
even though they are really only semi-public
(for people implementing new types of #PangoFont),
not public
* pango/pango-utils.c (pango_read_line): Minor bug
tweak.
Diffstat (limited to 'pango')
-rw-r--r-- | pango/modules.c | 37 | ||||
-rw-r--r-- | pango/pango-utils.c | 2 |
2 files changed, 38 insertions, 1 deletions
diff --git a/pango/modules.c b/pango/modules.c index 85b94f8d..fc59b008 100644 --- a/pango/modules.c +++ b/pango/modules.c @@ -74,6 +74,19 @@ GList *engines; static void build_map (PangoMapInfo *info); static void init_modules (void); +/** + * pango_find_map: + * @lang: the language tag for which to find the map (in the form + * en or en_US) + * @engine_type_id: the render type for the map to find + * @render_type_id: the engine type for the map to find + * + * Locate a #PangoMap for a particular engine type and render + * type. The resulting map can be used to determine the engine + * for each character. + * + * Return value: + **/ PangoMap * pango_find_map (const char *lang, guint engine_type_id, @@ -472,6 +485,19 @@ build_map (PangoMapInfo *info) } } +/** + * pango_map_get_entry: + * @map: a #PangoMap + * @wc: an ISO-10646 codepoint + * + * Returns the entry in the map for a given codepoint. The entry + * contains information about engine that should be used for + * the codepoint and also whether the engine matches the language + * tag for the map was created exactly or just approximately. + * + * Return value: the #PangoMapEntry for the codepoint. This value + * is owned by the #PangoMap and should not be freed. + **/ PangoMapEntry * pango_map_get_entry (PangoMap *map, guint32 wc) @@ -480,6 +506,17 @@ pango_map_get_entry (PangoMap *map, return submap->is_leaf ? &submap->d.entry : &submap->d.leaves[wc % 256]; } +/** + * pango_map_get_engine: + * @map: a #PangoMap + * @wc: an ISO-10646 codepoint + * + * Returns the engine listed in the map for a given codepoint. + * + * Return value: the engine, if one is listed for the codepoint, + * or %NULL. The lookup may cause the engine to be loaded; + * once an engine is loaded + **/ PangoEngine * pango_map_get_engine (PangoMap *map, guint32 wc) diff --git a/pango/pango-utils.c b/pango/pango-utils.c index 807adac8..e6d979c2 100644 --- a/pango/pango-utils.c +++ b/pango/pango-utils.c @@ -181,7 +181,7 @@ pango_read_line (FILE *stream, GString *str) { int next_c = getc_unlocked (stream); - if (!(c == EOF || + if (!(next_c == EOF || (c == '\r' && next_c == '\n') || (c == '\n' && next_c == '\r'))) ungetc (next_c, stream); |