1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #ifndef INCLUDED_LIBREOFFICEKIT_LIBREOFFICEKITENUMS_H
11 #define INCLUDED_LIBREOFFICEKIT_LIBREOFFICEKITENUMS_H
20 #if defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
24 LOK_DOCTYPE_SPREADSHEET
,
25 LOK_DOCTYPE_PRESENTATION
,
29 LibreOfficeKitDocumentType
;
36 LibreOfficeKitPartMode
;
43 LibreOfficeKitTileMode
;
50 LibreOfficeKitWindowAction
;
56 LOK_SELTYPE_LARGE_TEXT
, // unused (same as LOK_SELTYPE_COMPLEX)
59 LibreOfficeKitSelectionType
;
61 /** Optional features of LibreOfficeKit, in particular callbacks that block
62 * LibreOfficeKit until the corresponding reply is received, which would
63 * deadlock if the client does not support the feature.
65 * @see lok::Office::setOptionalFeatures().
70 * Handle LOK_CALLBACK_DOCUMENT_PASSWORD by prompting the user
73 * @see lok::Office::setDocumentPassword().
75 LOK_FEATURE_DOCUMENT_PASSWORD
= (1ULL << 0),
78 * Handle LOK_CALLBACK_DOCUMENT_PASSWORD_TO_MODIFY by prompting the user
81 * @see lok::Office::setDocumentPassword().
83 LOK_FEATURE_DOCUMENT_PASSWORD_TO_MODIFY
= (1ULL << 1),
86 * Request to have the part number as an 5th value in the
87 * LOK_CALLBACK_INVALIDATE_TILES payload.
89 LOK_FEATURE_PART_IN_INVALIDATION_CALLBACK
= (1ULL << 2),
92 * Turn off tile rendering for annotations
94 LOK_FEATURE_NO_TILED_ANNOTATIONS
= (1ULL << 3),
97 * Enable range based header data
99 LOK_FEATURE_RANGE_HEADERS
= (1ULL << 4),
102 * Request to have the active view's Id as the 1st value in the
103 * LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR payload.
105 LOK_FEATURE_VIEWID_IN_VISCURSOR_INVALIDATION_CALLBACK
= (1ULL << 5)
107 LibreOfficeKitOptionalFeatures
;
109 // This enumerates the types of callbacks emitted to a LibreOfficeKit
110 // object's callback function or to a LibreOfficeKitDocument object's
111 // callback function. No callback type will be emitted to both. It is a
112 // bit unfortunate that the same enum contains both kinds of
115 // TODO: We should really add some indication at the documentation for
116 // each enum value telling which type of callback it is.
121 * Any tiles which are over the rectangle described in the payload are no
124 * Rectangle format: "x, y, width, height", where all numbers are document
125 * coordinates, in twips. When all tiles are supposed to be dropped, the
126 * format is the "EMPTY" string.
128 * @see LOK_FEATURE_PART_IN_INVALIDATION_CALLBACK.
130 LOK_CALLBACK_INVALIDATE_TILES
= 0,
132 * The size and/or the position of the visible cursor changed.
134 * Old format is the same as LOK_CALLBACK_INVALIDATE_TILES.
135 * New format is a JSON with 3 elements the 'viewId' element represented by
136 * an integer value, a 'rectangle' element in the format "x, y, width, height",
137 * and a 'misspelledWord' element represented by an integer value: '1' when
138 * a misspelled word is at the cursor position, '0' when the word is
141 LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR
= 1,
143 * The list of rectangles representing the current text selection changed.
145 * List format is "rectangle1[; rectangle2[; ...]]" (without quotes and
146 * brackets), where rectangleN has the same format as
147 * LOK_CALLBACK_INVALIDATE_TILES. When there is no selection, an empty
148 * string is provided.
150 LOK_CALLBACK_TEXT_SELECTION
= 2,
152 * The position and size of the cursor rectangle at the text
153 * selection start. It is used to draw the selection handles.
155 * This callback must be called prior to LOK_CALLBACK_TEXT_SELECTION every
156 * time the selection is updated.
158 * Rectangle format is the same as LOK_CALLBACK_INVALIDATE_TILES.
160 LOK_CALLBACK_TEXT_SELECTION_START
= 3,
162 * The position and size of the cursor rectangle at the text
163 * selection end. It is used to draw the selection handles.
165 * This callback must be called prior to LOK_CALLBACK_TEXT_SELECTION every
166 * time the selection is updated.
168 * Rectangle format is the same as LOK_CALLBACK_INVALIDATE_TILES.
170 LOK_CALLBACK_TEXT_SELECTION_END
= 4,
172 * The blinking text cursor is now visible or not.
174 * Clients should assume that this is true initially and are expected to
175 * hide the blinking cursor at the rectangle described by
176 * LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR once it becomes false. Payload is
177 * either the "true" or the "false" string.
179 LOK_CALLBACK_CURSOR_VISIBLE
= 5,
181 * The size and/or the position of the graphic selection changed,
182 * the rotation angle of the embedded graphic object, and a property list
183 * which can be used for informing the client about several properties.
185 * Format is "x, y, width, height, angle, { list of properties }",
186 * where angle is in 100th of degree, and the property list is optional.
188 * The "{ list of properties }" part is in JSON format.
189 * Follow some examples of the property list part:
191 * 1) when the selected object is an image inserted in Writer:
193 * { "isWriterGraphic": true }
195 * 2) when the selected object is a chart legend:
197 * { "isDraggable": true, "isResizable": true, "isRotatable": false }
199 * 3) when the selected object is a pie segment in a chart:
202 * "isDraggable": true,
203 * "isResizable": false,
204 * "isRotatable": false,
206 * "dragMethod": "PieSegmentDragging",
207 * "initialOffset": 50,
208 * "dragDirection": [x, y],
213 * where the "svg" property is a string containing an svg document
214 * which is a representation of the pie segment.
216 LOK_CALLBACK_GRAPHIC_SELECTION
= 6,
219 * User clicked on a hyperlink that should be handled by other
220 * applications accordingly.
222 LOK_CALLBACK_HYPERLINK_CLICKED
= 7,
225 * Emit state update to the client.
226 * For example, when cursor is on bold text, this callback is triggered
227 * with payload: ".uno:Bold=true"
229 LOK_CALLBACK_STATE_CHANGED
= 8,
232 * Start a "status indicator" (here restricted to a progress bar type
233 * indicator). The payload is the descriptive text (or empty). Even if
234 * there is no documentation that would promise so, we assume that de facto
235 * for a document being viewed or edited, there will be at most one status
236 * indicator, and its descriptive text will not change.
238 * Note that for the case of the progress indication during loading of a
239 * document, the status indicator callbacks will arrive to the callback
240 * registered for the LibreOfficeKit (singleton) object, not a
241 * LibreOfficeKitDocument one, because we are in the very progress of
242 * loading a document and then constructing a LibreOfficeKitDocument
245 LOK_CALLBACK_STATUS_INDICATOR_START
= 9,
248 * Sets the numeric value of the status indicator.
249 * The payload should be a percentage, an integer between 0 and 100.
251 LOK_CALLBACK_STATUS_INDICATOR_SET_VALUE
= 10,
254 * Ends the status indicator.
256 * Not necessarily ever emitted.
258 LOK_CALLBACK_STATUS_INDICATOR_FINISH
= 11,
261 * No match was found for the search input
263 LOK_CALLBACK_SEARCH_NOT_FOUND
= 12,
266 * Size of the document changed.
268 * Payload format is "width, height", i.e. clients get the new size without
269 * having to do an explicit lok::Document::getDocumentSize() call.
271 * A size change is always preceded by a series of
272 * LOK_CALLBACK_INVALIDATE_TILES events invalidating any areas
273 * need re-rendering to adapt.
275 LOK_CALLBACK_DOCUMENT_SIZE_CHANGED
= 13,
278 * The current part number is changed.
280 * Payload is a single 0-based integer.
282 LOK_CALLBACK_SET_PART
= 14,
285 * Selection rectangles of the search result when find all is performed.
287 * Payload format example, in case of two matches:
290 * "searchString": "...",
291 * "highlightAll": true|false, // this is a result of 'search all'
292 * "searchResultSelection": [
295 * "rectangles": "..."
299 * "rectangles": "..."
304 * - searchString is the search query
305 * - searchResultSelection is an array of part-number and rectangle list
306 * pairs, in LOK_CALLBACK_SET_PART / LOK_CALLBACK_TEXT_SELECTION format.
308 LOK_CALLBACK_SEARCH_RESULT_SELECTION
= 15,
311 * Result of the UNO command execution when bNotifyWhenFinished was set
312 * to 'true' during the postUnoCommand() call.
314 * The result returns a success / failure state, and potentially
318 * "commandName": "...", // the command for which this is the result
319 * "success": true/false, // when the result is "don't know", this is missing
320 * // TODO "result": "..." // UNO Any converted to JSON (not implemented yet)
323 LOK_CALLBACK_UNO_COMMAND_RESULT
= 16,
326 * The size and/or the position of the cell cursor changed.
328 * Payload format: "x, y, width, height, column, row", where the first
329 * 4 numbers are document coordinates, in twips, and the last 2 are table
330 * coordinates starting from 0.
331 * When the cursor is not shown the payload format is the "EMPTY" string.
333 * Rectangle format is the same as LOK_CALLBACK_INVALIDATE_TILES.
335 LOK_CALLBACK_CELL_CURSOR
= 17,
338 * The current mouse pointer style.
340 * Payload is a css mouse pointer style.
342 LOK_CALLBACK_MOUSE_POINTER
= 18,
345 * The text content of the formula bar in Calc.
347 LOK_CALLBACK_CELL_FORMULA
= 19,
350 * Loading a document requires a password.
352 * Loading the document is blocked until the password is provided via
353 * lok::Office::setDocumentPassword(). The document cannot be loaded
354 * without the password.
356 LOK_CALLBACK_DOCUMENT_PASSWORD
= 20,
359 * Editing a document requires a password.
361 * Loading the document is blocked until the password is provided via
362 * lok::Office::setDocumentPassword().
364 LOK_CALLBACK_DOCUMENT_PASSWORD_TO_MODIFY
= 21,
369 * The payload returns information further identifying the error, like:
372 * "classification": "error" | "warning" | "info"
373 * "kind": "network" etc.
374 * "code": a structured 32-bit error code, the ErrCode from LibreOffice's <comphelper/errcode.hxx>
375 * "message": freeform description
378 LOK_CALLBACK_ERROR
= 22,
381 * Context menu structure
383 * Returns the structure of context menu. Contains all the separators &
384 * submenus, example of the returned structure:
388 * { "text": "label text1", "type": "command", "command": ".uno:Something1", "enabled": "true" },
389 * { "text": "label text2", "type": "command", "command": ".uno:Something2", "enabled": "false" },
390 * { "type": "separator" },
391 * { "text": "label text2", "type": "menu", "menu": [ { ... }, { ... }, ... ] },
396 * The 'command' can additionally have a checkable status, like:
398 * {"text": "label text3", "type": "command", "command": ".uno:Something3", "checktype": "checkmark|radio|auto", "checked": "true|false"}
400 LOK_CALLBACK_CONTEXT_MENU
= 23,
403 * The size and/or the position of the view cursor changed. A view cursor
404 * is a cursor of another view, the current view can't change it.
406 * The payload format:
413 * - viewId is a value returned earlier by lok::Document::createView()
414 * - rectangle uses the format of LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR
416 LOK_CALLBACK_INVALIDATE_VIEW_CURSOR
= 24,
419 * The text selection in one of the other views has changed.
421 * The payload format:
428 * - viewId is a value returned earlier by lok::Document::createView()
429 * - selection uses the format of LOK_CALLBACK_TEXT_SELECTION.
431 LOK_CALLBACK_TEXT_VIEW_SELECTION
= 25,
434 * The cell cursor in one of the other views has changed.
436 * The payload format:
443 * - viewId is a value returned earlier by lok::Document::createView()
444 * - rectangle uses the format of LOK_CALLBACK_CELL_CURSOR.
446 LOK_CALLBACK_CELL_VIEW_CURSOR
= 26,
449 * The size and/or the position of a graphic selection in one of the other
452 * The payload format:
459 * - viewId is a value returned earlier by lok::Document::createView()
460 * - selection uses the format of LOK_CALLBACK_INVALIDATE_TILES.
462 LOK_CALLBACK_GRAPHIC_VIEW_SELECTION
= 27,
465 * The blinking text cursor in one of the other views is now visible or
468 * The payload format:
475 * - viewId is a value returned earlier by lok::Document::createView()
476 * - visible uses the format of LOK_CALLBACK_CURSOR_VISIBLE.
478 LOK_CALLBACK_VIEW_CURSOR_VISIBLE
= 28,
481 * The size and/or the position of a lock rectangle in one of the other
484 * The payload format:
491 * - viewId is a value returned earlier by lok::Document::createView()
492 * - rectangle uses the format of LOK_CALLBACK_INVALIDATE_TILES.
494 LOK_CALLBACK_VIEW_LOCK
= 29,
497 * The size of the change tracking table has changed.
499 * The payload example:
502 * "action": "Remove",
504 * "author": "Unknown Author",
507 * "description": "Delete 'abc'",
508 * "dateTime": "2016-08-18T12:14:00"
512 * The format is the same as an entry of
513 * lok::Document::getCommandValues('.uno:AcceptTrackedChanges'), extra
516 * - 'action' is either 'Add' or 'Remove', depending on if this is an
517 * insertion into the table or a removal.
519 LOK_CALLBACK_REDLINE_TABLE_SIZE_CHANGED
= 30,
522 * An entry in the change tracking table has been modified.
524 * The payload example:
527 * "action": "Modify",
529 * "author": "Unknown Author",
532 * "description": "Insert 'abcd'",
533 * "dateTime": "2016-08-18T13:13:00"
537 * The format is the same as an entry of
538 * lok::Document::getCommandValues('.uno:AcceptTrackedChanges'), extra
541 * - 'action' is 'Modify'.
543 LOK_CALLBACK_REDLINE_TABLE_ENTRY_MODIFIED
= 31,
546 * There is some change in comments in the document
548 * The payload example:
554 * "author": "Unknown Author",
556 * "dateTime": "2016-08-18T13:13:00",
557 * "anchorPos": "4529, 3906",
558 * "textRange": "1418, 3906, 3111, 919"
562 * The format is the same as an entry of
563 * lok::Document::getCommandValues('.uno:ViewAnnotations'), extra
566 * - 'action' can be 'Add', 'Remove' or 'Modify' depending on whether
567 * comment has been added, removed or modified.
569 LOK_CALLBACK_COMMENT
= 32,
572 * The column/row header is no more valid because of a column/row insertion
573 * or a similar event. Clients must query a new column/row header set.
575 * The payload says if we are invalidating a row or column header. So,
576 * payload values can be: "row", "column", "all".
578 LOK_CALLBACK_INVALIDATE_HEADER
= 33,
580 * The text content of the address field in Calc. Eg: "A7"
582 LOK_CALLBACK_CELL_ADDRESS
= 34,
584 * The key horizontal ruler related properties on change are reported by this.
586 * The payload format is:
591 * "leftOffset": "...",
592 * "pageOffset": "...",
593 * "pageWidth": "...",
597 * Here all aproperties are same as described in svxruler.
599 LOK_CALLBACK_RULER_UPDATE
= 35,
601 * Window related callbacks are emitted under this category. It includes
602 * external windows like dialogs, autopopups for now.
604 * The payload format is:
607 * "id": "unique integer id of the dialog",
608 * "action": "<see below>",
609 * "type": "<see below>"
610 * "rectangle": "x, y, width, height"
613 * "type" tells the type of the window the action is associated with
614 * - "dialog" - window is a dialog
615 * - "child" - window is a floating window (combo boxes, etc.)
616 * - "deck" - window is a docked/floating deck (i.e. the sidebar)
617 * - "tooltip" - window is a tooltip popup
619 * "action" can take following values:
620 * - "created" - window is created in the backend, client can render it now
621 * - "title_changed" - window's title is changed
622 * - "size_changed" - window's size is changed
623 * - "invalidate" - the area as described by "rectangle" is invalidated
624 * Clients must request the new area
625 * - "cursor_invalidate" - cursor is invalidated. New position is in "rectangle"
626 * - "cursor_visible" - cursor visible status is changed. Status is available
628 * - "close" - window is closed
629 * - "show" - show the window
630 * - "hide" - hide the window
632 LOK_CALLBACK_WINDOW
= 36,
635 * When for the current cell is defined a validity list we need to show
636 * a drop down button in the form of a marker.
638 * The payload format is: "x, y, visible" where x, y are the current
639 * cell cursor coordinates and visible is set to 0 or 1.
641 LOK_CALLBACK_VALIDITY_LIST_BUTTON
= 37,
644 * Notification that the clipboard contents have changed.
645 * Typically fired in response to copying to clipboard.
647 * Payload is optional. When payload is empty, Online gets string from selected text.
648 * Payload format is JSON.
649 * Example: { "mimeType": "text/plain", "content": "some content" }
651 LOK_CALLBACK_CLIPBOARD_CHANGED
= 38,
654 * When the (editing) context changes - like the user switches from
655 * editing textbox in Impress to editing a shape there.
657 * Payload is the application ID and context, delimited by space.
658 * Eg. com.sun.star.presentation.PresentationDocument TextObject
660 LOK_CALLBACK_CONTEXT_CHANGED
= 39,
663 * On-load notification of the document signature status.
665 LOK_CALLBACK_SIGNATURE_STATUS
= 40,
668 * Profiling tracing information single string of multiple lines
669 * containing <pid> <timestamp> and zone start/stop information
671 LOK_CALLBACK_PROFILE_FRAME
= 41,
674 * The position and size of the cell selection area. It is used to
675 * draw the selection handles for cells in Calc documents.
677 * Rectangle format is the same as LOK_CALLBACK_INVALIDATE_TILES.
679 LOK_CALLBACK_CELL_SELECTION_AREA
= 42,
682 * The position and size of the cell auto fill area. It is used to
683 * trigger auto fill functionality if that area is hit.
685 * Rectangle format is the same as LOK_CALLBACK_INVALIDATE_TILES.
687 LOK_CALLBACK_CELL_AUTO_FILL_AREA
= 43,
690 * When the cursor is in a table or a table is selected in the
691 * document, this sends the table's column and row border positions
692 * to the client. If the payload is empty (empty JSON object), then
693 * no table is currently selected or the cursor is not inside a table
696 LOK_CALLBACK_TABLE_SELECTED
= 44,
699 * Show reference marks from payload.
704 * { "rectangle": "3825, 3315, 1245, 2010", "color": "0000ff", "part": "0" },
705 * { "rectangle": "8925, 4335, 2520, 735", "color": "ff0000", "part": "0" },
710 LOK_CALLBACK_REFERENCE_MARKS
= 45,
713 * Callback related to native dialogs generated in JavaScript from
716 LOK_CALLBACK_JSDIALOG
= 46,
719 * Send the list of functions whose name starts with the characters entered
720 * by the user in the formula input bar.
722 LOK_CALLBACK_CALC_FUNCTION_LIST
= 47,
725 * Sends the tab stop list for the current of the current cursor position.
727 LOK_CALLBACK_TAB_STOP_LIST
= 48,
730 * Sends all information for displaying form field button for a text based field.
732 * It contains the position where the frame with the button should be displayed and
733 * also contains all information that the popup window needs.
735 * The payload example:
738 * "type": "drop-down",
739 * "textArea": "1418, 3906, 3111, 919",
741 * "items": ["January", "February", "July"],
743 * "placeholder": "No items specified"
750 * "type": "drop-down"
753 LOK_CALLBACK_FORM_FIELD_BUTTON
= 49,
756 * This is Calc specific. Indicates that some or all of the current sheet's
757 * geometry data has changed. Clients must request a full or partial sheet
760 * The payload specifies what part of the sheet geometry data has changed.
761 * The payload format is:
762 * 'all|rows|columns [sizes [hidden [filtered [groups]]]]'
764 * For example, the payload 'rows sizes groups' indicates that the row heights
765 * and row-groups data have changed.
767 LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY
= 50,
770 * When for the current cell is defined an input help text.
772 * The payload format is JSON: { "title": "title text", "content": "content text" }
774 LOK_CALLBACK_VALIDITY_INPUT_HELP
= 51,
777 * Indicates the document background color in the payload as a RGB hex string (RRGGBB).
779 LOK_CALLBACK_DOCUMENT_BACKGROUND_COLOR
= 52,
782 * When a user tries to use command which is restricted for that user
784 LOK_COMMAND_BLOCKED
= 53,
787 * The position of the cell cursor jumped to.
789 * Payload format: "x, y, width, height, column, row", where the first
790 * 4 numbers are document coordinates, in twips, and the last 2 are table
791 * coordinates starting from 0.
792 * When the cursor is not shown the payload format is the "EMPTY" string.
794 * Rectangle format is the same as LOK_CALLBACK_INVALIDATE_TILES.
796 LOK_CALLBACK_SC_FOLLOW_JUMP
= 54,
799 * Sends all information for displaying metadata for a text based content control.
802 * Entered a rich text content control:
805 * "alias": "my alias", // omitted if empty
806 * "rectangles": "1418, 1694, 720, 551; 10291, 1418, 1099, 275"
809 * Left a rich text content control:
814 * Entered a dropdown content control:
817 * "rectangles": "...",
818 * "items": ["red", "green", "blue"]
821 * Clicked on a picture content control's placeholder:
823 * "action": "change-picture"
826 * Entered a date content control:
829 * "rectangles": "...",
833 LOK_CALLBACK_CONTENT_CONTROL
= 55,
836 * This is Calc specific. The payload contains print ranges of all
837 * sheets in the document.
859 * The format of the inner "ranges" array for each sheet is
860 * [<startColumn>, <startRow>, <endColumn>, <endRow>]
862 LOK_CALLBACK_PRINT_RANGES
= 56,
865 * Informs the LibreOfficeKit client that a font specified in the
866 * document is missing.
868 * This callback is emitted right after the document has been loaded.
873 * "Some Random Font",
878 * The names are those of the font family. Sadly it is currently
879 * not possible to know the name of the font style that is
883 LOK_CALLBACK_FONTS_MISSING
= 57,
886 * Insertion, removal, movement, and selection of a media shape.
887 * The payload is a json with the relevant details.
890 * "action": "insert",
892 * "url": "file:// ..."
897 * where the "svg" property is a string containing an svg document
898 * which is a representation of the pie segment.
900 LOK_CALLBACK_MEDIA_SHAPE
= 58,
903 * The document is available to download by the client.
906 * "file:///tmp/hello-world.pdf"
908 LOK_CALLBACK_EXPORT_FILE
= 59,
911 * Some attribute of this view has changed, that will cause it
912 * to completely re-render, eg. non-printing characters or
913 * or dark mode was toggled, and then distinct from other views.
915 * Payload is an opaque string that matches this set of states.
916 * this will be emitted after creating a new view.
918 LOK_CALLBACK_VIEW_RENDER_STATE
= 60,
921 * Informs the LibreOfficeKit client that the background color surrounding
922 * the document has changed.
924 LOK_CALLBACK_APPLICATION_BACKGROUND_COLOR
= 61,
927 * Accessibility event: a paragraph got focus.
928 * The payload is a json with the following structure.
931 * "content": "<paragraph text>"
935 * "listPrefixLength": L
937 * where N is the position of the text cursor inside the focused paragraph,
938 * and [N1,N2] is the range of the text selection inside the focused paragraph.
939 * In case the paragraph is a list item, L is the length of the bullet/number prefix.
941 LOK_CALLBACK_A11Y_FOCUS_CHANGED
= 62,
944 * Accessibility event: text cursor position has changed.
949 * where N is the position of the text cursor inside the focused paragraph.
951 LOK_CALLBACK_A11Y_CARET_CHANGED
= 63,
954 * Accessibility event: text selection has changed.
960 * where [N1,N2] is the range of the text selection inside the focused paragraph.
962 LOK_CALLBACK_A11Y_TEXT_SELECTION_CHANGED
= 64,
965 * Informs the LibreOfficeKit client that the color palettes have changed.
967 LOK_CALLBACK_COLOR_PALETTES
= 65,
970 * Informs that the document password has been successfully changed.
971 * The payload contains the new password and the type.
973 LOK_CALLBACK_DOCUMENT_PASSWORD_RESET
= 66,
976 * Accessibility event: a cell got focus.
977 * The payload is a json with the following structure.
980 * "outCount": <number of tables user gets out of>
983 * "rowCount": <number of rows for outer table user got in>
984 * "colCount": <number of columns for outer table user got in>
988 * "rowCount": <number of rows for inner table user got in>
989 * "colCount": <number of columns for inner table user got in>
992 * "row": <current row index>
993 * "col": <current column index>
994 * "rowSpan": <row span for current cell>
995 * "colSpan": <column span for current cell>
997 * <same structure as for LOK_CALLBACK_A11Y_FOCUS_CHANGED>
1000 * where row/column indexes start from 0, inList is the list of tables
1001 * the user got in from the outer to the inner; row/column span default
1002 * value is 1; paragraph is the cell text content.
1004 LOK_CALLBACK_A11Y_FOCUSED_CELL_CHANGED
= 67,
1007 * Accessibility event: text editing in a shape or cell has been enabled/disabled
1010 * "cell": true/false (editing a cell ?)
1011 * "enabled": true|false
1012 * "selection": a selection description
1013 * "paragraph": focused paragraph
1016 LOK_CALLBACK_A11Y_EDITING_IN_SELECTION_STATE
= 68,
1019 * Accessibility event: a selection (of a shape/graphic, etc.) has changed
1022 * "cell": true/false (selected object is a cell ?)
1023 * "action": "create"|"add"|"remove"
1024 * "name": selected object name
1025 * "text": text content if any
1028 LOK_CALLBACK_A11Y_SELECTION_CHANGED
= 69,
1031 * Forwarding logs from core to client can be useful
1032 * for keep track of the real core/client event sequence
1034 * Payload is the log to be sent
1036 LOK_CALLBACK_CORE_LOG
= 70,
1039 * Tooltips shown in the documents, like redline author and date.
1042 * "text": "text of tooltip",
1043 * "rectangle": "x, y, width, height"
1046 LOK_CALLBACK_TOOLTIP
= 71,
1049 * Used for sending the rectangle for text inside a shape/textbox
1051 * Payload contains the rectangle details
1053 LOK_CALLBACK_SHAPE_INNER_TEXT
= 72,
1055 * The key vertical ruler related properties on change are reported by this.
1057 * The payload format is:
1062 * "leftOffset": "...",
1063 * "pageOffset": "...",
1064 * "pageWidth": "...",
1068 * Here all aproperties are same as described in svxruler.
1070 LOK_CALLBACK_VERTICAL_RULER_UPDATE
= 73
1073 LibreOfficeKitCallbackType
;
1077 /// A key on the keyboard is pressed.
1078 LOK_KEYEVENT_KEYINPUT
,
1079 /// A key on the keyboard is released.
1082 LibreOfficeKitKeyEventType
;
1086 /// cf. SalEvent::ExtTextInput
1088 /// cf. SalEvent::ExtTextInputPos
1089 LOK_EXT_TEXTINPUT_POS
,
1090 /// cf. SalEvent::EndExtTextInput
1091 LOK_EXT_TEXTINPUT_END
1093 LibreOfficeKitExtTextInputType
;
1095 /// Returns the string representation of a LibreOfficeKitCallbackType enumeration element.
1096 static inline const char* lokCallbackTypeToString(int nType
)
1098 switch (static_cast<LibreOfficeKitCallbackType
>(nType
))
1100 case LOK_CALLBACK_INVALIDATE_TILES
:
1101 return "LOK_CALLBACK_INVALIDATE_TILES";
1102 case LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR
:
1103 return "LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR";
1104 case LOK_CALLBACK_TEXT_SELECTION
:
1105 return "LOK_CALLBACK_TEXT_SELECTION";
1106 case LOK_CALLBACK_TEXT_SELECTION_START
:
1107 return "LOK_CALLBACK_TEXT_SELECTION_START";
1108 case LOK_CALLBACK_TEXT_SELECTION_END
:
1109 return "LOK_CALLBACK_TEXT_SELECTION_END";
1110 case LOK_CALLBACK_CURSOR_VISIBLE
:
1111 return "LOK_CALLBACK_CURSOR_VISIBLE";
1112 case LOK_CALLBACK_VIEW_CURSOR_VISIBLE
:
1113 return "LOK_CALLBACK_VIEW_CURSOR_VISIBLE";
1114 case LOK_CALLBACK_GRAPHIC_SELECTION
:
1115 return "LOK_CALLBACK_GRAPHIC_SELECTION";
1116 case LOK_CALLBACK_GRAPHIC_VIEW_SELECTION
:
1117 return "LOK_CALLBACK_GRAPHIC_VIEW_SELECTION";
1118 case LOK_CALLBACK_CELL_CURSOR
:
1119 return "LOK_CALLBACK_CELL_CURSOR";
1120 case LOK_CALLBACK_HYPERLINK_CLICKED
:
1121 return "LOK_CALLBACK_HYPERLINK_CLICKED";
1122 case LOK_CALLBACK_MOUSE_POINTER
:
1123 return "LOK_CALLBACK_MOUSE_POINTER";
1124 case LOK_CALLBACK_STATE_CHANGED
:
1125 return "LOK_CALLBACK_STATE_CHANGED";
1126 case LOK_CALLBACK_STATUS_INDICATOR_START
:
1127 return "LOK_CALLBACK_STATUS_INDICATOR_START";
1128 case LOK_CALLBACK_STATUS_INDICATOR_SET_VALUE
:
1129 return "LOK_CALLBACK_STATUS_INDICATOR_SET_VALUE";
1130 case LOK_CALLBACK_STATUS_INDICATOR_FINISH
:
1131 return "LOK_CALLBACK_STATUS_INDICATOR_FINISH";
1132 case LOK_CALLBACK_SEARCH_NOT_FOUND
:
1133 return "LOK_CALLBACK_SEARCH_NOT_FOUND";
1134 case LOK_CALLBACK_DOCUMENT_SIZE_CHANGED
:
1135 return "LOK_CALLBACK_DOCUMENT_SIZE_CHANGED";
1136 case LOK_CALLBACK_SET_PART
:
1137 return "LOK_CALLBACK_SET_PART";
1138 case LOK_CALLBACK_SEARCH_RESULT_SELECTION
:
1139 return "LOK_CALLBACK_SEARCH_RESULT_SELECTION";
1140 case LOK_CALLBACK_DOCUMENT_PASSWORD
:
1141 return "LOK_CALLBACK_DOCUMENT_PASSWORD";
1142 case LOK_CALLBACK_DOCUMENT_PASSWORD_TO_MODIFY
:
1143 return "LOK_CALLBACK_DOCUMENT_PASSWORD_TO_MODIFY";
1144 case LOK_CALLBACK_CONTEXT_MENU
:
1145 return "LOK_CALLBACK_CONTEXT_MENU";
1146 case LOK_CALLBACK_INVALIDATE_VIEW_CURSOR
:
1147 return "LOK_CALLBACK_INVALIDATE_VIEW_CURSOR";
1148 case LOK_CALLBACK_TEXT_VIEW_SELECTION
:
1149 return "LOK_CALLBACK_TEXT_VIEW_SELECTION";
1150 case LOK_CALLBACK_CELL_VIEW_CURSOR
:
1151 return "LOK_CALLBACK_CELL_VIEW_CURSOR";
1152 case LOK_CALLBACK_CELL_ADDRESS
:
1153 return "LOK_CALLBACK_CELL_ADDRESS";
1154 case LOK_CALLBACK_CELL_FORMULA
:
1155 return "LOK_CALLBACK_CELL_FORMULA";
1156 case LOK_CALLBACK_UNO_COMMAND_RESULT
:
1157 return "LOK_CALLBACK_UNO_COMMAND_RESULT";
1158 case LOK_CALLBACK_ERROR
:
1159 return "LOK_CALLBACK_ERROR";
1160 case LOK_CALLBACK_VIEW_LOCK
:
1161 return "LOK_CALLBACK_VIEW_LOCK";
1162 case LOK_CALLBACK_REDLINE_TABLE_SIZE_CHANGED
:
1163 return "LOK_CALLBACK_REDLINE_TABLE_SIZE_CHANGED";
1164 case LOK_CALLBACK_REDLINE_TABLE_ENTRY_MODIFIED
:
1165 return "LOK_CALLBACK_REDLINE_TABLE_ENTRY_MODIFIED";
1166 case LOK_CALLBACK_INVALIDATE_HEADER
:
1167 return "LOK_CALLBACK_INVALIDATE_HEADER";
1168 case LOK_CALLBACK_COMMENT
:
1169 return "LOK_CALLBACK_COMMENT";
1170 case LOK_CALLBACK_RULER_UPDATE
:
1171 return "LOK_CALLBACK_RULER_UPDATE";
1172 case LOK_CALLBACK_VERTICAL_RULER_UPDATE
:
1173 return "LOK_CALLBACK_VERTICAL_RULER_UPDATE";
1174 case LOK_CALLBACK_WINDOW
:
1175 return "LOK_CALLBACK_WINDOW";
1176 case LOK_CALLBACK_VALIDITY_LIST_BUTTON
:
1177 return "LOK_CALLBACK_VALIDITY_LIST_BUTTON";
1178 case LOK_CALLBACK_VALIDITY_INPUT_HELP
:
1179 return "LOK_CALLBACK_VALIDITY_INPUT_HELP";
1180 case LOK_CALLBACK_CLIPBOARD_CHANGED
:
1181 return "LOK_CALLBACK_CLIPBOARD_CHANGED";
1182 case LOK_CALLBACK_CONTEXT_CHANGED
:
1183 return "LOK_CALLBACK_CONTEXT_CHANGED";
1184 case LOK_CALLBACK_SIGNATURE_STATUS
:
1185 return "LOK_CALLBACK_SIGNATURE_STATUS";
1186 case LOK_CALLBACK_PROFILE_FRAME
:
1187 return "LOK_CALLBACK_PROFILE_FRAME";
1188 case LOK_CALLBACK_CELL_SELECTION_AREA
:
1189 return "LOK_CALLBACK_CELL_SELECTION_AREA";
1190 case LOK_CALLBACK_CELL_AUTO_FILL_AREA
:
1191 return "LOK_CALLBACK_CELL_AUTO_FILL_AREA";
1192 case LOK_CALLBACK_TABLE_SELECTED
:
1193 return "LOK_CALLBACK_TABLE_SELECTED";
1194 case LOK_CALLBACK_REFERENCE_MARKS
:
1195 return "LOK_CALLBACK_REFERENCE_MARKS";
1196 case LOK_CALLBACK_JSDIALOG
:
1197 return "LOK_CALLBACK_JSDIALOG";
1198 case LOK_CALLBACK_CALC_FUNCTION_LIST
:
1199 return "LOK_CALLBACK_CALC_FUNCTION_LIST";
1200 case LOK_CALLBACK_TAB_STOP_LIST
:
1201 return "LOK_CALLBACK_TAB_STOP_LIST";
1202 case LOK_CALLBACK_FORM_FIELD_BUTTON
:
1203 return "LOK_CALLBACK_FORM_FIELD_BUTTON";
1204 case LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY
:
1205 return "LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY";
1206 case LOK_CALLBACK_DOCUMENT_BACKGROUND_COLOR
:
1207 return "LOK_CALLBACK_DOCUMENT_BACKGROUND_COLOR";
1208 case LOK_COMMAND_BLOCKED
:
1209 return "LOK_COMMAND_BLOCKED";
1210 case LOK_CALLBACK_SC_FOLLOW_JUMP
:
1211 return "LOK_CALLBACK_SC_FOLLOW_JUMP";
1212 case LOK_CALLBACK_CONTENT_CONTROL
:
1213 return "LOK_CALLBACK_CONTENT_CONTROL";
1214 case LOK_CALLBACK_PRINT_RANGES
:
1215 return "LOK_CALLBACK_PRINT_RANGES";
1216 case LOK_CALLBACK_FONTS_MISSING
:
1217 return "LOK_CALLBACK_FONTS_MISSING";
1218 case LOK_CALLBACK_MEDIA_SHAPE
:
1219 return "LOK_CALLBACK_MEDIA_SHAPE";
1220 case LOK_CALLBACK_EXPORT_FILE
:
1221 return "LOK_CALLBACK_EXPORT_FILE";
1222 case LOK_CALLBACK_VIEW_RENDER_STATE
:
1223 return "LOK_CALLBACK_VIEW_RENDER_STATE";
1224 case LOK_CALLBACK_APPLICATION_BACKGROUND_COLOR
:
1225 return "LOK_CALLBACK_APPLICATION_BACKGROUND_COLOR";
1226 case LOK_CALLBACK_A11Y_FOCUS_CHANGED
:
1227 return "LOK_CALLBACK_A11Y_FOCUS_CHANGED";
1228 case LOK_CALLBACK_A11Y_CARET_CHANGED
:
1229 return "LOK_CALLBACK_A11Y_CARET_CHANGED";
1230 case LOK_CALLBACK_A11Y_TEXT_SELECTION_CHANGED
:
1231 return "LOK_CALLBACK_A11Y_TEXT_SELECTION_CHANGED";
1232 case LOK_CALLBACK_COLOR_PALETTES
:
1233 return "LOK_CALLBACK_COLOR_PALETTES";
1234 case LOK_CALLBACK_DOCUMENT_PASSWORD_RESET
:
1235 return "LOK_CALLBACK_DOCUMENT_PASSWORD_RESET";
1236 case LOK_CALLBACK_A11Y_FOCUSED_CELL_CHANGED
:
1237 return "LOK_CALLBACK_A11Y_FOCUSED_CELL_CHANGED";
1238 case LOK_CALLBACK_A11Y_EDITING_IN_SELECTION_STATE
:
1239 return "LOK_CALLBACK_A11Y_EDITING_IN_SELECTION_STATE";
1240 case LOK_CALLBACK_A11Y_SELECTION_CHANGED
:
1241 return "LOK_CALLBACK_A11Y_SELECTION_CHANGED";
1242 case LOK_CALLBACK_CORE_LOG
:
1243 return "LOK_CALLBACK_CORE_LOG";
1244 case LOK_CALLBACK_TOOLTIP
:
1245 return "LOK_CALLBACK_TOOLTIP";
1246 case LOK_CALLBACK_SHAPE_INNER_TEXT
:
1247 return "LOK_CALLBACK_SHAPE_INNER_TEXT";
1250 assert(!"Unknown LibreOfficeKitCallbackType type.");
1256 /// A mouse button has been pressed down.
1257 LOK_MOUSEEVENT_MOUSEBUTTONDOWN
,
1258 /// A mouse button has been let go.
1259 LOK_MOUSEEVENT_MOUSEBUTTONUP
,
1260 /// The mouse has moved while a button is pressed.
1261 LOK_MOUSEEVENT_MOUSEMOVE
1263 LibreOfficeKitMouseEventType
;
1267 /// The start of selection is to be adjusted.
1268 LOK_SETTEXTSELECTION_START
,
1269 /// The end of selection is to be adjusted.
1270 LOK_SETTEXTSELECTION_END
,
1271 /// Both the start and the end of selection is to be adjusted.
1272 LOK_SETTEXTSELECTION_RESET
1274 LibreOfficeKitSetTextSelectionType
;
1279 * A move or a resize action starts. It is assumed that there is a valid
1280 * graphic selection (see LOK_CALLBACK_GRAPHIC_SELECTION) and the supplied
1281 * coordinates are the ones the user tapped on.
1283 * The type of the action is move by default, unless the coordinates are
1284 * the position of a handle (see below), in which case it's a resize.
1286 * There are 8 handles for a graphic selection:
1287 * - top-left, top-center, top-right
1288 * - middle-left, middle-right
1289 * - bottom-left, bottom-center, bottom-right
1291 LOK_SETGRAPHICSELECTION_START
,
1293 * A move or resize action stops. It is assumed that this is always used
1294 * only after a LOK_SETTEXTSELECTION_START. The supplied coordinates are
1295 * the ones where the user released the screen.
1297 LOK_SETGRAPHICSELECTION_END
1299 LibreOfficeKitSetGraphicSelectionType
;
1301 #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
1307 #endif // INCLUDED_LIBREOFFICEKIT_LIBREOFFICEKITENUMS_H
1309 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */