summaryrefslogtreecommitdiff
path: root/libreofficekit/README.md
diff options
context:
space:
mode:
authorHossein <hossein.ir@gmail.com>2021-03-29 21:55:26 +0430
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2021-04-07 17:47:16 +0200
commitea5641baeef73af60d025d185901a303844e2d85 (patch)
tree94b343b35e7b8805beb9a1745fe1de2f382574fb /libreofficekit/README.md
parent33da78c21f4243a3e469fb7df79ed1745df70078 (diff)
Updated README.md files to represent current code / use Markdown format
Previously, all of the README files have been renamed to README.md and now, the contents of these files were changed to use Markdown format. Other than format inconsistency, some README.md files lacked information about modules, or were out of date. By using LibreOffice / OpenOffice wiki and other documentation websites, these files were updated. Now every README.md file has a title, and some description. The top-level README.md file is changed to add links to the modules. The result of processing the Markdown format README.md files can be seen at: https://docs.libreoffice.org/ Change-Id: Ic3b0c3c064a2498d6a435253b041df010cd7797a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113424 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'libreofficekit/README.md')
-rw-r--r--libreofficekit/README.md37
1 files changed, 16 insertions, 21 deletions
diff --git a/libreofficekit/README.md b/libreofficekit/README.md
index d346770e0e1d..4932b791d319 100644
--- a/libreofficekit/README.md
+++ b/libreofficekit/README.md
@@ -1,5 +1,4 @@
-LibreOfficeKit
-**************
+# LibreOfficeKit
LibreOfficeKit can be used for accessing LibreOffice functionality
through C/C++, without any need to use UNO.
@@ -7,8 +6,7 @@ through C/C++, without any need to use UNO.
For now it only offers document conversion (in addition to an experimental
tiled rendering API).
-Integrating LOK into other software
------------------------------------
+## Integrating LOK Into Other Software
LOK functionality can be accessed by including LibreOfficeKit.h[xx] in your
program.
@@ -23,11 +21,10 @@ functionality as in LibreOfficeKit.h.)
An example program can be seen on:
https://gitlab.com/ojwb/lloconv
-Tiled Rendering
----------------
+## Tiled Rendering
To use LOK Tiled Rendering you will need the following before the LOK includes:
-#define LOK_USE_UNSTABLE_API
+ #define LOK_USE_UNSTABLE_API
(This must be define before ANY LOK header, i.e. including the Init header.)
@@ -36,8 +33,7 @@ colorspace (further alternatives could feasibly be implemented as needed).
Scanlines are ordered top-down (whereas LibreOffice will internally default
to bottom-up).
-Tiled Editing
--------------
+## 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
@@ -46,14 +42,14 @@ by calling the above mentioned methods. The most important methods for the
client -> LibreOffice communication are:
- 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
+ `lok::Office::documentLoad()` returned a `lok::Document*`.
+- `postKeyEvent()`, expected to be called when the user provides input on the
(soft-)keyboard.
-- postMouseEvent(), expected to be called when the user generated a touch or
+- `postMouseEvent()`, expected to be called when the user generated a touch or
mouse event.
In general, all coordinates are always in absolute twips (20th of a point, or:
-1" = 1440 twips). See lok::Document in LibreOfficeKit.hxx for a full list of
+1" = 1440 twips). See `lok::Document` in `LibreOfficeKit.hxx` for a full list of
methods and their documentation.
The other way around (LibreOffice -> LOK client) is implemented using a
@@ -64,11 +60,11 @@ LibreOfficeKitCallbackType enumeration in LibreOfficeKitEnums.h, the callback
function signature itself is provided by the LibreOfficeKitCallback typedef in
LibreOfficeKitTypes.h. The most important callback types:
-- LOK_CALLBACK_INVALIDATE_TILES: drop all tiles cached on client-side that
+- `LOK_CALLBACK_INVALIDATE_TILES`: drop all tiles cached on client-side that
intersect with the provided rectangle
-- LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR: need to set the position and/or the
+- `LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR`: need to set the position and/or the
size of the cursor
-- LOK_CALLBACK_TEXT_SELECTION: need to adjust the selection overlay provided
+- `LOK_CALLBACK_TEXT_SELECTION`: need to adjust the selection overlay provided
by the client as the set of rectangles describing the selection overlay
changed
@@ -90,7 +86,7 @@ To run gtktiledviewer:
bin/run gtktiledviewer --lo-path=$PWD/instdir/program path/to/test.odt
-To receive all incoming events from core use G_MESSAGES_DEBUG=all
+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
@@ -100,10 +96,9 @@ To debug with gdb:
before bin/run, this will run gtktiledviewer in the debugger instead.
-LibreOfficeKitGtk
-*****************
+## LibreOfficeKitGtk
-Currently consists of only a very basic GTK+ document viewer widget.
+Currently consists of only a very basic GTK document viewer widget.
-The widget uses g_info() instead of SAL_INFO(), use the 'G_MESSAGES_DEBUG=all'
+The widget uses `g_info()` instead of `SAL_INFO()`, use the `G_MESSAGES_DEBUG=all`
environment variable to display those messages.