@@ -75,7 +75,16 @@ FOSSIL_TEST_CASE(cpp_test_keyboard_poll_events) {
75
75
76
76
FOSSIL_TEST_CASE (cpp_test_mouse_register_and_unregister) {
77
77
fossil::io::Mouse mouse;
78
- fossil_io_mouse_event_t event = { 1 , 100 , 200 , 0 };
78
+
79
+ fossil_io_mouse_event_t event = {
80
+ .x = 100 ,
81
+ .y = 200 ,
82
+ .button = 1 ,
83
+ .shift = 1 ,
84
+ .ctrl = 0 ,
85
+ .alt = 1
86
+ };
87
+
79
88
fossil_io_mouse_callback_t callback = (fossil_io_mouse_callback_t )0x2 ;
80
89
81
90
mouse.register_binding (event, callback);
@@ -87,7 +96,16 @@ FOSSIL_TEST_CASE(cpp_test_mouse_register_and_unregister) {
87
96
88
97
FOSSIL_TEST_CASE (cpp_test_mouse_clear_bindings) {
89
98
fossil::io::Mouse mouse;
90
- fossil_io_mouse_event_t event = { 2 , 150 , 250 , 0 };
99
+
100
+ fossil_io_mouse_event_t event = {
101
+ .x = 150 ,
102
+ .y = 250 ,
103
+ .button = 2 ,
104
+ .shift = 0 ,
105
+ .ctrl = 1 ,
106
+ .alt = 0
107
+ };
108
+
91
109
fossil_io_mouse_callback_t callback = (fossil_io_mouse_callback_t )0x2 ;
92
110
93
111
mouse.register_binding (event, callback);
@@ -97,7 +115,16 @@ FOSSIL_TEST_CASE(cpp_test_mouse_clear_bindings) {
97
115
98
116
FOSSIL_TEST_CASE (cpp_test_mouse_poll_events) {
99
117
fossil::io::Mouse mouse;
100
- fossil_io_mouse_event_t event = { 3 , 120 , 180 , 0 };
118
+
119
+ fossil_io_mouse_event_t event = {
120
+ .x = 120 ,
121
+ .y = 180 ,
122
+ .button = 0 ,
123
+ .shift = 0 ,
124
+ .ctrl = 0 ,
125
+ .alt = 0
126
+ };
127
+
101
128
fossil_io_mouse_callback_t callback = (fossil_io_mouse_callback_t )0x2 ;
102
129
103
130
mouse.register_binding (event, callback);
@@ -111,7 +138,17 @@ FOSSIL_TEST_CASE(cpp_test_mouse_poll_events) {
111
138
112
139
FOSSIL_TEST_CASE (cpp_test_touch_register_and_unregister) {
113
140
fossil::io::Touch touch;
114
- fossil_io_touch_event_t event = { 0 , 400 , 300 , 0 };
141
+
142
+ fossil_io_touch_event_t event = {
143
+ .x = 400 ,
144
+ .y = 300 ,
145
+ .touch_id = 1 ,
146
+ .action = 0 ,
147
+ .shift = 0 ,
148
+ .ctrl = 1 ,
149
+ .alt = 0
150
+ };
151
+
115
152
fossil_io_touch_callback_t callback = (fossil_io_touch_callback_t )0x3 ;
116
153
117
154
touch.register_binding (event, callback);
@@ -123,7 +160,17 @@ FOSSIL_TEST_CASE(cpp_test_touch_register_and_unregister) {
123
160
124
161
FOSSIL_TEST_CASE (cpp_test_touch_clear_bindings) {
125
162
fossil::io::Touch touch;
126
- fossil_io_touch_event_t event = { 1 , 500 , 600 , 0 };
163
+
164
+ fossil_io_touch_event_t event = {
165
+ .x = 500 ,
166
+ .y = 600 ,
167
+ .touch_id = 2 ,
168
+ .action = 1 ,
169
+ .shift = 1 ,
170
+ .ctrl = 0 ,
171
+ .alt = 1
172
+ };
173
+
127
174
fossil_io_touch_callback_t callback = (fossil_io_touch_callback_t )0x3 ;
128
175
129
176
touch.register_binding (event, callback);
@@ -133,7 +180,17 @@ FOSSIL_TEST_CASE(cpp_test_touch_clear_bindings) {
133
180
134
181
FOSSIL_TEST_CASE (cpp_test_touch_poll_events) {
135
182
fossil::io::Touch touch;
136
- fossil_io_touch_event_t event = { 2 , 700 , 800 , 0 };
183
+
184
+ fossil_io_touch_event_t event = {
185
+ .x = 700 ,
186
+ .y = 800 ,
187
+ .touch_id = 3 ,
188
+ .action = 2 ,
189
+ .shift = 1 ,
190
+ .ctrl = 1 ,
191
+ .alt = 0
192
+ };
193
+
137
194
fossil_io_touch_callback_t callback = (fossil_io_touch_callback_t )0x3 ;
138
195
139
196
touch.register_binding (event, callback);
0 commit comments