1 | #pragma once |
2 | // This file is auto-generated from api/cpp/cbindgen.rs |
3 | namespace slint { |
4 | /// This enum describes the different types of buttons for a pointer event, |
5 | /// typically on a mouse or a pencil. |
6 | enum class PointerEventButton { |
7 | /// A button that is none of left, right or middle. For example |
8 | /// this is used for a fourth button on a mouse with many buttons. |
9 | Other, |
10 | /// The left button. |
11 | Left, |
12 | /// The right button. |
13 | Right, |
14 | /// The center button. |
15 | Middle, |
16 | }; |
17 | } |
18 | |
19 | /// This namespace contains constants for each special non-printable key. |
20 | /// |
21 | /// Each constant can be converted to SharedString. |
22 | /// The constants are meant to be used with the slint::Window::dispatch_key_press_event() and |
23 | /// slint::Window::dispatch_key_release_event() functions. |
24 | /// |
25 | /// Example: |
26 | /// ``` |
27 | /// window.dispatch_key_press_event(slint::platform::key_codes::Tab); |
28 | /// ``` |
29 | namespace slint::platform::key_codes { |
30 | |
31 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
32 | constexpr std::u8string_view Backspace = u8"\u0008" ; |
33 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
34 | constexpr std::u8string_view Tab = u8"\u0009" ; |
35 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
36 | constexpr std::u8string_view Return = u8"\u000a" ; |
37 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
38 | constexpr std::u8string_view Escape = u8"\u001b" ; |
39 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
40 | constexpr std::u8string_view Backtab = u8"\u0019" ; |
41 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
42 | constexpr std::u8string_view Delete = u8"\u007f" ; |
43 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
44 | constexpr std::u8string_view Shift = u8"\u0010" ; |
45 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
46 | constexpr std::u8string_view Control = u8"\u0011" ; |
47 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
48 | constexpr std::u8string_view Alt = u8"\u0012" ; |
49 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
50 | constexpr std::u8string_view AltGr = u8"\u0013" ; |
51 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
52 | constexpr std::u8string_view CapsLock = u8"\u0014" ; |
53 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
54 | constexpr std::u8string_view ShiftR = u8"\u0015" ; |
55 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
56 | constexpr std::u8string_view ControlR = u8"\u0016" ; |
57 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
58 | constexpr std::u8string_view Meta = u8"\u0017" ; |
59 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
60 | constexpr std::u8string_view MetaR = u8"\u0018" ; |
61 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
62 | constexpr std::u8string_view Space = u8"\u0020" ; |
63 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
64 | constexpr std::u8string_view UpArrow = u8"\uf700" ; |
65 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
66 | constexpr std::u8string_view DownArrow = u8"\uf701" ; |
67 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
68 | constexpr std::u8string_view LeftArrow = u8"\uf702" ; |
69 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
70 | constexpr std::u8string_view RightArrow = u8"\uf703" ; |
71 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
72 | constexpr std::u8string_view F1 = u8"\uf704" ; |
73 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
74 | constexpr std::u8string_view F2 = u8"\uf705" ; |
75 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
76 | constexpr std::u8string_view F3 = u8"\uf706" ; |
77 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
78 | constexpr std::u8string_view F4 = u8"\uf707" ; |
79 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
80 | constexpr std::u8string_view F5 = u8"\uf708" ; |
81 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
82 | constexpr std::u8string_view F6 = u8"\uf709" ; |
83 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
84 | constexpr std::u8string_view F7 = u8"\uf70a" ; |
85 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
86 | constexpr std::u8string_view F8 = u8"\uf70b" ; |
87 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
88 | constexpr std::u8string_view F9 = u8"\uf70c" ; |
89 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
90 | constexpr std::u8string_view F10 = u8"\uf70d" ; |
91 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
92 | constexpr std::u8string_view F11 = u8"\uf70e" ; |
93 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
94 | constexpr std::u8string_view F12 = u8"\uf70f" ; |
95 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
96 | constexpr std::u8string_view F13 = u8"\uf710" ; |
97 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
98 | constexpr std::u8string_view F14 = u8"\uf711" ; |
99 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
100 | constexpr std::u8string_view F15 = u8"\uf712" ; |
101 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
102 | constexpr std::u8string_view F16 = u8"\uf713" ; |
103 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
104 | constexpr std::u8string_view F17 = u8"\uf714" ; |
105 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
106 | constexpr std::u8string_view F18 = u8"\uf715" ; |
107 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
108 | constexpr std::u8string_view F19 = u8"\uf716" ; |
109 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
110 | constexpr std::u8string_view F20 = u8"\uf717" ; |
111 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
112 | constexpr std::u8string_view F21 = u8"\uf718" ; |
113 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
114 | constexpr std::u8string_view F22 = u8"\uf719" ; |
115 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
116 | constexpr std::u8string_view F23 = u8"\uf71a" ; |
117 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
118 | constexpr std::u8string_view F24 = u8"\uf71b" ; |
119 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
120 | constexpr std::u8string_view Insert = u8"\uf727" ; |
121 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
122 | constexpr std::u8string_view Home = u8"\uf729" ; |
123 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
124 | constexpr std::u8string_view End = u8"\uf72b" ; |
125 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
126 | constexpr std::u8string_view PageUp = u8"\uf72c" ; |
127 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
128 | constexpr std::u8string_view PageDown = u8"\uf72d" ; |
129 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
130 | constexpr std::u8string_view ScrollLock = u8"\uf72f" ; |
131 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
132 | constexpr std::u8string_view Pause = u8"\uf730" ; |
133 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
134 | constexpr std::u8string_view SysReq = u8"\uf731" ; |
135 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
136 | constexpr std::u8string_view Stop = u8"\uf734" ; |
137 | /// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event() |
138 | constexpr std::u8string_view = u8"\uf735" ; |
139 | } |
140 | |