"Initial commit to Gerrit"
[profile/ivi/cogl.git] / cogl-pango / cogl-pango-display-list.h
1 /*
2  * Clutter.
3  *
4  * An OpenGL based 'interactive canvas' library.
5  *
6  * Authored By Neil Roberts  <neil@linux.intel.com>
7  *
8  * Copyright (C) 2009  Intel Corporation.
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_DISPLAY_LIST_H__
25 #define __COGL_PANGO_DISPLAY_LIST_H__
26
27 #include <glib.h>
28 #include <cogl/cogl.h>
29 #include "cogl-pango-pipeline-cache.h"
30
31 G_BEGIN_DECLS
32
33 typedef struct _CoglPangoDisplayList CoglPangoDisplayList;
34
35 CoglPangoDisplayList *_cogl_pango_display_list_new (CoglPangoPipelineCache *);
36
37 void _cogl_pango_display_list_set_color_override (CoglPangoDisplayList *dl,
38                                                   const CoglColor *color);
39 void _cogl_pango_display_list_remove_color_override (CoglPangoDisplayList *dl);
40
41 void _cogl_pango_display_list_add_texture (CoglPangoDisplayList *dl,
42                                            CoglTexture *texture,
43                                            float x_1, float y_1,
44                                            float x_2, float y_2,
45                                            float tx_1, float ty_1,
46                                            float tx_2, float ty_2);
47
48 void _cogl_pango_display_list_add_rectangle (CoglPangoDisplayList *dl,
49                                              float x_1, float y_1,
50                                              float x_2, float y_2);
51
52 void _cogl_pango_display_list_add_trapezoid (CoglPangoDisplayList *dl,
53                                              float y_1,
54                                              float x_11,
55                                              float x_21,
56                                              float y_2,
57                                              float x_12,
58                                              float x_22);
59
60 void _cogl_pango_display_list_render (CoglPangoDisplayList *dl,
61                                       const CoglColor *color);
62
63 void _cogl_pango_display_list_clear (CoglPangoDisplayList *dl);
64
65 void _cogl_pango_display_list_free (CoglPangoDisplayList *dl);
66
67 G_END_DECLS
68
69 #endif /* __COGL_PANGO_DISPLAY_LIST_H__ */