Bump version to 6.4-15
[LibreOffice.git] / include / LibreOfficeKit / LibreOfficeKitEnums.h
blob94e4b95c0631fbb88698e294aa49b953f55fa762
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
10 #ifndef INCLUDED_LIBREOFFICEKIT_LIBREOFFICEKITENUMS_H
11 #define INCLUDED_LIBREOFFICEKIT_LIBREOFFICEKITENUMS_H
13 #include <assert.h>
15 #ifdef __cplusplus
16 extern "C"
18 #endif
20 #if defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
21 typedef enum
23 LOK_DOCTYPE_TEXT,
24 LOK_DOCTYPE_SPREADSHEET,
25 LOK_DOCTYPE_PRESENTATION,
26 LOK_DOCTYPE_DRAWING,
27 LOK_DOCTYPE_OTHER
29 LibreOfficeKitDocumentType;
31 typedef enum
33 LOK_PARTMODE_SLIDES,
34 LOK_PARTMODE_NOTES
36 LibreOfficeKitPartMode;
38 typedef enum
40 LOK_TILEMODE_RGBA,
41 LOK_TILEMODE_BGRA
43 LibreOfficeKitTileMode;
45 typedef enum
47 LOK_WINDOW_CLOSE,
48 LOK_WINDOW_PASTE
50 LibreOfficeKitWindowAction;
52 typedef enum
54 LOK_SELTYPE_NONE,
55 LOK_SELTYPE_TEXT,
56 LOK_SELTYPE_LARGE_TEXT,
57 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().
67 typedef enum
69 /**
70 * Handle LOK_CALLBACK_DOCUMENT_PASSWORD by prompting the user
71 * for a password.
73 * @see lok::Office::setDocumentPassword().
75 LOK_FEATURE_DOCUMENT_PASSWORD = (1ULL << 0),
77 /**
78 * Handle LOK_CALLBACK_DOCUMENT_PASSWORD_TO_MODIFY by prompting the user
79 * for a password.
81 * @see lok::Office::setDocumentPassword().
83 LOK_FEATURE_DOCUMENT_PASSWORD_TO_MODIFY = (1ULL << 1),
85 /**
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),
91 /**
92 * Turn off tile rendering for annotations
94 LOK_FEATURE_NO_TILED_ANNOTATIONS = (1ULL << 3),
96 /**
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
113 // callbacks.
115 // TODO: We should really add some indication at the documentation for
116 // each enum value telling which type of callback it is.
118 typedef enum
121 * Any tiles which are over the rectangle described in the payload are no
122 * longer valid.
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 'mispelledWord' element represented by an integer value: '1' when
138 * a mispelled word is at the cursor position, '0' when the word is
139 * not mispelled.
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,
205 * "dragInfo": {
206 * "dragMethod": "PieSegmentDragging",
207 * "initialOffset": 50,
208 * "dragDirection": [x, y],
209 * "svg": "<svg ..."
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 an 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
243 * object.
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": [
294 * "part": "...",
295 * "rectangles": "..."
296 * },
298 * "part": "...",
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
315 * additional data:
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,
367 * An error happened.
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 <tools/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:
387 * "menu": [
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": [ { ... }, { ... }, ... ] },
392 * ...
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:
409 * "viewId": "..."
410 * "rectangle": "..."
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:
424 * "viewId": "..."
425 * "selection": "..."
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:
439 * "viewId": "..."
440 * "rectangle": "..."
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
450 * views has changed.
452 * The payload format:
455 * "viewId": "..."
456 * "selection": "..."
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
466 * not.
468 * The payload format:
471 * "viewId": "..."
472 * "visible": "..."
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
482 * views has changed.
484 * The payload format:
487 * "viewId": "..."
488 * "rectangle": "..."
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:
501 * "redline": {
502 * "action": "Remove",
503 * "index": "1",
504 * "author": "Unknown Author",
505 * "type": "Delete",
506 * "comment": "",
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
514 * fields:
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:
526 * "redline": {
527 * "action": "Modify",
528 * "index": "1",
529 * "author": "Unknown Author",
530 * "type": "Insert",
531 * "comment": "",
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
539 * fields:
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:
550 * "comment": {
551 * "action": "Add",
552 * "id": "11",
553 * "parent": "4",
554 * "author": "Unknown Author",
555 * "text": "",
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
564 * fields:
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 ruler related properties on change are reported by this.
586 * The payload format is:
589 * "margin1": "...",
590 * "margin2": "...",
591 * "leftOffset": "...",
592 * "pageOffset": "...",
593 * "pageWidth": "...",
594 * "unit": "..."
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
627 * in "visible" field
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
694 * cell.
696 LOK_CALLBACK_TABLE_SELECTED = 44,
699 * Show reference marks from payload.
701 * Example payload:
703 * "marks": [
704 * { "rectangle": "3825, 3315, 1245, 2010", "color": "0000ff", "part": "0" },
705 * { "rectangle": "8925, 4335, 2520, 735", "color": "ff0000", "part": "0" },
706 * ...
710 LOK_CALLBACK_REFERENCE_MARKS = 45,
713 * Callback related to native dialogs generated in JavaScript from
714 * the description.
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 informations 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:
737 * "action": "show",
738 * "type": "drop-down",
739 * "textArea": "1418, 3906, 3111, 919",
740 * "params": {
741 * "items": ["January", "February", "July"],
742 * "selected": "2",
743 * "placeholder": "No items specified"
747 * or
749 * "action": "hide",
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
758 * geometry data set.
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,
776 LibreOfficeKitCallbackType;
778 typedef enum
780 /// A key on the keyboard is pressed.
781 LOK_KEYEVENT_KEYINPUT,
782 /// A key on the keyboard is released.
783 LOK_KEYEVENT_KEYUP
785 LibreOfficeKitKeyEventType;
787 typedef enum
789 /// cf. SalEvent::ExtTextInput
790 LOK_EXT_TEXTINPUT,
791 /// cf. SalEvent::ExtTextInputPos
792 LOK_EXT_TEXTINPUT_POS,
793 /// cf. SalEvent::EndExtTextInput
794 LOK_EXT_TEXTINPUT_END
796 LibreOfficeKitExtTextInputType;
798 /// Returns the string representation of a LibreOfficeKitCallbackType enumeration element.
799 static inline const char* lokCallbackTypeToString(int nType)
801 switch (static_cast<LibreOfficeKitCallbackType>(nType))
803 case LOK_CALLBACK_INVALIDATE_TILES:
804 return "LOK_CALLBACK_INVALIDATE_TILES";
805 case LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR:
806 return "LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR";
807 case LOK_CALLBACK_TEXT_SELECTION:
808 return "LOK_CALLBACK_TEXT_SELECTION";
809 case LOK_CALLBACK_TEXT_SELECTION_START:
810 return "LOK_CALLBACK_TEXT_SELECTION_START";
811 case LOK_CALLBACK_TEXT_SELECTION_END:
812 return "LOK_CALLBACK_TEXT_SELECTION_END";
813 case LOK_CALLBACK_CURSOR_VISIBLE:
814 return "LOK_CALLBACK_CURSOR_VISIBLE";
815 case LOK_CALLBACK_VIEW_CURSOR_VISIBLE:
816 return "LOK_CALLBACK_VIEW_CURSOR_VISIBLE";
817 case LOK_CALLBACK_GRAPHIC_SELECTION:
818 return "LOK_CALLBACK_GRAPHIC_SELECTION";
819 case LOK_CALLBACK_GRAPHIC_VIEW_SELECTION:
820 return "LOK_CALLBACK_GRAPHIC_VIEW_SELECTION";
821 case LOK_CALLBACK_CELL_CURSOR:
822 return "LOK_CALLBACK_CELL_CURSOR";
823 case LOK_CALLBACK_HYPERLINK_CLICKED:
824 return "LOK_CALLBACK_HYPERLINK_CLICKED";
825 case LOK_CALLBACK_MOUSE_POINTER:
826 return "LOK_CALLBACK_MOUSE_POINTER";
827 case LOK_CALLBACK_STATE_CHANGED:
828 return "LOK_CALLBACK_STATE_CHANGED";
829 case LOK_CALLBACK_STATUS_INDICATOR_START:
830 return "LOK_CALLBACK_STATUS_INDICATOR_START";
831 case LOK_CALLBACK_STATUS_INDICATOR_SET_VALUE:
832 return "LOK_CALLBACK_STATUS_INDICATOR_SET_VALUE";
833 case LOK_CALLBACK_STATUS_INDICATOR_FINISH:
834 return "LOK_CALLBACK_STATUS_INDICATOR_FINISH";
835 case LOK_CALLBACK_SEARCH_NOT_FOUND:
836 return "LOK_CALLBACK_SEARCH_NOT_FOUND";
837 case LOK_CALLBACK_DOCUMENT_SIZE_CHANGED:
838 return "LOK_CALLBACK_DOCUMENT_SIZE_CHANGED";
839 case LOK_CALLBACK_SET_PART:
840 return "LOK_CALLBACK_SET_PART";
841 case LOK_CALLBACK_SEARCH_RESULT_SELECTION:
842 return "LOK_CALLBACK_SEARCH_RESULT_SELECTION";
843 case LOK_CALLBACK_DOCUMENT_PASSWORD:
844 return "LOK_CALLBACK_DOCUMENT_PASSWORD";
845 case LOK_CALLBACK_DOCUMENT_PASSWORD_TO_MODIFY:
846 return "LOK_CALLBACK_DOCUMENT_PASSWORD_TO_MODIFY";
847 case LOK_CALLBACK_CONTEXT_MENU:
848 return "LOK_CALLBACK_CONTEXT_MENU";
849 case LOK_CALLBACK_INVALIDATE_VIEW_CURSOR:
850 return "LOK_CALLBACK_INVALIDATE_VIEW_CURSOR";
851 case LOK_CALLBACK_TEXT_VIEW_SELECTION:
852 return "LOK_CALLBACK_TEXT_VIEW_SELECTION";
853 case LOK_CALLBACK_CELL_VIEW_CURSOR:
854 return "LOK_CALLBACK_CELL_VIEW_CURSOR";
855 case LOK_CALLBACK_CELL_ADDRESS:
856 return "LOK_CALLBACK_CELL_ADDRESS";
857 case LOK_CALLBACK_CELL_FORMULA:
858 return "LOK_CALLBACK_CELL_FORMULA";
859 case LOK_CALLBACK_UNO_COMMAND_RESULT:
860 return "LOK_CALLBACK_UNO_COMMAND_RESULT";
861 case LOK_CALLBACK_ERROR:
862 return "LOK_CALLBACK_ERROR";
863 case LOK_CALLBACK_VIEW_LOCK:
864 return "LOK_CALLBACK_VIEW_LOCK";
865 case LOK_CALLBACK_REDLINE_TABLE_SIZE_CHANGED:
866 return "LOK_CALLBACK_REDLINE_TABLE_SIZE_CHANGED";
867 case LOK_CALLBACK_REDLINE_TABLE_ENTRY_MODIFIED:
868 return "LOK_CALLBACK_REDLINE_TABLE_ENTRY_MODIFIED";
869 case LOK_CALLBACK_INVALIDATE_HEADER:
870 return "LOK_CALLBACK_INVALIDATE_HEADER";
871 case LOK_CALLBACK_COMMENT:
872 return "LOK_CALLBACK_COMMENT";
873 case LOK_CALLBACK_RULER_UPDATE:
874 return "LOK_CALLBACK_RULER_UPDATE";
875 case LOK_CALLBACK_WINDOW:
876 return "LOK_CALLBACK_WINDOW";
877 case LOK_CALLBACK_VALIDITY_LIST_BUTTON:
878 return "LOK_CALLBACK_VALIDITY_LIST_BUTTON";
879 case LOK_CALLBACK_VALIDITY_INPUT_HELP:
880 return "LOK_CALLBACK_VALIDITY_INPUT_HELP";
881 case LOK_CALLBACK_CLIPBOARD_CHANGED:
882 return "LOK_CALLBACK_CLIPBOARD_CHANGED";
883 case LOK_CALLBACK_CONTEXT_CHANGED:
884 return "LOK_CALLBACK_CONTEXT_CHANGED";
885 case LOK_CALLBACK_SIGNATURE_STATUS:
886 return "LOK_CALLBACK_SIGNATURE_STATUS";
887 case LOK_CALLBACK_PROFILE_FRAME:
888 return "LOK_CALLBACK_PROFILE_FRAME";
889 case LOK_CALLBACK_CELL_SELECTION_AREA:
890 return "LOK_CALLBACK_CELL_SELECTION_AREA";
891 case LOK_CALLBACK_CELL_AUTO_FILL_AREA:
892 return "LOK_CALLBACK_CELL_AUTO_FILL_AREA";
893 case LOK_CALLBACK_TABLE_SELECTED:
894 return "LOK_CALLBACK_TABLE_SELECTED";
895 case LOK_CALLBACK_REFERENCE_MARKS:
896 return "LOK_CALLBACK_REFERENCE_MARKS";
897 case LOK_CALLBACK_JSDIALOG:
898 return "LOK_CALLBACK_JSDIALOG";
899 case LOK_CALLBACK_CALC_FUNCTION_LIST:
900 return "LOK_CALLBACK_CALC_FUNCTION_LIST";
901 case LOK_CALLBACK_TAB_STOP_LIST:
902 return "LOK_CALLBACK_TAB_STOP_LIST";
903 case LOK_CALLBACK_FORM_FIELD_BUTTON:
904 return "LOK_CALLBACK_FORM_FIELD_BUTTON";
905 case LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY:
906 return "LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY";
909 assert(!"Unknown LibreOfficeKitCallbackType type.");
910 return nullptr;
913 typedef enum
915 /// A pressed gesture has started.
916 LOK_MOUSEEVENT_MOUSEBUTTONDOWN,
917 /// A pressed gesture has finished.
918 LOK_MOUSEEVENT_MOUSEBUTTONUP,
919 /// A change has happened during a press gesture.
920 LOK_MOUSEEVENT_MOUSEMOVE
922 LibreOfficeKitMouseEventType;
924 typedef enum
926 /// The start of selection is to be adjusted.
927 LOK_SETTEXTSELECTION_START,
928 /// The end of selection is to be adjusted.
929 LOK_SETTEXTSELECTION_END,
930 /// Both the start and the end of selection is to be adjusted.
931 LOK_SETTEXTSELECTION_RESET
933 LibreOfficeKitSetTextSelectionType;
935 typedef enum
938 * A move or a resize action starts. It is assumed that there is a valid
939 * graphic selection (see LOK_CALLBACK_GRAPHIC_SELECTION) and the supplied
940 * coordinates are the ones the user tapped on.
942 * The type of the action is move by default, unless the coordinates are
943 * the position of a handle (see below), in which case it's a resize.
945 * There are 8 handles for a graphic selection:
946 * - top-left, top-center, top-right
947 * - middle-left, middle-right
948 * - bottom-left, bottom-center, bottom-right
950 LOK_SETGRAPHICSELECTION_START,
952 * A move or resize action stops. It is assumed that this is always used
953 * only after a LOK_SETTEXTSELECTION_START. The supplied coordinates are
954 * the ones where the user released the screen.
956 LOK_SETGRAPHICSELECTION_END
958 LibreOfficeKitSetGraphicSelectionType;
960 #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
962 #ifdef __cplusplus
964 #endif
966 #endif // INCLUDED_LIBREOFFICEKIT_LIBREOFFICEKITENUMS_H
968 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */