zng_app/view_process/raw_events.rs
1//! Events directly from the view-process targeting the app windows.
2//!
3//! These events get processed by [app extensions] to generate the events used in widgets, for example
4//! the `KeyboardManager` uses the [`RAW_KEY_INPUT_EVENT`] into focus targeted events.
5//!
6//! # Synthetic Input
7//!
8//! You can [`notify`] these events to fake hardware input, please be careful that you mimic the exact sequence a real
9//! hardware would generate, [app extensions] can assume that the raw events are correct. The [`DeviceId`] for fake
10//! input must be unique but constant for each distinctive *synthetic event source*.
11//!
12//! [app extensions]: crate::AppExtension
13//! [`RAW_KEY_INPUT_EVENT`]: crate::view_process::raw_events::RAW_KEY_INPUT_EVENT
14//! [`notify`]: crate::event::Event::notify
15//! [`DeviceId`]: crate::view_process::raw_device_events::DeviceId
16
17use zng_layout::unit::{DipPoint, DipSideOffsets, DipSize, Factor, PxPoint, PxRect};
18use zng_txt::Txt;
19use zng_view_api::{
20 AxisId, DragDropId, Ime,
21 api_extension::{ApiExtensionId, ApiExtensionPayload},
22 config::{
23 AnimationsConfig, ChromeConfig, ColorsConfig, FontAntiAliasing, KeyRepeatConfig, LocaleConfig, MultiClickConfig, TouchConfig,
24 },
25 drag_drop::{DragDropData, DragDropEffect},
26 keyboard::{Key, KeyCode, KeyLocation, KeyState},
27 mouse::{ButtonState, MouseButton, MouseScrollDelta},
28 touch::{TouchPhase, TouchUpdate},
29 window::{EventCause, FrameId, FrameWaitId, HeadlessOpenData, MonitorInfo, WindowStateAll},
30};
31
32use crate::{
33 event::{event, event_args},
34 window::{MonitorId, WindowId},
35};
36
37use super::{ViewHeadless, ViewImage, ViewWindow, WindowOpenData, raw_device_events::DeviceId};
38
39event_args! {
40 /// Arguments for the [`RAW_KEY_INPUT_EVENT`].
41 pub struct RawKeyInputArgs {
42 /// Window that received the event.
43 pub window_id: WindowId,
44
45 /// Keyboard device that generated the event.
46 pub device_id: DeviceId,
47
48 /// Physical key.
49 pub key_code: KeyCode,
50
51 /// The location of the key on the keyboard.
52 pub key_location: KeyLocation,
53
54 /// If the key was pressed or released.
55 pub state: KeyState,
56
57 /// Semantic key.
58 ///
59 /// Pressing `Shift+A` key will produce `Key::Char('a')` in QWERTY keyboards, the modifiers are not applied.
60 pub key: Key,
61 /// Semantic key modified by the current active modifiers.
62 ///
63 /// Pressing `Shift+A` key will produce `Key::Char('A')` in QWERTY keyboards, the modifiers are applied.
64 pub key_modified: Key,
65
66 /// Text typed.
67 ///
68 /// This is only set for `KeyState::Pressed` of a key that generates text.
69 ///
70 /// This is usually the `key_modified` char, but is also `'\r'` for `Key::Enter`. On Windows when a dead key was
71 /// pressed earlier but cannot be combined with the character from this key press, the produced text
72 /// will consist of two characters: the dead-key-character followed by the character resulting from this key press.
73 pub text: Txt,
74
75 ..
76
77 /// Broadcast to all widgets.
78 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
79 list.search_all();
80 }
81 }
82
83 /// Arguments for the [`RAW_IME_EVENT`].
84 pub struct RawImeArgs {
85 /// Window that received the event.
86 pub window_id: WindowId,
87
88 /// The IME event.
89 pub ime: Ime,
90
91 ..
92
93 /// Broadcast to all widgets.
94 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
95 list.search_all();
96 }
97 }
98
99 /// Arguments for the [`RAW_WINDOW_FOCUS_EVENT`].
100 pub struct RawWindowFocusArgs {
101 /// Window that load focus.
102 pub prev_focus: Option<WindowId>,
103
104 /// Window that got focus.
105 pub new_focus: Option<WindowId>,
106
107 ..
108
109 /// Broadcast to all widgets.
110 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
111 list.search_all();
112 }
113 }
114
115 /// Arguments for the [`RAW_FRAME_RENDERED_EVENT`].
116 pub struct RawFrameRenderedArgs {
117 /// Window that presents the rendered frame.
118 pub window_id: WindowId,
119
120 /// Frame tag.
121 pub frame_id: FrameId,
122
123 /// The frame pixels if it was requested when the frame request was sent to the view process.
124 pub frame_image: Option<ViewImage>,
125
126 ..
127
128 /// Broadcast to all widgets.
129 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
130 list.search_all();
131 }
132 }
133
134 /// Arguments for the [`RAW_WINDOW_CHANGED_EVENT`].
135 pub struct RawWindowChangedArgs {
136 /// Window that has moved, resized or has a state change.
137 pub window_id: WindowId,
138
139 /// New state if any part of it has changed.
140 pub state: Option<WindowStateAll>,
141
142 /// New window position if it was moved.
143 ///
144 /// The values are `(global_position, position_in_monitor)`.
145 pub position: Option<(PxPoint, DipPoint)>,
146
147 /// New window monitor.
148 ///
149 /// The window's monitor change when it is moved enough so that most of the
150 /// client area is in the new monitor screen.
151 pub monitor: Option<MonitorId>,
152
153 /// New window size if it was resized.
154 pub size: Option<DipSize>,
155
156 /// New window safe padding.
157 pub safe_padding: Option<DipSideOffsets>,
158
159 /// If the app or operating system caused the change.
160 pub cause: EventCause,
161
162 /// If the view-process is blocking the event loop for a time waiting for a frame for the new `size` this
163 /// ID must be send with the frame to signal that it is the frame for the new size.
164 ///
165 /// Event loop implementations can use this to resize without visible artifacts
166 /// like the clear color flashing on the window corners, there is a timeout to this delay but it
167 /// can be a noticeable stutter, a [`render`] or [`render_update`] request for the window unblocks the loop early
168 /// to continue the resize operation.
169 ///
170 /// [`render`]: crate::view_process::ViewRenderer::render
171 /// [`render_update`]: crate::view_process::ViewRenderer::render_update
172 pub frame_wait_id: Option<FrameWaitId>,
173
174 ..
175
176 /// Broadcast to all widgets.
177 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
178 list.search_all();
179 }
180 }
181
182 /// Arguments for the [`RAW_WINDOW_OPEN_EVENT`].
183 pub struct RawWindowOpenArgs {
184 /// Window that finished opening.
185 pub window_id: WindowId,
186
187 /// Live connection to the window in the view-process.
188 pub window: ViewWindow,
189
190 /// Extra data send by the view-process.
191 pub data: WindowOpenData,
192
193 ..
194
195 /// Broadcast to all widgets.
196 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
197 list.search_all();
198 }
199 }
200
201 /// Arguments for the [`RAW_HEADLESS_OPEN_EVENT`].
202 pub struct RawHeadlessOpenArgs {
203 /// Window id that represents the headless surface that finished opening.
204 pub window_id: WindowId,
205
206 /// Live connection to the headless surface in the view-process.
207 pub surface: ViewHeadless,
208
209 /// Extra data send by the view-process.
210 pub data: HeadlessOpenData,
211
212 ..
213
214 /// Broadcast to all widgets.
215 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
216 list.search_all();
217 }
218 }
219
220 /// Arguments for the [`RAW_WINDOW_OR_HEADLESS_OPEN_ERROR_EVENT`].
221 pub struct RawWindowOrHeadlessOpenErrorArgs {
222 /// Window id that failed to open.
223 pub window_id: WindowId,
224 /// Error message from the view-process.
225 pub error: Txt,
226
227 ..
228
229 /// Broadcast to all widgets.
230 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
231 list.search_all();
232 }
233 }
234
235 /// Arguments for the [`RAW_WINDOW_CLOSE_REQUESTED_EVENT`].
236 pub struct RawWindowCloseRequestedArgs {
237 /// Window that was requested to close.
238 pub window_id: WindowId,
239
240 ..
241
242 /// Broadcast to all widgets.
243 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
244 list.search_all();
245 }
246 }
247
248 /// Arguments for the [`RAW_WINDOW_CLOSE_EVENT`].
249 pub struct RawWindowCloseArgs {
250 /// Window that has closed.
251 pub window_id: WindowId,
252
253 ..
254
255 /// Broadcast to all widgets.
256 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
257 list.search_all();
258 }
259 }
260
261 /// Arguments for the [`RAW_DRAG_HOVERED_EVENT`].
262 pub struct RawDragHoveredArgs {
263 /// Window where it was dragged over.
264 pub window_id: WindowId,
265
266 /// Data payload.
267 pub data: Vec<DragDropData>,
268 /// Allowed effects.
269 pub allowed: DragDropEffect,
270
271 ..
272
273 /// Broadcast to all widgets.
274 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
275 list.search_all()
276 }
277 }
278
279 /// Arguments for the [`RAW_DRAG_MOVED_EVENT`].
280 pub struct RawDragMovedArgs {
281 /// Window that is hovered by drag&drop.
282 pub window_id: WindowId,
283
284 /// Cursor positions in between the previous event and this one.
285 ///
286 /// Drag move events can be coalesced, i.e. multiple moves packed into a single event.
287 pub coalesced_pos: Vec<DipPoint>,
288
289 /// Position of the cursor over the window, (0, 0) is the top-left.
290 pub position: DipPoint,
291
292 ..
293
294 /// Broadcast to all widgets.
295 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
296 list.search_all()
297 }
298 }
299
300 /// Arguments for the [`RAW_DRAG_DROPPED_EVENT`].
301 pub struct RawDragDroppedArgs {
302 /// Window where it was dropped.
303 pub window_id: WindowId,
304
305 /// Data payload.
306 pub data: Vec<DragDropData>,
307 /// Allowed effects.
308 pub allowed: DragDropEffect,
309 /// ID of this drop operation.
310 ///
311 /// Handlers must call `drag_dropped` with this ID and what effect was applied to the data.
312 pub drop_id: DragDropId,
313
314 ..
315
316 /// Broadcast to all widgets.
317 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
318 list.search_all()
319 }
320 }
321
322 /// Arguments for the [`RAW_DRAG_CANCELLED_EVENT`].
323 pub struct RawDragCancelledArgs {
324 /// Window where the file was previously dragged over.
325 pub window_id: WindowId,
326
327 ..
328
329 /// Broadcast to all widgets.
330 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
331 list.search_all()
332 }
333 }
334
335 /// Arguments for the [`RAW_APP_DRAG_ENDED_EVENT`].
336 pub struct RawAppDragEndedArgs {
337 /// Window that started the drag operation.
338 pub window_id: WindowId,
339
340 /// ID of the drag & drop operation.
341 pub id: DragDropId,
342
343 /// Effect applied to the data by the drop target.
344 ///
345 /// Is a single flag if the data was dropped in a valid drop target, or is empty if was canceled.
346 pub applied: DragDropEffect,
347
348 ..
349
350 /// Broadcast to all widgets.
351 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
352 list.search_all()
353 }
354 }
355
356 /// Arguments for the [`RAW_MOUSE_MOVED_EVENT`].
357 pub struct RawMouseMovedArgs {
358 /// Window the mouse was moved over.
359 pub window_id: WindowId,
360
361 /// Device that generated this event.
362 pub device_id: DeviceId,
363
364 /// Positions of the mouse in between the previous event and this one.
365 ///
366 /// Mouse move events can be coalesced, i.e. multiple mouse moves packed into a single event.
367 pub coalesced_pos: Vec<DipPoint>,
368
369 /// Position of the mouse over the window, (0, 0) is the top-left.
370 pub position: DipPoint,
371
372 ..
373
374 /// Broadcast to all widgets.
375 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
376 list.search_all()
377 }
378 }
379
380 /// Arguments for the [`RAW_MOUSE_ENTERED_EVENT`] and [`RAW_MOUSE_LEFT_EVENT`].
381 pub struct RawMouseArgs {
382 /// Window the mouse entered or left.
383 pub window_id: WindowId,
384
385 /// Device that generated this event.
386 pub device_id: DeviceId,
387
388 ..
389
390 /// Broadcast to all widgets.
391 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
392 list.search_all()
393 }
394 }
395
396 /// Arguments for the [`RAW_MOUSE_WHEEL_EVENT`].
397 pub struct RawMouseWheelArgs {
398 /// Window that is hovered by the mouse.
399 pub window_id: WindowId,
400
401 /// Device that generated this event.
402 pub device_id: DeviceId,
403
404 /// Wheel motion delta, value is in pixels if the *wheel* is a touchpad.
405 pub delta: MouseScrollDelta,
406
407 /// Touch state if the device that generated the event is a touchpad.
408 pub phase: TouchPhase,
409
410 ..
411
412 /// Broadcast to all widgets.
413 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
414 list.search_all()
415 }
416 }
417
418 /// Arguments for the [`RAW_MOUSE_INPUT_EVENT`].
419 pub struct RawMouseInputArgs {
420 /// Window that is hovered by the mouse.
421 pub window_id: WindowId,
422
423 /// Device that generated this event.
424 pub device_id: DeviceId,
425
426 /// If the button was pressed or released.
427 pub state: ButtonState,
428
429 /// What button was pressed or released.
430 pub button: MouseButton,
431
432 ..
433
434 /// Broadcast to all widgets.
435 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
436 list.search_all();
437 }
438 }
439
440 /// Arguments for the [`RAW_TOUCHPAD_PRESSURE_EVENT`].
441 pub struct RawTouchpadPressureArgs {
442 /// Window that is touched.
443 pub window_id: WindowId,
444
445 /// Device that generated this event.
446 pub device_id: DeviceId,
447
448 /// Pressure level between 0 and 1.
449 pub pressure: Factor,
450
451 /// Click level.
452 pub stage: i64,
453
454 ..
455
456 /// Broadcast to all widgets.
457 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
458 list.search_all();
459 }
460 }
461
462 /// Arguments for the [`RAW_AXIS_MOTION_EVENT`].
463 pub struct RawAxisMotionArgs {
464 /// Window that received the event.
465 pub window_id: WindowId,
466
467 /// Device that generated the event.
468 pub device_id: DeviceId,
469
470 /// Analog axis.
471 pub axis: AxisId,
472
473 /// Motion amount.
474 pub value: f64,
475
476 ..
477
478 /// Broadcast to all widgets.
479 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
480 list.search_all();
481 }
482 }
483
484 /// Arguments for the [`RAW_TOUCH_EVENT`].
485 pub struct RawTouchArgs {
486 /// Window that was touched.
487 pub window_id: WindowId,
488
489 /// Device that generated this event.
490 pub device_id: DeviceId,
491
492 /// Coalesced touch updates.
493 pub touches: Vec<TouchUpdate>,
494
495 ..
496
497 /// Broadcast to all widgets.
498 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
499 list.search_all();
500 }
501 }
502
503 /// Arguments for the [`RAW_SCALE_FACTOR_CHANGED_EVENT`].
504 pub struct RawScaleFactorChangedArgs {
505 /// Monitor that has changed.
506 pub monitor_id: MonitorId,
507
508 /// Window in the monitor that has changed.
509 pub windows: Vec<WindowId>,
510
511 /// New pixel scale factor.
512 pub scale_factor: Factor,
513
514 ..
515
516 /// Broadcast to all widgets.
517 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
518 list.search_all();
519 }
520 }
521
522 /// Arguments for the [`RAW_MONITORS_CHANGED_EVENT`].
523 pub struct RawMonitorsChangedArgs {
524 /// Up-to-date monitors list.
525 pub available_monitors: Vec<(MonitorId, MonitorInfo)>,
526
527 ..
528
529 /// Broadcast to all widgets.
530 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
531 list.search_all();
532 }
533 }
534
535 /// Arguments for the image events.
536 pub struct RawImageArgs {
537 /// Image that changed.
538 pub image: ViewImage,
539
540 ..
541
542 /// Broadcast to all widgets.
543 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
544 list.search_all()
545 }
546 }
547
548 /// Arguments for the [`RAW_FRAME_IMAGE_READY_EVENT`].
549 pub struct RawFrameImageReadyArgs {
550 /// Frame image that is ready.
551 pub image: ViewImage,
552
553 /// Window that was captured.
554 pub window_id: WindowId,
555
556 /// Frame that was captured.
557 pub frame_id: FrameId,
558
559 /// Area of the frame that was captured.
560 pub area: PxRect,
561
562 ..
563
564 /// Broadcast to all widgets.
565 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
566 list.search_all()
567 }
568 }
569
570 /// [`RAW_FONT_CHANGED_EVENT`] arguments.
571 pub struct RawFontChangedArgs {
572
573 ..
574
575 /// Broadcast to all widgets.
576 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
577 list.search_all()
578 }
579 }
580
581 /// Arguments for the [`RAW_FONT_AA_CHANGED_EVENT`].
582 pub struct RawFontAaChangedArgs {
583 /// The new anti-aliasing config.
584 pub aa: FontAntiAliasing,
585
586 ..
587
588 /// Broadcast to all widgets.
589 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
590 list.search_all()
591 }
592 }
593
594 /// Arguments for the [`RAW_MULTI_CLICK_CONFIG_CHANGED_EVENT`].
595 pub struct RawMultiClickConfigChangedArgs {
596 /// New config.
597 pub config: MultiClickConfig,
598
599 ..
600
601 /// Broadcast to all widgets.
602 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
603 list.search_all()
604 }
605 }
606
607 /// Arguments for the [`RAW_ANIMATIONS_CONFIG_CHANGED_EVENT`].
608 pub struct RawAnimationsConfigChangedArgs {
609 /// New config.
610 pub config: AnimationsConfig,
611
612 ..
613
614 /// Broadcast to all widgets.
615 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
616 list.search_all()
617 }
618 }
619
620 /// Arguments for the [`RAW_KEY_REPEAT_CONFIG_CHANGED_EVENT`].
621 pub struct RawKeyRepeatConfigChangedArgs {
622 /// New config.
623 pub config: KeyRepeatConfig,
624
625 ..
626
627 /// Broadcast to all widgets.
628 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
629 list.search_all()
630 }
631 }
632
633 /// Arguments for the [`RAW_TOUCH_CONFIG_CHANGED_EVENT`].
634 pub struct RawTouchConfigChangedArgs {
635 /// New config.
636 pub config: TouchConfig,
637
638 ..
639
640 /// Broadcast to all widgets.
641 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
642 list.search_all()
643 }
644 }
645
646 /// Arguments for the [`RAW_LOCALE_CONFIG_CHANGED_EVENT`].
647 pub struct RawLocaleChangedArgs {
648 /// New config.
649 pub config: LocaleConfig,
650
651 ..
652
653 /// Broadcast to all widgets.
654 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
655 list.search_all()
656 }
657 }
658
659 /// Arguments for the [`RAW_COLORS_CONFIG_CHANGED_EVENT`].
660 pub struct RawColorsConfigChangedArgs {
661 /// New config.
662 pub config: ColorsConfig,
663
664 ..
665
666 /// Broadcast to all widgets.
667 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
668 list.search_all();
669 }
670 }
671
672 /// Arguments for the [`RAW_CHROME_CONFIG_CHANGED_EVENT`].
673 pub struct RawChromeConfigChangedArgs {
674 /// New config.
675 pub config: ChromeConfig,
676
677 ..
678
679 /// Broadcast to all widgets.
680 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
681 list.search_all();
682 }
683 }
684
685 /// Arguments for the [`RAW_EXTENSION_EVENT`].
686 pub struct RawExtensionEventArgs {
687 /// Id of the sender extension.
688 pub extension_id: ApiExtensionId,
689 /// Event payload.
690 pub payload: ApiExtensionPayload,
691
692 ..
693
694 /// Broadcast to all widgets.
695 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
696 list.search_all()
697 }
698 }
699
700 /// Arguments for [`LOW_MEMORY_EVENT`].
701 pub struct LowMemoryArgs {
702
703 ..
704
705 /// Broadcast to all widgets.
706 fn delivery_list(&self, list: &mut UpdateDeliveryList) {
707 list.search_all()
708 }
709 }
710}
711
712event! {
713 /// A key press or release targeting a window.
714 ///
715 /// This event represents a key input directly from the operating system. It is processed
716 /// by `KeyboardManager` to generate the `KEY_INPUT_EVENT` that actually targets the focused widget.
717 ///
718 /// *See also the [module level documentation](self) for details of how you can fake this event*
719 pub static RAW_KEY_INPUT_EVENT: RawKeyInputArgs;
720
721 /// An IME event was received by a window.
722 pub static RAW_IME_EVENT: RawImeArgs;
723
724 /// A window received or lost focus.
725 pub static RAW_WINDOW_FOCUS_EVENT: RawWindowFocusArgs;
726
727 /// A window was moved, resized or has a state change.
728 ///
729 /// This event aggregates events moves, resizes and other state changes into a
730 /// single event to simplify tracking composite changes, for example, the window changes size and position
731 /// when maximized, this can be trivially observed with this event.
732 pub static RAW_WINDOW_CHANGED_EVENT: RawWindowChangedArgs;
733
734 /// A frame finished rendering and was presented in a window.
735 pub static RAW_FRAME_RENDERED_EVENT: RawFrameRenderedArgs;
736
737 /// A window has finished initializing in the view-process.
738 pub static RAW_WINDOW_OPEN_EVENT: RawWindowOpenArgs;
739
740 /// A headless surface has finished initializing in the view-process.
741 pub static RAW_HEADLESS_OPEN_EVENT: RawHeadlessOpenArgs;
742
743 /// A window or headless surface initialization failed in the view-process.
744 pub static RAW_WINDOW_OR_HEADLESS_OPEN_ERROR_EVENT: RawWindowOrHeadlessOpenErrorArgs;
745
746 /// A window was requested to close.
747 pub static RAW_WINDOW_CLOSE_REQUESTED_EVENT: RawWindowCloseRequestedArgs;
748
749 /// A window was destroyed.
750 pub static RAW_WINDOW_CLOSE_EVENT: RawWindowCloseArgs;
751
752 /// Data was dragged over a window.
753 pub static RAW_DRAG_HOVERED_EVENT: RawDragHoveredArgs;
754
755 /// Data dragging over the window has moved.
756 pub static RAW_DRAG_MOVED_EVENT: RawDragMovedArgs;
757
758 /// Data was drag-dropped on a window.
759 pub static RAW_DRAG_DROPPED_EVENT: RawDragDroppedArgs;
760
761 /// Data was dragged away from the window or the operation was cancelled.
762 pub static RAW_DRAG_CANCELLED_EVENT: RawDragCancelledArgs;
763
764 /// Drag & drop operation started by the app has dropped or was cancelled.
765 pub static RAW_APP_DRAG_ENDED_EVENT: RawAppDragEndedArgs;
766
767 /// Mouse pointer moved over a window.
768 pub static RAW_MOUSE_MOVED_EVENT: RawMouseMovedArgs;
769
770 /// Mouse pointer started hovering a window.
771 pub static RAW_MOUSE_ENTERED_EVENT: RawMouseArgs;
772
773 /// Mouse pointer stopped hovering a window.
774 pub static RAW_MOUSE_LEFT_EVENT: RawMouseArgs;
775
776 /// Mouse wheel scrolled when the mouse was over a window.
777 pub static RAW_MOUSE_WHEEL_EVENT: RawMouseWheelArgs;
778
779 /// Mouse button was pressed or released when the mouse was over a window.
780 pub static RAW_MOUSE_INPUT_EVENT: RawMouseInputArgs;
781
782 /// Touchpad touched when the mouse was over a window.
783 pub static RAW_TOUCHPAD_PRESSURE_EVENT: RawTouchpadPressureArgs;
784
785 /// Motion on some analog axis send to a window.
786 pub static RAW_AXIS_MOTION_EVENT: RawAxisMotionArgs;
787
788 /// A window was touched.
789 pub static RAW_TOUCH_EVENT: RawTouchArgs;
790
791 /// Pixel scale factor for a monitor screen and its windows has changed.
792 ///
793 /// This can happen if the user change the screen settings. Note that a
794 /// window's scale factor can also change if it is moved to a different monitor,
795 /// this change can be monitored using [`RAW_WINDOW_CHANGED_EVENT`].
796 pub static RAW_SCALE_FACTOR_CHANGED_EVENT: RawScaleFactorChangedArgs;
797
798 /// Monitors added, removed or modified.
799 pub static RAW_MONITORS_CHANGED_EVENT: RawMonitorsChangedArgs;
800
801 /// Color scheme or accent color preference changed for a window.
802 pub static RAW_COLORS_CONFIG_CHANGED_EVENT: RawColorsConfigChangedArgs;
803
804 /// System window chrome config changed.
805 pub static RAW_CHROME_CONFIG_CHANGED_EVENT: RawChromeConfigChangedArgs;
806
807 /// Change in system font anti-aliasing config.
808 pub static RAW_FONT_AA_CHANGED_EVENT: RawFontAaChangedArgs;
809
810 /// Change in system text fonts, install or uninstall.
811 pub static RAW_FONT_CHANGED_EVENT: RawFontChangedArgs;
812
813 /// Change in system "double-click" config.
814 pub static RAW_MULTI_CLICK_CONFIG_CHANGED_EVENT: RawMultiClickConfigChangedArgs;
815
816 /// Change in system animation enabled config.
817 pub static RAW_ANIMATIONS_CONFIG_CHANGED_EVENT: RawAnimationsConfigChangedArgs;
818
819 /// Change in system key repeat interval config.
820 pub static RAW_KEY_REPEAT_CONFIG_CHANGED_EVENT: RawKeyRepeatConfigChangedArgs;
821
822 /// Change in system touch config.
823 pub static RAW_TOUCH_CONFIG_CHANGED_EVENT: RawTouchConfigChangedArgs;
824
825 /// Change in system locale config.
826 pub static RAW_LOCALE_CONFIG_CHANGED_EVENT: RawLocaleChangedArgs;
827
828 /// Image metadata loaded without errors.
829 pub static RAW_IMAGE_METADATA_LOADED_EVENT: RawImageArgs;
830
831 /// Progressively decoded image has decoded more pixels.
832 pub static RAW_IMAGE_PARTIALLY_LOADED_EVENT: RawImageArgs;
833
834 /// Image loaded without errors.
835 pub static RAW_IMAGE_LOADED_EVENT: RawImageArgs;
836
837 /// Image failed to load.
838 pub static RAW_IMAGE_LOAD_ERROR_EVENT: RawImageArgs;
839
840 /// Image generated from a frame is ready for reading.
841 pub static RAW_FRAME_IMAGE_READY_EVENT: RawFrameImageReadyArgs;
842
843 /// System low memory warning, some platforms may kill the app if it does not release memory.
844 pub static LOW_MEMORY_EVENT: LowMemoryArgs;
845
846 /// Custom view-process extension event.
847 pub static RAW_EXTENSION_EVENT: RawExtensionEventArgs;
848}