rute 0.0.4

UI library implemented on top of Qt
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
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
// This file is auto-generated by rute_gen. DO NOT EDIT!
#pragma once

#include <stdbool.h>
#include <stdint.h>

#include "../rute_base.h"

#ifdef __cplusplus
extern "C" {
#endif
#include "backing_store_ffi.h"
#include "cursor_ffi.h"
#include "font_ffi.h"
#include "icon_ffi.h"
#include "layout_ffi.h"
#include "margins_ffi.h"
#include "paint_engine_ffi.h"
#include "palette_ffi.h"
#include "pixmap_ffi.h"
#include "point_ffi.h"
#include "rect_ffi.h"
#include "region_ffi.h"
#include "size_ffi.h"
#include "size_policy_ffi.h"
#include "style_ffi.h"
#include "widget_ffi.h"
#include "window_ffi.h"

struct RUWidgetFuncs;
struct RUWidget;

typedef struct RUWidgetFuncs {
    void (*destroy)(struct RUBase* self);
    uint64_t (*win_id)(struct RUBase* self_c);
    void (*create_win_id)(struct RUBase* self_c);
    uint64_t (*internal_win_id)(struct RUBase* self_c);
    uint64_t (*effective_win_id)(struct RUBase* self_c);
    struct RUStyle (*style)(struct RUBase* self_c);
    void (*set_style)(struct RUBase* self_c, struct RUBase* arg0);
    bool (*is_top_level)(struct RUBase* self_c);
    bool (*is_window)(struct RUBase* self_c);
    bool (*is_modal)(struct RUBase* self_c);
    int (*window_modality)(struct RUBase* self_c);
    void (*set_window_modality)(struct RUBase* self_c, int window_modality);
    bool (*is_enabled)(struct RUBase* self_c);
    bool (*is_enabled_to)(struct RUBase* self_c, struct RUBase* arg0);
    void (*set_enabled)(struct RUBase* self_c, bool arg0);
    void (*set_disabled)(struct RUBase* self_c, bool arg0);
    void (*set_window_modified)(struct RUBase* self_c, bool arg0);
    int (*x)(struct RUBase* self_c);
    int (*y)(struct RUBase* self_c);
    struct RUPoint (*pos)(struct RUBase* self_c);
    struct RUSize (*frame_size)(struct RUBase* self_c);
    struct RUSize (*size)(struct RUBase* self_c);
    int (*width)(struct RUBase* self_c);
    int (*height)(struct RUBase* self_c);
    struct RURect (*rect)(struct RUBase* self_c);
    struct RURect (*children_rect)(struct RUBase* self_c);
    struct RURegion (*children_region)(struct RUBase* self_c);
    struct RUSize (*minimum_size)(struct RUBase* self_c);
    struct RUSize (*maximum_size)(struct RUBase* self_c);
    int (*minimum_width)(struct RUBase* self_c);
    int (*minimum_height)(struct RUBase* self_c);
    int (*maximum_width)(struct RUBase* self_c);
    int (*maximum_height)(struct RUBase* self_c);
    void (*set_minimum_size)(struct RUBase* self_c, struct RUBase* arg0);
    void (*set_minimum_size_2)(struct RUBase* self_c, int minw, int minh);
    void (*set_maximum_size)(struct RUBase* self_c, struct RUBase* arg0);
    void (*set_maximum_size_2)(struct RUBase* self_c, int maxw, int maxh);
    void (*set_minimum_width)(struct RUBase* self_c, int minw);
    void (*set_minimum_height)(struct RUBase* self_c, int minh);
    void (*set_maximum_width)(struct RUBase* self_c, int maxw);
    void (*set_maximum_height)(struct RUBase* self_c, int maxh);
    struct RUSize (*size_increment)(struct RUBase* self_c);
    void (*set_size_increment)(struct RUBase* self_c, struct RUBase* arg0);
    void (*set_size_increment_2)(struct RUBase* self_c, int w, int h);
    struct RUSize (*base_size)(struct RUBase* self_c);
    void (*set_base_size)(struct RUBase* self_c, struct RUBase* arg0);
    void (*set_base_size_2)(struct RUBase* self_c, int basew, int baseh);
    void (*set_fixed_size)(struct RUBase* self_c, struct RUBase* arg0);
    void (*set_fixed_size_2)(struct RUBase* self_c, int w, int h);
    void (*set_fixed_width)(struct RUBase* self_c, int w);
    void (*set_fixed_height)(struct RUBase* self_c, int h);
    struct RUPoint (*map_to_global)(struct RUBase* self_c, struct RUBase* arg0);
    struct RUPoint (*map_from_global)(struct RUBase* self_c,
                                      struct RUBase* arg0);
    struct RUPoint (*map_to_parent)(struct RUBase* self_c, struct RUBase* arg0);
    struct RUPoint (*map_from_parent)(struct RUBase* self_c,
                                      struct RUBase* arg0);
    struct RUPoint (*map_to)(struct RUBase* self_c, struct RUBase* arg0,
                             struct RUBase* arg1);
    struct RUPoint (*map_from)(struct RUBase* self_c, struct RUBase* arg0,
                               struct RUBase* arg1);
    struct RUWidget (*window)(struct RUBase* self_c);
    struct RUWidget (*native_parent_widget)(struct RUBase* self_c);
    struct RUPalette (*palette)(struct RUBase* self_c);
    void (*set_palette)(struct RUBase* self_c, struct RUBase* arg0);
    void (*set_background_role)(struct RUBase* self_c, int arg0);
    int (*background_role)(struct RUBase* self_c);
    void (*set_foreground_role)(struct RUBase* self_c, int arg0);
    int (*foreground_role)(struct RUBase* self_c);
    struct RUFont (*font)(struct RUBase* self_c);
    void (*set_font)(struct RUBase* self_c, struct RUBase* arg0);
    struct RUCursor (*cursor)(struct RUBase* self_c);
    void (*set_cursor)(struct RUBase* self_c, struct RUBase* arg0);
    void (*unset_cursor)(struct RUBase* self_c);
    void (*set_mouse_tracking)(struct RUBase* self_c, bool enable);
    bool (*has_mouse_tracking)(struct RUBase* self_c);
    bool (*under_mouse)(struct RUBase* self_c);
    void (*set_tablet_tracking)(struct RUBase* self_c, bool enable);
    bool (*has_tablet_tracking)(struct RUBase* self_c);
    void (*set_mask)(struct RUBase* self_c, struct RUBase* arg0);
    void (*set_mask_2)(struct RUBase* self_c, struct RUBase* arg0);
    struct RURegion (*mask)(struct RUBase* self_c);
    void (*clear_mask)(struct RUBase* self_c);
    void (*render)(struct RUBase* self_c, struct RUBase* target,
                   struct RUBase* target_offset, struct RUBase* source_region,
                   int render_flags);
    void (*render_2)(struct RUBase* self_c, struct RUBase* painter,
                     struct RUBase* target_offset, struct RUBase* source_region,
                     int render_flags);
    struct RUPixmap (*grab)(struct RUBase* self_c, struct RUBase* rectangle);
    void (*grab_gesture)(struct RUBase* self_c, int gtype, int flags);
    void (*ungrab_gesture)(struct RUBase* self_c, int gtype);
    void (*set_window_title)(struct RUBase* self_c, const char* arg0);
    void (*set_style_sheet)(struct RUBase* self_c, const char* style_sheet);
    const char* (*style_sheet)(struct RUBase* self_c);
    const char* (*window_title)(struct RUBase* self_c);
    void (*set_window_icon)(struct RUBase* self_c, struct RUBase* icon);
    struct RUIcon (*window_icon)(struct RUBase* self_c);
    void (*set_window_icon_text)(struct RUBase* self_c, const char* arg0);
    const char* (*window_icon_text)(struct RUBase* self_c);
    void (*set_window_role)(struct RUBase* self_c, const char* arg0);
    const char* (*window_role)(struct RUBase* self_c);
    void (*set_window_file_path)(struct RUBase* self_c, const char* file_path);
    const char* (*window_file_path)(struct RUBase* self_c);
    void (*set_window_opacity)(struct RUBase* self_c, float level);
    float (*window_opacity)(struct RUBase* self_c);
    bool (*is_window_modified)(struct RUBase* self_c);
    void (*set_tool_tip)(struct RUBase* self_c, const char* arg0);
    const char* (*tool_tip)(struct RUBase* self_c);
    void (*set_tool_tip_duration)(struct RUBase* self_c, int msec);
    int (*tool_tip_duration)(struct RUBase* self_c);
    void (*set_status_tip)(struct RUBase* self_c, const char* arg0);
    const char* (*status_tip)(struct RUBase* self_c);
    void (*set_whats_this)(struct RUBase* self_c, const char* arg0);
    const char* (*whats_this)(struct RUBase* self_c);
    const char* (*accessible_name)(struct RUBase* self_c);
    void (*set_accessible_name)(struct RUBase* self_c, const char* name);
    const char* (*accessible_description)(struct RUBase* self_c);
    void (*set_accessible_description)(struct RUBase* self_c,
                                       const char* description);
    void (*set_layout_direction)(struct RUBase* self_c, int direction);
    int (*layout_direction)(struct RUBase* self_c);
    void (*unset_layout_direction)(struct RUBase* self_c);
    bool (*is_right_to_left)(struct RUBase* self_c);
    bool (*is_left_to_right)(struct RUBase* self_c);
    void (*set_focus)(struct RUBase* self_c);
    bool (*is_active_window)(struct RUBase* self_c);
    void (*activate_window)(struct RUBase* self_c);
    void (*clear_focus)(struct RUBase* self_c);
    void (*set_focus_2)(struct RUBase* self_c, int reason);
    int (*focus_policy)(struct RUBase* self_c);
    void (*set_focus_policy)(struct RUBase* self_c, int policy);
    bool (*has_focus)(struct RUBase* self_c);
    void (*set_tab_order)(struct RUBase* self_c, struct RUBase* arg0,
                          struct RUBase* arg1);
    void (*set_focus_proxy)(struct RUBase* self_c, struct RUBase* arg0);
    struct RUWidget (*focus_proxy)(struct RUBase* self_c);
    int (*context_menu_policy)(struct RUBase* self_c);
    void (*set_context_menu_policy)(struct RUBase* self_c, int policy);
    void (*grab_mouse)(struct RUBase* self_c);
    void (*grab_mouse_2)(struct RUBase* self_c, struct RUBase* arg0);
    void (*release_mouse)(struct RUBase* self_c);
    void (*grab_keyboard)(struct RUBase* self_c);
    void (*release_keyboard)(struct RUBase* self_c);
    int (*grab_shortcut)(struct RUBase* self_c, struct RUBase* key,
                         int context);
    void (*release_shortcut)(struct RUBase* self_c, int id);
    void (*set_shortcut_enabled)(struct RUBase* self_c, int id, bool enable);
    void (*set_shortcut_auto_repeat)(struct RUBase* self_c, int id,
                                     bool enable);
    struct RUWidget (*mouse_grabber)(struct RUBase* self_c);
    struct RUWidget (*keyboard_grabber)(struct RUBase* self_c);
    bool (*updates_enabled)(struct RUBase* self_c);
    void (*set_updates_enabled)(struct RUBase* self_c, bool enable);
    void (*update)(struct RUBase* self_c);
    void (*repaint)(struct RUBase* self_c);
    void (*update_2)(struct RUBase* self_c, int x, int y, int w, int h);
    void (*update_3)(struct RUBase* self_c, struct RUBase* arg0);
    void (*update_4)(struct RUBase* self_c, struct RUBase* arg0);
    void (*repaint_2)(struct RUBase* self_c, int x, int y, int w, int h);
    void (*repaint_3)(struct RUBase* self_c, struct RUBase* arg0);
    void (*repaint_4)(struct RUBase* self_c, struct RUBase* arg0);
    void (*set_hidden)(struct RUBase* self_c, bool hidden);
    void (*show)(struct RUBase* self_c);
    void (*hide)(struct RUBase* self_c);
    void (*show_minimized)(struct RUBase* self_c);
    void (*show_maximized)(struct RUBase* self_c);
    void (*show_full_screen)(struct RUBase* self_c);
    void (*show_normal)(struct RUBase* self_c);
    bool (*close)(struct RUBase* self_c);
    void (*raise)(struct RUBase* self_c);
    void (*lower)(struct RUBase* self_c);
    void (*stack_under)(struct RUBase* self_c, struct RUBase* arg0);
    void (*move_widget)(struct RUBase* self_c, int x, int y);
    void (*move_2)(struct RUBase* self_c, struct RUBase* arg0);
    void (*resize)(struct RUBase* self_c, int w, int h);
    void (*resize_2)(struct RUBase* self_c, struct RUBase* arg0);
    void (*adjust_size)(struct RUBase* self_c);
    bool (*is_visible)(struct RUBase* self_c);
    bool (*is_visible_to)(struct RUBase* self_c, struct RUBase* arg0);
    bool (*is_hidden)(struct RUBase* self_c);
    bool (*is_minimized)(struct RUBase* self_c);
    bool (*is_maximized)(struct RUBase* self_c);
    bool (*is_full_screen)(struct RUBase* self_c);
    int (*window_state)(struct RUBase* self_c);
    void (*set_window_state)(struct RUBase* self_c, int state);
    void (*override_window_state)(struct RUBase* self_c, int state);
    struct RUSize (*size_hint)(struct RUBase* self_c);
    struct RUSize (*minimum_size_hint)(struct RUBase* self_c);
    struct RUSizePolicy (*size_policy)(struct RUBase* self_c);
    void (*set_size_policy)(struct RUBase* self_c, struct RUBase* arg0);
    void (*set_size_policy_2)(struct RUBase* self_c, int horizontal,
                              int vertical);
    int (*height_for_width)(struct RUBase* self_c, int arg0);
    bool (*has_height_for_width)(struct RUBase* self_c);
    struct RURegion (*visible_region)(struct RUBase* self_c);
    void (*set_contents_margins)(struct RUBase* self_c, int left, int top,
                                 int right, int bottom);
    void (*set_contents_margins_2)(struct RUBase* self_c,
                                   struct RUBase* margins);
    struct RUMargins (*contents_margins)(struct RUBase* self_c);
    struct RURect (*contents_rect)(struct RUBase* self_c);
    struct RULayout (*layout)(struct RUBase* self_c);
    void (*set_layout)(struct RUBase* self_c, struct RUBase* arg0);
    void (*set_parent)(struct RUBase* self_c, struct RUBase* parent);
    void (*set_parent_2)(struct RUBase* self_c, struct RUBase* parent, int f);
    void (*scroll)(struct RUBase* self_c, int dx, int dy);
    void (*scroll_2)(struct RUBase* self_c, int dx, int dy,
                     struct RUBase* arg0);
    struct RUWidget (*focus_widget)(struct RUBase* self_c);
    struct RUWidget (*next_in_focus_chain)(struct RUBase* self_c);
    struct RUWidget (*previous_in_focus_chain)(struct RUBase* self_c);
    bool (*accept_drops)(struct RUBase* self_c);
    void (*set_accept_drops)(struct RUBase* self_c, bool on);
    struct RUWidget (*parent_widget)(struct RUBase* self_c);
    void (*set_window_flags)(struct RUBase* self_c, int gtype);
    int (*window_flags)(struct RUBase* self_c);
    void (*override_window_flags)(struct RUBase* self_c, int wtype);
    struct RUWidget (*find)(struct RUBase* self_c, uint64_t arg0);
    struct RUWidget (*child_at)(struct RUBase* self_c, int x, int y);
    struct RUWidget (*child_at_2)(struct RUBase* self_c, struct RUBase* p);
    struct RUPaintEngine (*paint_engine)(struct RUBase* self_c);
    void (*ensure_polished)(struct RUBase* self_c);
    bool (*is_ancestor_of)(struct RUBase* self_c, struct RUBase* child);
    bool (*auto_fill_background)(struct RUBase* self_c);
    void (*set_auto_fill_background)(struct RUBase* self_c, bool enabled);
    struct RUBackingStore (*backing_store)(struct RUBase* self_c);
    struct RUWindow (*window_handle)(struct RUBase* self_c);
    struct RUWidget (*create_window_container)(struct RUBase* self_c,
                                               struct RUBase* window,
                                               struct RUBase* parent,
                                               int flags);
    void (*set_window_title_changed_event)(void* object, void* user_data,
                                           void* wrapped_func,
                                           void (*event)(void*, void* self_c,
                                                         const char* title));
    void (*set_window_icon_changed_event)(void* object, void* user_data,
                                          void* wrapped_func,
                                          void (*event)(void*, void* self_c,
                                                        struct RUBase* icon));
    void (*set_window_icon_text_changed_event)(
        void* object, void* user_data, void* wrapped_func,
        void (*event)(void*, void* self_c, const char* icon_text));
    void (*set_custom_context_menu_requested_event)(
        void* object, void* user_data, void* wrapped_func,
        void (*event)(void*, void* self_c, struct RUBase* pos));
    void (*set_mouse_press_event)(void* object, void* user_data,
                                  void* wrapped_func,
                                  void (*event)(void*, void* self_c,
                                                struct RUBase* event));
    void (*remove_mouse_press_event)(void* object);
    void (*set_mouse_release_event)(void* object, void* user_data,
                                    void* wrapped_func,
                                    void (*event)(void*, void* self_c,
                                                  struct RUBase* event));
    void (*remove_mouse_release_event)(void* object);
    void (*set_mouse_double_click_event)(void* object, void* user_data,
                                         void* wrapped_func,
                                         void (*event)(void*, void* self_c,
                                                       struct RUBase* event));
    void (*remove_mouse_double_click_event)(void* object);
    void (*set_mouse_move_event)(void* object, void* user_data,
                                 void* wrapped_func,
                                 void (*event)(void*, void* self_c,
                                               struct RUBase* event));
    void (*remove_mouse_move_event)(void* object);
    void (*set_wheel_event)(void* object, void* user_data, void* wrapped_func,
                            void (*event)(void*, void* self_c,
                                          struct RUBase* event));
    void (*remove_wheel_event)(void* object);
    void (*set_key_press_event)(void* object, void* user_data,
                                void* wrapped_func,
                                void (*event)(void*, void* self_c,
                                              struct RUBase* event));
    void (*remove_key_press_event)(void* object);
    void (*set_key_release_event)(void* object, void* user_data,
                                  void* wrapped_func,
                                  void (*event)(void*, void* self_c,
                                                struct RUBase* event));
    void (*remove_key_release_event)(void* object);
    void (*set_focus_in_event)(void* object, void* user_data,
                               void* wrapped_func,
                               void (*event)(void*, void* self_c,
                                             struct RUBase* event));
    void (*remove_focus_in_event)(void* object);
    void (*set_focus_out_event)(void* object, void* user_data,
                                void* wrapped_func,
                                void (*event)(void*, void* self_c,
                                              struct RUBase* event));
    void (*remove_focus_out_event)(void* object);
    void (*set_enter_event)(void* object, void* user_data, void* wrapped_func,
                            void (*event)(void*, void* self_c,
                                          struct RUBase* event));
    void (*remove_enter_event)(void* object);
    void (*set_leave_event)(void* object, void* user_data, void* wrapped_func,
                            void (*event)(void*, void* self_c,
                                          struct RUBase* event));
    void (*remove_leave_event)(void* object);
    void (*set_paint_event)(void* object, void* user_data, void* wrapped_func,
                            void (*event)(void*, void* self_c,
                                          struct RUBase* event));
    void (*remove_paint_event)(void* object);
    void (*set_move_event)(void* object, void* user_data, void* wrapped_func,
                           void (*event)(void*, void* self_c,
                                         struct RUBase* event));
    void (*remove_move_event)(void* object);
    void (*set_resize_event)(void* object, void* user_data, void* wrapped_func,
                             void (*event)(void*, void* self_c,
                                           struct RUBase* event));
    void (*remove_resize_event)(void* object);
    void (*set_close_event)(void* object, void* user_data, void* wrapped_func,
                            void (*event)(void*, void* self_c,
                                          struct RUBase* event));
    void (*remove_close_event)(void* object);
    void (*set_context_menu_event)(void* object, void* user_data,
                                   void* wrapped_func,
                                   void (*event)(void*, void* self_c,
                                                 struct RUBase* event));
    void (*remove_context_menu_event)(void* object);
    void (*set_tablet_event)(void* object, void* user_data, void* wrapped_func,
                             void (*event)(void*, void* self_c,
                                           struct RUBase* event));
    void (*remove_tablet_event)(void* object);
    void (*set_drag_enter_event)(void* object, void* user_data,
                                 void* wrapped_func,
                                 void (*event)(void*, void* self_c,
                                               struct RUBase* event));
    void (*remove_drag_enter_event)(void* object);
    void (*set_drag_move_event)(void* object, void* user_data,
                                void* wrapped_func,
                                void (*event)(void*, void* self_c,
                                              struct RUBase* event));
    void (*remove_drag_move_event)(void* object);
    void (*set_drag_leave_event)(void* object, void* user_data,
                                 void* wrapped_func,
                                 void (*event)(void*, void* self_c,
                                               struct RUBase* event));
    void (*remove_drag_leave_event)(void* object);
    void (*set_drop_event)(void* object, void* user_data, void* wrapped_func,
                           void (*event)(void*, void* self_c,
                                         struct RUBase* event));
    void (*remove_drop_event)(void* object);
    void (*set_show_event)(void* object, void* user_data, void* wrapped_func,
                           void (*event)(void*, void* self_c,
                                         struct RUBase* event));
    void (*remove_show_event)(void* object);
    void (*set_hide_event)(void* object, void* user_data, void* wrapped_func,
                           void (*event)(void*, void* self_c,
                                         struct RUBase* event));
    void (*remove_hide_event)(void* object);
    void (*set_change_event)(void* object, void* user_data, void* wrapped_func,
                             void (*event)(void*, void* self_c,
                                           struct RUBase* arg0));
    void (*remove_change_event)(void* object);
    int (*input_method_hints)(struct RUBase* self_c);
    void (*set_input_method_hints)(struct RUBase* self_c, int hints);
} RUWidgetFuncs;

typedef struct RUWidgetAllFuncs {
    struct RUObjectFuncs* object_funcs;
    struct RUPaintDeviceFuncs* paint_device_funcs;
    struct RUWidgetFuncs* widget_funcs;
} RUWidgetAllFuncs;

typedef struct RUWidget {
    RUBase* qt_data;
    RUBase* host_data;
    struct RUWidgetAllFuncs* all_funcs;
} RUWidget;

extern RUWidgetFuncs s_widget_funcs;
extern RUWidgetAllFuncs s_widget_all_funcs;

#ifdef __cplusplus
}
#endif