Coverage Report

Created: 2026-08-14 10:22

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/include/LibreOfficeKit/LibreOfficeKitEnums.h
Line
Count
Source
1
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
 * This file is part of the LibreOffice project.
4
 *
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
 */
9
10
#ifndef INCLUDED_LIBREOFFICEKIT_LIBREOFFICEKITENUMS_H
11
#define INCLUDED_LIBREOFFICEKIT_LIBREOFFICEKITENUMS_H
12
13
#include <assert.h>
14
15
#ifdef __cplusplus
16
extern "C"
17
{
18
#endif
19
20
#if defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
21
typedef enum
22
{
23
  LOK_DOCTYPE_TEXT,
24
  LOK_DOCTYPE_SPREADSHEET,
25
  LOK_DOCTYPE_PRESENTATION,
26
  LOK_DOCTYPE_DRAWING,
27
  LOK_DOCTYPE_OTHER
28
}
29
LibreOfficeKitDocumentType;
30
31
typedef enum
32
{
33
    LOK_PARTMODE_SLIDES,
34
    LOK_PARTMODE_NOTES
35
}
36
LibreOfficeKitPartMode;
37
38
typedef enum
39
{
40
    LOK_TILEMODE_RGBA,
41
    LOK_TILEMODE_BGRA
42
}
43
LibreOfficeKitTileMode;
44
45
typedef enum
46
{
47
    LOK_WINDOW_CLOSE,
48
    LOK_WINDOW_PASTE
49
}
50
LibreOfficeKitWindowAction;
51
52
typedef enum
53
{
54
    LOK_SELTYPE_NONE,
55
    LOK_SELTYPE_TEXT,
56
    LOK_SELTYPE_LARGE_TEXT, // unused (same as LOK_SELTYPE_COMPLEX)
57
    LOK_SELTYPE_COMPLEX
58
}
59
LibreOfficeKitSelectionType;
60
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.
64
 *
65
 *  @see lok::Office::setOptionalFeatures().
66
 */
67
typedef enum
68
{
69
    /**
70
     * Handle LOK_CALLBACK_DOCUMENT_PASSWORD by prompting the user
71
     * for a password.
72
     *
73
     * @see lok::Office::setDocumentPassword().
74
     */
75
    LOK_FEATURE_DOCUMENT_PASSWORD = (1ULL << 0),
76
77
    /**
78
     * Handle LOK_CALLBACK_DOCUMENT_PASSWORD_TO_MODIFY by prompting the user
79
     * for a password.
80
     *
81
     * @see lok::Office::setDocumentPassword().
82
     */
83
    LOK_FEATURE_DOCUMENT_PASSWORD_TO_MODIFY = (1ULL << 1),
84
85
    /**
86
     * Request to have the part number as an 5th value in the
87
     * LOK_CALLBACK_INVALIDATE_TILES payload.
88
     */
89
    LOK_FEATURE_PART_IN_INVALIDATION_CALLBACK = (1ULL << 2),
90
91
    /**
92
     * Turn off tile rendering for annotations
93
     */
94
    LOK_FEATURE_NO_TILED_ANNOTATIONS = (1ULL << 3),
95
96
    /**
97
     * Enable range based header data
98
     */
99
    LOK_FEATURE_RANGE_HEADERS = (1ULL << 4),
100
101
    /**
102
     * Request to have the active view's Id as the 1st value in the
103
     * LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR payload.
104
     */
105
    LOK_FEATURE_VIEWID_IN_VISCURSOR_INVALIDATION_CALLBACK = (1ULL << 5)
106
}
107
LibreOfficeKitOptionalFeatures;
108
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.
114
115
// TODO: We should really add some indication at the documentation for
116
// each enum value telling which type of callback it is.
117
118
typedef enum
119
{
120
    /**
121
     * Any tiles which are over the rectangle described in the payload are no
122
     * longer valid.
123
     *
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.
127
     *
128
     * @see LOK_FEATURE_PART_IN_INVALIDATION_CALLBACK.
129
     */
130
    LOK_CALLBACK_INVALIDATE_TILES = 0,
131
    /**
132
     * The size and/or the position of the visible cursor changed.
133
     *
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
139
     * not misspelled.
140
     */
141
    LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR = 1,
142
    /**
143
     * The list of rectangles representing the current text selection changed.
144
     *
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.
149
     */
150
    LOK_CALLBACK_TEXT_SELECTION = 2,
151
    /**
152
     * The position and size of the cursor rectangle at the text
153
     * selection start. It is used to draw the selection handles.
154
     *
155
     * This callback must be called prior to LOK_CALLBACK_TEXT_SELECTION every
156
     * time the selection is updated.
157
     *
158
     * Rectangle format is the same as LOK_CALLBACK_INVALIDATE_TILES.
159
     */
160
    LOK_CALLBACK_TEXT_SELECTION_START = 3,
161
    /**
162
     * The position and size of the cursor rectangle at the text
163
     * selection end. It is used to draw the selection handles.
164
     *
165
     * This callback must be called prior to LOK_CALLBACK_TEXT_SELECTION every
166
     * time the selection is updated.
167
     *
168
     * Rectangle format is the same as LOK_CALLBACK_INVALIDATE_TILES.
169
     */
170
    LOK_CALLBACK_TEXT_SELECTION_END = 4,
171
    /**
172
     * The blinking text cursor is now visible or not.
173
     *
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.
178
     */
179
    LOK_CALLBACK_CURSOR_VISIBLE = 5,
180
    /**
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.
184
     *
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.
187
     *
188
     * The "{ list of properties }" part is in JSON format.
189
     * Follow some examples of the property list part:
190
     *
191
     * 1) when the selected object is an image inserted in Writer:
192
     *
193
     *      { "isWriterGraphic": true }
194
     *
195
     * 2) when the selected object is a chart legend:
196
     *
197
     *      { "isDraggable": true, "isResizable": true, "isRotatable": false }
198
     *
199
     * 3) when the selected object is a pie segment in a chart:
200
     *
201
     *      {
202
     *          "isDraggable": true,
203
     *          "isResizable": false,
204
     *          "isRotatable": false,
205
     *          "dragInfo": {
206
     *              "dragMethod": "PieSegmentDragging",
207
     *              "initialOffset": 50,
208
     *              "dragDirection": [x, y],
209
     *              "svg": "<svg ..."
210
     *          }
211
     *      }
212
     *
213
     *      where the "svg" property is a string containing an svg document
214
     *      which is a representation of the pie segment.
215
     */
216
    LOK_CALLBACK_GRAPHIC_SELECTION = 6,
217
218
    /**
219
     * User clicked on a hyperlink that should be handled by other
220
     * applications accordingly.
221
     */
222
    LOK_CALLBACK_HYPERLINK_CLICKED = 7,
223
224
    /**
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"
228
     */
229
    LOK_CALLBACK_STATE_CHANGED = 8,
230
231
    /**
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.
237
     *
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.
244
     */
245
    LOK_CALLBACK_STATUS_INDICATOR_START = 9,
246
247
    /**
248
     * Sets the numeric value of the status indicator.
249
     * The payload should be a percentage, an integer between 0 and 100.
250
     */
251
    LOK_CALLBACK_STATUS_INDICATOR_SET_VALUE = 10,
252
253
    /**
254
     * Ends the status indicator.
255
     *
256
     * Not necessarily ever emitted.
257
     */
258
    LOK_CALLBACK_STATUS_INDICATOR_FINISH = 11,
259
260
    /**
261
     * No match was found for the search input
262
     */
263
    LOK_CALLBACK_SEARCH_NOT_FOUND = 12,
264
265
    /**
266
     * Size of the document changed.
267
     *
268
     * Payload format is "width, height", i.e. clients get the new size without
269
     * having to do an explicit lok::Document::getDocumentSize() call.
270
     *
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.
274
     */
275
    LOK_CALLBACK_DOCUMENT_SIZE_CHANGED = 13,
276
277
    /**
278
     * The current part number is changed.
279
     *
280
     * Payload is a single 0-based integer.
281
     */
282
    LOK_CALLBACK_SET_PART = 14,
283
284
    /**
285
     * Selection rectangles of the search result when find all is performed.
286
     *
287
     * Payload format example, in case of two matches:
288
     *
289
     * {
290
     *     "searchString": "...",
291
     *     "highlightAll": true|false, // this is a result of 'search all'
292
     *     "searchResultSelection": [
293
     *         {
294
     *             "part": "...",
295
     *             "rectangles": "..."
296
     *         },
297
     *         {
298
     *             "part": "...",
299
     *             "rectangles": "..."
300
     *         }
301
     *     ]
302
     * }
303
     *
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.
307
     */
308
    LOK_CALLBACK_SEARCH_RESULT_SELECTION = 15,
309
310
    /**
311
     * Result of the UNO command execution when bNotifyWhenFinished was set
312
     * to 'true' during the postUnoCommand() call.
313
     *
314
     * The result returns a success / failure state, and potentially
315
     * additional data:
316
     *
317
     * {
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)
321
     * }
322
     */
323
    LOK_CALLBACK_UNO_COMMAND_RESULT = 16,
324
325
    /**
326
     * The size and/or the position of the cell cursor changed.
327
     *
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.
332
     *
333
     * Rectangle format is the same as LOK_CALLBACK_INVALIDATE_TILES.
334
     */
335
    LOK_CALLBACK_CELL_CURSOR = 17,
336
337
    /**
338
     * The current mouse pointer style.
339
     *
340
     * Payload is a css mouse pointer style.
341
     */
342
    LOK_CALLBACK_MOUSE_POINTER = 18,
343
344
    /**
345
     * The text content of the formula bar in Calc.
346
     */
347
    LOK_CALLBACK_CELL_FORMULA = 19,
348
349
    /**
350
     * Loading a document requires a password.
351
     *
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.
355
     */
356
    LOK_CALLBACK_DOCUMENT_PASSWORD = 20,
357
358
    /**
359
     * Editing a document requires a password.
360
     *
361
     * Loading the document is blocked until the password is provided via
362
     * lok::Office::setDocumentPassword().
363
     */
364
    LOK_CALLBACK_DOCUMENT_PASSWORD_TO_MODIFY = 21,
365
366
    /**
367
     * An error happened.
368
     *
369
     * The payload returns information further identifying the error, like:
370
     *
371
     * {
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
376
     * }
377
     */
378
    LOK_CALLBACK_ERROR = 22,
379
380
    /**
381
     * Context menu structure
382
     *
383
     * Returns the structure of context menu.  Contains all the separators &
384
     * submenus, example of the returned structure:
385
     *
386
     * {
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
     *         ...
393
     *     ]
394
     * }
395
     *
396
     * The 'command' can additionally have a checkable status, like:
397
     *
398
     *     {"text": "label text3", "type": "command", "command": ".uno:Something3", "checktype": "checkmark|radio|auto", "checked": "true|false"}
399
     */
400
    LOK_CALLBACK_CONTEXT_MENU = 23,
401
402
    /**
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.
405
     *
406
     * The payload format:
407
     *
408
     * {
409
     *     "viewId": "..."
410
     *     "rectangle": "..."
411
     * }
412
     *
413
     * - viewId is a value returned earlier by lok::Document::createView()
414
     * - rectangle uses the format of LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR
415
     */
416
    LOK_CALLBACK_INVALIDATE_VIEW_CURSOR = 24,
417
418
    /**
419
     * The text selection in one of the other views has changed.
420
     *
421
     * The payload format:
422
     *
423
     * {
424
     *     "viewId": "..."
425
     *     "selection": "..."
426
     * }
427
     *
428
     * - viewId is a value returned earlier by lok::Document::createView()
429
     * - selection uses the format of LOK_CALLBACK_TEXT_SELECTION.
430
     */
431
    LOK_CALLBACK_TEXT_VIEW_SELECTION = 25,
432
433
    /**
434
     * The cell cursor in one of the other views has changed.
435
     *
436
     * The payload format:
437
     *
438
     * {
439
     *     "viewId": "..."
440
     *     "rectangle": "..."
441
     * }
442
     *
443
     * - viewId is a value returned earlier by lok::Document::createView()
444
     * - rectangle uses the format of LOK_CALLBACK_CELL_CURSOR.
445
     */
446
    LOK_CALLBACK_CELL_VIEW_CURSOR = 26,
447
448
    /**
449
     * The size and/or the position of a graphic selection in one of the other
450
     * views has changed.
451
     *
452
     * The payload format:
453
     *
454
     * {
455
     *     "viewId": "..."
456
     *     "selection": "..."
457
     * }
458
     *
459
     * - viewId is a value returned earlier by lok::Document::createView()
460
     * - selection uses the format of LOK_CALLBACK_INVALIDATE_TILES.
461
     */
462
    LOK_CALLBACK_GRAPHIC_VIEW_SELECTION = 27,
463
464
    /**
465
     * The blinking text cursor in one of the other views is now visible or
466
     * not.
467
     *
468
     * The payload format:
469
     *
470
     * {
471
     *     "viewId": "..."
472
     *     "visible": "..."
473
     * }
474
     *
475
     * - viewId is a value returned earlier by lok::Document::createView()
476
     * - visible uses the format of LOK_CALLBACK_CURSOR_VISIBLE.
477
     */
478
    LOK_CALLBACK_VIEW_CURSOR_VISIBLE = 28,
479
480
    /**
481
     * The size and/or the position of a lock rectangle in one of the other
482
     * views has changed.
483
     *
484
     * The payload format:
485
     *
486
     * {
487
     *     "viewId": "..."
488
     *     "rectangle": "..."
489
     * }
490
     *
491
     * - viewId is a value returned earlier by lok::Document::createView()
492
     * - rectangle uses the format of LOK_CALLBACK_INVALIDATE_TILES.
493
     */
494
    LOK_CALLBACK_VIEW_LOCK = 29,
495
496
    /**
497
     * The size of the change tracking table has changed.
498
     *
499
     * The payload example:
500
     * {
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"
509
     *     }
510
     * }
511
     *
512
     * The format is the same as an entry of
513
     * lok::Document::getCommandValues('.uno:AcceptTrackedChanges'), extra
514
     * fields:
515
     *
516
     * - 'action' is either 'Add' or 'Remove', depending on if this is an
517
     *   insertion into the table or a removal.
518
     */
519
    LOK_CALLBACK_REDLINE_TABLE_SIZE_CHANGED = 30,
520
521
    /**
522
     * An entry in the change tracking table has been modified.
523
     *
524
     * The payload example:
525
     * {
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"
534
     *     }
535
     * }
536
     *
537
     * The format is the same as an entry of
538
     * lok::Document::getCommandValues('.uno:AcceptTrackedChanges'), extra
539
     * fields:
540
     *
541
     * - 'action' is 'Modify'.
542
     */
543
    LOK_CALLBACK_REDLINE_TABLE_ENTRY_MODIFIED = 31,
544
545
    /**
546
     * There is some change in comments in the document
547
     *
548
     * The payload example:
549
     * {
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"
559
     *     }
560
     * }
561
     *
562
     * The format is the same as an entry of
563
     * lok::Document::getCommandValues('.uno:ViewAnnotations'), extra
564
     * fields:
565
     *
566
     * - 'action' can be 'Add', 'Remove' or 'Modify' depending on whether
567
     *    comment has been added, removed or modified.
568
     */
569
    LOK_CALLBACK_COMMENT = 32,
570
571
    /**
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.
574
     *
575
     * The payload says if we are invalidating a row or column header. So,
576
     * payload values can be: "row", "column", "all".
577
     */
578
    LOK_CALLBACK_INVALIDATE_HEADER = 33,
579
    /**
580
     * The text content of the address field in Calc. Eg: "A7"
581
     */
582
    LOK_CALLBACK_CELL_ADDRESS = 34,
583
    /**
584
     * The key horizontal ruler related properties on change are reported by this.
585
     *
586
     * The payload format is:
587
     *
588
     * {
589
     *      "margin1": "...",
590
     *      "margin2": "...",
591
     *      "leftOffset": "...",
592
     *      "pageOffset": "...",
593
     *      "pageWidth": "...",
594
     *      "unit": "..."
595
     *  }
596
     *
597
     * Here all aproperties are same as described in svxruler.
598
     */
599
    LOK_CALLBACK_RULER_UPDATE = 35,
600
    /**
601
     * Window related callbacks are emitted under this category. It includes
602
     * external windows like dialogs, autopopups for now.
603
     *
604
     * The payload format is:
605
     *
606
     * {
607
     *    "id": "unique integer id of the dialog",
608
     *    "action": "<see below>",
609
     *    "type": "<see below>"
610
     *    "rectangle": "x, y, width, height"
611
     * }
612
     *
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
618
     *
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
631
     */
632
    LOK_CALLBACK_WINDOW = 36,
633
634
    /**
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.
637
     *
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.
640
     */
641
    LOK_CALLBACK_VALIDITY_LIST_BUTTON = 37,
642
643
    /**
644
     * Notification that the clipboard contents have changed.
645
     * Typically fired in response to copying to clipboard.
646
     *
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" }
650
     */
651
    LOK_CALLBACK_CLIPBOARD_CHANGED = 38,
652
653
    /**
654
     * When the (editing) context changes - like the user switches from
655
     * editing textbox in Impress to editing a shape there.
656
     *
657
     * Payload is the application ID and context, delimited by space.
658
     * Eg. com.sun.star.presentation.PresentationDocument TextObject
659
     */
660
    LOK_CALLBACK_CONTEXT_CHANGED = 39,
661
662
    /**
663
     * On-load notification of the document signature status.
664
     */
665
    LOK_CALLBACK_SIGNATURE_STATUS = 40,
666
667
    /**
668
     * Profiling tracing information single string of multiple lines
669
     * containing <pid> <timestamp> and zone start/stop information
670
     */
671
    LOK_CALLBACK_PROFILE_FRAME = 41,
672
673
    /**
674
     * The position and size of the cell selection area. It is used to
675
     * draw the selection handles for cells in Calc documents.
676
     *
677
     * Rectangle format is the same as LOK_CALLBACK_INVALIDATE_TILES.
678
     */
679
    LOK_CALLBACK_CELL_SELECTION_AREA = 42,
680
681
    /**
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.
684
     *
685
     * Rectangle format is the same as LOK_CALLBACK_INVALIDATE_TILES.
686
     */
687
    LOK_CALLBACK_CELL_AUTO_FILL_AREA = 43,
688
689
    /**
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.
695
     */
696
    LOK_CALLBACK_TABLE_SELECTED = 44,
697
698
    /*
699
     * Show reference marks from payload.
700
     *
701
     * Example payload:
702
     * {
703
     *     "marks": [
704
     *         { "rectangle": "3825, 3315, 1245, 2010", "color": "0000ff", "part": "0" },
705
     *         { "rectangle": "8925, 4335, 2520, 735", "color": "ff0000", "part": "0" },
706
     *         ...
707
     *     ]
708
     * }
709
     */
710
    LOK_CALLBACK_REFERENCE_MARKS = 45,
711
712
    /**
713
     * Send the list of functions whose name starts with the characters entered
714
     * by the user in the formula input bar.
715
     */
716
    LOK_CALLBACK_CALC_FUNCTION_LIST = 47,
717
718
    /**
719
     * Sends the tab stop list for the current of the current cursor position.
720
     */
721
    LOK_CALLBACK_TAB_STOP_LIST = 48,
722
723
    /**
724
     * Sends all information for displaying form field button for a text based field.
725
     *
726
     * It contains the position where the frame with the button should be displayed and
727
     * also contains all information that the popup window needs.
728
     *
729
     * The payload example:
730
     * {
731
     *      "action": "show",
732
     *      "type": "drop-down",
733
     *      "textArea": "1418, 3906, 3111, 919",
734
     *      "params": {
735
     *           "items": ["January", "February", "July"],
736
     *           "selected": "2",
737
     *           "placeholder": "No items specified"
738
     *      }
739
     * }
740
     *
741
     * or
742
     * {
743
     *      "action": "hide",
744
     *      "type": "drop-down"
745
     * }
746
     */
747
    LOK_CALLBACK_FORM_FIELD_BUTTON = 49,
748
749
    /**
750
     * This is Calc specific. Indicates that some or all of the current sheet's
751
     * geometry data has changed. Clients must request a full or partial sheet
752
     * geometry data set.
753
     *
754
     * The payload specifies what part of the sheet geometry data has changed.
755
     * The payload format is:
756
     * 'all|rows|columns [sizes [hidden [filtered [groups]]]]'
757
     *
758
     * For example, the payload 'rows sizes groups' indicates that the row heights
759
     * and row-groups data have changed.
760
     */
761
    LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY = 50,
762
763
    /**
764
     * When for the current cell is defined an input help text.
765
     *
766
     * The payload format is JSON: { "title": "title text", "content": "content text" }
767
     */
768
    LOK_CALLBACK_VALIDITY_INPUT_HELP = 51,
769
770
    /**
771
     * Indicates the document background color in the payload as a RGB hex string (RRGGBB).
772
     */
773
    LOK_CALLBACK_DOCUMENT_BACKGROUND_COLOR = 52,
774
775
    /**
776
     * When a user tries to use command which is restricted for that user
777
     */
778
    LOK_COMMAND_BLOCKED = 53,
779
780
    /**
781
     * The position of the cell cursor jumped to.
782
     *
783
     * Payload format: "x, y, width, height, column, row", where the first
784
     * 4 numbers are document coordinates, in twips, and the last 2 are table
785
     * coordinates starting from 0.
786
     * When the cursor is not shown the payload format is the "EMPTY" string.
787
     *
788
     * Rectangle format is the same as LOK_CALLBACK_INVALIDATE_TILES.
789
     */
790
    LOK_CALLBACK_SC_FOLLOW_JUMP = 54,
791
792
    /**
793
     * Sends all information for displaying metadata for a text based content control.
794
     *
795
     * Examples:
796
     * Entered a rich text content control:
797
     * {
798
     *     "action": "show",
799
     *     "alias": "my alias", // omitted if empty
800
     *     "rectangles": "1418, 1694, 720, 551; 10291, 1418, 1099, 275"
801
     * }
802
     *
803
     * Left a rich text content control:
804
     * {
805
     *     "action": "hide"
806
     * }
807
     *
808
     * Entered a dropdown content control:
809
     * {
810
     *     "action": "show",
811
     *     "rectangles": "...",
812
     *     "items": ["red", "green", "blue"]
813
     * }
814
     *
815
     * Clicked on a picture content control's placeholder:
816
     * {
817
     *     "action": "change-picture"
818
     * }
819
     *
820
     * Entered a date content control:
821
     * {
822
     *     "action": "show",
823
     *     "rectangles": "...",
824
     *     "date": "true"
825
     * }
826
     */
827
    LOK_CALLBACK_CONTENT_CONTROL = 55,
828
829
    /**
830
     * This is Calc specific. The payload contains print ranges of all
831
     * sheets in the document.
832
     *
833
     * Payload example:
834
     * {
835
     *     "printranges" : [
836
     *         {
837
     *             "sheet": 0,
838
     *             "ranges": [
839
     *                 [0, 0, 4, 5],
840
     *                 [5, 100, 8, 150]
841
     *             ]
842
     *         },
843
     *         {
844
     *             "sheet": 3,
845
     *             "ranges": [
846
     *                 [1, 0, 6, 10],
847
     *                 [3, 200, 6, 230]
848
     *             ]
849
     *         }
850
     *     ]
851
     * }
852
     *
853
     * The format of the inner "ranges" array for each sheet is
854
     * [<startColumn>, <startRow>, <endColumn>, <endRow>]
855
     */
856
    LOK_CALLBACK_PRINT_RANGES = 56,
857
858
    /**
859
     * Informs the LibreOfficeKit client that a font specified in the
860
     * document is missing.
861
     *
862
     * This callback is emitted right after the document has been loaded.
863
     *
864
     * Payload example:
865
     * {
866
     *     "fontsmissing": [
867
     *         "Some Random Font",
868
     *         "Another Font"
869
     *     ]
870
     * }
871
     *
872
     * The names are those of the font family. Sadly it is currently
873
     * not possible to know the name of the font style that is
874
     * missing.
875
     *
876
     */
877
    LOK_CALLBACK_FONTS_MISSING = 57,
878
879
    /**
880
     * Insertion, removal, movement, and selection of a media shape.
881
     * The payload is a json with the relevant details.
882
     *
883
     *      {
884
     *          "action": "insert",
885
     *          "id": 123456,
886
     *          "url": "file:// ..."
887
     *          "x": ...,
888
     *          "y": ...,
889
     *      }
890
     *
891
     *      where the "svg" property is a string containing an svg document
892
     *      which is a representation of the pie segment.
893
     */
894
    LOK_CALLBACK_MEDIA_SHAPE = 58,
895
896
    /**
897
     * The document is available to download by the client.
898
     *
899
     * Payload example:
900
     * "file:///tmp/hello-world.pdf"
901
     */
902
    LOK_CALLBACK_EXPORT_FILE = 59,
903
904
    /**
905
     * Some attribute of this view has changed, that will cause it
906
     * to completely re-render, eg. non-printing characters or
907
     * or dark mode was toggled, and then distinct from other views.
908
     *
909
     * Payload is an opaque string that matches this set of states.
910
     * this will be emitted after creating a new view.
911
     */
912
    LOK_CALLBACK_VIEW_RENDER_STATE = 60,
913
914
    /**
915
     * Informs the LibreOfficeKit client that the background color surrounding
916
     * the document has changed.
917
    */
918
   LOK_CALLBACK_APPLICATION_BACKGROUND_COLOR = 61,
919
920
    /**
921
     * Accessibility event: a paragraph got focus.
922
     * The payload is a json with the following structure.
923
     *
924
     *   {
925
     *       "content": "<paragraph text>"
926
     *       "position": N
927
     *       "start": N1
928
     *       "end": N2
929
     *       "listPrefixLength": L
930
     *   }
931
     *   where N is the position of the text cursor inside the focused paragraph,
932
     *   and [N1,N2] is the range of the text selection inside the focused paragraph.
933
     *   In case the paragraph is a list item, L is the length of the bullet/number prefix.
934
     */
935
    LOK_CALLBACK_A11Y_FOCUS_CHANGED = 62,
936
937
    /**
938
     * Accessibility event: text cursor position has changed.
939
     *
940
     *  {
941
     *      "position": N
942
     *  }
943
     *  where N is the position of the text cursor inside the focused paragraph.
944
     */
945
    LOK_CALLBACK_A11Y_CARET_CHANGED = 63,
946
947
    /**
948
     * Accessibility event: text selection has changed.
949
     *
950
     *  {
951
     *      "start": N1
952
     *      "end": N2
953
     *  }
954
     *  where [N1,N2] is the range of the text selection inside the focused paragraph.
955
     */
956
    LOK_CALLBACK_A11Y_TEXT_SELECTION_CHANGED = 64,
957
958
    /**
959
     * Informs that the document password has been successfully changed.
960
     * The payload contains the new password and the type.
961
    */
962
    LOK_CALLBACK_DOCUMENT_PASSWORD_RESET = 66,
963
964
    /**
965
     * Accessibility event: a cell got focus.
966
     * The payload is a json with the following structure.
967
     *
968
     *   {
969
     *       "outCount": <number of tables user gets out of>
970
     *       "inList": [
971
     *           {
972
     *               "rowCount": <number of rows for outer table user got in>
973
     *               "colCount": <number of columns for outer table user got in>
974
     *           },
975
     *           ...
976
     *           {
977
     *               "rowCount": <number of rows for inner table user got in>
978
     *               "colCount": <number of columns for inner table user got in>
979
     *           }
980
     *       ]
981
     *       "row": <current row index>
982
     *       "col": <current column index>
983
     *       "rowSpan": <row span for current cell>
984
     *       "colSpan": <column span for current cell>
985
     *       "paragraph": {
986
     *           <same structure as for LOK_CALLBACK_A11Y_FOCUS_CHANGED>
987
     *        }
988
     *   }
989
     *   where row/column indexes start from 0, inList is the list of tables
990
     *   the user got in from the outer to the inner; row/column span default
991
     *   value is 1; paragraph is the cell text content.
992
     */
993
    LOK_CALLBACK_A11Y_FOCUSED_CELL_CHANGED = 67,
994
995
    /**
996
     * Accessibility event: text editing in a shape or cell has been enabled/disabled
997
     *
998
     *  {
999
     *      "cell": true/false (editing a cell ?)
1000
     *      "enabled": true|false
1001
     *      "selection": a selection description
1002
     *      "paragraph": focused paragraph
1003
     *  }
1004
     */
1005
    LOK_CALLBACK_A11Y_EDITING_IN_SELECTION_STATE = 68,
1006
1007
    /**
1008
     * Accessibility event: a selection (of a shape/graphic, etc.) has changed
1009
     *
1010
     *  {
1011
     *      "cell": true/false (selected object is a cell ?)
1012
     *      "action": "create"|"add"|"remove"
1013
     *      "name": selected object name
1014
     *      "text": text content if any
1015
     *  }
1016
     */
1017
    LOK_CALLBACK_A11Y_SELECTION_CHANGED = 69,
1018
1019
    /**
1020
     * Forwarding logs from core to client can be useful
1021
     * for keep track of the real core/client event sequence
1022
     *
1023
     * Payload is the log to be sent
1024
     */
1025
    LOK_CALLBACK_CORE_LOG = 70,
1026
1027
    /**
1028
     * Tooltips shown in the documents, like redline author and date.
1029
     *
1030
     *  {
1031
     *      "text": "text of tooltip",
1032
     *      "rectangle": "x, y, width, height"
1033
     *  }
1034
     */
1035
    LOK_CALLBACK_TOOLTIP = 71,
1036
1037
    /**
1038
     * Used for sending the rectangle for text inside a shape/textbox
1039
     *
1040
     *  Payload contains the rectangle details
1041
     */
1042
    LOK_CALLBACK_SHAPE_INNER_TEXT = 72,
1043
        /**
1044
     * The key vertical ruler related properties on change are reported by this.
1045
     *
1046
     * The payload format is:
1047
     *
1048
     * {
1049
     *      "margin1": "...",
1050
     *      "margin2": "...",
1051
     *      "leftOffset": "...",
1052
     *      "pageOffset": "...",
1053
     *      "pageWidth": "...",
1054
     *      "unit": "..."
1055
     *  }
1056
     *
1057
     * Here all aproperties are same as described in svxruler.
1058
     */
1059
    LOK_CALLBACK_VERTICAL_RULER_UPDATE = 73
1060
1061
}
1062
LibreOfficeKitCallbackType;
1063
1064
typedef enum
1065
{
1066
    /// A key on the keyboard is pressed.
1067
    LOK_KEYEVENT_KEYINPUT,
1068
    /// A key on the keyboard is released.
1069
    LOK_KEYEVENT_KEYUP
1070
}
1071
LibreOfficeKitKeyEventType;
1072
1073
typedef enum
1074
{
1075
    /// cf. SalEvent::ExtTextInput
1076
    LOK_EXT_TEXTINPUT,
1077
    /// cf. SalEvent::ExtTextInputPos
1078
    LOK_EXT_TEXTINPUT_POS,
1079
    /// cf. SalEvent::EndExtTextInput
1080
    LOK_EXT_TEXTINPUT_END
1081
}
1082
LibreOfficeKitExtTextInputType;
1083
1084
/// Returns the string representation of a LibreOfficeKitCallbackType enumeration element.
1085
static inline const char* lokCallbackTypeToString(int nType)
1086
0
{
1087
0
    switch (static_cast<LibreOfficeKitCallbackType>(nType))
1088
0
    {
1089
0
    case LOK_CALLBACK_INVALIDATE_TILES:
1090
0
        return "LOK_CALLBACK_INVALIDATE_TILES";
1091
0
    case LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR:
1092
0
        return "LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR";
1093
0
    case LOK_CALLBACK_TEXT_SELECTION:
1094
0
        return "LOK_CALLBACK_TEXT_SELECTION";
1095
0
    case LOK_CALLBACK_TEXT_SELECTION_START:
1096
0
        return "LOK_CALLBACK_TEXT_SELECTION_START";
1097
0
    case LOK_CALLBACK_TEXT_SELECTION_END:
1098
0
        return "LOK_CALLBACK_TEXT_SELECTION_END";
1099
0
    case LOK_CALLBACK_CURSOR_VISIBLE:
1100
0
        return "LOK_CALLBACK_CURSOR_VISIBLE";
1101
0
    case LOK_CALLBACK_VIEW_CURSOR_VISIBLE:
1102
0
        return "LOK_CALLBACK_VIEW_CURSOR_VISIBLE";
1103
0
    case LOK_CALLBACK_GRAPHIC_SELECTION:
1104
0
        return "LOK_CALLBACK_GRAPHIC_SELECTION";
1105
0
    case LOK_CALLBACK_GRAPHIC_VIEW_SELECTION:
1106
0
        return "LOK_CALLBACK_GRAPHIC_VIEW_SELECTION";
1107
0
    case LOK_CALLBACK_CELL_CURSOR:
1108
0
        return "LOK_CALLBACK_CELL_CURSOR";
1109
0
    case LOK_CALLBACK_HYPERLINK_CLICKED:
1110
0
        return "LOK_CALLBACK_HYPERLINK_CLICKED";
1111
0
    case LOK_CALLBACK_MOUSE_POINTER:
1112
0
        return "LOK_CALLBACK_MOUSE_POINTER";
1113
0
    case LOK_CALLBACK_STATE_CHANGED:
1114
0
        return "LOK_CALLBACK_STATE_CHANGED";
1115
0
    case LOK_CALLBACK_STATUS_INDICATOR_START:
1116
0
        return "LOK_CALLBACK_STATUS_INDICATOR_START";
1117
0
    case LOK_CALLBACK_STATUS_INDICATOR_SET_VALUE:
1118
0
        return "LOK_CALLBACK_STATUS_INDICATOR_SET_VALUE";
1119
0
    case LOK_CALLBACK_STATUS_INDICATOR_FINISH:
1120
0
        return "LOK_CALLBACK_STATUS_INDICATOR_FINISH";
1121
0
    case LOK_CALLBACK_SEARCH_NOT_FOUND:
1122
0
        return "LOK_CALLBACK_SEARCH_NOT_FOUND";
1123
0
    case LOK_CALLBACK_DOCUMENT_SIZE_CHANGED:
1124
0
        return "LOK_CALLBACK_DOCUMENT_SIZE_CHANGED";
1125
0
    case LOK_CALLBACK_SET_PART:
1126
0
        return "LOK_CALLBACK_SET_PART";
1127
0
    case LOK_CALLBACK_SEARCH_RESULT_SELECTION:
1128
0
        return "LOK_CALLBACK_SEARCH_RESULT_SELECTION";
1129
0
    case LOK_CALLBACK_DOCUMENT_PASSWORD:
1130
0
        return "LOK_CALLBACK_DOCUMENT_PASSWORD";
1131
0
    case LOK_CALLBACK_DOCUMENT_PASSWORD_TO_MODIFY:
1132
0
        return "LOK_CALLBACK_DOCUMENT_PASSWORD_TO_MODIFY";
1133
0
    case LOK_CALLBACK_CONTEXT_MENU:
1134
0
        return "LOK_CALLBACK_CONTEXT_MENU";
1135
0
    case LOK_CALLBACK_INVALIDATE_VIEW_CURSOR:
1136
0
        return "LOK_CALLBACK_INVALIDATE_VIEW_CURSOR";
1137
0
    case LOK_CALLBACK_TEXT_VIEW_SELECTION:
1138
0
        return "LOK_CALLBACK_TEXT_VIEW_SELECTION";
1139
0
    case LOK_CALLBACK_CELL_VIEW_CURSOR:
1140
0
        return "LOK_CALLBACK_CELL_VIEW_CURSOR";
1141
0
    case LOK_CALLBACK_CELL_ADDRESS:
1142
0
        return "LOK_CALLBACK_CELL_ADDRESS";
1143
0
    case LOK_CALLBACK_CELL_FORMULA:
1144
0
        return "LOK_CALLBACK_CELL_FORMULA";
1145
0
    case LOK_CALLBACK_UNO_COMMAND_RESULT:
1146
0
        return "LOK_CALLBACK_UNO_COMMAND_RESULT";
1147
0
    case LOK_CALLBACK_ERROR:
1148
0
        return "LOK_CALLBACK_ERROR";
1149
0
    case LOK_CALLBACK_VIEW_LOCK:
1150
0
        return "LOK_CALLBACK_VIEW_LOCK";
1151
0
    case LOK_CALLBACK_REDLINE_TABLE_SIZE_CHANGED:
1152
0
        return "LOK_CALLBACK_REDLINE_TABLE_SIZE_CHANGED";
1153
0
    case LOK_CALLBACK_REDLINE_TABLE_ENTRY_MODIFIED:
1154
0
        return "LOK_CALLBACK_REDLINE_TABLE_ENTRY_MODIFIED";
1155
0
    case LOK_CALLBACK_INVALIDATE_HEADER:
1156
0
        return "LOK_CALLBACK_INVALIDATE_HEADER";
1157
0
    case LOK_CALLBACK_COMMENT:
1158
0
        return "LOK_CALLBACK_COMMENT";
1159
0
    case LOK_CALLBACK_RULER_UPDATE:
1160
0
        return "LOK_CALLBACK_RULER_UPDATE";
1161
0
    case LOK_CALLBACK_VERTICAL_RULER_UPDATE:
1162
0
        return "LOK_CALLBACK_VERTICAL_RULER_UPDATE";
1163
0
    case LOK_CALLBACK_WINDOW:
1164
0
        return "LOK_CALLBACK_WINDOW";
1165
0
    case LOK_CALLBACK_VALIDITY_LIST_BUTTON:
1166
0
        return "LOK_CALLBACK_VALIDITY_LIST_BUTTON";
1167
0
    case LOK_CALLBACK_VALIDITY_INPUT_HELP:
1168
0
        return "LOK_CALLBACK_VALIDITY_INPUT_HELP";
1169
0
    case LOK_CALLBACK_CLIPBOARD_CHANGED:
1170
0
        return "LOK_CALLBACK_CLIPBOARD_CHANGED";
1171
0
    case LOK_CALLBACK_CONTEXT_CHANGED:
1172
0
        return "LOK_CALLBACK_CONTEXT_CHANGED";
1173
0
    case LOK_CALLBACK_SIGNATURE_STATUS:
1174
0
        return "LOK_CALLBACK_SIGNATURE_STATUS";
1175
0
    case LOK_CALLBACK_PROFILE_FRAME:
1176
0
        return "LOK_CALLBACK_PROFILE_FRAME";
1177
0
    case LOK_CALLBACK_CELL_SELECTION_AREA:
1178
0
        return "LOK_CALLBACK_CELL_SELECTION_AREA";
1179
0
    case LOK_CALLBACK_CELL_AUTO_FILL_AREA:
1180
0
        return "LOK_CALLBACK_CELL_AUTO_FILL_AREA";
1181
0
    case LOK_CALLBACK_TABLE_SELECTED:
1182
0
        return "LOK_CALLBACK_TABLE_SELECTED";
1183
0
    case LOK_CALLBACK_REFERENCE_MARKS:
1184
0
        return "LOK_CALLBACK_REFERENCE_MARKS";
1185
0
    case LOK_CALLBACK_CALC_FUNCTION_LIST:
1186
0
        return "LOK_CALLBACK_CALC_FUNCTION_LIST";
1187
0
    case LOK_CALLBACK_TAB_STOP_LIST:
1188
0
        return "LOK_CALLBACK_TAB_STOP_LIST";
1189
0
    case LOK_CALLBACK_FORM_FIELD_BUTTON:
1190
0
        return "LOK_CALLBACK_FORM_FIELD_BUTTON";
1191
0
    case LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY:
1192
0
        return "LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY";
1193
0
    case LOK_CALLBACK_DOCUMENT_BACKGROUND_COLOR:
1194
0
        return "LOK_CALLBACK_DOCUMENT_BACKGROUND_COLOR";
1195
0
    case LOK_COMMAND_BLOCKED:
1196
0
        return "LOK_COMMAND_BLOCKED";
1197
0
    case LOK_CALLBACK_SC_FOLLOW_JUMP:
1198
0
        return "LOK_CALLBACK_SC_FOLLOW_JUMP";
1199
0
    case LOK_CALLBACK_CONTENT_CONTROL:
1200
0
        return "LOK_CALLBACK_CONTENT_CONTROL";
1201
0
    case LOK_CALLBACK_PRINT_RANGES:
1202
0
        return "LOK_CALLBACK_PRINT_RANGES";
1203
0
    case LOK_CALLBACK_FONTS_MISSING:
1204
0
        return "LOK_CALLBACK_FONTS_MISSING";
1205
0
    case LOK_CALLBACK_MEDIA_SHAPE:
1206
0
        return "LOK_CALLBACK_MEDIA_SHAPE";
1207
0
    case LOK_CALLBACK_EXPORT_FILE:
1208
0
        return "LOK_CALLBACK_EXPORT_FILE";
1209
0
    case LOK_CALLBACK_VIEW_RENDER_STATE:
1210
0
        return "LOK_CALLBACK_VIEW_RENDER_STATE";
1211
0
    case LOK_CALLBACK_APPLICATION_BACKGROUND_COLOR:
1212
0
        return "LOK_CALLBACK_APPLICATION_BACKGROUND_COLOR";
1213
0
    case LOK_CALLBACK_A11Y_FOCUS_CHANGED:
1214
0
        return "LOK_CALLBACK_A11Y_FOCUS_CHANGED";
1215
0
    case LOK_CALLBACK_A11Y_CARET_CHANGED:
1216
0
        return "LOK_CALLBACK_A11Y_CARET_CHANGED";
1217
0
    case LOK_CALLBACK_A11Y_TEXT_SELECTION_CHANGED:
1218
0
        return "LOK_CALLBACK_A11Y_TEXT_SELECTION_CHANGED";
1219
0
    case LOK_CALLBACK_DOCUMENT_PASSWORD_RESET:
1220
0
        return "LOK_CALLBACK_DOCUMENT_PASSWORD_RESET";
1221
0
    case LOK_CALLBACK_A11Y_FOCUSED_CELL_CHANGED:
1222
0
        return "LOK_CALLBACK_A11Y_FOCUSED_CELL_CHANGED";
1223
0
    case LOK_CALLBACK_A11Y_EDITING_IN_SELECTION_STATE:
1224
0
        return "LOK_CALLBACK_A11Y_EDITING_IN_SELECTION_STATE";
1225
0
    case LOK_CALLBACK_A11Y_SELECTION_CHANGED:
1226
0
        return "LOK_CALLBACK_A11Y_SELECTION_CHANGED";
1227
0
    case LOK_CALLBACK_CORE_LOG:
1228
0
        return "LOK_CALLBACK_CORE_LOG";
1229
0
    case LOK_CALLBACK_TOOLTIP:
1230
0
        return "LOK_CALLBACK_TOOLTIP";
1231
0
    case LOK_CALLBACK_SHAPE_INNER_TEXT:
1232
0
        return "LOK_CALLBACK_SHAPE_INNER_TEXT";
1233
0
    }
1234
1235
0
    assert(!"Unknown LibreOfficeKitCallbackType type.");
1236
0
    return nullptr;
1237
0
}
Unexecuted instantiation: mouse.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: unohelp2.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: builder.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: DocWindow.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: lok.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: documen3.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: tablestyle.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: scmod.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: docsh4.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: drawsh2.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: undotab.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: docuno.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: cellsh3.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: drawview.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: formatsh.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: gridwin.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: gridwin2.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: gridwin4.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: tabview3.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: tabview4.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: tabvwsh4.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: tabvwshc.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: viewdata.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: viewfun2.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: viewfun3.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: inputhdl.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: checklistmenu.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: tabcont.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: editview.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: impedit.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: openuriexternally.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: sfxhelp.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: dispatch.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: unoctitm.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: dinfdlg.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: objmisc.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: objserv.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: sfxbasemodel.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: SidebarController.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: ipclient.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: lokcharthelper.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: lokhelper.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: viewsh.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: guisaveas.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: svdedtv1.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: svdmrkv.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: tablecontroller.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: ThemeColorChangerCommon.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: Annotation.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: xmlerror.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: ChartAreaPanel.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: ChartColorWrapper.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: ChartLinePanel.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: ChartController_Tools.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: ChartController_Window.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: view.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: cursor.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: docredln.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: nodes.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: editsh.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: feshview.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: atrref.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: apphdl.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: PostItMgr.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: basesh.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: tabsh.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: view2.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: viewdraw.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: viewling.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: viewsrch.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: viewstat.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: viewtab.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: unotxdoc.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: wrtsh2.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: wrtsh3.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: wrtsh4.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: bookmark.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: crsrsh.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: viscrs.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: edtwin2.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: svxruler.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: unomodel.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: ViewShellBase.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: drviews1.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: drviewse.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: drviewsk.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: sdview.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: sdpage.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: fusel.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: Outliner.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: drviews2.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: drviewsg.cxx:lokCallbackTypeToString(int)
1238
1239
typedef enum
1240
{
1241
    /// A mouse button has been pressed down.
1242
    LOK_MOUSEEVENT_MOUSEBUTTONDOWN,
1243
    /// A mouse button has been let go.
1244
    LOK_MOUSEEVENT_MOUSEBUTTONUP,
1245
    /// The mouse has moved while a button is pressed.
1246
    LOK_MOUSEEVENT_MOUSEMOVE
1247
}
1248
LibreOfficeKitMouseEventType;
1249
1250
typedef enum
1251
{
1252
    /// The start of selection is to be adjusted.
1253
    LOK_SETTEXTSELECTION_START,
1254
    /// The end of selection is to be adjusted.
1255
    LOK_SETTEXTSELECTION_END,
1256
    /// Both the start and the end of selection is to be adjusted.
1257
    LOK_SETTEXTSELECTION_RESET
1258
}
1259
LibreOfficeKitSetTextSelectionType;
1260
1261
typedef enum
1262
{
1263
    /**
1264
     * A move or a resize action starts. It is assumed that there is a valid
1265
     * graphic selection (see LOK_CALLBACK_GRAPHIC_SELECTION) and the supplied
1266
     * coordinates are the ones the user tapped on.
1267
     *
1268
     * The type of the action is move by default, unless the coordinates are
1269
     * the position of a handle (see below), in which case it's a resize.
1270
     *
1271
     * There are 8 handles for a graphic selection:
1272
     * - top-left, top-center, top-right
1273
     * - middle-left, middle-right
1274
     * - bottom-left, bottom-center, bottom-right
1275
     */
1276
    LOK_SETGRAPHICSELECTION_START,
1277
    /**
1278
     * A move or resize action stops. It is assumed that this is always used
1279
     * only after a LOK_SETTEXTSELECTION_START. The supplied coordinates are
1280
     * the ones where the user released the screen.
1281
     */
1282
    LOK_SETGRAPHICSELECTION_END
1283
}
1284
LibreOfficeKitSetGraphicSelectionType;
1285
1286
#endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
1287
1288
#ifdef __cplusplus
1289
}
1290
#endif
1291
1292
#endif // INCLUDED_LIBREOFFICEKIT_LIBREOFFICEKITENUMS_H
1293
1294
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */