rute 0.0.6

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

#include "../rute_base.h"
#include "../rute_manual.h"
#include <QSurface>
#include "surface_ffi.h"

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

static uint32_t surface_surface_class(struct RUBase* self_c) {
    QSurface* qt_value = (QSurface*)self_c;
    auto ret_value = qt_value->surfaceClass();
    return (uint32_t)ret_value;
}

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

static struct RUSurfaceFormat surface_format(struct RUBase* self_c) {
    QSurface* qt_value = (QSurface*)self_c;
    auto ret_value = qt_value->format();
    WRSurfaceFormat* new_val = new WRSurfaceFormat();
    *new_val = ret_value;
    struct RUSurfaceFormat ctl;
    ctl.qt_data = (struct RUBase*)new_val;
    ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
    ctl.all_funcs = &s_surface_format_all_funcs;
    return ctl;
}

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

static uint32_t surface_surface_type(struct RUBase* self_c) {
    QSurface* qt_value = (QSurface*)self_c;
    auto ret_value = qt_value->surfaceType();
    return (uint32_t)ret_value;
}

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

static struct RUSize surface_size(struct RUBase* self_c) {
    QSurface* qt_value = (QSurface*)self_c;
    auto ret_value = qt_value->size();
    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;
}

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

struct RUSurfaceFuncs s_surface_funcs = {
    surface_surface_class,
    surface_format,
    surface_surface_type,
    surface_size,
};

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

struct RUSurfaceAllFuncs s_surface_all_funcs = {
    &s_surface_funcs,
};