#include "kate/kate_config.h"
Go to the source code of this file.
The libkate public API.
#define KATE_BITSTREAM_VERSION_MAJOR 0 |
major version number of the highest bitstream version this version of libkate supports
Referenced by kate_get_bitstream_version(), kate_get_bitstream_version_string(), and kate_info_init().
#define KATE_BITSTREAM_VERSION_MINOR 7 |
minor version number of the highest bitstream version this version of libkate supports
Referenced by kate_get_bitstream_version(), kate_get_bitstream_version_string(), and kate_info_init().
#define KATE_E_BAD_GRANULE (-4) |
decreasing granule
Referenced by kate_duration_granule(), kate_encode_finish_raw_times(), kate_encode_keepalive_raw_times(), kate_encode_repeat_raw_times(), kate_encode_text_raw_times(), and kate_info_set_granule_encoding().
#define KATE_E_BAD_PACKET (-6) |
packet contains invalid data
Referenced by kate_decode_headerin().
#define KATE_E_BAD_TAG (-11) |
a tag does not comply with the Vorbis comment rules
Referenced by kate_comment_add_length().
#define KATE_E_IMPL (-12) |
the requested feature is not implemented
Referenced by kate_encode_set_id().
#define KATE_E_INIT (-5) |
initializing twice, using an uninitialized state, etc
Referenced by kate_curve_get_point(), kate_decode_eventout(), kate_decode_packetin(), kate_decode_seek(), kate_encode_add_bitmap(), kate_encode_add_bitmap_index(), kate_encode_add_meta(), kate_encode_add_motion(), kate_encode_add_motion_index(), kate_encode_finish_raw_times(), kate_encode_get_granule(), kate_encode_headers(), kate_encode_keepalive_raw_times(), kate_encode_merge_meta(), kate_encode_repeat_raw_times(), kate_encode_set_bitmap(), kate_encode_set_bitmap_index(), kate_encode_set_font_mapping_index(), kate_encode_set_id(), kate_encode_set_language(), kate_encode_set_markup_type(), kate_encode_set_palette(), kate_encode_set_palette_index(), kate_encode_set_region(), kate_encode_set_region_index(), kate_encode_set_secondary_style(), kate_encode_set_secondary_style_index(), kate_encode_set_style(), kate_encode_set_style_index(), kate_encode_set_text_directionality(), kate_encode_set_text_encoding(), kate_encode_text_raw_times(), kate_high_decode_clear(), kate_high_decode_packetin(), kate_tracker_clear(), and kate_tracker_update().
#define KATE_E_INVALID_PARAMETER (-2) |
a bogus parameter was passed (usually NULL)
Referenced by kate_bitmap_init(), kate_bitmap_init_new(), kate_clear(), kate_comment_add(), kate_comment_add_length(), kate_comment_add_tag(), kate_comment_clear(), kate_comment_init(), kate_comment_query_count(), kate_curve_get_point(), kate_curve_init(), kate_decode_eventout(), kate_decode_headerin(), kate_decode_init(), kate_decode_packetin(), kate_decode_seek(), kate_duration_granule(), kate_encode_add_bitmap(), kate_encode_add_bitmap_index(), kate_encode_add_meta(), kate_encode_add_motion(), kate_encode_add_motion_index(), kate_encode_finish(), kate_encode_finish_raw_times(), kate_encode_get_granule(), kate_encode_headers(), kate_encode_init(), kate_encode_keepalive(), kate_encode_keepalive_raw_times(), kate_encode_merge_meta(), kate_encode_repeat(), kate_encode_repeat_raw_times(), kate_encode_set_bitmap(), kate_encode_set_bitmap_index(), kate_encode_set_font_mapping_index(), kate_encode_set_id(), kate_encode_set_language(), kate_encode_set_markup_type(), kate_encode_set_palette(), kate_encode_set_palette_index(), kate_encode_set_region(), kate_encode_set_region_index(), kate_encode_set_secondary_style(), kate_encode_set_secondary_style_index(), kate_encode_set_style(), kate_encode_set_style_index(), kate_encode_set_text_directionality(), kate_encode_set_text_encoding(), kate_encode_text(), kate_encode_text_raw_times(), kate_font_get_index_from_code_point(), kate_granule_duration(), kate_granule_shift(), kate_granule_split_time(), kate_high_decode_clear(), kate_high_decode_init(), kate_high_decode_packetin(), kate_info_clear(), kate_info_init(), kate_info_matches_language(), kate_info_no_limits(), kate_info_remove_markup(), kate_info_set_category(), kate_info_set_granule_encoding(), kate_info_set_language(), kate_info_set_markup_type(), kate_info_set_original_canvas_size(), kate_info_set_text_directionality(), kate_meta_add(), kate_meta_add_string(), kate_meta_create(), kate_meta_destroy(), kate_meta_merge(), kate_meta_query(), kate_meta_query_count(), kate_meta_query_tag(), kate_meta_query_tag_count(), kate_meta_remove(), kate_meta_remove_tag(), kate_motion_get_point(), kate_motion_init(), kate_ogg_decode_headerin(), kate_ogg_decode_packetin(), kate_packet_clear(), kate_packet_init(), kate_packet_wrap(), kate_palette_init(), kate_region_init(), kate_style_init(), kate_text_get_character(), kate_text_remove_markup(), kate_text_set_character(), kate_text_validate(), kate_time_granule(), kate_tracker_clear(), kate_tracker_get_text_path_position(), kate_tracker_init(), kate_tracker_morph_styles(), kate_tracker_remap(), kate_tracker_update(), and kate_tracker_update_property_at_duration().
#define KATE_E_LIMIT (-8) |
a limit was exceeded (eg, string too long, pixel value above bpp, etc)
Referenced by kate_info_set_category(), and kate_time_granule().
#define KATE_E_NOT_FOUND (-1) |
whatever was requested was not found
Referenced by kate_encode_finish_raw_times(), kate_encode_keepalive_raw_times(), kate_encode_repeat_raw_times(), and kate_font_get_index_from_code_point().
#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
Referenced by kate_comment_add_length(), kate_comment_add_tag(), kate_decode_init(), kate_encode_init(), kate_encode_set_language(), kate_high_decode_init(), kate_meta_add(), kate_meta_create(), kate_meta_merge(), kate_packet_init(), and kate_tracker_init().
#define KATE_E_TEXT (-7) |
invalid/truncated character/sequence, etc
Referenced by kate_font_get_index_from_code_point(), kate_text_get_character(), kate_text_set_character(), and kate_text_validate().
#define KATE_E_VERSION (-9) |
we do not understand that bitstream version
#define KATE_VERSION_MAJOR 0 |
major version number of the libkate API
Referenced by kate_get_version(), and kate_get_version_string().
#define KATE_VERSION_MINOR 4 |
minor version number of the libkate API
Referenced by kate_get_version(), and kate_get_version_string().
#define KATE_VERSION_PATCH 1 |
patch version number of the libkate API
Referenced by kate_get_version(), and kate_get_version_string().
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_clear(), and KATE_E_INVALID_PARAMETER.
Referenced by kate_clear(), and 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_get_point(), 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_curve_get_point(), and 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, KATE_E_OUT_OF_MEMORY, and kate_meta_add().
Referenced by kate_meta_add(), and 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_meta_add_string(), kate_text_validate(), and kate_utf8.
Referenced by kate_meta_add_string().
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, KATE_E_OUT_OF_MEMORY, and kate_meta_create().
Referenced by kate_meta_create().
int kate_meta_destroy | ( | kate_meta * | km | ) |
Destroys a kate_meta structure.
km | the structure to destroy |
References KATE_E_INVALID_PARAMETER, and kate_meta_destroy().
Referenced by kate_info_clear(), and kate_meta_destroy().
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, KATE_E_OUT_OF_MEMORY, and kate_meta_merge().
Referenced by kate_meta_merge().
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, and kate_meta_query().
Referenced by kate_meta_query().
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, and kate_meta_query_count().
Referenced by kate_meta_query_count().
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, and kate_meta_query_tag().
Referenced by kate_meta_query_tag().
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, and kate_meta_query_tag_count().
Referenced by kate_meta_query_tag_count().
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, and kate_meta_remove().
Referenced by kate_meta_remove().
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, and kate_meta_remove_tag().
Referenced by kate_meta_remove_tag().
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_get_point(), kate_motion::ncurves, and kate_motion::periodic.
Referenced by kate_motion_get_point(), kate_tracker_update(), and kate_tracker_update_property_at_duration().