diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-05-06 16:43:33 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2015-05-06 17:55:59 +0300 |
commit | e449308e5d1c2de7e405115a737c0094fa9c5485 (patch) | |
tree | 7de800b99583a10797fb8e5f9578baf63a13c83b /include/LibreOfficeKit | |
parent | cec72eff99d1d683f2236c8a86a2814b34ad861e (diff) |
Add support for progress bar callbacks to LibreOfficeKit
The libsofficeapp and LibreOfficeKit API bits.
Change-Id: I4efe9880dfa4e0387f05b50e64b5eaee448e0925
Diffstat (limited to 'include/LibreOfficeKit')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.h | 5 | ||||
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKitEnums.h | 31 |
2 files changed, 35 insertions, 1 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h index e576e0a91089..7eb42e898b87 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -50,6 +50,11 @@ struct _LibreOfficeKitClass LibreOfficeKitDocument* (*documentLoadWithOptions) (LibreOfficeKit* pThis, const char* pURL, const char* pOptions); +#ifdef LOK_USE_UNSTABLE_API + void (*registerCallback) (LibreOfficeKit* pThis, + LibreOfficeKitCallback pCallback, + void* pData); +#endif }; #define LIBREOFFICEKIT_DOCUMENT_HAS(pDoc,member) LIBREOFFICEKIT_HAS_MEMBER(LibreOfficeKitDocumentClass,member,(pDoc)->pClass->nSize) diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h index d4d1b4c4fc3b..aaf99be60535 100644 --- a/include/LibreOfficeKit/LibreOfficeKitEnums.h +++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h @@ -109,7 +109,36 @@ typedef enum * For example, when cursor is on bold text, this callback is triggered * with payload: ".uno:Bold=true" */ - LOK_CALLBACK_STATE_CHANGED + LOK_CALLBACK_STATE_CHANGED, + + /** + * Start a "status indicator" (here restricted to a progress bar type + * indicator). The payload is the descriptive text (or empty). Even if + * there is no documentation that would promise so, we assume that de facto + * for a document being viewed or edited, there will be at most one status + * indicator, and its descriptive text will not change. + * + * Note that for the case of the progress indication during loading of a + * document, the status indicator callbacks will arrive to the callback + * registered for the LibreOfficeKit (singleton) object, not a + * LibreOfficeKitDocument one, because we are in the very progress of + * loading a docuemnt and then constructing a LibreOfficeKitDocument + * object. + */ + LOK_CALLBACK_STATUS_INDICATOR_START, + + /** + * Sets the numeric value of the status indicator. + * The payload should be a percentage, an integer between 0 and 100. + */ + LOK_CALLBACK_STATUS_INDICATOR_SET_VALUE, + + /** + * Ends the status indicator. + * + * Not necessarily ever emitted. + */ + LOK_CALLBACK_STATUS_INDICATOR_FINISH } LibreOfficeKitCallbackType; |