libtiger 0.3.4

- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

- File List
- Globals

tiger.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 Vincent Penquerc'h.
2 This file is part of the Tiger rendering library.
3 Written by Vincent Penquerc'h.
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. */
19
20
21 #ifndef TIGER_tiger_h_GUARD
22 #define TIGER_tiger_h_GUARD
23
28 #include <stddef.h>
29 #include <kate/kate.h>
30 #include "tiger/tiger_config.h"
31
34 #define TIGER_VERSION_MAJOR 0
35 #define TIGER_VERSION_MINOR 3
36 #define TIGER_VERSION_PATCH 4
39 typedef struct tiger_renderer tiger_renderer;
40
41 typedef enum {
42 tiger_font_plain,
43 tiger_font_shadow,
44 tiger_font_outline
45 } tiger_font_effect;
46
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50
52 extern int tiger_get_version(void);
53 extern const char *tiger_get_version_string(void);
54
56 extern int tiger_renderer_create(tiger_renderer **tr);
57 extern int tiger_renderer_set_buffer(tiger_renderer *tr,unsigned char *ptr,int width,int height,int stride,int swap_rgb);
58 extern int tiger_renderer_set_surface_clear_color(tiger_renderer *tr,int clear,double r,double g,double b,double a);
59 extern int tiger_renderer_set_quality(tiger_renderer *tr,double quality);
60 extern int tiger_renderer_add_event(tiger_renderer *tr,const kate_info *ki,const kate_event *ev);
61 extern int tiger_renderer_update(tiger_renderer *tr,kate_float t,int track);
62 extern int tiger_renderer_seek(tiger_renderer *tr, kate_float target);
63 extern int tiger_renderer_render(tiger_renderer *tr);
64 extern int tiger_renderer_destroy(tiger_renderer *tr);
65 extern int tiger_renderer_is_dirty(const tiger_renderer *tr);
66 extern int tiger_renderer_enable_caching(tiger_renderer *tr,int enable);
67
68 extern int tiger_renderer_set_default_font_description(tiger_renderer *tr,const char *desc);
69 extern int tiger_renderer_set_default_font(tiger_renderer *tr,const char *font);
70 extern int tiger_renderer_set_default_font_size(tiger_renderer *tr,double size);
71 extern int tiger_renderer_set_default_font_color(tiger_renderer *tr,double r,double g, double b,double a);
72
73 extern int tiger_renderer_set_default_background_fill_color(tiger_renderer *tr,double r,double g,double b,double a);
74 extern int tiger_renderer_set_default_font_effect(tiger_renderer *tr,tiger_font_effect effect,double strength);
75
76 #ifdef DEBUG
77
78 extern int tiger_renderer_enable_debug(tiger_renderer *tr,int debug);
79 #endif
80
81 #ifdef __cplusplus
82 }
83 #endif
84
87 /* note that libkate errors may be returned by libtiger - see libkate API for more details */
88 #define TIGER_E_NOT_FOUND (-1001)
89 #define TIGER_E_INVALID_PARAMETER (-1002)
90 #define TIGER_E_OUT_OF_MEMORY (-1003)
91 #define TIGER_E_CAIRO_ERROR (-1004)
92 #define TIGER_E_BAD_SURFACE_TYPE (-1005)
95 #endif
96