Debian Codegraph @

doc/kate-format-text-data.doc

raw
1 /* Copyright (C) 2008 Vincent Penquerc'h.
2 This file is part of the Kate codec library.
3 Written by Vincent Penquerc'h.
4
5 Use, distribution and reproduction of this library is governed
6 by a BSD style source license included with this source in the
7 file 'COPYING'. Please read these terms before distributing. */
8
9
10 /**
11
12 \page format_0x00 Format - data packet type 0x00 - text
13
14 Text packets are the main payload packet.
15
16 \li a 64 bit value representing the start of the event, at the granule rate.
17 \li a 64 bit value representing the duration of the event, at the granule rate.
18 \li a 64 bit value representing the start of the earliest event still active when this event starts, at the granule rate.
19 \li a 32 bit value representing the number of bytes in the text to follow.
20 \li that same number of bytes representing the text.
21 \li 1 bit being 1 if the event is assigned an ID, 0 if not.
22 \li if the event is assigned an ID, a \ref format_32v "variable length integer" representing the ID assigned to this event.
23 \li 1 bit being 1 if there are motions attached to this event.
24
25 Next, if there are motions attached to this event:
26 \li a \ref format_32v "variable length integer" representing the number of motions attached to this event.
27
28 For each motion:
29 \li a bit being 1 if the next motion is predefined, 0 if not
30 \li if the next motion is predefined, a \ref format_32v "variable length integer" representing the index of this motion
31 in the list of predefined motions
32 \li if the next motion is not predefined, a \ref format_motion "motion" definition.
33
34 Next, a bit being 1 if there are overrides for this event. If there are:
35 \li if the next bit is set, 8 bits for the \ref #kate_text_encoding "text encoding" used by the text in this packet.
36 \li if the next bit is set, 8 bits for the \ref #kate_text_directionality "text directionality" used by the text in this packet.
37 \li if the next bit is set, a ref format_32v "variable length integer" representing the number of characters in the following language string,
38 followed by this number of bytes for a (non NUL terminated) string representing the language used by the text in this event.
39 \li if the next bit is set, a \ref format_32v "variable length integer" representing the index of a predefined region to use for this event.
40 \li if the next bit is set, a \ref format_region "region" definition to use for this event.
41 \li if the next bit is set, a \ref format_32v "variable length integer" representing the index of a predefined style to use for this event.
42 \li if the next bit is set, a \ref format_style "style" definition to use for this event.
43 \li if the next bit is set, a \ref format_32v "variable length integer" representing the index of a predefined style to use as secondary style for this event.
44 \li if the next bit is set, a \ref format_style "style" definition to use as secondary style for this event.
45 \li if the next bit is set, a \ref format_32v "variable length integer" representing the index of the font mapping to use for the text in this event.
46
47
48 Next, there is a \ref format_warp "warp".
49
50 Bitstream version 0.2 starts making use of this warp:
51 \li if the next bit is set, a \ref format_32v "variable length integer" representing the index of the palette to use for the bitmap in this event.
52 \li if the next bit is set, a \ref format_palette "palette" definition to use for the bitmap in this event.
53 \li if the next bit is set, a \ref format_32v "variable length integer" representing the index of the bitmap to use for this event.
54 \li if the next bit is set, a \ref format_bitmap "bitmap" definition to use for this event.
55 \li if the next bit is set, 8 bits representing the type of \ref #kate_markup_type "markup" to use to interpret the text in this event.
56
57 Bitstream version 0.4 makes further use of this warp:
58 \li a \ref format_32v "variable length integer" representing the number of bitmaps associated with this event.
59 For this many bitmaps:
60 \li a bit being 1 is the bitmap is a reference to one already present in the stream headers
61 \li if the bitmap is already present in the stream headers, a \ref format_32v "variable length integer" representing its index in the stream headers.
62 \li if the bitmap is not already present in the stream headers, a \ref format_bitmap "bitmap" definition.
63
64 Bitstream 0.6 makes further use of this warp to add:
65
66 \li a \ref format_metadata "metadata" set.
67
68 \note
69 Since a \ref format_warp "warp" may contain any number of chained warps, it is important to note that the bistream
70 will contain another warp after any non empty warps. This means that a warp is a chain of single warps, where the
71 last warp (and only the last one) is empty.
72
73 Next, the data ends.
74
75
76 */
77