@lynx-js/lynx-library-headers 0.0.1-alpha.4 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/index.js +1 -0
  2. package/package.json +3 -26
  3. package/README.md +0 -53
  4. package/include/base/include/value/lynx_api_types.h +0 -57
  5. package/include/base/include/value/lynx_value_api.h +0 -204
  6. package/include/base/include/value/lynx_value_types.h +0 -73
  7. package/include/capi/lynx_env_capi.h +0 -47
  8. package/include/capi/lynx_event_reporter_service_capi.h +0 -67
  9. package/include/capi/lynx_export.h +0 -27
  10. package/include/capi/lynx_extension_module_capi.h +0 -148
  11. package/include/capi/lynx_extension_module_types_capi.h +0 -17
  12. package/include/capi/lynx_generic_resource_fetcher_capi.h +0 -124
  13. package/include/capi/lynx_group_capi.h +0 -42
  14. package/include/capi/lynx_http_service_capi.h +0 -113
  15. package/include/capi/lynx_load_meta_capi.h +0 -52
  16. package/include/capi/lynx_log_capi.h +0 -69
  17. package/include/capi/lynx_memory_capi.h +0 -28
  18. package/include/capi/lynx_native_module_capi.h +0 -51
  19. package/include/capi/lynx_native_view_capi.h +0 -163
  20. package/include/capi/lynx_resource_request_capi.h +0 -71
  21. package/include/capi/lynx_resource_response_capi.h +0 -92
  22. package/include/capi/lynx_runtime_lifecycle_observer_capi.h +0 -62
  23. package/include/capi/lynx_security_service_capi.h +0 -52
  24. package/include/capi/lynx_service_center_capi.h +0 -50
  25. package/include/capi/lynx_template_bundle_capi.h +0 -39
  26. package/include/capi/lynx_template_data_capi.h +0 -33
  27. package/include/capi/lynx_trace_capi.h +0 -62
  28. package/include/capi/lynx_trail_service_capi.h +0 -35
  29. package/include/capi/lynx_types.h +0 -750
  30. package/include/capi/lynx_update_meta_capi.h +0 -33
  31. package/include/capi/lynx_view_builder_capi.h +0 -113
  32. package/include/capi/lynx_view_capi.h +0 -174
  33. package/include/capi/lynx_view_client_capi.h +0 -81
  34. package/include/capi/lynx_vsync_monitor_capi.h +0 -38
  35. package/include/capi/lynx_windowless_renderer_capi.h +0 -213
  36. package/include/js_native_api.h +0 -608
  37. package/include/js_native_api_types.h +0 -202
  38. package/include/lynx/base/include/value/lynx_api_types.h +0 -57
  39. package/include/lynx/base/include/value/lynx_value_api.h +0 -204
  40. package/include/lynx/base/include/value/lynx_value_types.h +0 -73
  41. package/include/lynx/extension.h +0 -6
  42. package/include/lynx/platform/embedder/public/capi/lynx_env_capi.h +0 -47
  43. package/include/lynx/platform/embedder/public/capi/lynx_event_reporter_service_capi.h +0 -67
  44. package/include/lynx/platform/embedder/public/capi/lynx_export.h +0 -27
  45. package/include/lynx/platform/embedder/public/capi/lynx_extension_module_capi.h +0 -148
  46. package/include/lynx/platform/embedder/public/capi/lynx_extension_module_types_capi.h +0 -17
  47. package/include/lynx/platform/embedder/public/capi/lynx_generic_resource_fetcher_capi.h +0 -124
  48. package/include/lynx/platform/embedder/public/capi/lynx_group_capi.h +0 -42
  49. package/include/lynx/platform/embedder/public/capi/lynx_http_service_capi.h +0 -113
  50. package/include/lynx/platform/embedder/public/capi/lynx_load_meta_capi.h +0 -52
  51. package/include/lynx/platform/embedder/public/capi/lynx_log_capi.h +0 -69
  52. package/include/lynx/platform/embedder/public/capi/lynx_memory_capi.h +0 -28
  53. package/include/lynx/platform/embedder/public/capi/lynx_native_module_capi.h +0 -51
  54. package/include/lynx/platform/embedder/public/capi/lynx_native_view_capi.h +0 -163
  55. package/include/lynx/platform/embedder/public/capi/lynx_resource_request_capi.h +0 -71
  56. package/include/lynx/platform/embedder/public/capi/lynx_resource_response_capi.h +0 -92
  57. package/include/lynx/platform/embedder/public/capi/lynx_runtime_lifecycle_observer_capi.h +0 -62
  58. package/include/lynx/platform/embedder/public/capi/lynx_security_service_capi.h +0 -52
  59. package/include/lynx/platform/embedder/public/capi/lynx_service_center_capi.h +0 -50
  60. package/include/lynx/platform/embedder/public/capi/lynx_template_bundle_capi.h +0 -39
  61. package/include/lynx/platform/embedder/public/capi/lynx_template_data_capi.h +0 -33
  62. package/include/lynx/platform/embedder/public/capi/lynx_trace_capi.h +0 -62
  63. package/include/lynx/platform/embedder/public/capi/lynx_trail_service_capi.h +0 -35
  64. package/include/lynx/platform/embedder/public/capi/lynx_types.h +0 -750
  65. package/include/lynx/platform/embedder/public/capi/lynx_update_meta_capi.h +0 -33
  66. package/include/lynx/platform/embedder/public/capi/lynx_view_builder_capi.h +0 -113
  67. package/include/lynx/platform/embedder/public/capi/lynx_view_capi.h +0 -174
  68. package/include/lynx/platform/embedder/public/capi/lynx_view_client_capi.h +0 -81
  69. package/include/lynx/platform/embedder/public/capi/lynx_vsync_monitor_capi.h +0 -38
  70. package/include/lynx/platform/embedder/public/capi/lynx_windowless_renderer_capi.h +0 -213
  71. package/include/lynx/platform/embedder/public/lynx_env.h +0 -104
  72. package/include/lynx/platform/embedder/public/lynx_event_reporter_service.h +0 -96
  73. package/include/lynx/platform/embedder/public/lynx_event_simulation_proxy.h +0 -31
  74. package/include/lynx/platform/embedder/public/lynx_extension_module.h +0 -521
  75. package/include/lynx/platform/embedder/public/lynx_generic_resource_fetcher.h +0 -178
  76. package/include/lynx/platform/embedder/public/lynx_group.h +0 -70
  77. package/include/lynx/platform/embedder/public/lynx_http_service.h +0 -211
  78. package/include/lynx/platform/embedder/public/lynx_load_meta.h +0 -120
  79. package/include/lynx/platform/embedder/public/lynx_native_module.h +0 -9
  80. package/include/lynx/platform/embedder/public/lynx_native_view.h +0 -201
  81. package/include/lynx/platform/embedder/public/lynx_resource_request.h +0 -56
  82. package/include/lynx/platform/embedder/public/lynx_resource_response.h +0 -63
  83. package/include/lynx/platform/embedder/public/lynx_runtime_lifecycle_observer.h +0 -102
  84. package/include/lynx/platform/embedder/public/lynx_security_service.h +0 -78
  85. package/include/lynx/platform/embedder/public/lynx_service_center.h +0 -64
  86. package/include/lynx/platform/embedder/public/lynx_template_bundle.h +0 -65
  87. package/include/lynx/platform/embedder/public/lynx_template_data.h +0 -104
  88. package/include/lynx/platform/embedder/public/lynx_trail_service.h +0 -81
  89. package/include/lynx/platform/embedder/public/lynx_update_meta.h +0 -56
  90. package/include/lynx/platform/embedder/public/lynx_value.h +0 -270
  91. package/include/lynx/platform/embedder/public/lynx_view.h +0 -364
  92. package/include/lynx/platform/embedder/public/lynx_view_client.h +0 -226
  93. package/include/lynx/platform/embedder/public/lynx_vsync_monitor.h +0 -70
  94. package/include/lynx/platform/embedder/public/lynx_windowless_renderer.h +0 -302
  95. package/include/lynx/registration.h +0 -178
  96. package/include/lynx_env.h +0 -104
  97. package/include/lynx_event_reporter_service.h +0 -96
  98. package/include/lynx_event_simulation_proxy.h +0 -31
  99. package/include/lynx_extension.h +0 -10
  100. package/include/lynx_extension_module.h +0 -521
  101. package/include/lynx_generic_resource_fetcher.h +0 -178
  102. package/include/lynx_group.h +0 -70
  103. package/include/lynx_http_service.h +0 -211
  104. package/include/lynx_load_meta.h +0 -120
  105. package/include/lynx_native_module.h +0 -9
  106. package/include/lynx_native_view.h +0 -201
  107. package/include/lynx_resource_request.h +0 -56
  108. package/include/lynx_resource_response.h +0 -63
  109. package/include/lynx_runtime_lifecycle_observer.h +0 -102
  110. package/include/lynx_security_service.h +0 -78
  111. package/include/lynx_service_center.h +0 -64
  112. package/include/lynx_template_bundle.h +0 -65
  113. package/include/lynx_template_data.h +0 -104
  114. package/include/lynx_trail_service.h +0 -81
  115. package/include/lynx_update_meta.h +0 -56
  116. package/include/lynx_value.h +0 -270
  117. package/include/lynx_view.h +0 -364
  118. package/include/lynx_view_client.h +0 -226
  119. package/include/lynx_vsync_monitor.h +0 -70
  120. package/include/lynx_windowless_renderer.h +0 -302
  121. package/include/napi-inl.deprecated.h +0 -186
  122. package/include/napi-inl.h +0 -6607
  123. package/include/napi.h +0 -3208
  124. package/include/node_api.h +0 -276
  125. package/include/node_api_types.h +0 -59
  126. package/include/third_party/weak-node-api/headers/js_native_api.h +0 -608
  127. package/include/third_party/weak-node-api/headers/js_native_api_types.h +0 -202
  128. package/include/third_party/weak-node-api/headers/napi-inl.deprecated.h +0 -186
  129. package/include/third_party/weak-node-api/headers/napi-inl.h +0 -6607
  130. package/include/third_party/weak-node-api/headers/napi.h +0 -3208
  131. package/include/third_party/weak-node-api/headers/node_api.h +0 -276
  132. package/include/third_party/weak-node-api/headers/node_api_types.h +0 -59
  133. package/include/third_party/weak-node-api/headers/weak_napi_defines.h +0 -331
  134. package/include/third_party/weak-node-api/headers/weak_napi_undefs.h +0 -282
  135. package/include/weak_napi_defines.h +0 -331
  136. package/include/weak_napi_undefs.h +0 -282
