~oem-solutions-group/unity-2d/clutter-1.0

« back to all changes in this revision

Viewing changes to clutter/cogl/pango/cogl-pango-glyph-cache.h

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2010-03-21 13:27:56 UTC
  • mto: (2.1.3 experimental)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20100321132756-nf8yd30yxo3zzwcm
Tags: upstream-1.2.2
ImportĀ upstreamĀ versionĀ 1.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Clutter.
 
3
 *
 
4
 * An OpenGL based 'interactive canvas' library.
 
5
 *
 
6
 * Authored By Matthew Allum  <mallum@openedhand.com>
 
7
 *
 
8
 * Copyright (C) 2008 OpenedHand
 
9
 *
 
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.
 
14
 *
 
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.
 
19
 *
 
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/>.
 
22
 */
 
23
 
 
24
#ifndef __COGL_PANGO_GLYPH_CACHE_H__
 
25
#define __COGL_PANGO_GLYPH_CACHE_H__
 
26
 
 
27
#include <glib.h>
 
28
#include <cogl/cogl.h>
 
29
#include <pango/pango-font.h>
 
30
 
 
31
G_BEGIN_DECLS
 
32
 
 
33
typedef struct _CoglPangoGlyphCache      CoglPangoGlyphCache;
 
34
typedef struct _CoglPangoGlyphCacheValue CoglPangoGlyphCacheValue;
 
35
 
 
36
struct _CoglPangoGlyphCacheValue
 
37
{
 
38
  CoglHandle texture;
 
39
 
 
40
  float  tx1;
 
41
  float  ty1;
 
42
  float  tx2;
 
43
  float  ty2;
 
44
 
 
45
  int        draw_x;
 
46
  int        draw_y;
 
47
  int        draw_width;
 
48
  int        draw_height;
 
49
};
 
50
 
 
51
CoglPangoGlyphCache *
 
52
cogl_pango_glyph_cache_new (void);
 
53
 
 
54
void
 
55
cogl_pango_glyph_cache_free (CoglPangoGlyphCache *cache);
 
56
 
 
57
CoglPangoGlyphCacheValue *
 
58
cogl_pango_glyph_cache_lookup (CoglPangoGlyphCache *cache,
 
59
                               PangoFont           *font,
 
60
                               PangoGlyph           glyph);
 
61
 
 
62
CoglPangoGlyphCacheValue *
 
63
cogl_pango_glyph_cache_set (CoglPangoGlyphCache *cache,
 
64
                            PangoFont           *font,
 
65
                            PangoGlyph           glyph,
 
66
                            gconstpointer        pixels,
 
67
                            int                  width,
 
68
                            int                  height,
 
69
                            int                  stride,
 
70
                            int                  draw_x,
 
71
                            int                  draw_y);
 
72
 
 
73
void
 
74
cogl_pango_glyph_cache_clear (CoglPangoGlyphCache *cache);
 
75
 
 
76
G_END_DECLS
 
77
 
 
78
#endif /* __COGL_PANGO_GLYPH_CACHE_H__ */