@@ -8,22 +8,23 @@ tiled rendering API).
8
8
9
9
## Integrating LOK Into Other Software
10
10
11
- LOK functionality can be accessed by including LibreOfficeKit.h[ xx] in your
11
+ LOK functionality can be accessed by including ` LibreOfficeKit.h[xx] ` in your
12
12
program.
13
13
14
- LOK initialisation (lok_init) requires the inclusion of LibreOfficeKitInit.h in
15
- your program. If you use the C++ LibreOfficeKit.hxx header, it already includes
16
- LibreOfficeKitInit.h for you.
14
+ LOK initialisation (` lok_init ` ) requires the inclusion of ` LibreOfficeKitInit.h ` in
15
+ your program. If you use the C++ ` LibreOfficeKit.hxx ` header, it already includes
16
+ ` LibreOfficeKitInit.h ` for you.
17
17
18
- (LibreOfficeKit.hxx is a simple and fully inlined C++ wrapper for the same
19
- functionality as in LibreOfficeKit.h.)
18
+ (` LibreOfficeKit.hxx ` is a simple and fully inlined C++ wrapper for the same
19
+ functionality as in ` LibreOfficeKit.h ` .)
20
20
21
21
An example program can be seen on:
22
- https://gitlab.com/ojwb/lloconv
22
+ < https://gitlab.com/ojwb/lloconv >
23
23
24
24
## Tiled Rendering
25
25
26
26
To use LOK Tiled Rendering you will need the following before the LOK includes:
27
+
27
28
#define LOK_USE_UNSTABLE_API
28
29
29
30
(This must be define before ANY LOK header, i.e. including the Init header.)
@@ -36,12 +37,12 @@ to bottom-up).
36
37
## Tiled Editing
37
38
38
39
On top of the tiled rendering API, a set of new methods have been added to the
39
- lok::Document class to allow basic editing, too. Communication between the LOK
40
+ ` lok::Document ` class to allow basic editing, too. Communication between the LOK
40
41
client and LibreOffice is a two-way channel. The client can initiate an action
41
42
by calling the above mentioned methods. The most important methods for the
42
43
client -> LibreOffice communication are:
43
44
44
- - initializeForRendering(), expected to be called right after
45
+ - ` initializeForRendering() ` , expected to be called right after
45
46
` lok::Office::documentLoad() ` returned a ` lok::Document* ` .
46
47
- ` postKeyEvent() ` , expected to be called when the user provides input on the
47
48
(soft-)keyboard.
@@ -56,9 +57,9 @@ The other way around (LibreOffice -> LOK client) is implemented using a
56
57
callback. A LOK client can register a callback using the registerCallback()
57
58
method. Whenever editing requires some action on the client side, a callback
58
59
event is emitted. The callback types are described using the
59
- LibreOfficeKitCallbackType enumeration in LibreOfficeKitEnums.h, the callback
60
+ ` LibreOfficeKitCallbackType ` enumeration in ` LibreOfficeKitEnums.h ` , the callback
60
61
function signature itself is provided by the LibreOfficeKitCallback typedef in
61
- LibreOfficeKitTypes.h. The most important callback types:
62
+ ` LibreOfficeKitTypes.h ` . The most important callback types:
62
63
63
64
- ` LOK_CALLBACK_INVALIDATE_TILES ` : drop all tiles cached on client-side that
64
65
intersect with the provided rectangle
@@ -70,31 +71,31 @@ LibreOfficeKitTypes.h. The most important callback types:
70
71
71
72
There are currently two known LOK clients supporting tiled editing:
72
73
73
- - gtktiledviewer (see below), which allows testing the LOK core implementation
74
+ - ` gtktiledviewer ` (see below), which allows testing the LOK core implementation
74
75
on (desktop) Linux
75
76
- (LibreOffice on) Android
76
77
77
78
Core has next to no idea what is the LOK client, so for effective development,
78
- it's recommended that the core part is developed against gtktiledviewer, and
79
+ it's recommended that the core part is developed against ` gtktiledviewer ` , and
79
80
once a feature works there, then implement the Android part, with its slower
80
81
development iteration (slow uploading to the device, the need to link all
81
- object files into a single .so, etc).
82
+ object files into a single ` .so ` , etc).
82
83
83
- * Debugging with gdb and gtktiledviewer
84
+ * Debugging with gdb and ` gtktiledviewer `
84
85
85
- To run gtktiledviewer:
86
+ To run ` gtktiledviewer ` :
86
87
87
88
bin/run gtktiledviewer --lo-path=$PWD/instdir/program path/to/test.odt
88
89
89
90
To receive all incoming events from core use ` G_MESSAGES_DEBUG=all `
90
91
91
92
G_MESSAGES_DEBUG=all bin/run gtktiledviewer --lo-path=$PWD/instdir/program ../test.odt
92
93
93
- To debug with gdb:
94
+ To debug with ` gdb ` :
94
95
95
96
export LO_TRACE='gdb --tui --args'
96
97
97
- before bin/run, this will run gtktiledviewer in the debugger instead.
98
+ before ` bin/run ` , this will run gtktiledviewer in the debugger instead.
98
99
99
100
## LibreOfficeKitGtk
100
101
0 commit comments