Coverage Report

Created: 2025-11-16 09:57

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
     * Callback related to native dialogs generated in JavaScript from
714
     * the description.
715
     */
716
    LOK_CALLBACK_JSDIALOG = 46,
717
718
    /**
719
     * Send the list of functions whose name starts with the characters entered
720
     * by the user in the formula input bar.
721
     */
722
    LOK_CALLBACK_CALC_FUNCTION_LIST = 47,
723
724
    /**
725
     * Sends the tab stop list for the current of the current cursor position.
726
     */
727
    LOK_CALLBACK_TAB_STOP_LIST = 48,
728
729
    /**
730
     * Sends all information for displaying form field button for a text based field.
731
     *
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.
734
     *
735
     * The payload example:
736
     * {
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"
744
     *      }
745
     * }
746
     *
747
     * or
748
     * {
749
     *      "action": "hide",
750
     *      "type": "drop-down"
751
     * }
752
     */
753
    LOK_CALLBACK_FORM_FIELD_BUTTON = 49,
754
755
    /**
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.
759
     *
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]]]]'
763
     *
764
     * For example, the payload 'rows sizes groups' indicates that the row heights
765
     * and row-groups data have changed.
766
     */
767
    LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY = 50,
768
769
    /**
770
     * When for the current cell is defined an input help text.
771
     *
772
     * The payload format is JSON: { "title": "title text", "content": "content text" }
773
     */
774
    LOK_CALLBACK_VALIDITY_INPUT_HELP = 51,
775
776
    /**
777
     * Indicates the document background color in the payload as a RGB hex string (RRGGBB).
778
     */
779
    LOK_CALLBACK_DOCUMENT_BACKGROUND_COLOR = 52,
780
781
    /**
782
     * When a user tries to use command which is restricted for that user
783
     */
784
    LOK_COMMAND_BLOCKED = 53,
785
786
    /**
787
     * The position of the cell cursor jumped to.
788
     *
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.
793
     *
794
     * Rectangle format is the same as LOK_CALLBACK_INVALIDATE_TILES.
795
     */
796
    LOK_CALLBACK_SC_FOLLOW_JUMP = 54,
797
798
    /**
799
     * Sends all information for displaying metadata for a text based content control.
800
     *
801
     * Examples:
802
     * Entered a rich text content control:
803
     * {
804
     *     "action": "show",
805
     *     "alias": "my alias", // omitted if empty
806
     *     "rectangles": "1418, 1694, 720, 551; 10291, 1418, 1099, 275"
807
     * }
808
     *
809
     * Left a rich text content control:
810
     * {
811
     *     "action": "hide"
812
     * }
813
     *
814
     * Entered a dropdown content control:
815
     * {
816
     *     "action": "show",
817
     *     "rectangles": "...",
818
     *     "items": ["red", "green", "blue"]
819
     * }
820
     *
821
     * Clicked on a picture content control's placeholder:
822
     * {
823
     *     "action": "change-picture"
824
     * }
825
     *
826
     * Entered a date content control:
827
     * {
828
     *     "action": "show",
829
     *     "rectangles": "...",
830
     *     "date": "true"
831
     * }
832
     */
833
    LOK_CALLBACK_CONTENT_CONTROL = 55,
834
835
    /**
836
     * This is Calc specific. The payload contains print ranges of all
837
     * sheets in the document.
838
     *
839
     * Payload example:
840
     * {
841
     *     "printranges" : [
842
     *         {
843
     *             "sheet": 0,
844
     *             "ranges": [
845
     *                 [0, 0, 4, 5],
846
     *                 [5, 100, 8, 150]
847
     *             ]
848
     *         },
849
     *         {
850
     *             "sheet": 3,
851
     *             "ranges": [
852
     *                 [1, 0, 6, 10],
853
     *                 [3, 200, 6, 230]
854
     *             ]
855
     *         }
856
     *     ]
857
     * }
858
     *
859
     * The format of the inner "ranges" array for each sheet is
860
     * [<startColumn>, <startRow>, <endColumn>, <endRow>]
861
     */
862
    LOK_CALLBACK_PRINT_RANGES = 56,
