1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
// This file is auto-generated by rute_gen. DO NOT EDIT.
use rute_ffi_base::*;

#[allow(unused_imports)]
use auto::cursor_ffi::RUCursor;
#[allow(unused_imports)]
use auto::icon_ffi::RUIcon;
#[allow(unused_imports)]
use auto::margins_ffi::RUMargins;
#[allow(unused_imports)]
use auto::object_ffi::RUObject;
#[allow(unused_imports)]
use auto::object_ffi::*;
#[allow(unused_imports)]
use auto::point_ffi::RUPoint;
#[allow(unused_imports)]
use auto::region_ffi::RURegion;
#[allow(unused_imports)]
use auto::screen_ffi::RUScreen;
#[allow(unused_imports)]
use auto::size_ffi::RUSize;
#[allow(unused_imports)]
use auto::surface_ffi::*;
#[allow(unused_imports)]
use auto::surface_format_ffi::RUSurfaceFormat;
#[allow(unused_imports)]
use std::os::raw::c_void;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct RUWindowFuncs {
    pub destroy: extern "C" fn(self_c: *const RUBase),
    pub set_object_surface_type: extern "C" fn(self_c: *const RUBase, surface_type: u32),
    pub surface_type: extern "C" fn(self_c: *const RUBase) -> u32,
    pub is_visible: extern "C" fn(self_c: *const RUBase) -> bool,
    pub visibility: extern "C" fn(self_c: *const RUBase) -> u32,
    pub set_visibility: extern "C" fn(self_c: *const RUBase, v: u32),
    pub create: extern "C" fn(self_c: *const RUBase),
    pub win_id: extern "C" fn(self_c: *const RUBase) -> u64,
    pub parent: extern "C" fn(self_c: *const RUBase, mode: u32) -> RUWindow,
    pub parent_2: extern "C" fn(self_c: *const RUBase) -> RUWindow,
    pub set_parent: extern "C" fn(self_c: *const RUBase, parent: *const RUBase),
    pub is_top_level: extern "C" fn(self_c: *const RUBase) -> bool,
    pub is_modal: extern "C" fn(self_c: *const RUBase) -> bool,
    pub modality: extern "C" fn(self_c: *const RUBase) -> u32,
    pub set_modality: extern "C" fn(self_c: *const RUBase, modality: u32),
    pub set_object_format: extern "C" fn(self_c: *const RUBase, format: *const RUBase),
    pub format: extern "C" fn(self_c: *const RUBase) -> RUSurfaceFormat,
    pub requested_format: extern "C" fn(self_c: *const RUBase) -> RUSurfaceFormat,
    pub set_flags: extern "C" fn(self_c: *const RUBase, flags: u32),
    pub flags: extern "C" fn(self_c: *const RUBase) -> u32,
    pub title: extern "C" fn(self_c: *const RUBase) -> *const ::std::os::raw::c_char,
    pub set_opacity: extern "C" fn(self_c: *const RUBase, level: f32),
    pub opacity: extern "C" fn(self_c: *const RUBase) -> f32,
    pub set_mask: extern "C" fn(self_c: *const RUBase, region: *const RUBase),
    pub mask: extern "C" fn(self_c: *const RUBase) -> RURegion,
    pub is_active: extern "C" fn(self_c: *const RUBase) -> bool,
    pub report_content_orientation_change: extern "C" fn(self_c: *const RUBase, orientation: u32),
    pub content_orientation: extern "C" fn(self_c: *const RUBase) -> u32,
    pub device_pixel_ratio: extern "C" fn(self_c: *const RUBase) -> f32,
    pub window_state: extern "C" fn(self_c: *const RUBase) -> u32,
    pub window_states: extern "C" fn(self_c: *const RUBase) -> u32,
    pub set_window_state: extern "C" fn(self_c: *const RUBase, state: u32),
    pub set_window_states: extern "C" fn(self_c: *const RUBase, states: u32),
    pub set_transient_parent: extern "C" fn(self_c: *const RUBase, parent: *const RUBase),
    pub is_ancestor_of:
        extern "C" fn(self_c: *const RUBase, child: *const RUBase, mode: u32) -> bool,
    pub is_exposed: extern "C" fn(self_c: *const RUBase) -> bool,
    pub minimum_width: extern "C" fn(self_c: *const RUBase) -> i32,
    pub minimum_height: extern "C" fn(self_c: *const RUBase) -> i32,
    pub maximum_width: extern "C" fn(self_c: *const RUBase) -> i32,
    pub maximum_height: extern "C" fn(self_c: *const RUBase) -> i32,
    pub minimum_size: extern "C" fn(self_c: *const RUBase) -> RUSize,
    pub maximum_size: extern "C" fn(self_c: *const RUBase) -> RUSize,
    pub base_size: extern "C" fn(self_c: *const RUBase) -> RUSize,
    pub size_increment: extern "C" fn(self_c: *const RUBase) -> RUSize,
    pub set_minimum_size: extern "C" fn(self_c: *const RUBase, size: *const RUBase),
    pub set_maximum_size: extern "C" fn(self_c: *const RUBase, size: *const RUBase),
    pub set_base_size: extern "C" fn(self_c: *const RUBase, size: *const RUBase),
    pub set_size_increment: extern "C" fn(self_c: *const RUBase, size: *const RUBase),
    pub frame_margins: extern "C" fn(self_c: *const RUBase) -> RUMargins,
    pub frame_position: extern "C" fn(self_c: *const RUBase) -> RUPoint,
    pub set_frame_position: extern "C" fn(self_c: *const RUBase, point: *const RUBase),
    pub width: extern "C" fn(self_c: *const RUBase) -> i32,
    pub height: extern "C" fn(self_c: *const RUBase) -> i32,
    pub x: extern "C" fn(self_c: *const RUBase) -> i32,
    pub y: extern "C" fn(self_c: *const RUBase) -> i32,
    pub size: extern "C" fn(self_c: *const RUBase) -> RUSize,
    pub position: extern "C" fn(self_c: *const RUBase) -> RUPoint,
    pub set_position: extern "C" fn(self_c: *const RUBase, pt: *const RUBase),
    pub set_position_2: extern "C" fn(self_c: *const RUBase, posx: i32, posy: i32),
    pub resize: extern "C" fn(self_c: *const RUBase, new_size: *const RUBase),
    pub resize_2: extern "C" fn(self_c: *const RUBase, w: i32, h: i32),
    pub set_file_path:
        extern "C" fn(self_c: *const RUBase, file_path: *const ::std::os::raw::c_char),
    pub file_path: extern "C" fn(self_c: *const RUBase) -> *const ::std::os::raw::c_char,
    pub set_icon: extern "C" fn(self_c: *const RUBase, icon: *const RUBase),
    pub icon: extern "C" fn(self_c: *const RUBase) -> RUIcon,
    pub set_keyboard_grab_enabled: extern "C" fn(self_c: *const RUBase, grab: bool) -> bool,
    pub set_mouse_grab_enabled: extern "C" fn(self_c: *const RUBase, grab: bool) -> bool,
    pub screen: extern "C" fn(self_c: *const RUBase) -> RUScreen,
    pub set_screen: extern "C" fn(self_c: *const RUBase, screen: *const RUBase),
    pub focus_object: extern "C" fn(self_c: *const RUBase) -> RUObject,
    pub map_to_global: extern "C" fn(self_c: *const RUBase, pos: *const RUBase) -> RUPoint,
    pub map_from_global: extern "C" fn(self_c: *const RUBase, pos: *const RUBase) -> RUPoint,
    pub cursor: extern "C" fn(self_c: *const RUBase) -> RUCursor,
    pub set_cursor: extern "C" fn(self_c: *const RUBase, arg0: *const RUBase),
    pub unset_cursor: extern "C" fn(self_c: *const RUBase),
    pub from_win_id: extern "C" fn(self_c: *const RUBase, id: u64) -> RUWindow,
    pub request_activate: extern "C" fn(self_c: *const RUBase),
    pub set_visible: extern "C" fn(self_c: *const RUBase, visible: bool),
    pub show: extern "C" fn(self_c: *const RUBase),
    pub hide: extern "C" fn(self_c: *const RUBase),
    pub show_minimized: extern "C" fn(self_c: *const RUBase),
    pub show_maximized: extern "C" fn(self_c: *const RUBase),
    pub show_full_screen: extern "C" fn(self_c: *const RUBase),
    pub show_normal: extern "C" fn(self_c: *const RUBase),
    pub close: extern "C" fn(self_c: *const RUBase) -> bool,
    pub raise: extern "C" fn(self_c: *const RUBase),
    pub lower: extern "C" fn(self_c: *const RUBase),
    pub set_title: extern "C" fn(self_c: *const RUBase, arg0: *const ::std::os::raw::c_char),
    pub set_x: extern "C" fn(self_c: *const RUBase, arg: i32),
    pub set_y: extern "C" fn(self_c: *const RUBase, arg: i32),
    pub set_width: extern "C" fn(self_c: *const RUBase, arg: i32),
    pub set_height: extern "C" fn(self_c: *const RUBase, arg: i32),
    pub set_minimum_width: extern "C" fn(self_c: *const RUBase, w: i32),
    pub set_minimum_height: extern "C" fn(self_c: *const RUBase, h: i32),
    pub set_maximum_width: extern "C" fn(self_c: *const RUBase, w: i32),
    pub set_maximum_height: extern "C" fn(self_c: *const RUBase, h: i32),
    pub alert: extern "C" fn(self_c: *const RUBase, msec: i32),
    pub request_update: extern "C" fn(self_c: *const RUBase),
    pub set_screen_changed_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub set_window_title_changed_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub set_x_changed_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub set_y_changed_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub set_width_changed_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub set_height_changed_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub set_minimum_width_changed_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub set_minimum_height_changed_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub set_maximum_width_changed_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub set_maximum_height_changed_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub set_visible_changed_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub set_active_changed_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub set_focus_object_changed_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub set_opacity_changed_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub set_expose_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub remove_expose_event: extern "C" fn(object: *const RUBase),

    pub set_resize_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub remove_resize_event: extern "C" fn(object: *const RUBase),

    pub set_move_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub remove_move_event: extern "C" fn(object: *const RUBase),

    pub set_focus_in_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub remove_focus_in_event: extern "C" fn(object: *const RUBase),

    pub set_focus_out_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub remove_focus_out_event: extern "C" fn(object: *const RUBase),

    pub set_show_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub remove_show_event: extern "C" fn(object: *const RUBase),

    pub set_hide_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub remove_hide_event: extern "C" fn(object: *const RUBase),

    pub set_key_press_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub remove_key_press_event: extern "C" fn(object: *const RUBase),

    pub set_key_release_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub remove_key_release_event: extern "C" fn(object: *const RUBase),

    pub set_mouse_press_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub remove_mouse_press_event: extern "C" fn(object: *const RUBase),

    pub set_mouse_release_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub remove_mouse_release_event: extern "C" fn(object: *const RUBase),

    pub set_mouse_double_click_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub remove_mouse_double_click_event: extern "C" fn(object: *const RUBase),

    pub set_mouse_move_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub remove_mouse_move_event: extern "C" fn(object: *const RUBase),

    pub set_wheel_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub remove_wheel_event: extern "C" fn(object: *const RUBase),

    pub set_touch_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub remove_touch_event: extern "C" fn(object: *const RUBase),

    pub set_tablet_event: extern "C" fn(
        object: *const RUBase,
        user_data: *const c_void,
        trampoline_func: *const c_void,
        callback: *const c_void,
    ),

    pub remove_tablet_event: extern "C" fn(object: *const RUBase),
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct RUWindowAllFuncs {
    pub object_funcs: *const RUObjectFuncs,
    pub surface_funcs: *const RUSurfaceFuncs,
    pub window_funcs: *const RUWindowFuncs,
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct RUWindow {
    pub qt_data: *const RUBase,
    pub host_data: *const RUBase,
    pub all_funcs: *const RUWindowAllFuncs,
}