#pragma once
#include <stdbool.h>
#include <stdint.h>
#include "../rute_base.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "cursor_ffi.h"
#include "icon_ffi.h"
#include "margins_ffi.h"
#include "object_ffi.h"
#include "point_ffi.h"
#include "region_ffi.h"
#include "screen_ffi.h"
#include "size_ffi.h"
#include "surface_format_ffi.h"
#include "window_ffi.h"
struct RUWindowFuncs;
struct RUWindow;
typedef struct RUWindowFuncs {
void (*destroy)(struct RUBase* self);
void (*set_object_surface_type)(struct RUBase* self_c, int surface_type);
int (*surface_type)(struct RUBase* self_c);
bool (*is_visible)(struct RUBase* self_c);
int (*visibility)(struct RUBase* self_c);
void (*set_visibility)(struct RUBase* self_c, int v);
void (*create)(struct RUBase* self_c);
uint64_t (*win_id)(struct RUBase* self_c);
struct RUWindow (*parent)(struct RUBase* self_c, int mode);
struct RUWindow (*parent_2)(struct RUBase* self_c);
void (*set_parent)(struct RUBase* self_c, struct RUBase* parent);
bool (*is_top_level)(struct RUBase* self_c);
bool (*is_modal)(struct RUBase* self_c);
int (*modality)(struct RUBase* self_c);
void (*set_modality)(struct RUBase* self_c, int modality);
void (*set_object_format)(struct RUBase* self_c, struct RUBase* format);
struct RUSurfaceFormat (*format)(struct RUBase* self_c);
struct RUSurfaceFormat (*requested_format)(struct RUBase* self_c);
void (*set_flags)(struct RUBase* self_c, int flags);
int (*flags)(struct RUBase* self_c);
const char* (*title)(struct RUBase* self_c);
void (*set_opacity)(struct RUBase* self_c, float level);
float (*opacity)(struct RUBase* self_c);
void (*set_mask)(struct RUBase* self_c, struct RUBase* region);
struct RURegion (*mask)(struct RUBase* self_c);
bool (*is_active)(struct RUBase* self_c);
void (*report_content_orientation_change)(struct RUBase* self_c,
int orientation);
int (*content_orientation)(struct RUBase* self_c);
float (*device_pixel_ratio)(struct RUBase* self_c);
int (*window_state)(struct RUBase* self_c);
int (*window_states)(struct RUBase* self_c);
void (*set_window_state)(struct RUBase* self_c, int state);
void (*set_window_states)(struct RUBase* self_c, int states);
void (*set_transient_parent)(struct RUBase* self_c, struct RUBase* parent);
bool (*is_ancestor_of)(struct RUBase* self_c, struct RUBase* child,
int mode);
bool (*is_exposed)(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);
struct RUSize (*minimum_size)(struct RUBase* self_c);
struct RUSize (*maximum_size)(struct RUBase* self_c);
struct RUSize (*base_size)(struct RUBase* self_c);
struct RUSize (*size_increment)(struct RUBase* self_c);
void (*set_minimum_size)(struct RUBase* self_c, struct RUBase* size);
void (*set_maximum_size)(struct RUBase* self_c, struct RUBase* size);
void (*set_base_size)(struct RUBase* self_c, struct RUBase* size);
void (*set_size_increment)(struct RUBase* self_c, struct RUBase* size);
struct RUMargins (*frame_margins)(struct RUBase* self_c);
struct RUPoint (*frame_position)(struct RUBase* self_c);
void (*set_frame_position)(struct RUBase* self_c, struct RUBase* point);
int (*width)(struct RUBase* self_c);
int (*height)(struct RUBase* self_c);
int (*x)(struct RUBase* self_c);
int (*y)(struct RUBase* self_c);
struct RUSize (*size)(struct RUBase* self_c);
struct RUPoint (*position)(struct RUBase* self_c);
void (*set_position)(struct RUBase* self_c, struct RUBase* pt);
void (*set_position_2)(struct RUBase* self_c, int posx, int posy);
void (*resize)(struct RUBase* self_c, struct RUBase* new_size);
void (*resize_2)(struct RUBase* self_c, int w, int h);
void (*set_file_path)(struct RUBase* self_c, const char* file_path);
const char* (*file_path)(struct RUBase* self_c);
void (*set_icon)(struct RUBase* self_c, struct RUBase* icon);
struct RUIcon (*icon)(struct RUBase* self_c);
bool (*set_keyboard_grab_enabled)(struct RUBase* self_c, bool grab);
bool (*set_mouse_grab_enabled)(struct RUBase* self_c, bool grab);
struct RUScreen (*screen)(struct RUBase* self_c);
void (*set_screen)(struct RUBase* self_c, struct RUBase* screen);
struct RUObject (*focus_object)(struct RUBase* self_c);
struct RUPoint (*map_to_global)(struct RUBase* self_c, struct RUBase* pos);
struct RUPoint (*map_from_global)(struct RUBase* self_c,
struct RUBase* pos);
struct RUCursor (*cursor)(struct RUBase* self_c);
void (*set_cursor)(struct RUBase* self_c, struct RUBase* arg0);
void (*unset_cursor)(struct RUBase* self_c);
struct RUWindow (*from_win_id)(struct RUBase* self_c, uint64_t id);
void (*request_activate)(struct RUBase* self_c);
void (*set_visible)(struct RUBase* self_c, bool visible);
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 (*set_title)(struct RUBase* self_c, const char* arg0);
void (*set_x)(struct RUBase* self_c, int arg);
void (*set_y)(struct RUBase* self_c, int arg);
void (*set_width)(struct RUBase* self_c, int arg);
void (*set_height)(struct RUBase* self_c, int arg);
void (*set_minimum_width)(struct RUBase* self_c, int w);
void (*set_minimum_height)(struct RUBase* self_c, int h);
void (*set_maximum_width)(struct RUBase* self_c, int w);
void (*set_maximum_height)(struct RUBase* self_c, int h);
void (*alert)(struct RUBase* self_c, int msec);
void (*request_update)(struct RUBase* self_c);
void (*set_screen_changed_event)(void* object, void* user_data,
void* wrapped_func,
void (*event)(void*, void* self_c,
struct RUBase* screen));
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_x_changed_event)(void* object, void* user_data,
void* wrapped_func,
void (*event)(void*, void* self_c, int arg));
void (*set_y_changed_event)(void* object, void* user_data,
void* wrapped_func,
void (*event)(void*, void* self_c, int arg));
void (*set_width_changed_event)(void* object, void* user_data,
void* wrapped_func,
void (*event)(void*, void* self_c,
int arg));
void (*set_height_changed_event)(void* object, void* user_data,
void* wrapped_func,
void (*event)(void*, void* self_c,
int arg));
void (*set_minimum_width_changed_event)(void* object, void* user_data,
void* wrapped_func,
void (*event)(void*, void* self_c,
int arg));
void (*set_minimum_height_changed_event)(void* object, void* user_data,
void* wrapped_func,
void (*event)(void*, void* self_c,
int arg));
void (*set_maximum_width_changed_event)(void* object, void* user_data,
void* wrapped_func,
void (*event)(void*, void* self_c,
int arg));
void (*set_maximum_height_changed_event)(void* object, void* user_data,
void* wrapped_func,
void (*event)(void*, void* self_c,
int arg));
void (*set_visible_changed_event)(void* object, void* user_data,
void* wrapped_func,
void (*event)(void*, void* self_c,
bool arg));
void (*set_active_changed_event)(void* object, void* user_data,
void* wrapped_func,
void (*event)(void*, void* self_c));
void (*set_focus_object_changed_event)(
void* object, void* user_data, void* wrapped_func,
void (*event)(void*, void* self_c, struct RUBase* object));
void (*set_opacity_changed_event)(void* object, void* user_data,
void* wrapped_func,
void (*event)(void*, void* self_c,
float opacity));
void (*set_expose_event)(void* object, void* user_data, void* wrapped_func,
void (*event)(void*, void* self_c,
struct RUBase* arg0));
void (*remove_expose_event)(void* object);
void (*set_resize_event)(void* object, void* user_data, void* wrapped_func,
void (*event)(void*, void* self_c,
struct RUBase* arg0));
void (*remove_resize_event)(void* object);
void (*set_move_event)(void* object, void* user_data, void* wrapped_func,
void (*event)(void*, void* self_c,
struct RUBase* arg0));
void (*remove_move_event)(void* object);
void (*set_focus_in_event)(void* object, void* user_data,
void* wrapped_func,
void (*event)(void*, void* self_c,
struct RUBase* arg0));
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* arg0));
void (*remove_focus_out_event)(void* object);
void (*set_show_event)(void* object, void* user_data, void* wrapped_func,
void (*event)(void*, void* self_c,
struct RUBase* arg0));
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* arg0));
void (*remove_hide_event)(void* object);
void (*set_key_press_event)(void* object, void* user_data,
void* wrapped_func,
void (*event)(void*, void* self_c,
struct RUBase* arg0));
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* arg0));
void (*remove_key_release_event)(void* object);
void (*set_mouse_press_event)(void* object, void* user_data,
void* wrapped_func,
void (*event)(void*, void* self_c,
struct RUBase* arg0));
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* arg0));
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* arg0));
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* arg0));
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* arg0));
void (*remove_wheel_event)(void* object);
void (*set_touch_event)(void* object, void* user_data, void* wrapped_func,
void (*event)(void*, void* self_c,
struct RUBase* arg0));
void (*remove_touch_event)(void* object);
void (*set_tablet_event)(void* object, void* user_data, void* wrapped_func,
void (*event)(void*, void* self_c,
struct RUBase* arg0));
void (*remove_tablet_event)(void* object);
} RUWindowFuncs;
typedef struct RUWindowAllFuncs {
struct RUObjectFuncs* object_funcs;
struct RUSurfaceFuncs* surface_funcs;
struct RUWindowFuncs* window_funcs;
} RUWindowAllFuncs;
typedef struct RUWindow {
RUBase* qt_data;
RUBase* host_data;
struct RUWindowAllFuncs* all_funcs;
} RUWindow;
extern RUWindowFuncs s_window_funcs;
extern RUWindowAllFuncs s_window_all_funcs;
#ifdef __cplusplus
}
#endif