863
864
    /**
865
     * Informs the LibreOfficeKit client that a font specified in the
866
     * document is missing.
867
     *
868
     * This callback is emitted right after the document has been loaded.
869
     *
870
     * Payload example:
871
     * {
872
     *     "fontsmissing": [
873
     *         "Some Random Font",
874
     *         "Another Font"
875
     *     ]
876
     * }
877
     *
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
880
     * missing.
881
     *
882
     */
883
    LOK_CALLBACK_FONTS_MISSING = 57,
884
885
    /**
886
     * Insertion, removal, movement, and selection of a media shape.
887
     * The payload is a json with the relevant details.
888
     *
889
     *      {
890
     *          "action": "insert",
891
     *          "id": 123456,
892
     *          "url": "file:// ..."
893
     *          "x": ...,
894
     *          "y": ...,
895
     *      }
896
     *
897
     *      where the "svg" property is a string containing an svg document
898
     *      which is a representation of the pie segment.
899
     */
900
    LOK_CALLBACK_MEDIA_SHAPE = 58,
901
902
    /**
903
     * The document is available to download by the client.
904
     *
905
     * Payload example:
906
     * "file:///tmp/hello-world.pdf"
907
     */
908
    LOK_CALLBACK_EXPORT_FILE = 59,
909
910
    /**
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.
914
     *
915
     * Payload is an opaque string that matches this set of states.
916
     * this will be emitted after creating a new view.
917
     */
918
    LOK_CALLBACK_VIEW_RENDER_STATE = 60,
919
920
    /**
921
     * Informs the LibreOfficeKit client that the background color surrounding
922
     * the document has changed.
923
    */
924
   LOK_CALLBACK_APPLICATION_BACKGROUND_COLOR = 61,
925
926
    /**
927
     * Accessibility event: a paragraph got focus.
928
     * The payload is a json with the following structure.
929
     *
930
     *   {
931
     *       "content": "<paragraph text>"
932
     *       "position": N
933
     *       "start": N1
934
     *       "end": N2
935
     *       "listPrefixLength": L
936
     *   }
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.
940
     */
941
    LOK_CALLBACK_A11Y_FOCUS_CHANGED = 62,
942
943
    /**
944
     * Accessibility event: text cursor position has changed.
945
     *
946
     *  {
947
     *      "position": N
948
     *  }
949
     *  where N is the position of the text cursor inside the focused paragraph.
950
     */
951
    LOK_CALLBACK_A11Y_CARET_CHANGED = 63,
952
953
    /**
954
     * Accessibility event: text selection has changed.
955
     *
956
     *  {
957
     *      "start": N1
958
     *      "end": N2
959
     *  }
960
     *  where [N1,N2] is the range of the text selection inside the focused paragraph.
961
     */
962
    LOK_CALLBACK_A11Y_TEXT_SELECTION_CHANGED = 64,
963
964
    /**
965
     * Informs the LibreOfficeKit client that the color palettes have changed.
966
    */
967
    LOK_CALLBACK_COLOR_PALETTES = 65,
968
969
    /**
970
     * Informs that the document password has been successfully changed.
971
     * The payload contains the new password and the type.
972
    */
973
    LOK_CALLBACK_DOCUMENT_PASSWORD_RESET = 66,
974
975
    /**
976
     * Accessibility event: a cell got focus.
977
     * The payload is a json with the following structure.
978
     *
979
     *   {
980
     *       "outCount": <number of tables user gets out of>
981
     *       "inList": [
982
     *           {
983
     *               "rowCount": <number of rows for outer table user got in>
984
     *               "colCount": <number of columns for outer table user got in>
985
     *           },
986
     *           ...
987
     *           {
988
     *               "rowCount": <number of rows for inner table user got in>
989
     *               "colCount": <number of columns for inner table user got in>
990
     *           }
991
     *       ]
992
     *       "row": <current row index>
993
     *       "col": <current column index>
994
     *       "rowSpan": <row span for current cell>
995
     *       "colSpan": <column span for current cell>
996
     *       "paragraph": {
997
     *           <same structure as for LOK_CALLBACK_A11Y_FOCUS_CHANGED>
998
     *        }
999
     *   }
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.
1003
     */
1004
    LOK_CALLBACK_A11Y_FOCUSED_CELL_CHANGED = 67,
