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 <QDropEvent>
#include "drop_event_ffi.h"

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

static struct RUPoint drop_event_pos(struct RUBase* self_c) {
    QDropEvent* qt_value = (QDropEvent*)self_c;
    auto ret_value = qt_value->pos();
    WRPoint* new_val = new WRPoint();
    *new_val = ret_value;
    struct RUPoint ctl;
    ctl.qt_data = (struct RUBase*)new_val;
    ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
    ctl.all_funcs = &s_point_all_funcs;
    return ctl;
}

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

static struct RUPointF drop_event_pos_f(struct RUBase* self_c) {
    QDropEvent* qt_value = (QDropEvent*)self_c;
    auto ret_value = qt_value->posF();
    WRPointF* new_val = new WRPointF();
    *new_val = ret_value;
    struct RUPointF ctl;
    ctl.qt_data = (struct RUBase*)new_val;
    ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
    ctl.all_funcs = &s_point_f_all_funcs;
    return ctl;
}

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

static int drop_event_mouse_buttons(struct RUBase* self_c) {
    QDropEvent* qt_value = (QDropEvent*)self_c;
    auto ret_value = qt_value->mouseButtons();
    return s_mouse_buttons_lookup[(int)ret_value];
}

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

static int drop_event_keyboard_modifiers(struct RUBase* self_c) {
    QDropEvent* qt_value = (QDropEvent*)self_c;
    auto ret_value = qt_value->keyboardModifiers();
    return s_keyboard_modifiers_lookup[(int)ret_value];
}

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

static int drop_event_possible_actions(struct RUBase* self_c) {
    QDropEvent* qt_value = (QDropEvent*)self_c;
    auto ret_value = qt_value->possibleActions();
    return s_drop_actions_lookup[(int)ret_value];
}

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

static int drop_event_proposed_action(struct RUBase* self_c) {
    QDropEvent* qt_value = (QDropEvent*)self_c;
    auto ret_value = qt_value->proposedAction();
    return s_drop_action_lookup[(int)ret_value];
}

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

static void drop_event_accept_proposed_action(struct RUBase* self_c) {
    QDropEvent* qt_value = (QDropEvent*)self_c;
    qt_value->acceptProposedAction();
}

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

static int drop_event_drop_action(struct RUBase* self_c) {
    QDropEvent* qt_value = (QDropEvent*)self_c;
    auto ret_value = qt_value->dropAction();
    return s_drop_action_lookup[(int)ret_value];
}

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

static void drop_event_set_drop_action(struct RUBase* self_c, int action) {
    QDropEvent* qt_value = (QDropEvent*)self_c;
    qt_value->setDropAction((Qt::DropAction)s_drop_action_lookup[action]);
}

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

static struct RUObject drop_event_source(struct RUBase* self_c) {
    QDropEvent* qt_value = (QDropEvent*)self_c;
    auto ret_value = qt_value->source();
    struct RUObject ctl;
    ctl.qt_data = (struct RUBase*)ret_value;
    ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)ret_value];
    ctl.all_funcs = &s_object_all_funcs;
    return ctl;
}

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

static struct RUMimeData drop_event_mime_data(struct RUBase* self_c) {
    QDropEvent* qt_value = (QDropEvent*)self_c;
    auto ret_value = qt_value->mimeData();
    struct RUMimeData ctl;
    ctl.qt_data = (struct RUBase*)ret_value;
    ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)ret_value];
    ctl.all_funcs = &s_mime_data_all_funcs;
    return ctl;
}

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

struct RUDropEventFuncs s_drop_event_funcs = {
    drop_event_pos,
    drop_event_pos_f,
    drop_event_mouse_buttons,
    drop_event_keyboard_modifiers,
    drop_event_possible_actions,
    drop_event_proposed_action,
    drop_event_accept_proposed_action,
    drop_event_drop_action,
    drop_event_set_drop_action,
    drop_event_source,
    drop_event_mime_data,
};

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

struct RUDropEventAllFuncs s_drop_event_all_funcs = {
    &s_event_funcs,
    &s_drop_event_funcs,
};