summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2023-10-10 10:50:50 +0200
committerMichael Meeks <michael.meeks@collabora.com>2023-10-24 11:33:43 +0200
commit76899152ec3d1924cc72d2b869e197a1e34a0a1a (patch)
tree0011dcd3c5cbecbd8693f827b7d3f3ed7bc997cf /include
parent9d44086770d9a1c625d42676033f47a698dfa572 (diff)
lok: a11y: impress: help screen reader to report shape selection
Refactored LOKDocumentFocusListener::notifyEvent. Implemented 2 new callbacks: - LOK_CALLBACK_A11Y_EDITING_IN_SELECTION_STATE: it says the client if editing in a shape or cell is active or it isn't. - LOK_CALLBACK_A11Y_SELECTION_CHANGED: it says if a shape has been selected/unselected, the name of the shape and text content are sent too for being reported by a screen reader. Change-Id: I644bcc7daeb8772805688a9bccdabd0631ce0a22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158343 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKitEnums.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index ce093ff7a276..c17c6e811131 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -1001,7 +1001,32 @@ typedef enum
* the user got in from the outer to the inner; row/column span default
* value is 1; paragraph is the cell text content.
*/
- LOK_CALLBACK_A11Y_FOCUSED_CELL_CHANGED = 67
+ LOK_CALLBACK_A11Y_FOCUSED_CELL_CHANGED = 67,
+
+ /**
+ * Accessibility event: text editing in a shape or cell has been enabled/disabled
+ *
+ * {
+ * "cell": true/false (editing a cell ?)
+ * "enabled": true|false
+ * "selection": a selection description
+ * "paragraph": focused paragraph
+ * }
+ */
+ LOK_CALLBACK_A11Y_EDITING_IN_SELECTION_STATE = 68,
+
+ /**
+ * Accessibility event: a selection (of a shape/graphic, etc.) has changed
+ *
+ * {
+ * "cell": true/false (selected object is a cell ?)
+ * "action": "create"|"add"|"remove"
+ * "name": selected object name
+ * "text": text content if any
+ * }
+ */
+ LOK_CALLBACK_A11Y_SELECTION_CHANGED = 69
+
}
LibreOfficeKitCallbackType;
@@ -1166,6 +1191,10 @@ static inline const char* lokCallbackTypeToString(int nType)
return "LOK_CALLBACK_DOCUMENT_PASSWORD_RESET";
case LOK_CALLBACK_A11Y_FOCUSED_CELL_CHANGED:
return "LOK_CALLBACK_A11Y_FOCUSED_CELL_CHANGED";
+ case LOK_CALLBACK_A11Y_EDITING_IN_SELECTION_STATE:
+ return "LOK_CALLBACK_A11Y_EDITING_IN_SELECTION_STATE";
+ case LOK_CALLBACK_A11Y_SELECTION_CHANGED:
+ return "LOK_CALLBACK_A11Y_SELECTION_CHANGED";
}
assert(!"Unknown LibreOfficeKitCallbackType type.");