update emoji autocorrect entries from po-files
[LibreOffice.git] / include / LibreOfficeKit / LibreOfficeKitEnums.h
blob5293aa9be4c0772c7b905446fcbda6c9662b9b9d
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #ifndef INCLUDED_LIBREOFFICEKIT_LIBREOFFICEKITENUMS_H
11 #define INCLUDED_LIBREOFFICEKIT_LIBREOFFICEKITENUMS_H
13 #ifdef __cplusplus
14 extern "C"
16 #endif
18 #ifdef LOK_USE_UNSTABLE_API
19 typedef enum
21 LOK_DOCTYPE_TEXT,
22 LOK_DOCTYPE_SPREADSHEET,
23 LOK_DOCTYPE_PRESENTATION,
24 LOK_DOCTYPE_DRAWING,
25 LOK_DOCTYPE_OTHER
27 LibreOfficeKitDocumentType;
29 typedef enum
31 LOK_PARTMODE_DEFAULT,
32 LOK_PARTMODE_SLIDE,
33 LOK_PARTMODE_NOTES,
34 LOK_PARTMODE_SLIDENOTES,
35 LOK_PARTMODE_EMBEDDEDOBJ
37 LibreOfficeKitPartMode;
39 typedef enum
41 /**
42 * Any tiles which are over the rectangle described in the payload are no
43 * longer valid.
45 * Rectangle format: "width, height, x, y", where all numbers are document
46 * coordinates, in twips. When all tiles are supposed to be dropped, the
47 * format is the "EMPTY" string.
49 LOK_CALLBACK_INVALIDATE_TILES,
50 /**
51 * The size and/or the position of the visible cursor changed.
53 * Rectangle format is the same as LOK_CALLBACK_INVALIDATE_TILES.
55 LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR,
56 /**
57 * The list of rectangles representing the current text selection changed.
59 * List format is "rectangle1[; rectangle2[; ...]]" (without quotes and
60 * brackets), where rectangleN has the same format as
61 * LOK_CALLBACK_INVALIDATE_TILES. When there is no selection, an empty
62 * string is provided.
64 LOK_CALLBACK_TEXT_SELECTION,
65 /**
66 * The position and size of the cursor rectangle at the text
67 * selection start. It is used to draw the selection handles.
69 * This callback must be called prior to LOK_CALLBACK_TEXT_SELECTION every
70 * time the selection is updated.
72 * Rectangle format is the same as LOK_CALLBACK_INVALIDATE_TILES.
74 LOK_CALLBACK_TEXT_SELECTION_START,
75 /**
76 * The position and size of the cursor rectangle at the text
77 * selection end. It is used to draw the selection handles.
79 * This callback must be called prior to LOK_CALLBACK_TEXT_SELECTION every
80 * time the selection is updated.
82 * Rectangle format is the same as LOK_CALLBACK_INVALIDATE_TILES.
84 LOK_CALLBACK_TEXT_SELECTION_END,
85 /**
86 * The blinking text cursor is now visible or not.
88 * Clients should assume that this is true initially and are expected to
89 * hide the blinking cursor at the rectangle described by
90 * LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR once it becomes false. Payload is
91 * either the "true" or the "false" string.
93 LOK_CALLBACK_CURSOR_VISIBLE,
94 /**
95 * The size and/or the position of the graphic selection changed.
97 * Rectangle format is the same as LOK_CALLBACK_INVALIDATE_TILES.
99 LOK_CALLBACK_GRAPHIC_SELECTION,
102 * User clicked on an hyperlink that should be handled by other
103 * applications accordingly.
105 LOK_CALLBACK_HYPERLINK_CLICKED,
108 * Emit state update to the client.
109 * For example, when cursor is on bold text, this callback is triggered
110 * with payload: ".uno:Bold=true"
112 LOK_CALLBACK_STATE_CHANGED,
115 * Start a "status indicator" (here restricted to a progress bar type
116 * indicator). The payload is the descriptive text (or empty). Even if
117 * there is no documentation that would promise so, we assume that de facto
118 * for a document being viewed or edited, there will be at most one status
119 * indicator, and its descriptive text will not change.
121 * Note that for the case of the progress indication during loading of a
122 * document, the status indicator callbacks will arrive to the callback
123 * registered for the LibreOfficeKit (singleton) object, not a
124 * LibreOfficeKitDocument one, because we are in the very progress of
125 * loading a docuemnt and then constructing a LibreOfficeKitDocument
126 * object.
128 LOK_CALLBACK_STATUS_INDICATOR_START,
131 * Sets the numeric value of the status indicator.
132 * The payload should be a percentage, an integer between 0 and 100.
134 LOK_CALLBACK_STATUS_INDICATOR_SET_VALUE,
137 * Ends the status indicator.
139 * Not necessarily ever emitted.
141 LOK_CALLBACK_STATUS_INDICATOR_FINISH,
144 * No match was found for the search input
146 LOK_CALLBACK_SEARCH_NOT_FOUND,
149 * Size of the document changed.
151 * Payload format is "width, height", i.e. clients get the new size without
152 * having to do an explicit lok::Document::getDocumentSize() call.
154 LOK_CALLBACK_DOCUMENT_SIZE_CHANGED,
157 * The current part number is changed.
159 * Payload is a single 0-based integer.
161 LOK_CALLBACK_SET_PART
163 LibreOfficeKitCallbackType;
165 typedef enum
167 /// A key on the keyboard is pressed.
168 LOK_KEYEVENT_KEYINPUT,
169 /// A key on the keyboard is released.
170 LOK_KEYEVENT_KEYUP
172 LibreOfficeKitKeyEventType;
174 typedef enum
176 /// A pressed gesture has started.
177 LOK_MOUSEEVENT_MOUSEBUTTONDOWN,
178 /// A pressed gesture has finished.
179 LOK_MOUSEEVENT_MOUSEBUTTONUP,
180 /// A change has happened during a press gesture.
181 LOK_MOUSEEVENT_MOUSEMOVE
183 LibreOfficeKitMouseEventType;
185 typedef enum
187 /// The start of selection is to be adjusted.
188 LOK_SETTEXTSELECTION_START,
189 /// The end of selection is to be adjusted.
190 LOK_SETTEXTSELECTION_END,
191 /// Both the start and the end of selection is to be adjusted.
192 LOK_SETTEXTSELECTION_RESET
194 LibreOfficeKitSetTextSelectionType;
196 typedef enum
199 * A move or a resize action starts. It is assumed that there is a valid
200 * graphic selection (see LOK_CALLBACK_GRAPHIC_SELECTION) and the supplied
201 * coordinates are the ones the user tapped on.
203 * The type of the action is move by default, unless the coordinates are
204 * the position of a handle (see below), in which case it's a resize.
206 * There are 8 handles for a graphic selection:
207 * - top-left, top-center, top-right
208 * - middle-left, middle-right
209 * - bottom-left, bottom-center, bottom-right
211 LOK_SETGRAPHICSELECTION_START,
213 * A move or resize action stops. It is assumed that this is always used
214 * only after a LOK_SETTEXTSELECTION_START. The supplied coordinates are
215 * the ones where the user released the screen.
217 LOK_SETGRAPHICSELECTION_END
219 LibreOfficeKitSetGraphicSelectionType;
221 #endif // LOK_USE_UNSTABLE_API
223 #ifdef __cplusplus
225 #endif
227 #endif // INCLUDED_LIBREOFFICEKIT_LIBREOFFICEKITENUMS_H
229 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */