summaryrefslogtreecommitdiff
path: root/libreofficekit/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'libreofficekit/README.md')
-rw-r--r--libreofficekit/README.md37
1 files changed, 19 insertions, 18 deletions
diff --git a/libreofficekit/README.md b/libreofficekit/README.md
index 4932b791d319..7eb7bb5fd355 100644
--- a/libreofficekit/README.md
+++ b/libreofficekit/README.md
@@ -8,22 +8,23 @@ tiled rendering API).
## Integrating LOK Into Other Software
-LOK functionality can be accessed by including LibreOfficeKit.h[xx] in your
+LOK functionality can be accessed by including `LibreOfficeKit.h[xx]` in your
program.
-LOK initialisation (lok_init) requires the inclusion of LibreOfficeKitInit.h in
-your program. If you use the C++ LibreOfficeKit.hxx header, it already includes
-LibreOfficeKitInit.h for you.
+LOK initialisation (`lok_init`) requires the inclusion of `LibreOfficeKitInit.h` in
+your program. If you use the C++ `LibreOfficeKit.hxx` header, it already includes
+`LibreOfficeKitInit.h` for you.
-(LibreOfficeKit.hxx is a simple and fully inlined C++ wrapper for the same
-functionality as in LibreOfficeKit.h.)
+(`LibreOfficeKit.hxx` is a simple and fully inlined C++ wrapper for the same
+functionality as in `LibreOfficeKit.h`.)
An example program can be seen on:
-https://gitlab.com/ojwb/lloconv
+<https://gitlab.com/ojwb/lloconv>
## Tiled Rendering
To use LOK Tiled Rendering you will need the following before the LOK includes:
+
#define LOK_USE_UNSTABLE_API
(This must be define before ANY LOK header, i.e. including the Init header.)
@@ -36,12 +37,12 @@ to bottom-up).
## Tiled Editing
On top of the tiled rendering API, a set of new methods have been added to the
-lok::Document class to allow basic editing, too. Communication between the LOK
+`lok::Document` class to allow basic editing, too. Communication between the LOK
client and LibreOffice is a two-way channel. The client can initiate an action
by calling the above mentioned methods. The most important methods for the
client -> LibreOffice communication are:
-- initializeForRendering(), expected to be called right after
+- `initializeForRendering()`, expected to be called right after
`lok::Office::documentLoad()` returned a `lok::Document*`.
- `postKeyEvent()`, expected to be called when the user provides input on the
(soft-)keyboard.
@@ -56,9 +57,9 @@ The other way around (LibreOffice -> LOK client) is implemented using a
callback. A LOK client can register a callback using the registerCallback()
method. Whenever editing requires some action on the client side, a callback
event is emitted. The callback types are described using the
-LibreOfficeKitCallbackType enumeration in LibreOfficeKitEnums.h, the callback
+`LibreOfficeKitCallbackType` enumeration in `LibreOfficeKitEnums.h`, the callback
function signature itself is provided by the LibreOfficeKitCallback typedef in
-LibreOfficeKitTypes.h. The most important callback types:
+`LibreOfficeKitTypes.h`. The most important callback types:
- `LOK_CALLBACK_INVALIDATE_TILES`: drop all tiles cached on client-side that
intersect with the provided rectangle
@@ -70,19 +71,19 @@ LibreOfficeKitTypes.h. The most important callback types:
There are currently two known LOK clients supporting tiled editing:
-- gtktiledviewer (see below), which allows testing the LOK core implementation
+- `gtktiledviewer` (see below), which allows testing the LOK core implementation
on (desktop) Linux
- (LibreOffice on) Android
Core has next to no idea what is the LOK client, so for effective development,
-it's recommended that the core part is developed against gtktiledviewer, and
+it's recommended that the core part is developed against `gtktiledviewer`, and
once a feature works there, then implement the Android part, with its slower
development iteration (slow uploading to the device, the need to link all
-object files into a single .so, etc).
+object files into a single `.so`, etc).
-* Debugging with gdb and gtktiledviewer
+* Debugging with gdb and `gtktiledviewer`
-To run gtktiledviewer:
+To run `gtktiledviewer`:
bin/run gtktiledviewer --lo-path=$PWD/instdir/program path/to/test.odt
@@ -90,11 +91,11 @@ To receive all incoming events from core use `G_MESSAGES_DEBUG=all`
G_MESSAGES_DEBUG=all bin/run gtktiledviewer --lo-path=$PWD/instdir/program ../test.odt
-To debug with gdb:
+To debug with `gdb`:
export LO_TRACE='gdb --tui --args'
-before bin/run, this will run gtktiledviewer in the debugger instead.
+before `bin/run`, this will run gtktiledviewer in the debugger instead.
## LibreOfficeKitGtk