int kate_encode_add_bitmap | ( | kate_state * | k, | |
const kate_bitmap * | kb | |||
) |
Adds a bitmap to the currently encoded event.
k | the kate_state to add the bitmap to | |
kb | the bitmap to add |
KATE_E_* error
int kate_encode_add_bitmap_index | ( | kate_state * | k, | |
size_t | bitmap | |||
) |
Adds a bitmap to the currently encoded event by its index into the list of predefined bitmaps.
k | the kate_state to add the bitmap to | |
bitmap | the index of the bitmap to add |
KATE_E_* error
int kate_encode_add_motion | ( | kate_state * | k, | |
kate_motion * | km, | |||
int | destroy | |||
) |
Adds a motion to the currently encoded event. If destroy is set, the motion will be automatically destroyed after the current event has been encoded.
k | the kate_state to add the motion to | |
km | the motion to add | |
destroy | if true, the motion will be destroyed when the event is fully encoded |
KATE_E_* error
int kate_encode_add_motion_index | ( | kate_state * | k, | |
size_t | motion | |||
) |
Adds a motion to the currently encoded event by its index into the list of predefined motions.
k | the kate_state to add the motion to | |
motion | the index of the motion to add |
KATE_E_* error
int kate_encode_finish | ( | kate_state * | k, | |
kate_float | t, | |||
kate_packet * | kp | |||
) |
Finalizes the currently encoded stream. No more events may be added after this is called.
k | the kate_state to encode to | |
t | the timestamp for the end (if negative, the end time of the last event will be used) | |
kp | the packet to encode to |
KATE_E_* error
kate_int64_t kate_encode_get_granule | ( | const kate_state * | k | ) |
Retrieves the current granulepos
k | the kate_state to encode to |
KATE_E_* error
int kate_encode_headers | ( | kate_state * | k, | |
kate_comment * | kc, | |||
kate_packet * | kp | |||
) |
Encodes a header. This should be repeatedly called at the beginning of encoding, until a positive value is returned, marking the encoding of the last header.
k | the kate_state to encode to | |
kc | the list of comments to add to the headers | |
kp | the packet to encode to |
1 success, and all headers have been encoded
KATE_E_* error
int kate_encode_init | ( | kate_state * | k, | |
kate_info * | ki | |||
) |
Initializes a kate_state structure for encoding using the supplied kate_info structure. When done, the kate_state structure should be cleared using kate_clear.
k | the kate_state structure to initialize for encoding | |
ki | the kate_info structure containing the encoding parameters |
KATE_E_* error
int kate_encode_keepalive | ( | kate_state * | k, | |
kate_float | t, | |||
kate_packet * | kp | |||
) |
Emits a keepalive packet, to help with seeking.
k | the kate_state to encode to | |
t | the timestamp for the keepalive packet | |
kp | the packet to encode to |
KATE_E_* error
int kate_encode_set_bitmap | ( | kate_state * | k, | |
const kate_bitmap * | kb | |||
) |
Adds a bitmap to the currently encoded event.
k | the kate_state to set the bitmap for | |
kb | the bitmap to set |
KATE_E_* error
int kate_encode_set_bitmap_index | ( | kate_state * | k, | |
size_t | bitmap | |||
) |
Sets the bitmap the event should use, by its index in the predefined bitmap list.
k | the kate_state to encode to | |
bitmap | the index of the predefined bitmap to use |
KATE_E_* error
int kate_encode_set_font_mapping_index | ( | kate_state * | k, | |
size_t | font_mapping | |||
) |
Sets the font mapping this event's text should be displayed with, by its index into the predefined font mappings list.
k | the kate_state to encode to | |
font_mapping | the font mapping to use |
KATE_E_* error
int kate_encode_set_id | ( | kate_state * | k, | |
kate_int32_t | id | |||
) |
Sets a unique identifier for the currently encoded event, so it can be referred to later
k | the kate_state to encode to | |
id | the id to tag this event with (must be positive) |
KATE_E_* error
int kate_encode_set_language | ( | kate_state * | k, | |
const char * | language | |||
) |
Sets the language used in this event's text, overriding the default language
k | the kate_state to encode to | |
language | the language for this event's text - may be NULL (use the default language) |
KATE_E_* error
int kate_encode_set_markup_type | ( | kate_state * | k, | |
int | text_markup_type | |||
) |
Sets the markup type of this event
k | the kate_state to encode to | |
text_markup_type | the markup type of this event |
KATE_E_* error
int kate_encode_set_palette | ( | kate_state * | k, | |
const kate_palette * | kp | |||
) |
Adds a palette to the currently encoded event.
k | the kate_state to set the palette for | |
kp | the palette to set |
KATE_E_* error
int kate_encode_set_palette_index | ( | kate_state * | k, | |
size_t | palette | |||
) |
Sets the palette the event should use for its bitmap, by its index in the predefined palette list.
k | the kate_state to encode to | |
palette | the index of the predefined palette to use |
KATE_E_* error
int kate_encode_set_region | ( | kate_state * | k, | |
const kate_region * | kr | |||
) |
Sets the region the event should be displayed in.
k | the kate_state to encode to | |
kr | the region to use |
KATE_E_* error
int kate_encode_set_region_index | ( | kate_state * | k, | |
size_t | region | |||
) |
Sets the region the event should be displayed in, by its index in the predefined regions list.
k | the kate_state to encode to | |
region | the index of the predefined region to use |
KATE_E_* error
int kate_encode_set_secondary_style | ( | kate_state * | k, | |
const kate_style * | ks | |||
) |
Sets the secondary style the event should be displayed with.
k | the kate_state to encode to | |
ks | the style to use |
KATE_E_* error
int kate_encode_set_secondary_style_index | ( | kate_state * | k, | |
size_t | style | |||
) |
Sets the secondary style the event should be displayed with, by its index in the predefined styles list.
k | the kate_state to encode to | |
style | the index of the predefined style to use |
KATE_E_* error
int kate_encode_set_style | ( | kate_state * | k, | |
const kate_style * | ks | |||
) |
Sets the style the event should be displayed with.
k | the kate_state to encode to | |
ks | the style to use |
KATE_E_* error
int kate_encode_set_style_index | ( | kate_state * | k, | |
size_t | style | |||
) |
Sets the style the event should be displayed with, by its index in the predefined styles list.
k | the kate_state to encode to | |
style | the index of the predefined style to use |
KATE_E_* error
int kate_encode_set_text_directionality | ( | kate_state * | k, | |
kate_text_directionality | text_directionality | |||
) |
Sets the text directionality used in this event's text, overriding the default text directionality.
k | the kate_state to encode to | |
text_directionality | the text directionality for this event's text |
KATE_E_* error
int kate_encode_set_text_encoding | ( | kate_state * | k, | |
kate_text_encoding | text_encoding | |||
) |
Sets the character encoding used in this event's text, overriding the default character encoding.
k | the kate_state to encode to | |
text_encoding | the text encoding for this event's text |
KATE_E_* error
int kate_encode_text | ( | kate_state * | k, | |
kate_float | t0, | |||
kate_float | t1, | |||
const char * | text, | |||
size_t | sz, | |||
kate_packet * | kp | |||
) |
Encodes a text (which may be NULL) of the given size, starting at t0 and ending at t1. This should always be called when encoding an event, even if the text is NULL. After this is called, the event is fully encoded and cannot be added to anymore.
k | the kate_state to add the text to | |
t0 | the start time in seconds of the text | |
t1 | the end time in seconds of the text | |
text | the text to add (may be NULL) | |
sz | the length in bytes of the text to add | |
kp | the packet to encode to |
KATE_E_* error