1005
1006
    /**
1007
     * Accessibility event: text editing in a shape or cell has been enabled/disabled
1008
     *
1009
     *  {
1010
     *      "cell": true/false (editing a cell ?)
1011
     *      "enabled": true|false
1012
     *      "selection": a selection description
1013
     *      "paragraph": focused paragraph
1014
     *  }
1015
     */
1016
    LOK_CALLBACK_A11Y_EDITING_IN_SELECTION_STATE = 68,
1017
1018
    /**
1019
     * Accessibility event: a selection (of a shape/graphic, etc.) has changed
1020
     *
1021
     *  {
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
1026
     *  }
1027
     */
1028
    LOK_CALLBACK_A11Y_SELECTION_CHANGED = 69,
1029
1030
    /**
1031
     * Forwarding logs from core to client can be useful
1032
     * for keep track of the real core/client event sequence
1033
     *
1034
     * Payload is the log to be sent
1035
     */
1036
    LOK_CALLBACK_CORE_LOG = 70,
1037
1038
    /**
1039
     * Tooltips shown in the documents, like redline author and date.
1040
     *
1041
     *  {
1042
     *      "text": "text of tooltip",
1043
     *      "rectangle": "x, y, width, height"
1044
     *  }
1045
     */
1046
    LOK_CALLBACK_TOOLTIP = 71,
1047
1048
    /**
1049
     * Used for sending the rectangle for text inside a shape/textbox
1050
     *
1051
     *  Payload contains the rectangle details
1052
     */
1053
    LOK_CALLBACK_SHAPE_INNER_TEXT = 72,
1054
        /**
1055
     * The key vertical ruler related properties on change are reported by this.
1056
     *
1057
     * The payload format is:
1058
     *
1059
     * {
1060
     *      "margin1": "...",
1061
     *      "margin2": "...",
1062
     *      "leftOffset": "...",
1063
     *      "pageOffset": "...",
1064
     *      "pageWidth": "...",
1065
     *      "unit": "..."
1066
     *  }
1067
     *
1068
     * Here all aproperties are same as described in svxruler.
1069
     */
1070
    LOK_CALLBACK_VERTICAL_RULER_UPDATE = 73
