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 <QPixelFormat>
#include "pixel_format_ffi.h"

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

static int pixel_format_color_model(struct RUBase* self_c) {
    WRPixelFormat* qt_value = (WRPixelFormat*)self_c;
    auto ret_value = qt_value->colorModel();
    return s_color_model_lookup[(int)ret_value];
}

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

static uint8_t pixel_format_channel_count(struct RUBase* self_c) {
    WRPixelFormat* qt_value = (WRPixelFormat*)self_c;
    auto ret_value = qt_value->channelCount();
    return ret_value;
}

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

static uint8_t pixel_format_red_size(struct RUBase* self_c) {
    WRPixelFormat* qt_value = (WRPixelFormat*)self_c;
    auto ret_value = qt_value->redSize();
    return ret_value;
}

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

static uint8_t pixel_format_green_size(struct RUBase* self_c) {
    WRPixelFormat* qt_value = (WRPixelFormat*)self_c;
    auto ret_value = qt_value->greenSize();
    return ret_value;
}

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

static uint8_t pixel_format_blue_size(struct RUBase* self_c) {
    WRPixelFormat* qt_value = (WRPixelFormat*)self_c;
    auto ret_value = qt_value->blueSize();
    return ret_value;
}

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

static uint8_t pixel_format_cyan_size(struct RUBase* self_c) {
    WRPixelFormat* qt_value = (WRPixelFormat*)self_c;
    auto ret_value = qt_value->cyanSize();
    return ret_value;
}

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

static uint8_t pixel_format_magenta_size(struct RUBase* self_c) {
    WRPixelFormat* qt_value = (WRPixelFormat*)self_c;
    auto ret_value = qt_value->magentaSize();
    return ret_value;
}

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

static uint8_t pixel_format_yellow_size(struct RUBase* self_c) {
    WRPixelFormat* qt_value = (WRPixelFormat*)self_c;
    auto ret_value = qt_value->yellowSize();
    return ret_value;
}

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

static uint8_t pixel_format_black_size(struct RUBase* self_c) {
    WRPixelFormat* qt_value = (WRPixelFormat*)self_c;
    auto ret_value = qt_value->blackSize();
    return ret_value;
}

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

static uint8_t pixel_format_hue_size(struct RUBase* self_c) {
    WRPixelFormat* qt_value = (WRPixelFormat*)self_c;
    auto ret_value = qt_value->hueSize();
    return ret_value;
}

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

static uint8_t pixel_format_saturation_size(struct RUBase* self_c) {
    WRPixelFormat* qt_value = (WRPixelFormat*)self_c;
    auto ret_value = qt_value->saturationSize();
    return ret_value;
}

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

static uint8_t pixel_format_lightness_size(struct RUBase* self_c) {
    WRPixelFormat* qt_value = (WRPixelFormat*)self_c;
    auto ret_value = qt_value->lightnessSize();
    return ret_value;
}

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

static uint8_t pixel_format_brightness_size(struct RUBase* self_c) {
    WRPixelFormat* qt_value = (WRPixelFormat*)self_c;
    auto ret_value = qt_value->brightnessSize();
    return ret_value;
}

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

static uint8_t pixel_format_alpha_size(struct RUBase* self_c) {
    WRPixelFormat* qt_value = (WRPixelFormat*)self_c;
    auto ret_value = qt_value->alphaSize();
    return ret_value;
}

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

static uint8_t pixel_format_bits_per_pixel(struct RUBase* self_c) {
    WRPixelFormat* qt_value = (WRPixelFormat*)self_c;
    auto ret_value = qt_value->bitsPerPixel();
    return ret_value;
}

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

static int pixel_format_alpha_usage(struct RUBase* self_c) {
    WRPixelFormat* qt_value = (WRPixelFormat*)self_c;
    auto ret_value = qt_value->alphaUsage();
    return s_alpha_usage_lookup[(int)ret_value];
}

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

static int pixel_format_alpha_position(struct RUBase* self_c) {
    WRPixelFormat* qt_value = (WRPixelFormat*)self_c;
    auto ret_value = qt_value->alphaPosition();
    return s_alpha_position_lookup[(int)ret_value];
}

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

static int pixel_format_premultiplied(struct RUBase* self_c) {
    WRPixelFormat* qt_value = (WRPixelFormat*)self_c;
    auto ret_value = qt_value->premultiplied();
    return s_alpha_premultiplied_lookup[(int)ret_value];
}

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

static int pixel_format_type_interpretation(struct RUBase* self_c) {
    WRPixelFormat* qt_value = (WRPixelFormat*)self_c;
    auto ret_value = qt_value->typeInterpretation();
    return s_type_interpretation_lookup[(int)ret_value];
}

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

static int pixel_format_byte_order(struct RUBase* self_c) {
    WRPixelFormat* qt_value = (WRPixelFormat*)self_c;
    auto ret_value = qt_value->byteOrder();
    return s_byte_order_lookup[(int)ret_value];
}

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

static int pixel_format_yuv_layout(struct RUBase* self_c) {
    WRPixelFormat* qt_value = (WRPixelFormat*)self_c;
    auto ret_value = qt_value->yuvLayout();
    return s_yuv_layout_lookup[(int)ret_value];
}

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

static uint8_t pixel_format_sub_enum(struct RUBase* self_c) {
    WRPixelFormat* qt_value = (WRPixelFormat*)self_c;
    auto ret_value = qt_value->subEnum();
    return ret_value;
}

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

static struct RUPixelFormat create_pixel_format(
    struct RUBase* priv_data,
    RUDeleteCallback delete_callback,
    void* private_user_data)
{
    auto ctl = generic_create_func_with_delete<struct RUPixelFormat, WRPixelFormat>(priv_data, delete_callback, private_user_data);
    ctl.all_funcs = &s_pixel_format_all_funcs;
    return ctl;
}

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

static void destroy_pixel_format(struct RUBase* priv_data) {
    destroy_generic<WRPixelFormat>(priv_data);
}

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

struct RUPixelFormatFuncs s_pixel_format_funcs = {
    destroy_pixel_format,
    pixel_format_color_model,
    pixel_format_channel_count,
    pixel_format_red_size,
    pixel_format_green_size,
    pixel_format_blue_size,
    pixel_format_cyan_size,
    pixel_format_magenta_size,
    pixel_format_yellow_size,
    pixel_format_black_size,
    pixel_format_hue_size,
    pixel_format_saturation_size,
    pixel_format_lightness_size,
    pixel_format_brightness_size,
    pixel_format_alpha_size,
    pixel_format_bits_per_pixel,
    pixel_format_alpha_usage,
    pixel_format_alpha_position,
    pixel_format_premultiplied,
    pixel_format_type_interpretation,
    pixel_format_byte_order,
    pixel_format_yuv_layout,
    pixel_format_sub_enum,
};

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

struct RUPixelFormatAllFuncs s_pixel_format_all_funcs = {
    &s_pixel_format_funcs,
};