rute 0.0.4

UI library implemented on top of Qt
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// This file is auto-generated by rute_gen. DO NOT EDIT
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#include "../rute_base.h"
#include "../rute_manual.h"
#include <QSpacerItem>
#include "spacer_item_ffi.h"

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

static void spacer_item_change_size(struct RUBase* self_c, int w, int h, int h_data, int v_data) {
    QSpacerItem* qt_value = (QSpacerItem*)self_c;
    qt_value->changeSize(w, h, (QSizePolicy::Policy)s_policy_lookup[h_data], (QSizePolicy::Policy)s_policy_lookup[v_data]);
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

static struct RUSize spacer_item_size_hint(struct RUBase* self_c) {
    QSpacerItem* qt_value = (QSpacerItem*)self_c;
    auto ret_value = qt_value->sizeHint();
    WRSize* new_val = new WRSize();
    *new_val = ret_value;
    struct RUSize ctl;
    ctl.qt_data = (struct RUBase*)new_val;
    ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
    ctl.all_funcs = &s_size_all_funcs;
    return ctl;
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

static struct RUSize spacer_item_minimum_size(struct RUBase* self_c) {
    QSpacerItem* qt_value = (QSpacerItem*)self_c;
    auto ret_value = qt_value->minimumSize();
    WRSize* new_val = new WRSize();
    *new_val = ret_value;
    struct RUSize ctl;
    ctl.qt_data = (struct RUBase*)new_val;
    ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
    ctl.all_funcs = &s_size_all_funcs;
    return ctl;
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

static struct RUSize spacer_item_maximum_size(struct RUBase* self_c) {
    QSpacerItem* qt_value = (QSpacerItem*)self_c;
    auto ret_value = qt_value->maximumSize();
    WRSize* new_val = new WRSize();
    *new_val = ret_value;
    struct RUSize ctl;
    ctl.qt_data = (struct RUBase*)new_val;
    ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
    ctl.all_funcs = &s_size_all_funcs;
    return ctl;
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

static int spacer_item_expanding_directions(struct RUBase* self_c) {
    QSpacerItem* qt_value = (QSpacerItem*)self_c;
    auto ret_value = qt_value->expandingDirections();
    return s_orientations_lookup[(int)ret_value];
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

static bool spacer_item_is_empty(struct RUBase* self_c) {
    QSpacerItem* qt_value = (QSpacerItem*)self_c;
    auto ret_value = qt_value->isEmpty();
    return ret_value;
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

static struct RUSpacerItem spacer_item_spacer_item(struct RUBase* self_c) {
    QSpacerItem* qt_value = (QSpacerItem*)self_c;
    auto ret_value = qt_value->spacerItem();
    struct RUSpacerItem ctl;
    ctl.qt_data = (struct RUBase*)ret_value;
    ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)ret_value];
    ctl.all_funcs = &s_spacer_item_all_funcs;
    return ctl;
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

static struct RUSizePolicy spacer_item_size_policy(struct RUBase* self_c) {
    QSpacerItem* qt_value = (QSpacerItem*)self_c;
    auto ret_value = qt_value->sizePolicy();
    WRSizePolicy* new_val = new WRSizePolicy();
    *new_val = ret_value;
    struct RUSizePolicy ctl;
    ctl.qt_data = (struct RUBase*)new_val;
    ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
    ctl.all_funcs = &s_size_policy_all_funcs;
    return ctl;
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

struct RUSpacerItemFuncs s_spacer_item_funcs = {
    spacer_item_change_size,
    spacer_item_size_hint,
    spacer_item_minimum_size,
    spacer_item_maximum_size,
    spacer_item_expanding_directions,
    spacer_item_is_empty,
    spacer_item_spacer_item,
    spacer_item_size_policy,
};

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

struct RUSpacerItemAllFuncs s_spacer_item_all_funcs = {
    &s_layout_item_funcs,
    &s_spacer_item_funcs,
};