1071
1072
}
1073
LibreOfficeKitCallbackType;
1074
1075
typedef enum
1076
{
1077
    /// A key on the keyboard is pressed.
1078
    LOK_KEYEVENT_KEYINPUT,
1079
    /// A key on the keyboard is released.
1080
    LOK_KEYEVENT_KEYUP
1081
}
1082
LibreOfficeKitKeyEventType;
1083
1084
typedef enum
1085
{
1086
    /// cf. SalEvent::ExtTextInput
1087
    LOK_EXT_TEXTINPUT,
1088
    /// cf. SalEvent::ExtTextInputPos
1089
    LOK_EXT_TEXTINPUT_POS,
1090
    /// cf. SalEvent::EndExtTextInput
1091
    LOK_EXT_TEXTINPUT_END
1092
}
1093
LibreOfficeKitExtTextInputType;
1094
1095
/// Returns the string representation of a LibreOfficeKitCallbackType enumeration element.
1096
static inline const char* lokCallbackTypeToString(int nType)
1097
0
{
1098
0
    switch (static_cast<LibreOfficeKitCallbackType>(nType))
1099
0
    {
1100
0
    case LOK_CALLBACK_INVALIDATE_TILES:
1101
0
        return "LOK_CALLBACK_INVALIDATE_TILES";
1102
0
    case LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR:
1103
0
        return "LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR";
1104
0
    case LOK_CALLBACK_TEXT_SELECTION:
1105
0
        return "LOK_CALLBACK_TEXT_SELECTION";
1106
0
    case LOK_CALLBACK_TEXT_SELECTION_START:
1107
0
        return "LOK_CALLBACK_TEXT_SELECTION_START";
1108
0
    case LOK_CALLBACK_TEXT_SELECTION_END:
1109
0
        return "LOK_CALLBACK_TEXT_SELECTION_END";
1110
0
    case LOK_CALLBACK_CURSOR_VISIBLE:
1111
0
        return "LOK_CALLBACK_CURSOR_VISIBLE";
1112
0
    case LOK_CALLBACK_VIEW_CURSOR_VISIBLE:
1113
0
        return "LOK_CALLBACK_VIEW_CURSOR_VISIBLE";
1114
0
    case LOK_CALLBACK_GRAPHIC_SELECTION:
1115
0
        return "LOK_CALLBACK_GRAPHIC_SELECTION";
1116
0
    case LOK_CALLBACK_GRAPHIC_VIEW_SELECTION:
1117
0
        return "LOK_CALLBACK_GRAPHIC_VIEW_SELECTION";
1118
0
    case LOK_CALLBACK_CELL_CURSOR:
1119
0
        return "LOK_CALLBACK_CELL_CURSOR";
1120
0
    case LOK_CALLBACK_HYPERLINK_CLICKED:
1121
0
        return "LOK_CALLBACK_HYPERLINK_CLICKED";
1122
0
    case LOK_CALLBACK_MOUSE_POINTER:
1123
0
        return "LOK_CALLBACK_MOUSE_POINTER";
1124
0
    case LOK_CALLBACK_STATE_CHANGED:
1125
0
        return "LOK_CALLBACK_STATE_CHANGED";
1126
0
    case LOK_CALLBACK_STATUS_INDICATOR_START:
1127
0
        return "LOK_CALLBACK_STATUS_INDICATOR_START";
1128
0
    case LOK_CALLBACK_STATUS_INDICATOR_SET_VALUE:
1129
0
        return "LOK_CALLBACK_STATUS_INDICATOR_SET_VALUE";
1130
0
    case LOK_CALLBACK_STATUS_INDICATOR_FINISH:
1131
0
        return "LOK_CALLBACK_STATUS_INDICATOR_FINISH";
1132
0
    case LOK_CALLBACK_SEARCH_NOT_FOUND:
1133
0
        return "LOK_CALLBACK_SEARCH_NOT_FOUND";
1134
0
    case LOK_CALLBACK_DOCUMENT_SIZE_CHANGED:
1135
0
        return "LOK_CALLBACK_DOCUMENT_SIZE_CHANGED";
1136
0
    case LOK_CALLBACK_SET_PART:
1137
0
        return "LOK_CALLBACK_SET_PART";
1138
0
    case LOK_CALLBACK_SEARCH_RESULT_SELECTION:
1139
0
        return "LOK_CALLBACK_SEARCH_RESULT_SELECTION";
1140
0
    case LOK_CALLBACK_DOCUMENT_PASSWORD:
1141
0
        return "LOK_CALLBACK_DOCUMENT_PASSWORD";
1142
0
    case LOK_CALLBACK_DOCUMENT_PASSWORD_TO_MODIFY:
1143
0
        return "LOK_CALLBACK_DOCUMENT_PASSWORD_TO_MODIFY";
1144
0
    case LOK_CALLBACK_CONTEXT_MENU:
1145
0
        return "LOK_CALLBACK_CONTEXT_MENU";
1146
0
    case LOK_CALLBACK_INVALIDATE_VIEW_CURSOR:
1147
0
        return "LOK_CALLBACK_INVALIDATE_VIEW_CURSOR";
1148
0
    case LOK_CALLBACK_TEXT_VIEW_SELECTION:
1149
0
        return "LOK_CALLBACK_TEXT_VIEW_SELECTION";
1150
0
    case LOK_CALLBACK_CELL_VIEW_CURSOR:
1151
0
        return "LOK_CALLBACK_CELL_VIEW_CURSOR";
1152
0
    case LOK_CALLBACK_CELL_ADDRESS:
1153
0
        return "LOK_CALLBACK_CELL_ADDRESS";
1154
0
    case LOK_CALLBACK_CELL_FORMULA:
1155
0
        return "LOK_CALLBACK_CELL_FORMULA";
1156
0
    case LOK_CALLBACK_UNO_COMMAND_RESULT:
1157
0
        return "LOK_CALLBACK_UNO_COMMAND_RESULT";
1158
0
    case LOK_CALLBACK_ERROR:
1159
0
        return "LOK_CALLBACK_ERROR";
1160
0
    case LOK_CALLBACK_VIEW_LOCK:
1161
0
        return "LOK_CALLBACK_VIEW_LOCK";
1162
0
    case LOK_CALLBACK_REDLINE_TABLE_SIZE_CHANGED:
1163
0
        return "LOK_CALLBACK_REDLINE_TABLE_SIZE_CHANGED";
1164
0
    case LOK_CALLBACK_REDLINE_TABLE_ENTRY_MODIFIED:
1165
0
        return "LOK_CALLBACK_REDLINE_TABLE_ENTRY_MODIFIED";
1166
0
    case LOK_CALLBACK_INVALIDATE_HEADER:
1167
0
        return "LOK_CALLBACK_INVALIDATE_HEADER";
1168
0
    case LOK_CALLBACK_COMMENT:
1169
0
        return "LOK_CALLBACK_COMMENT";
1170
0
    case LOK_CALLBACK_RULER_UPDATE:
1171
0
        return "LOK_CALLBACK_RULER_UPDATE";
1172
0
    case LOK_CALLBACK_VERTICAL_RULER_UPDATE:
1173
0
        return "LOK_CALLBACK_VERTICAL_RULER_UPDATE";
1174
0
    case LOK_CALLBACK_WINDOW:
1175
0
        return "LOK_CALLBACK_WINDOW";
1176
0
    case LOK_CALLBACK_VALIDITY_LIST_BUTTON:
1177
0
        return "LOK_CALLBACK_VALIDITY_LIST_BUTTON";
1178
0
    case LOK_CALLBACK_VALIDITY_INPUT_HELP:
1179
0
        return "LOK_CALLBACK_VALIDITY_INPUT_HELP";
1180
0
    case LOK_CALLBACK_CLIPBOARD_CHANGED:
1181
0
        return "LOK_CALLBACK_CLIPBOARD_CHANGED";
1182
0
    case LOK_CALLBACK_CONTEXT_CHANGED:
1183
0
        return "LOK_CALLBACK_CONTEXT_CHANGED";
1184
0
    case LOK_CALLBACK_SIGNATURE_STATUS:
1185
0
        return "LOK_CALLBACK_SIGNATURE_STATUS";
1186
0
    case LOK_CALLBACK_PROFILE_FRAME:
1187
0
        return "LOK_CALLBACK_PROFILE_FRAME";
1188
0
    case LOK_CALLBACK_CELL_SELECTION_AREA:
1189
0
        return "LOK_CALLBACK_CELL_SELECTION_AREA";
1190
0
    case LOK_CALLBACK_CELL_AUTO_FILL_AREA:
1191
0
        return "LOK_CALLBACK_CELL_AUTO_FILL_AREA";
1192
0
    case LOK_CALLBACK_TABLE_SELECTED:
1193
0
        return "LOK_CALLBACK_TABLE_SELECTED";
1194
0
    case LOK_CALLBACK_REFERENCE_MARKS:
1195
0
        return "LOK_CALLBACK_REFERENCE_MARKS";
1196
0
    case LOK_CALLBACK_JSDIALOG:
1197
0
        return "LOK_CALLBACK_JSDIALOG";
1198
0
    case LOK_CALLBACK_CALC_FUNCTION_LIST:
1199
0
        return "LOK_CALLBACK_CALC_FUNCTION_LIST";
1200
0
    case LOK_CALLBACK_TAB_STOP_LIST:
1201
0
        return "LOK_CALLBACK_TAB_STOP_LIST";
1202
0
    case LOK_CALLBACK_FORM_FIELD_BUTTON:
1203
0
        return "LOK_CALLBACK_FORM_FIELD_BUTTON";
1204
0
    case LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY:
1205
0
        return "LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY";
1206
0
    case LOK_CALLBACK_DOCUMENT_BACKGROUND_COLOR:
1207
0
        return "LOK_CALLBACK_DOCUMENT_BACKGROUND_COLOR";
1208
0
    case LOK_COMMAND_BLOCKED:
1209
0
        return "LOK_COMMAND_BLOCKED";
1210
0
    case LOK_CALLBACK_SC_FOLLOW_JUMP:
1211
0
        return "LOK_CALLBACK_SC_FOLLOW_JUMP";
1212
0
    case LOK_CALLBACK_CONTENT_CONTROL:
1213
0
        return "LOK_CALLBACK_CONTENT_CONTROL";
1214
0
    case LOK_CALLBACK_PRINT_RANGES:
1215
0
        return "LOK_CALLBACK_PRINT_RANGES";
1216
0
    case LOK_CALLBACK_FONTS_MISSING:
1217
0
        return "LOK_CALLBACK_FONTS_MISSING";
1218
0
    case LOK_CALLBACK_MEDIA_SHAPE:
1219
0
        return "LOK_CALLBACK_MEDIA_SHAPE";
1220
0
    case LOK_CALLBACK_EXPORT_FILE:
1221
0
        return "LOK_CALLBACK_EXPORT_FILE";
1222
0
    case LOK_CALLBACK_VIEW_RENDER_STATE:
1223
0
        return "LOK_CALLBACK_VIEW_RENDER_STATE";
1224
0
    case LOK_CALLBACK_APPLICATION_BACKGROUND_COLOR:
1225
0
        return "LOK_CALLBACK_APPLICATION_BACKGROUND_COLOR";
1226
0
    case LOK_CALLBACK_A11Y_FOCUS_CHANGED:
1227
0
        return "LOK_CALLBACK_A11Y_FOCUS_CHANGED";
1228
0
    case LOK_CALLBACK_A11Y_CARET_CHANGED:
1229
0
        return "LOK_CALLBACK_A11Y_CARET_CHANGED";
1230
0
    case LOK_CALLBACK_A11Y_TEXT_SELECTION_CHANGED:
1231
0
        return "LOK_CALLBACK_A11Y_TEXT_SELECTION_CHANGED";
1232
0
    case LOK_CALLBACK_COLOR_PALETTES:
1233
0
        return "LOK_CALLBACK_COLOR_PALETTES";
1234
0
    case LOK_CALLBACK_DOCUMENT_PASSWORD_RESET:
1235
0
        return "LOK_CALLBACK_DOCUMENT_PASSWORD_RESET";
1236
0
    case LOK_CALLBACK_A11Y_FOCUSED_CELL_CHANGED:
1237
0
        return "LOK_CALLBACK_A11Y_FOCUSED_CELL_CHANGED";
1238
0
    case LOK_CALLBACK_A11Y_EDITING_IN_SELECTION_STATE:
1239
0
        return "LOK_CALLBACK_A11Y_EDITING_IN_SELECTION_STATE";
1240
0
    case LOK_CALLBACK_A11Y_SELECTION_CHANGED:
1241
0
        return "LOK_CALLBACK_A11Y_SELECTION_CHANGED";
1242
0
    case LOK_CALLBACK_CORE_LOG:
1243
0
        return "LOK_CALLBACK_CORE_LOG";
1244
0
    case LOK_CALLBACK_TOOLTIP:
1245
0
        return "LOK_CALLBACK_TOOLTIP";
1246
0
    case LOK_CALLBACK_SHAPE_INNER_TEXT:
1247
0
        return "LOK_CALLBACK_SHAPE_INNER_TEXT";
1248
0
    }
1249
1250
0
    assert(!"Unknown LibreOfficeKitCallbackType type.");
1251
0
    return nullptr;
1252
0
}
Unexecuted instantiation: mouse.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: unohelp2.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: DocWindow.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: jsdialogsender.cxx:lokCallbackTypeToString(int)
Unexecuted instantiation: documen3.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: 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)
1253
1254
typedef enum
1255
{
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
1262
}
1263
LibreOfficeKitMouseEventType;
1264
1265
typedef enum
1266
{
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
1273
}
1274
LibreOfficeKitSetTextSelectionType;
1275
1276
typedef enum
1277
{
1278
    /**
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.
1282
     *
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.
1285
     *
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
1290
     */
1291
    LOK_SETGRAPHICSELECTION_START,
1292
    /**
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.
1296
     */
1297
    LOK_SETGRAPHICSELECTION_END
1298
}
1299
LibreOfficeKitSetGraphicSelectionType;
1300
1301
#endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
1302
1303
#ifdef __cplusplus
1304
}
1305
#endif
1306
1307
#endif // INCLUDED_LIBREOFFICEKIT_LIBREOFFICEKITENUMS_H
1308
1309
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */