|
libkate 0.4.3
|
#include "kate/kate_config.h"Go to the source code of this file.
Data Structures | |
| struct | kate_region |
| struct | kate_color |
| struct | kate_style |
| struct | kate_curve |
| struct | kate_motion |
| struct | kate_palette |
| struct | kate_bitmap |
| struct | kate_font_range |
| struct | kate_font_mapping |
| struct | kate_info |
| struct | kate_state |
| struct | kate_comment |
| struct | kate_event |
| struct | kate_tracker |
| struct | kate_packet |
Macros | |
API version | |
| #define | KATE_VERSION_MAJOR 0 |
| #define | KATE_VERSION_MINOR 4 |
| #define | KATE_VERSION_PATCH 3 |
Bitstream version | |
| #define | KATE_BITSTREAM_VERSION_MAJOR 0 |
| #define | KATE_BITSTREAM_VERSION_MINOR 7 |
Error codes | |
| #define | KATE_E_NOT_FOUND (-1) |
| #define | KATE_E_INVALID_PARAMETER (-2) |
| #define | KATE_E_OUT_OF_MEMORY (-3) |
| #define | KATE_E_BAD_GRANULE (-4) |
| #define | KATE_E_INIT (-5) |
| #define | KATE_E_BAD_PACKET (-6) |
| #define | KATE_E_TEXT (-7) |
| #define | KATE_E_LIMIT (-8) |
| #define | KATE_E_VERSION (-9) |
| #define | KATE_E_NOT_KATE (-10) |
| #define | KATE_E_BAD_TAG (-11) |
| #define | KATE_E_IMPL (-12) |
Typedefs | |
| typedef struct kate_region | kate_region |
| typedef struct kate_color | kate_color |
| typedef struct kate_style | kate_style |
| typedef enum kate_curve_type | kate_curve_type |
| typedef struct kate_curve | kate_curve |
| typedef enum kate_motion_mapping | kate_motion_mapping |
| typedef enum kate_motion_semantics | kate_motion_semantics |
| typedef struct kate_motion | kate_motion |
| typedef enum kate_text_directionality | kate_text_directionality |
| typedef struct kate_palette | kate_palette |
| typedef enum kate_bitmap_type | kate_bitmap_type |
| typedef struct kate_bitmap | kate_bitmap |
| typedef struct kate_font_range | kate_font_range |
| typedef struct kate_font_mapping | kate_font_mapping |
| typedef struct kate_info | kate_info |
| typedef struct kate_state | kate_state |
| typedef struct kate_comment | kate_comment |
| typedef struct kate_event | kate_event |
| typedef struct kate_tracker | kate_tracker |
| typedef struct kate_packet | kate_packet |
The libkate public API.
| #define KATE_BITSTREAM_VERSION_MAJOR 0 |
major version number of the highest bitstream version this version of libkate supports
| #define KATE_BITSTREAM_VERSION_MINOR 7 |
minor version number of the highest bitstream version this version of libkate supports
| #define KATE_E_BAD_GRANULE (-4) |
decreasing granule
| #define KATE_E_BAD_PACKET (-6) |
packet contains invalid data
| #define KATE_E_BAD_TAG (-11) |
a tag does not comply with the Vorbis comment rules
| #define KATE_E_IMPL (-12) |
the requested feature is not implemented
| #define KATE_E_INIT (-5) |
initializing twice, using an uninitialized state, etc
| #define KATE_E_INVALID_PARAMETER (-2) |
a bogus parameter was passed (usually NULL)
| #define KATE_E_LIMIT (-8) |
a limit was exceeded (eg, string too long, pixel value above bpp, etc)
| #define KATE_E_NOT_FOUND (-1) |
whatever was requested was not found
| #define KATE_E_NOT_KATE (-10) |
the packet is not a Kate packet
| #define KATE_E_OUT_OF_MEMORY (-3) |
we're running out of cheese, bring some more
| #define KATE_E_TEXT (-7) |
invalid/truncated character/sequence, etc
| #define KATE_E_VERSION (-9) |
we do not understand that bitstream version
| #define KATE_VERSION_MAJOR 0 |
major version number of the libkate API
| #define KATE_VERSION_MINOR 4 |
minor version number of the libkate API
| #define KATE_VERSION_PATCH 3 |
patch version number of the libkate API
| typedef struct kate_bitmap kate_bitmap |
defines a paletted image
| typedef enum kate_bitmap_type kate_bitmap_type |
defines a particular type of bitmap
| typedef struct kate_color kate_color |
defines an RGBA color
| typedef struct kate_comment kate_comment |
Vorbis comments - this is the same as Vorbis and Theora comments
| typedef struct kate_curve kate_curve |
defines a curve
| typedef enum kate_curve_type kate_curve_type |
defines a type of curve
| typedef struct kate_event kate_event |
This is an event passed to the user. A kate_tracker may be used to track animation changes to this event.
| typedef struct kate_font_mapping kate_font_mapping |
defines a set of ranges to define a font mapping
| typedef struct kate_font_range kate_font_range |
defines a set of images to map to a range of Unicode code points
Information about a Kate bitstream. On encoding, this information will be filled by the encoder. On decoding, it will be extracted from the stream headers.
| typedef struct kate_motion kate_motion |
defines a motion - well, try to find a better explanation
| typedef enum kate_motion_mapping kate_motion_mapping |
defines a way to transform a curve point
| typedef enum kate_motion_semantics kate_motion_semantics |
defines what uses a motion can have
| typedef struct kate_packet kate_packet |
a kate packet raw data
| typedef struct kate_palette kate_palette |
defines colors to correspond to a bitmap's pixels
| typedef struct kate_region kate_region |
defines an area where to draw
| typedef struct kate_state kate_state |
top level information about a Kate bitstream
| typedef struct kate_style kate_style |
defines a style to display text
| typedef enum kate_text_directionality kate_text_directionality |
defines the direction in which glyphs within a text are drawn
| typedef struct kate_tracker kate_tracker |
this keeps track of changes during an event's lifetime
| enum kate_bitmap_type |
| enum kate_curve_type |
defines a type of curve
| enum kate_markup_type |
| enum kate_motion_mapping |
defines a way to transform a curve point
defines what uses a motion can have
| enum kate_space_metric |
defines the direction in which glyphs within a text are drawn
| enum kate_text_encoding |
| enum kate_wrap_mode |
| int kate_clear | ( | kate_state * | k | ) |
Destroys a kate_state structure. The kate_state structure should have been initialized with kate_decode_init or kate_encode_init.
| k | the kate_state structure to clear |
References KATE_E_INVALID_PARAMETER.
Referenced by kate_high_decode_clear().
| int kate_curve_get_point | ( | const kate_curve * | kc, |
| kate_float | t, | ||
| kate_float * | x, | ||
| kate_float * | y | ||
| ) |
Returns the point defined by the given curve at the given time. t will be between 0 and 1
| kc | the curve to get the point from |
| t | the time at which the point should be taken (between 0 and motion duration) |
| x | a pointer to the first coordinate of the computed point (may be NULL) |
| y | a pointer to the second coordinate of the computed point (may be NULL) |
References kate_curve_bezier_cubic_spline, kate_curve_bspline, kate_curve_catmull_rom_spline, kate_curve_linear, kate_curve_none, kate_curve_static, KATE_E_INIT, KATE_E_INVALID_PARAMETER, kate_curve::npts, kate_curve::pts, and kate_curve::type.
Referenced by kate_motion_get_point().
| int kate_meta_add | ( | kate_meta * | km, |
| const char * | tag, | ||
| const char * | value, | ||
| size_t | len | ||
| ) |
Adds a tag/value metadata pair to the kate_meta structure. The tag must be 7 bit ASCII, and may not contain embedded NULs The value is binary data, and dependent on the tag. Text values should be UTF-8 and may contain embedded NULs
| km | the kate_meta structure to add the metadata to |
| tag | the tag for the metadata add |
| value | the value for the metadata add (a stream of len bytes) |
| len | the number of bytes in the value |
References KATE_E_INVALID_PARAMETER, and KATE_E_OUT_OF_MEMORY.
Referenced by kate_meta_add_string().
| int kate_meta_add_string | ( | kate_meta * | km, |
| const char * | tag, | ||
| const char * | value | ||
| ) |
Adds a tag/value metadata pair to the kate_meta structure.
| km | the kate_meta structure to add the metadata to |
| tag | the tag for the metadata add |
| value | the value for the metadata add (a NUL terminated UTF-8 string) |
References KATE_E_INVALID_PARAMETER, kate_meta_add(), kate_text_validate(), and kate_utf8.
| int kate_meta_create | ( | kate_meta ** | km | ) |
Creates and initializes a kate_meta_list structure.
| km | the structure to initialize |
References KATE_E_INVALID_PARAMETER, and KATE_E_OUT_OF_MEMORY.
| int kate_meta_destroy | ( | kate_meta * | km | ) |
Destroys a kate_meta structure.
| km | the structure to destroy |
References KATE_E_INVALID_PARAMETER.
Referenced by kate_info_clear().
| int kate_meta_merge | ( | kate_meta * | km, |
| kate_meta * | km2 | ||
| ) |
Merges two sets of metadata together
| km | the kate_meta structure to contain the merged metadata. |
| km2 | the kate_meta structure to merge to km. It will be freed if this call is successful. |
References KATE_E_INVALID_PARAMETER, and KATE_E_OUT_OF_MEMORY.
| int kate_meta_query | ( | const kate_meta * | km, |
| unsigned int | idx, | ||
| const char ** | tag, | ||
| const char ** | value, | ||
| size_t * | len | ||
| ) |
Retrieves the data for a given metadata.
| km | the kate_meta structure to search in |
| idx | the index of the metadata to get data for |
| tag | where to store the tag of the metadata |
| value | where to store the value of the tag |
| len | where to store the length (in bytes) of the value |
References KATE_E_INVALID_PARAMETER.
| int kate_meta_query_count | ( | const kate_meta * | km | ) |
Returns the number of metadata in this structure
| km | the kate_meta structure to search in |
References KATE_E_INVALID_PARAMETER.
| int kate_meta_query_tag | ( | const kate_meta * | km, |
| const char * | tag, | ||
| unsigned int | idx, | ||
| const char ** | value, | ||
| size_t * | len | ||
| ) |
Retrieves the data for a given metadata.
| km | the kate_meta structure to search in |
| tag | the tag to search for |
| idx | the index of the tag to search for (eg, if a tag is present more than once) |
| value | where to store the value of the tag |
| len | where to store the length (in bytes) of the value |
References KATE_E_INVALID_PARAMETER.
| int kate_meta_query_tag_count | ( | const kate_meta * | km, |
| const char * | tag | ||
| ) |
Returns the number of metadata with the given tag
| km | the kate_meta structure to search in |
| tag | the tag to search for |
References KATE_E_INVALID_PARAMETER.
| int kate_meta_remove | ( | kate_meta * | km, |
| unsigned int | idx | ||
| ) |
Removes a given metadata pair.
| km | the kate_meta structure to change |
| idx | the index of the metadata |
References KATE_E_INVALID_PARAMETER.
| int kate_meta_remove_tag | ( | kate_meta * | km, |
| const char * | tag, | ||
| unsigned int | idx | ||
| ) |
Removes a given metadata pair.
| km | the kate_meta structure to change |
| tag | the tag to search for, may be NULL to match any tag |
| idx | the index of the metadata |
References KATE_E_INVALID_PARAMETER.
| int kate_motion_get_point | ( | const kate_motion * | km, |
| kate_float | duration, | ||
| kate_float | t, | ||
| kate_float * | x, | ||
| kate_float * | y | ||
| ) |
Returns the point defined by the given motion at the given time. t will be between 0 and the duration of the motion
| km | the motion to get the point from |
| duration | the duration the motion spans |
| t | the time at which the point should be taken (between 0 and motion duration) |
| x | a pointer to the first coordinate of the computed point (may be NULL) |
| y | a pointer to the second coordinate of the computed point (may be NULL) |
References kate_motion::curves, kate_motion::durations, kate_curve_get_point(), KATE_E_INVALID_PARAMETER, kate_motion::ncurves, and kate_motion::periodic.
Referenced by kate_tracker_update(), and kate_tracker_update_property_at_duration().