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 <QSizeF>
#include "size_f_ffi.h"

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

static bool size_f_is_null(struct RUBase* self_c) {
    WRSizeF* qt_value = (WRSizeF*)self_c;
    auto ret_value = qt_value->isNull();
    return ret_value;
}

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

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

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

static bool size_f_is_valid(struct RUBase* self_c) {
    WRSizeF* qt_value = (WRSizeF*)self_c;
    auto ret_value = qt_value->isValid();
    return ret_value;
}

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

static float size_f_width(struct RUBase* self_c) {
    WRSizeF* qt_value = (WRSizeF*)self_c;
    auto ret_value = qt_value->width();
    return ret_value;
}

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

static float size_f_height(struct RUBase* self_c) {
    WRSizeF* qt_value = (WRSizeF*)self_c;
    auto ret_value = qt_value->height();
    return ret_value;
}

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

static void size_f_set_width(struct RUBase* self_c, float w) {
    WRSizeF* qt_value = (WRSizeF*)self_c;
    qt_value->setWidth(w);
}

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

static void size_f_set_height(struct RUBase* self_c, float h) {
    WRSizeF* qt_value = (WRSizeF*)self_c;
    qt_value->setHeight(h);
}

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

static void size_f_scale(struct RUBase* self_c, float w, float h, int mode) {
    WRSizeF* qt_value = (WRSizeF*)self_c;
    qt_value->scale(w, h, (Qt::AspectRatioMode)s_aspect_ratio_mode_lookup[mode]);
}

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

static void size_f_scale_2(struct RUBase* self_c, struct RUBase* s, int mode) {
    WRSizeF* qt_value = (WRSizeF*)self_c;
    qt_value->scale(*((QSizeF*)s), (Qt::AspectRatioMode)s_aspect_ratio_mode_lookup[mode]);
}

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

static struct RUSizeF size_f_scaled(struct RUBase* self_c, float w, float h, int mode) {
    WRSizeF* qt_value = (WRSizeF*)self_c;
    auto ret_value = qt_value->scaled(w, h, (Qt::AspectRatioMode)s_aspect_ratio_mode_lookup[mode]);
    WRSizeF* new_val = new WRSizeF();
    *new_val = ret_value;
    struct RUSizeF 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_f_all_funcs;
    return ctl;
}

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

static struct RUSizeF size_f_scaled_2(struct RUBase* self_c, struct RUBase* s, int mode) {
    WRSizeF* qt_value = (WRSizeF*)self_c;
    auto ret_value = qt_value->scaled(*((QSizeF*)s), (Qt::AspectRatioMode)s_aspect_ratio_mode_lookup[mode]);
    WRSizeF* new_val = new WRSizeF();
    *new_val = ret_value;
    struct RUSizeF 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_f_all_funcs;
    return ctl;
}

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

static struct RUSizeF size_f_expanded_to(struct RUBase* self_c, struct RUBase* arg0) {
    WRSizeF* qt_value = (WRSizeF*)self_c;
    auto ret_value = qt_value->expandedTo(*((QSizeF*)arg0));
    WRSizeF* new_val = new WRSizeF();
    *new_val = ret_value;
    struct RUSizeF 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_f_all_funcs;
    return ctl;
}

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

static struct RUSizeF size_f_bounded_to(struct RUBase* self_c, struct RUBase* arg0) {
    WRSizeF* qt_value = (WRSizeF*)self_c;
    auto ret_value = qt_value->boundedTo(*((QSizeF*)arg0));
    WRSizeF* new_val = new WRSizeF();
    *new_val = ret_value;
    struct RUSizeF 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_f_all_funcs;
    return ctl;
}

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

static float size_f_rwidth(struct RUBase* self_c) {
    WRSizeF* qt_value = (WRSizeF*)self_c;
    auto ret_value = qt_value->rwidth();
    return ret_value;
}

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

static float size_f_rheight(struct RUBase* self_c) {
    WRSizeF* qt_value = (WRSizeF*)self_c;
    auto ret_value = qt_value->rheight();
    return ret_value;
}

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

static struct RUSize size_f_to_size(struct RUBase* self_c) {
    WRSizeF* qt_value = (WRSizeF*)self_c;
    auto ret_value = qt_value->toSize();
    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 RUSizeF create_size_f(
    struct RUBase* priv_data,
    RUDeleteCallback delete_callback,
    void* private_user_data)
{
    auto ctl = generic_create_func_with_delete<struct RUSizeF, WRSizeF>(priv_data, delete_callback, private_user_data);
    ctl.all_funcs = &s_size_f_all_funcs;
    return ctl;
}

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

static void destroy_size_f(struct RUBase* priv_data) {
    destroy_generic<WRSizeF>(priv_data);
}

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

struct RUSizeFFuncs s_size_f_funcs = {
    destroy_size_f,
    size_f_is_null,
    size_f_is_empty,
    size_f_is_valid,
    size_f_width,
    size_f_height,
    size_f_set_width,
    size_f_set_height,
    size_f_scale,
    size_f_scale_2,
    size_f_scaled,
    size_f_scaled_2,
    size_f_expanded_to,
    size_f_bounded_to,
    size_f_rwidth,
    size_f_rheight,
    size_f_to_size,
};

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

struct RUSizeFAllFuncs s_size_f_all_funcs = {
    &s_size_f_funcs,
};