summaryrefslogtreecommitdiff
path: root/include/LibreOfficeKit
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-04-22 12:25:31 +0200
committerMiklos Vajna <vmiklos@collabora.com>2022-04-22 13:20:09 +0200
commite4d1731ba3e8bac2801d1b76cfb66bf7f9795468 (patch)
tree089fb4cc7b6f3eabbf33d6f656dff799b3fe61b0 /include/LibreOfficeKit
parent50774644bbede54784bf710e8f4c527110513361 (diff)
sw content controls: add LOK API
This is somewhat similar to LOK_CALLBACK_FORM_FIELD_BUTTON: if the cursor enters or leaves a content control, then we send this message, so the LOK client can render some kind of shading and/or border around the content control to indicate the boundaries of the object. Similar to selections, this can be multiple rectangles in case the string is long enough that the layout breaks it into multiple lines. Change-Id: I0641a19503b7a1d4cade8fe9b510605cab49f258 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133314 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'include/LibreOfficeKit')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKitEnums.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index d15e0e5a70ba..0fda66777a09 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -795,6 +795,22 @@ typedef enum
* Rectangle format is the same as LOK_CALLBACK_INVALIDATE_TILES.
*/
LOK_CALLBACK_SC_FOLLOW_JUMP = 54,
+
+ /**
+ * Sends all information for displaying metadata for a text based content control.
+ *
+ * The payload example:
+ * {
+ * "action": "show",
+ * "rectangles": "1418, 1694, 720, 551; 10291, 1418, 1099, 275"
+ * }
+ *
+ * or
+ * {
+ * "action": "hide"
+ * }
+ */
+ LOK_CALLBACK_CONTENT_CONTROL = 55,
}
LibreOfficeKitCallbackType;
@@ -933,6 +949,8 @@ static inline const char* lokCallbackTypeToString(int nType)
return "LOK_COMMAND_BLOCKED";
case LOK_CALLBACK_SC_FOLLOW_JUMP:
return "LOK_CALLBACK_SC_FOLLOW_JUMP";
+ case LOK_CALLBACK_CONTENT_CONTROL:
+ return "LOK_CALLBACK_CONTENT_CONTROL";
}
assert(!"Unknown LibreOfficeKitCallbackType type.");