#include "../rute_base.h"
#include "../rute_manual.h"
#include <QMargins>
#include "margins_ffi.h"
static bool margins_is_null(struct RUBase* self_c) {
WRMargins* qt_value = (WRMargins*)self_c;
auto ret_value = qt_value->isNull();
return ret_value;
}
static int margins_left(struct RUBase* self_c) {
WRMargins* qt_value = (WRMargins*)self_c;
auto ret_value = qt_value->left();
return ret_value;
}
static int margins_top(struct RUBase* self_c) {
WRMargins* qt_value = (WRMargins*)self_c;
auto ret_value = qt_value->top();
return ret_value;
}
static int margins_right(struct RUBase* self_c) {
WRMargins* qt_value = (WRMargins*)self_c;
auto ret_value = qt_value->right();
return ret_value;
}
static int margins_bottom(struct RUBase* self_c) {
WRMargins* qt_value = (WRMargins*)self_c;
auto ret_value = qt_value->bottom();
return ret_value;
}
static void margins_set_left(struct RUBase* self_c, int left) {
WRMargins* qt_value = (WRMargins*)self_c;
qt_value->setLeft(left);
}
static void margins_set_top(struct RUBase* self_c, int top) {
WRMargins* qt_value = (WRMargins*)self_c;
qt_value->setTop(top);
}
static void margins_set_right(struct RUBase* self_c, int right) {
WRMargins* qt_value = (WRMargins*)self_c;
qt_value->setRight(right);
}
static void margins_set_bottom(struct RUBase* self_c, int bottom) {
WRMargins* qt_value = (WRMargins*)self_c;
qt_value->setBottom(bottom);
}
static struct RUMargins create_margins(
struct RUBase* priv_data,
RUDeleteCallback delete_callback,
void* private_user_data)
{
auto ctl = generic_create_func_with_delete<struct RUMargins, WRMargins>(priv_data, delete_callback, private_user_data);
ctl.all_funcs = &s_margins_all_funcs;
return ctl;
}
static void destroy_margins(struct RUBase* priv_data) {
destroy_generic<WRMargins>(priv_data);
}
struct RUMarginsFuncs s_margins_funcs = {
destroy_margins,
margins_is_null,
margins_left,
margins_top,
margins_right,
margins_bottom,
margins_set_left,
margins_set_top,
margins_set_right,
margins_set_bottom,
};
struct RUMarginsAllFuncs s_margins_all_funcs = {
&s_margins_funcs,
};