@@ -1,750 +0,0 @@
1
- // Copyright 2013 The Flutter Authors. All rights reserved.
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
- // Copyright 2025 The Lynx Authors. All rights reserved.
5
- // Licensed under the Apache License Version 2.0 that can be found in the
6
- // LICENSE file in the root directory of this source tree.
7
- #ifndef PLATFORM_EMBEDDER_PUBLIC_CAPI_LYNX_TYPES_H_
8
- #define PLATFORM_EMBEDDER_PUBLIC_CAPI_LYNX_TYPES_H_
9
-
10
- #include <stdbool.h>
11
- #include <stddef.h>
12
- #include <stdint.h>
13
-
14
- typedef enum {
15
- kLynxCursorTypeUnknown = 1,
16
-
17
- // cursor is a image which is downloaded from the internet.
18
- kLynxCursorTypeNet,
19
-
20
- // cursor is a image which is obtained from the local file.
21
- kLynxCursorTypeFile,
22
-
23
- /// Determines the pointer style based on the current content
24
- /// e.g. use the text style when the context is text
25
- kLynxCursorTypeAuto,
26
-
27
- /// Hide the cursor.
28
- ///
29
- /// Any cursor other than [none] or [MouseCursor.uncontrolled] unhides the
30
- /// cursor.
31
- kLynxCursorTypeNone,
32
-
33
- // STATUS
34
-
35
- /// The platform-dependent basic cursor.
36
- ///
37
- /// Typically the shape of an arrow.
38
- ///
39
- /// Corresponds to:
40
- ///
41
- /// * Android: TYPE_DEFAULT, TYPE_ARROW
42
- /// * Web: default
43
- /// * Windows: IDC_ARROW
44
- /// * Linux: default
45
- /// * macOS: arrowCursor
46
- kLynxCursorTypeBasic,
47
-
48
- /// A cursor that emphasizes an element being clickable, such as a
49
- /// hyperlink.
50
- ///
51
- /// Typically the shape of a pointing hand.
52
- ///
53
- /// Corresponds to:
54
- ///
55
- /// * Android: TYPE_HAND
56
- /// * Web: pointer
57
- /// * Windows: IDC_HAND
58
- /// * Linux: pointer
59
- /// * macOS: pointingHandCursor
60
- kLynxCursorTypeClick,
61
-
62
- /// A cursor indicating an operation that will not be carried out.
63
- ///
64
- /// Typically the shape of a circle with a diagonal line. May fall back to
65
- /// [noDrop].
66
- ///
67
- /// Corresponds to:
68
- ///
69
- /// * Android: TYPE_NO_DROP
70
- /// * Web: not-allowed
71
- /// * Windows: IDC_NO
72
- /// * Linux: not-allowed
73
- /// * macOS: operationNotAllowedCursor
74
- ///
75
- /// See also:
76
- ///
77
- /// * [noDrop], which indicates somewhere that the current item may not be
78
- /// dropped.
79
- kLynxCursorTypeForbidden,
80
-
81
- /// A cursor indicating the status that the program is busy and therefore
82
- /// can not be interacted with.
83
- ///
84
- /// Typically the shape of an hourglass or a watch.
85
- ///
86
- /// This cursor is not available as a system cursor on macOS. Although macOS
87
- /// displays a "spinning ball" cursor when busy, it's handled by the OS and
88
- /// not exposed for applications to choose.
89
- ///
90
- /// Corresponds to:
91
- ///
92
- /// * Android: TYPE_WAIT
93
- /// * Windows: IDC_WAIT
94
- /// * Web: wait
95
- /// * Linux: wait
96
- ///
97
- /// See also:
98
- ///
99
- /// * [progress], which is similar to [wait] but the program can still be
100
- /// interacted with.
101
- kLynxCursorTypeWait,
102
-
103
- /// A cursor indicating the status that the program is busy but can still be
104
- /// interacted with.
105
- ///
106
- /// Typically the shape of an arrow with an hourglass or a watch at the
107
- /// corner. Does *not* fall back to [wait] if unavailable.
108
- ///
109
- /// Corresponds to:
110
- ///
111
- /// * Web: progress
112
- /// * Windows: IDC_APPSTARTING
113
- /// * Linux: progress
114
- ///
115
- /// See also:
116
- ///
117
- /// * [wait], which is similar to [progress] but the program can not be
118
- /// interacted with.
119
- kLynxCursorTypeProgress,
120
-
121
- /// A cursor indicating somewhere the user can trigger a context menu.
122
- ///
123
- /// Typically the shape of an arrow with a small menu at the corner.
124
- ///
125
- /// Corresponds to:
126
- ///
127
- /// * Android: TYPE_CONTEXT_MENU
128
- /// * Web: context-menu
129
- /// * Linux: context-menu
130
- /// * macOS: contextualMenuCursor
131
- kLynxCursorTypeContextmenu,
132
-
133
- /// A cursor indicating help information.
134
- ///
135
- /// Typically the shape of a question mark, or an arrow therewith.
136
- ///
137
- /// Corresponds to:
138
- ///
139
- /// * Android: TYPE_HELP
140
- /// * Windows: IDC_HELP
141
- /// * Web: help
142
- /// * Linux: help
143
- kLynxCursorTypeHelp,
144
-
145
- // SELECTION
146
-
147
- /// A cursor indicating selectable text.
148
- ///
149
- /// Typically the shape of a capital I.
150
- ///
151
- /// Corresponds to:
152
- ///
153
- /// * Android: TYPE_TEXT
154
- /// * Web: text
155
- /// * Windows: IDC_IBEAM
156
- /// * Linux: text
157
- /// * macOS: IBeamCursor
158
- kLynxCursorTypeText,
159
-
160
- /// A cursor indicating selectable vertical text.
161
- ///
162
- /// Typically the shape of a capital I rotated to be horizontal. May fall
163
- /// back to [text].
164
- ///
165
- /// Corresponds to:
166
- ///
167
- /// * Android: TYPE_VERTICAL_TEXT
168
- /// * Web: vertical-text
169
- /// * Linux: vertical-text
170
- /// * macOS: IBeamCursorForVerticalLayout
171
- kLynxCursorTypeVerticalText,
172
-
173
- /// A cursor indicating selectable table cells.
174
- ///
175
- /// Typically the shape of a hollow plus sign.
176
- ///
177
- /// Corresponds to:
178
- ///
179
- /// * Android: TYPE_CELL
180
- /// * Web: cell
181
- /// * Linux: cell
182
- kLynxCursorTypeCell,
183
-
184
- /// A cursor indicating precise selection, such as selecting a pixel in a
185
- /// bitmap.
186
- ///
187
- /// Typically the shape of a crosshair.
188
- ///
189
- /// Corresponds to:
190
- ///
191
- /// * Android: TYPE_CROSSHAIR
192
- /// * Web: crosshair
193
- /// * Windows: IDC_CROSS
194
- /// * Linux: crosshair
195
- /// * macOS: crosshairCursor
196
- kLynxCursorTypePrecise,
197
-
198
- // DRAG-AND-DROP
199
-
200
- /// A cursor indicating moving something.
201
- ///
202
- /// Typically the shape of four-way arrow. May fall back to [allScroll].
203
- ///
204
- /// Corresponds to:
205
- ///
206
- /// * Android: TYPE_ALL_SCROLL
207
- /// * Windows: IDC_SIZEALL
208
- /// * Web: move
209
- /// * Linux: move
210
- kLynxCursorTypeMove,
211
-
212
- /// A cursor indicating something that can be dragged.
213
- ///
214
- /// Typically the shape of an open hand.
215
- ///
216
- /// Corresponds to:
217
- ///
218
- /// * Android: TYPE_GRAB
219
- /// * Web: grab
220
- /// * Linux: grab
221
- /// * macOS: openHandCursor
222
- kLynxCursorTypeGrab,
223
-
224
- /// A cursor indicating something that is being dragged.
225
- ///
226
- /// Typically the shape of a closed hand.
227
- ///
228
- /// Corresponds to:
229
- ///
230
- /// * Android: TYPE_GRABBING
231
- /// * Web: grabbing
232
- /// * Linux: grabbing
233
- /// * macOS: closedHandCursor
234
- kLynxCursorTypeGrabbing,
235
-
236
- /// A cursor indicating somewhere that the current item may not be dropped.
237
- ///
238
- /// Typically the shape of a hand with a [forbidden] sign at the corner. May
239
- /// fall back to [forbidden].
240
- ///
241
- /// Corresponds to:
242
- ///
243
- /// * Android: TYPE_NO_DROP
244
- /// * Web: no-drop
245
- /// * Windows: IDC_NO
246
- /// * Linux: no-drop
247
- /// * macOS: operationNotAllowedCursor
248
- ///
249
- /// See also:
250
- ///
251
- /// * [forbidden], which indicates an action that will not be carried out.
252
- kLynxCursorTypeNoDrop,
253
-
254
- /// A cursor indicating that the current operation will create an alias of,
255
- /// or a shortcut of the item.
256
- ///
257
- /// Typically the shape of an arrow with a shortcut icon at the corner.
258
- ///
259
- /// Corresponds to:
260
- ///
261
- /// * Android: TYPE_ALIAS
262
- /// * Web: alias
263
- /// * Linux: alias
264
- /// * macOS: dragLinkCursor
265
- kLynxCursorTypeAlias,
266
-
267
- /// A cursor indicating that the current operation will copy the item.
268
- ///
269
- /// Typically the shape of an arrow with a boxed plus sign at the corner.
270
- ///
271
- /// Corresponds to:
272
- ///
273
- /// * Android: TYPE_COPY
274
- /// * Web: copy
275
- /// * Linux: copy
276
- /// * macOS: dragCopyCursor
277
- kLynxCursorTypeSystemMouseCursor,
278
-
279
- /// A cursor indicating that the current operation will result in the
280
- /// disappearance of the item.
281
- ///
282
- /// Typically the shape of an arrow with a cloud of smoke at the corner.
283
- ///
284
- /// Corresponds to:
285
- ///
286
- /// * macOS: disappearingItemCursor
287
- kLynxCursorTypeDisappearing,
288
-
289
- // RESIZING AND SCROLLING
290
-
291
- /// A cursor indicating scrolling in any direction.
292
- ///
293
- /// Typically the shape of a dot surrounded by 4 arrows.
294
- ///
295
- /// Corresponds to:
296
- ///
297
- /// * Android: TYPE_ALL_SCROLL
298
- /// * Windows: IDC_SIZEALL
299
- /// * Web: all-scroll
300
- /// * Linux: all-scroll
301
- ///
302
- /// See also:
303
- ///
304
- /// * [move], which indicates moving in any direction.
305
- kLynxCursorTypeAllScroll,
306
-
307
- /// A cursor indicating resizing an object bidirectionally from its left or
308
- /// right edge.
309
- ///
310
- /// Typically the shape of a bidirectional arrow pointing left and right.
311
- ///
312
- /// Corresponds to:
313
- ///
314
- /// * Android: TYPE_HORIZONTAL_DOUBLE_ARROW
315
- /// * Web: ew-resize
316
- /// * Windows: IDC_SIZEWE
317
- /// * Linux: ew-resize
318
- /// * macOS: resizeLeftRightCursor
319
- kLynxCursorTypeResizeLeftRight,
320
-
321
- /// A cursor indicating resizing an object bidirectionally from its top or
322
- /// bottom edge.
323
- ///
324
- /// Typically the shape of a bidirectional arrow pointing up and down.
325
- ///
326
- /// Corresponds to:
327
- ///
328
- /// * Android: TYPE_VERTICAL_DOUBLE_ARROW
329
- /// * Web: ns-resize
330
- /// * Windows: IDC_SIZENS
331
- /// * Linux: ns-resize
332
- /// * macOS: resizeUpDownCursor
333
- kLynxCursorTypeResizeUpDown,
334
-
335
- /// A cursor indicating resizing an object bidirectionally from its top left
336
- /// or bottom right corner.
337
- ///
338
- /// Typically the shape of a bidirectional arrow pointing upper left and
339
- /// lower right.
340
- ///
341
- /// Corresponds to:
342
- ///
343
- /// * Android: TYPE_TOP_LEFT_DIAGONAL_DOUBLE_ARROW
344
- /// * Web: nwse-resize
345
- /// * Windows: IDC_SIZENWSE
346
- /// * Linux: nwse-resize
347
- kLynxCursorTypeResizeUpLeftDownRight,
348
-
349
- /// A cursor indicating resizing an object bidirectionally from its top
350
- /// right or bottom left corner.
351
- ///
352
- /// Typically the shape of a bidirectional arrow pointing upper right and
353
- /// lower left.
354
- ///
355
- /// Corresponds to:
356
- ///
357
- /// * Android: TYPE_TOP_RIGHT_DIAGONAL_DOUBLE_ARROW
358
- /// * Windows: IDC_SIZENESW
359
- /// * Web: nesw-resize
360
- /// * Linux: nesw-resize
361
- kLynxCursorTypeResizeUpRightDownLeft,
362
-
363
- /// A cursor indicating resizing an object from its top edge.
364
- ///
365
- /// Typically the shape of an arrow pointing up. May fallback to
366
- /// [resizeUpDown].
367
- ///
368
- /// Corresponds to:
369
- ///
370
- /// * Android: TYPE_VERTICAL_DOUBLE_ARROW
371
- /// * Web: n-resize
372
- /// * Windows: IDC_SIZENS
373
- /// * Linux: n-resize
374
- /// * macOS: resizeUpCursor
375
- kLynxCursorTypeResizeUp,
376
-
377
- /// A cursor indicating resizing an object from its bottom edge.
378
- ///
379
- /// Typically the shape of an arrow pointing down. May fallback to
380
- /// [resizeUpDown].
381
- ///
382
- /// Corresponds to:
383
- ///
384
- /// * Android: TYPE_VERTICAL_DOUBLE_ARROW
385
- /// * Web: s-resize
386
- /// * Windows: IDC_SIZENS
387
- /// * Linux: s-resize
388
- /// * macOS: resizeDownCursor
389
- kLynxCursorTypeResizeDown,
390
-
391
- /// A cursor indicating resizing an object from its left edge.
392
- ///
393
- /// Typically the shape of an arrow pointing left. May fallback to
394
- /// [resizeLeftRight].
395
- ///
396
- /// Corresponds to:
397
- ///
398
- /// * Android: TYPE_HORIZONTAL_DOUBLE_ARROW
399
- /// * Web: w-resize
400
- /// * Windows: IDC_SIZEWE
401
- /// * Linux: w-resize
402
- /// * macOS: resizeLeftCursor
403
- kLynxCursorTypeResizeLeft,
404
-
405
- /// A cursor indicating resizing an object from its right edge.
406
- ///
407
- /// Typically the shape of an arrow pointing right. May fallback to
408
- /// [resizeLeftRight].
409
- ///
410
- /// Corresponds to:
411
- ///
412
- /// * Android: TYPE_HORIZONTAL_DOUBLE_ARROW
413
- /// * Web: e-resize
414
- /// * Windows: IDC_SIZEWE
415
- /// * Linux: e-resize
416
- /// * macOS: resizeRightCursor
417
- kLynxCursorTypeResizeRight,
418
-
419
- /// A cursor indicating resizing an object from its top-left corner.
420
- ///
421
- /// Typically the shape of an arrow pointing upper left. May fallback to
422
- /// [resizeUpLeftDownRight].
423
- ///
424
- /// Corresponds to:
425
- ///
426
- /// * Android: TYPE_TOP_LEFT_DIAGONAL_DOUBLE_ARROW
427
- /// * Web: nw-resize
428
- /// * Windows: IDC_SIZENWSE
429
- /// * Linux: nw-resize
430
- kLynxCursorTypeResizeUpLeft,
431
-
432
- /// A cursor indicating resizing an object from its top-right corner.
433
- ///
434
- /// Typically the shape of an arrow pointing upper right. May fallback to
435
- /// [resizeUpRightDownLeft].
436
- ///
437
- /// Corresponds to:
438
- ///
439
- /// * Android: TYPE_TOP_RIGHT_DIAGONAL_DOUBLE_ARROW
440
- /// * Web: ne-resize
441
- /// * Windows: IDC_SIZENESW
442
- /// * Linux: ne-resize
443
- kLynxCursorTypeResizeUpRight,
444
-
445
- /// A cursor indicating resizing an object from its bottom-left corner.
446
- ///
447
- /// Typically the shape of an arrow pointing lower left. May fallback to
448
- /// [resizeUpRightDownLeft].
449
- ///
450
- /// Corresponds to:
451
- ///
452
- /// * Android: TYPE_TOP_RIGHT_DIAGONAL_DOUBLE_ARROW
453
- /// * Web: sw-resize
454
- /// * Windows: IDC_SIZENESW
455
- /// * Linux: sw-resize
456
- kLynxCursorTypeResizeDownLeft,
457
-
458
- /// A cursor indicating resizing an object from its bottom-right corner.
459
- ///
460
- /// Typically the shape of an arrow pointing lower right. May fallback to
461
- /// [resizeUpLeftDownRight].
462
- ///
463
- /// Corresponds to:
464
- ///
465
- /// * Android: TYPE_TOP_LEFT_DIAGONAL_DOUBLE_ARROW
466
- /// * Web: se-resize
467
- /// * Windows: IDC_SIZENWSE
468
- /// * Linux: se-resize
469
- kLynxCursorTypeResizeDownRight,
470
-
471
- /// A cursor indicating resizing a column, or an item horizontally.
472
- ///
473
- /// Typically the shape of arrows pointing left and right with a vertical
474
- /// bar separating them. May fallback to [resizeLeftRight].
475
- ///
476
- /// Corresponds to:
477
- ///
478
- /// * Android: TYPE_HORIZONTAL_DOUBLE_ARROW
479
- /// * Web: col-resize
480
- /// * Windows: IDC_SIZEWE
481
- /// * Linux: col-resize
482
- /// * macOS: resizeLeftRightCursor
483
- kLynxCursorTypeResizeColumn,
484
-
485
- /// A cursor indicating resizing a row, or an item vertically.
486
- ///
487
- /// Typically the shape of arrows pointing up and down with a horizontal bar
488
- /// separating them. May fallback to [resizeUpDown].
489
- ///
490
- /// Corresponds to:
491
- ///
492
- /// * Android: TYPE_VERTICAL_DOUBLE_ARROW
493
- /// * Web: row-resize
494
- /// * Windows: IDC_SIZENS
495
- /// * Linux: row-resize
496
- /// * macOS: resizeUpDownCursor
497
- kLynxCursorTypeResizeRow,
498
-
499
- // OTHER OPERATIONS
500
-
501
- /// A cursor indicating zooming in.
502
- ///
503
- /// Typically a magnifying glass with a plus sign.
504
- ///
505
- /// Corresponds to:
506
- ///
507
- /// * Android: TYPE_ZOOM_IN
508
- /// * Web: zoom-in
509
- /// * Linux: zoom-in
510
- kLynxCursorTypeZoomIn,
511
-
512
- /// A cursor indicating zooming out.
513
- ///
514
- /// Typically a magnifying glass with a minus sign.
515
- ///
516
- /// Corresponds to:
517
- ///
518
- /// * Android: TYPE_ZOOM_OUT
519
- /// * Web: zoom-out
520
- /// * Linux: zoom-out
521
- kLynxCursorTypeZoomOut,
522
- } lynx_cursor_type_e;
523
-
524
- typedef enum {
525
- kLynxPointerPhaseCancel,
526
- /// The pointer, which must have been down (see kDown), is now up.
527
- ///
528
- /// For touch, this means that the pointer is no longer in contact with the
529
- /// screen. For a mouse, it means the last button was released. Note that if
530
- /// any other buttons are still pressed when one button is released, that
531
- /// should be sent as a kMove rather than a kUp.
532
- kLynxPointerPhaseUp,
533
- /// The pointer, which must have been been up, is now down.
534
- ///
535
- /// For touch, this means that the pointer has come into contact with the
536
- /// screen. For a mouse, it means a button is now pressed. Note that if any
537
- /// other buttons are already pressed when a new button is pressed, that
538
- /// should be sent as a kMove rather than a kDown.
539
- kLynxPointerPhaseDown,
540
- /// The pointer moved while down.
541
- ///
542
- /// This is also used for changes in button state that don't cause a kDown or
543
- /// kUp, such as releasing one of two pressed buttons.
544
- kLynxPointerPhaseMove,
545
- /// The pointer is now sending input to Lynx. For instance, a mouse has
546
- /// entered the area where the Lynx content is displayed.
547
- ///
548
- /// A pointer should always be added before sending any other events.
549
- kLynxPointerPhaseAdd,
550
- /// The pointer is no longer sending input to Lynx. For instance, a mouse
551
- /// has left the area where the Lynx content is displayed.
552
- ///
553
- /// A removed pointer should no longer send events until sending a new kAdd.
554
- kLynxPointerPhaseRemove,
555
- /// The pointer moved while up.
556
- kLynxPointerPhaseHover,
557
- /// A pan/zoom started on this pointer.
558
- kLynxPointerPhasePanZoomStart,
559
- /// The pan/zoom updated.
560
- kLynxPointerPhasePanZoomUpdate,
561
- /// The pan/zoom ended.
562
- kLynxPointerPhasePanZoomEnd,
563
- } lynx_pointer_phase_e;
564
-
565
- typedef enum {
566
- kLynxPointerSignalKindNone,
567
- kLynxPointerSignalKindScroll,
568
- kLynxPointerSignalKindScrollInertiaCancel,
569
- kLynxPointerSignalKindScale,
570
- } lynx_pointer_signal_kind_e;
571
-
572
- typedef enum {
573
- kLynxPointerDeviceKindMouse = 1,
574
- kLynxPointerDeviceKindTouch,
575
- kLynxPointerDeviceKindStylus,
576
- kLynxPointerDeviceKindTrackpad,
577
- } lynx_pointer_device_kind_e;
578
-
579
- /// Flags for the `buttons` field of `lynx_pointer_event_t` when `device_kind`
580
- /// is `kLynxPointerDeviceKindMouse`.
581
- typedef enum {
582
- kLynxPointerMouseButtonsMousePrimary = 1 << 0,
583
- kLynxPointerMouseButtonsMouseSecondary = 1 << 1,
584
- kLynxPointerMouseButtonsMouseMiddle = 1 << 2,
585
- kLynxPointerMouseButtonsMouseBack = 1 << 3,
586
- kLynxPointerMouseButtonsMouseForward = 1 << 4,
587
- /// If a mouse has more than five buttons, send higher bit shifted values
588
- /// corresponding to the button number: 1 << 5 for the 6th, etc.
589
- } lynx_pointer_mouse_buttons_e;
590
-
591
- typedef enum {
592
- kLynxKeyEventTypeUp = 1,
593
- kLynxKeyEventTypeDown,
594
- kLynxKeyEventTypeRepeat,
595
- } lynx_key_event_type_e;
596
-
597
- typedef enum {
598
- kLynxEventTypeUnknown = 0,
599
-
600
- // touch events
601
- kLynxEventTypeTouchStart,
602
- kLynxEventTypeTouchMove,
603
- kLynxEventTypeTouchCancel,
604
- kLynxEventTypeTouchEnd,
605
- kLynxEventTypeTap,
606
- kLynxEventTypeLongPress,
607
-
608
- // mouse events
609
- kLynxEventTypeMouseDown,
610
- kLynxEventTypeMouseUp,
611
- kLynxEventTypeMouseMove,
612
- kLynxEventTypeMouseClick,
613
- kLynxEventTypeMouseDoubleClick,
614
- kLynxEventTypeMouseLongPress,
615
- kLynxEventTypeMouseEnter,
616
- kLynxEventTypeMouseOver,
617
- kLynxEventTypeMouseLeave,
618
- // mouse drag and drop events
619
- kLynxEventTypeDragEnter,
620
- kLynxEventTypeDragOver,
621
- kLynxEventTypeDragLeave,
622
- kLynxEventTypeDrop,
623
-
624
- // wheel event
625
- kLynxEventTypeWheel,
626
-
627
- // key events
628
- kLynxEventTypeKeyDown,
629
- kLynxEventTypeKeyUp,
630
- // animation events
631
- kLynxEventTypeAnimationStart,
632
- kLynxEventTypeAnimationRepeat,
633
- kLynxEventTypeAnimationEnd,
634
- kLynxEventTypeAnimationCancel,
635
- kLynxEventTypeTransitionStart,
636
- kLynxEventTypeTransitionEnd,
637
- } lynx_event_type_e;
638
-
639
- typedef struct lynx_pointer_event_t {
640
- /// The size of this struct. Must be sizeof(lynx_pointer_event_t).
641
- size_t struct_size;
642
- lynx_pointer_phase_e phase;
643
- /// The timestamp at which the pointer event was generated.
644
- size_t timestamp;
645
- /// The x coordinate of the pointer event in physical pixels.
646
- double x;
647
- /// The y coordinate of the pointer event in physical pixels.
648
- double y;
649
- /// An optional device identifier. If this is not specified, it is assumed
650
- /// that the embedder has no multi-touch capability.
651
- int32_t device;
652
- lynx_pointer_signal_kind_e signal_kind;
653
- /// The x offset of the scroll in physical pixels.
654
- double scroll_delta_x;
655
- /// The y offset of the scroll in physical pixels.
656
- double scroll_delta_y;
657
- /// The type of the device generating this event.
658
- /// Backwards compatibility note: If this is not set, the device will be
659
- /// treated as a mouse, with the primary button set for `kDown` and `kMove`.
660
- /// If set explicitly to `kLynxPointerDeviceKindMouse`, you must set the
661
- /// correct buttons.
662
- lynx_pointer_device_kind_e device_kind;
663
- /// The buttons currently pressed, if any.
664
- int64_t buttons;
665
- /// The x offset of the pan/zoom in physical pixels.
666
- double pan_x;
667
- /// The y offset of the pan/zoom in physical pixels.
668
- double pan_y;
669
- /// The scale of the pan/zoom, where 1.0 is the initial scale.
670
- double scale;
671
- /// The rotation of the pan/zoom in radians, where 0.0 is the initial angle.
672
- double rotation;
673
- /// Whether the event is triggered by the touchpad
674
- size_t is_precise_scroll;
675
- } lynx_pointer_event_t;
676
-
677
- /// A structure to represent a key event.
678
- typedef struct lynx_key_event_t {
679
- /// The size of this struct. Must be sizeof(lynx_key_event_t).
680
- size_t struct_size;
681
- /// The timestamp at which the key event was generated.
682
- double timestamp;
683
- /// The event kind.
684
- lynx_key_event_type_e type;
685
- /// The USB HID code for the physical key of the event.
686
- ///
687
- /// For the full definition and list of pre-defined physical keys.
688
- ///
689
- /// The only case that `physical` might be 0 is when this is an empty event.
690
- uint64_t physical;
691
- /// The key ID for the logical key of this event.
692
- ///
693
- /// For the full definition and a list of pre-defined logical keys.
694
- ///
695
- /// The only case that `logical` might be 0 is when this is an empty event.
696
- uint64_t logical;
697
- /// Null-terminated character input from the event. Can be null. Ignored for
698
- /// up events.
699
- const char* character;
700
- /// True if this event does not correspond to a native event.
701
- ///
702
- /// The embedder is likely to skip events and/or construct new events that do
703
- /// not correspond to any native events in order to conform the regularity
704
- /// of events (as documented in `lynx_key_event_t`). An example is when a key
705
- /// up is missed due to loss of window focus, on a platform that provides
706
- /// query to key pressing status, the embedder might realize that the key has
707
- /// been released at the next key event, and should construct a synthesized up
708
- /// event immediately before the actual event.
709
- ///
710
- /// An event being synthesized means that the `timestamp` might greatly
711
- /// deviate from the actual time when the event occurs physically.
712
- bool synthesized;
713
- } lynx_key_event_t;
714
-
715
- typedef struct lynx_task_runner_* lynx_task_runner;
716
-
717
- typedef struct lynx_task_t {
718
- lynx_task_runner runner;
719
- uint64_t task;
720
- } lynx_task_t;
721
-
722
- ///
723
- /// Describes how to interpret the components of a pixel.
724
- ///
725
- typedef enum lynx_color_type_e {
726
- ///
727
- /// RGBA with 8 bits per pixel (32bits total).
728
- ///
729
- kLynxColorTypeRGBA_8888,
730
-
731
- ///
732
- /// BGRA with 8 bits per pixel (32bits total).
733
- ///
734
- kLynxColorTypeBGRA_8888,
735
- } lynx_color_type_e;
736
-
737
- typedef struct lynx_accelerated_paint_info_t {
738
- /// The size of this struct. Must be sizeof(lynx_accelerated_paint_info_t).
739
- size_t struct_size;
740
- /// The handle to the shared texture.
741
- void* shared_texture_handle;
742
- /// The color type of the shared texture.
743
- lynx_color_type_e color_type;
744
- /// The width of the shared texture in pixels.
745
- uint32_t width;
746
- /// The height of the shared texture in pixels.
747
- uint32_t height;
748
- } lynx_accelerated_paint_info_t;
749
-
750
- #endif // PLATFORM_EMBEDDER_PUBLIC_CAPI_LYNX_TYPES_H_