4 * An OpenGL based 'interactive canvas' library.
6 * Authored By Matthew Allum <mallum@openedhand.com>
8 * Copyright (C) 2008 OpenedHand
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
24 #ifndef __COGL_PANGO_GLYPH_CACHE_H__
25 #define __COGL_PANGO_GLYPH_CACHE_H__
28 #include <cogl/cogl.h>
29 #include <pango/pango-font.h>
33 typedef struct _CoglPangoGlyphCache CoglPangoGlyphCache;
34 typedef struct _CoglPangoGlyphCacheValue CoglPangoGlyphCacheValue;
36 struct _CoglPangoGlyphCacheValue
53 /* This will be set to TRUE when the glyph atlas is reorganized
54 which means the glyph will need to be redrawn */
58 typedef void (* CoglPangoGlyphCacheDirtyFunc) (PangoFont *font,
60 CoglPangoGlyphCacheValue *value);
63 cogl_pango_glyph_cache_new (gboolean use_mipmapping);
66 cogl_pango_glyph_cache_free (CoglPangoGlyphCache *cache);
68 CoglPangoGlyphCacheValue *
69 cogl_pango_glyph_cache_lookup (CoglPangoGlyphCache *cache,
75 cogl_pango_glyph_cache_clear (CoglPangoGlyphCache *cache);
78 _cogl_pango_glyph_cache_add_reorganize_callback (CoglPangoGlyphCache *cache,
83 _cogl_pango_glyph_cache_remove_reorganize_callback (CoglPangoGlyphCache *cache,
88 _cogl_pango_glyph_cache_set_dirty_glyphs (CoglPangoGlyphCache *cache,
89 CoglPangoGlyphCacheDirtyFunc func);
93 #endif /* __COGL_PANGO_GLYPH_CACHE_H__ */