rute 0.0.4

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

#include <stdbool.h>
#include <stdint.h>

#include "../rute_base.h"

#ifdef __cplusplus
extern "C" {
#endif
#include "color_ffi.h"
#include "image_ffi.h"
#include "paint_engine_ffi.h"
#include "pixel_format_ffi.h"
#include "point_ffi.h"
#include "rect_ffi.h"
#include "size_ffi.h"

struct RUImageFuncs;
struct RUImage;

typedef struct RUImageFuncs {
    void (*destroy)(struct RUBase* self);
    void (*swap)(struct RUBase* self_c, struct RUBase* other);
    bool (*is_null)(struct RUBase* self_c);
    int (*dev_type)(struct RUBase* self_c);
    void (*detach)(struct RUBase* self_c);
    bool (*is_detached)(struct RUBase* self_c);
    struct RUImage (*copy)(struct RUBase* self_c, struct RUBase* rect);
    struct RUImage (*copy_2)(struct RUBase* self_c, int x, int y, int w, int h);
    int (*format)(struct RUBase* self_c);
    struct RUImage (*convert_to_format)(struct RUBase* self_c, int f,
                                        int flags);
    struct RUImage (*convert_to_format_2)(struct RUBase* self_c, int f,
                                          int flags);
    bool (*reinterpret_as_format)(struct RUBase* self_c, int f);
    int (*width)(struct RUBase* self_c);
    int (*height)(struct RUBase* self_c);
    struct RUSize (*size)(struct RUBase* self_c);
    struct RURect (*rect)(struct RUBase* self_c);
    int (*depth)(struct RUBase* self_c);
    int (*color_count)(struct RUBase* self_c);
    int (*bit_plane_count)(struct RUBase* self_c);
    void (*set_color_count)(struct RUBase* self_c, int arg0);
    bool (*all_gray)(struct RUBase* self_c);
    bool (*is_grayscale)(struct RUBase* self_c);
    int (*byte_count)(struct RUBase* self_c);
    int (*bytes_per_line)(struct RUBase* self_c);
    bool (*valid)(struct RUBase* self_c, int x, int y);
    bool (*valid_2)(struct RUBase* self_c, struct RUBase* pt);
    int (*pixel_index)(struct RUBase* self_c, int x, int y);
    int (*pixel_index_2)(struct RUBase* self_c, struct RUBase* pt);
    void (*set_pixel)(struct RUBase* self_c, int x, int y,
                      uint32_t index_or_rgb);
    void (*set_pixel_2)(struct RUBase* self_c, struct RUBase* pt,
                        uint32_t index_or_rgb);
    struct RUColor (*pixel_color)(struct RUBase* self_c, int x, int y);
    struct RUColor (*pixel_color_2)(struct RUBase* self_c, struct RUBase* pt);
    void (*set_pixel_color)(struct RUBase* self_c, int x, int y,
                            struct RUBase* c);
    void (*set_pixel_color_2)(struct RUBase* self_c, struct RUBase* pt,
                              struct RUBase* c);
    float (*device_pixel_ratio)(struct RUBase* self_c);
    void (*set_device_pixel_ratio)(struct RUBase* self_c, float scale_factor);
    void (*fill)(struct RUBase* self_c, uint32_t pixel);
    void (*fill_2)(struct RUBase* self_c, struct RUBase* color);
    void (*fill_3)(struct RUBase* self_c, int color);
    bool (*has_alpha_channel)(struct RUBase* self_c);
    void (*set_alpha_channel)(struct RUBase* self_c,
                              struct RUBase* alpha_channel);
    struct RUImage (*alpha_channel)(struct RUBase* self_c);
    struct RUImage (*create_alpha_mask)(struct RUBase* self_c, int flags);
    struct RUImage (*create_heuristic_mask)(struct RUBase* self_c,
                                            bool clip_tight);
    struct RUImage (*scaled)(struct RUBase* self_c, int w, int h,
                             int aspect_mode, int mode);
    struct RUImage (*scaled_2)(struct RUBase* self_c, struct RUBase* s,
                               int aspect_mode, int mode);
    struct RUImage (*scaled_to_width)(struct RUBase* self_c, int w, int mode);
    struct RUImage (*scaled_to_height)(struct RUBase* self_c, int h, int mode);
    struct RUImage (*mirrored)(struct RUBase* self_c, bool horizontally,
                               bool vertically);
    struct RUImage (*mirrored_2)(struct RUBase* self_c, bool horizontally,
                                 bool vertically);
    struct RUImage (*rgb_swapped)(struct RUBase* self_c);
    struct RUImage (*rgb_swapped_2)(struct RUBase* self_c);
    void (*invert_pixels)(struct RUBase* self_c, int arg0);
    int64_t (*cache_key)(struct RUBase* self_c);
    struct RUPaintEngine (*paint_engine)(struct RUBase* self_c);
    int (*dots_per_meter_x)(struct RUBase* self_c);
    int (*dots_per_meter_y)(struct RUBase* self_c);
    void (*set_dots_per_meter_x)(struct RUBase* self_c, int arg0);
    void (*set_dots_per_meter_y)(struct RUBase* self_c, int arg0);
    struct RUPoint (*offset)(struct RUBase* self_c);
    void (*set_offset)(struct RUBase* self_c, struct RUBase* arg0);
    const char* (*text)(struct RUBase* self_c, const char* key);
    void (*set_text)(struct RUBase* self_c, const char* key, const char* value);
    struct RUPixelFormat (*pixel_format)(struct RUBase* self_c);
    struct RUPixelFormat (*to_pixel_format)(struct RUBase* self_c, int format);
} RUImageFuncs;

typedef struct RUImageAllFuncs {
    struct RUPaintDeviceFuncs* paint_device_funcs;
    struct RUImageFuncs* image_funcs;
} RUImageAllFuncs;

typedef struct RUImage {
    RUBase* qt_data;
    RUBase* host_data;
    struct RUImageAllFuncs* all_funcs;
} RUImage;

extern RUImageFuncs s_image_funcs;
extern RUImageAllFuncs s_image_all_funcs;

#ifdef __cplusplus
}
#endif