#include "../rute_base.h"
#include "../rute_manual.h"
#include <QObject>
#include "object_ffi.h"
static const char* object_object_name(struct RUBase* self_c) {
WRObject* qt_value = (WRObject*)self_c;
auto ret_value = qt_value->objectName();
return q_string_to_const_char(ret_value);
}
static void object_set_object_name(struct RUBase* self_c, const char* name) {
WRObject* qt_value = (WRObject*)self_c;
qt_value->setObjectName(QString::fromUtf8(name));
}
static bool object_is_widget_type(struct RUBase* self_c) {
WRObject* qt_value = (WRObject*)self_c;
auto ret_value = qt_value->isWidgetType();
return ret_value;
}
static bool object_is_window_type(struct RUBase* self_c) {
WRObject* qt_value = (WRObject*)self_c;
auto ret_value = qt_value->isWindowType();
return ret_value;
}
static bool object_signals_blocked(struct RUBase* self_c) {
WRObject* qt_value = (WRObject*)self_c;
auto ret_value = qt_value->signalsBlocked();
return ret_value;
}
static bool object_block_signals(struct RUBase* self_c, bool b) {
WRObject* qt_value = (WRObject*)self_c;
auto ret_value = qt_value->blockSignals(b);
return ret_value;
}
static int object_start_timer(struct RUBase* self_c, int interval, int timer_type) {
WRObject* qt_value = (WRObject*)self_c;
auto ret_value = qt_value->startTimer(interval, (Qt::TimerType)s_timer_type_lookup[timer_type]);
return ret_value;
}
static int object_start_timer_2(struct RUBase* self_c, uint32_t time, int timer_type) {
WRObject* qt_value = (WRObject*)self_c;
auto ret_value = qt_value->startTimer(time, (Qt::TimerType)s_timer_type_lookup[timer_type]);
return ret_value;
}
static void object_kill_timer(struct RUBase* self_c, int id) {
WRObject* qt_value = (WRObject*)self_c;
qt_value->killTimer(id);
}
static void object_set_parent(struct RUBase* self_c, struct RUBase* parent) {
WRObject* qt_value = (WRObject*)self_c;
qt_value->setParent((QObject*)parent);
}
static void object_install_event_filter(struct RUBase* self_c, struct RUBase* filter_obj) {
WRObject* qt_value = (WRObject*)self_c;
qt_value->installEventFilter((QObject*)filter_obj);
}
static void object_dump_object_tree(struct RUBase* self_c) {
WRObject* qt_value = (WRObject*)self_c;
qt_value->dumpObjectTree();
}
static void object_dump_object_info(struct RUBase* self_c) {
WRObject* qt_value = (WRObject*)self_c;
qt_value->dumpObjectInfo();
}
static void object_dump_object_tree_2(struct RUBase* self_c) {
WRObject* qt_value = (WRObject*)self_c;
qt_value->dumpObjectTree();
}
static void object_dump_object_info_2(struct RUBase* self_c) {
WRObject* qt_value = (WRObject*)self_c;
qt_value->dumpObjectInfo();
}
static struct RUObject object_parent(struct RUBase* self_c) {
WRObject* qt_value = (WRObject*)self_c;
auto ret_value = qt_value->parent();
struct RUObject ctl;
ctl.qt_data = (struct RUBase*)ret_value;
ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)ret_value];
ctl.all_funcs = &s_object_all_funcs;
return ctl;
}
static void object_delete_later(struct RUBase* self_c) {
WRObject* qt_value = (WRObject*)self_c;
qt_value->deleteLater();
}
static void set_object_custom_event(void* object, void* user_data, void* wrapped_func, void (*trampoline_func)(void*, void* self_c, struct RUBase* event)) {
WRObject* qt_object = (WRObject*)object;
qt_object->m_custom_event = trampoline_func;
qt_object->m_custom_event_user_data = user_data;
qt_object->m_custom_event_wrapped_func = wrapped_func;
}
static void remove_object_custom_event(void* object) {
WRObject* qt_object = (WRObject*)object;
qt_object->m_custom_event = nullptr;
qt_object->m_custom_event_user_data = nullptr;
qt_object->m_custom_event_wrapped_func = nullptr;
}
static struct RUObject create_object(
struct RUBase* priv_data,
RUDeleteCallback delete_callback,
void* private_user_data)
{
auto ctl = generic_create_func_with_delete<struct RUObject, WRObject>(priv_data, delete_callback, private_user_data);
ctl.all_funcs = &s_object_all_funcs;
return ctl;
}
static void destroy_object(struct RUBase* priv_data) {
destroy_generic<WRObject>(priv_data);
}
struct RUObjectFuncs s_object_funcs = {
destroy_object,
object_object_name,
object_set_object_name,
object_is_widget_type,
object_is_window_type,
object_signals_blocked,
object_block_signals,
object_start_timer,
object_start_timer_2,
object_kill_timer,
object_set_parent,
object_install_event_filter,
object_dump_object_tree,
object_dump_object_info,
object_dump_object_tree_2,
object_dump_object_info_2,
object_parent,
object_delete_later,
set_object_custom_event,
remove_object_custom_event,
};
struct RUObjectAllFuncs s_object_all_funcs = {
&s_object_funcs,
};