libtiger: /home/lyrian/OggVorbis/tiger/include/tiger/tiger.h Source File

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

# /home/lyrian/OggVorbis/tiger/include/tiger/tiger.h

Go to the documentation of this file.

    00001 /* Copyright (C) 2008 Vincent Penquerc'h.
    00002    This file is part of the Tiger rendering library.
    00003    Written by Vincent Penquerc'h.
    00004
    00005    This library is free software; you can redistribute it and/or
    00006    modify it under the terms of the GNU Lesser General Public
    00007    License as published by the Free Software Foundation; either
    00008    version 2.1 of the License, or (at your option) any later version.
    00009
    00010    This library is distributed in the hope that it will be useful,
    00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00013    Lesser General Public License for more details.
    00014
    00015    You should have received a copy of the GNU Lesser General Public
    00016    License along with this library; if not, write to the
    00017    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00018    Boston, MA 02111-1307, USA. */
    00019
    00020
    00021 #ifndef TIGER_tiger_h_GUARD
    00022 #define TIGER_tiger_h_GUARD
    00023
    00028 #include <stddef.h>
    00029 #include <kate/kate.h>
    00030 #include "tiger/tiger_config.h"
    00031
    00034 #define TIGER_VERSION_MAJOR 0
    00035 #define TIGER_VERSION_MINOR 3
    00036 #define TIGER_VERSION_PATCH 3
    00039 typedef struct tiger_renderer tiger_renderer;
    00040
    00041 typedef enum {
    00042   tiger_font_plain,
    00043   tiger_font_shadow,
    00044   tiger_font_outline
    00045 } tiger_font_effect;
    00046
    00047 #ifdef __cplusplus
    00048 extern "C" {
    00049 #endif
    00050
    00052 extern int tiger_get_version(void);
    00053 extern const char *tiger_get_version_string(void);
    00054
    00056 extern int tiger_renderer_create(tiger_renderer **tr);
    00057 extern int tiger_renderer_set_buffer(tiger_renderer *tr,unsigned char *ptr,int width,int height,int stride,int swap_rgb);
    00058 extern int tiger_renderer_set_surface_clear_color(tiger_renderer *tr,int clear,double r,double g,double b,double a);
    00059 extern int tiger_renderer_set_quality(tiger_renderer *tr,double quality);
    00060 extern int tiger_renderer_add_event(tiger_renderer *tr,const kate_info *ki,const kate_event *ev);
    00061 extern int tiger_renderer_update(tiger_renderer *tr,kate_float t,int track);
    00062 extern int tiger_renderer_seek(tiger_renderer *tr, kate_float target);
    00063 extern int tiger_renderer_render(tiger_renderer *tr);
    00064 extern int tiger_renderer_destroy(tiger_renderer *tr);
    00065 extern int tiger_renderer_is_dirty(const tiger_renderer *tr);
    00066 extern int tiger_renderer_enable_caching(tiger_renderer *tr,int enable);
    00067
    00068 extern int tiger_renderer_set_default_font_description(tiger_renderer *tr,const char *desc);
    00069 extern int tiger_renderer_set_default_font(tiger_renderer *tr,const char *font);
    00070 extern int tiger_renderer_set_default_font_size(tiger_renderer *tr,double size);
    00071 extern int tiger_renderer_set_default_font_color(tiger_renderer *tr,double r,double g, double b,double a);
    00072
    00073 extern int tiger_renderer_set_default_background_fill_color(tiger_renderer *tr,double r,double g,double b,double a);
    00074 extern int tiger_renderer_set_default_font_effect(tiger_renderer *tr,tiger_font_effect effect,double strength);
    00075
    00076 #ifdef DEBUG
    00077
    00078 extern int tiger_renderer_enable_debug(tiger_renderer *tr,int debug);
    00079 #endif
    00080
    00081 #ifdef __cplusplus
    00082 }
    00083 #endif
    00084
    00087 /* note that libkate errors may be returned by libtiger - see libkate API for more details */
    00088 #define TIGER_E_NOT_FOUND (-1001)
    00089 #define TIGER_E_INVALID_PARAMETER (-1002)
    00090 #define TIGER_E_OUT_OF_MEMORY (-1003)
    00091 #define TIGER_E_CAIRO_ERROR (-1004)
    00092 #define TIGER_E_BAD_SURFACE_TYPE (-1005)
    00095 #endif
    00096