KDDockWidgets API Documentation 2.1
Loading...
Searching...
No Matches
Event_c.cpp
Go to the documentation of this file.
1/*
2 This file is part of KDDockWidgets.
3
4 SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5 Author: SĂ©rgio Martins <sergio.martins@kdab.com>
6
7 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
8
9 Contact KDAB at <info@kdab.com> for commercial licensing options.
10*/
11#include "Event_c.h"
12
13
14#include <iostream>
15
16#include <cassert>
17
18
19namespace Dartagnan {
20
21typedef int (*CleanupCallback)(void *thisPtr);
23
24template<typename T>
25struct ValueWrapper
26{
27 T value;
28};
29
30}
32Event_wrapper::Event_wrapper(KDDockWidgets::Event::Type type)
33 : ::KDDockWidgets::Event(type)
34{
35}
37{
38 ::KDDockWidgets::Event::accept();
39}
41{
42 ::KDDockWidgets::Event::ignore();
43}
45{
46 return ::KDDockWidgets::Event::isAccepted();
47}
49{
50 return ::KDDockWidgets::Event::spontaneous();
51}
52KDDockWidgets::Event::Type Event_wrapper::type() const
53{
54 return ::KDDockWidgets::Event::type();
55}
59
60}
61static KDDockWidgets::Event *fromPtr(void *ptr)
62{
63 return reinterpret_cast<KDDockWidgets::Event *>(ptr);
64}
69extern "C" {
71{
72 delete reinterpret_cast<KDDockWidgetsBindings_wrappersNS::Event_wrapper *>(cppObj);
73}
75{
76 auto ptr = new KDDockWidgetsBindings_wrappersNS::Event_wrapper(static_cast<KDDockWidgets::Event::Type>(type));
77 return reinterpret_cast<void *>(ptr);
78}
79// accept()
81{
82 fromPtr(thisObj)->accept();
83}
84// ignore()
86{
87 fromPtr(thisObj)->ignore();
88}
89// isAccepted() const
91{
92 const auto &result = fromPtr(thisObj)->isAccepted();
93 return result;
94}
95// spontaneous() const
97{
98 const auto &result = fromPtr(thisObj)->spontaneous();
99 return result;
100}
101// type() const
103{
104 const auto &result = int(fromPtr(thisObj)->type());
105 return result;
106}
108{
109 delete fromPtr(thisObj);
110}
112{
113 return fromPtr(thisObj)->m_accepted;
114}
116{
117 return fromPtr(thisObj)->m_spontaneous;
118}
119void c_KDDockWidgets__Event___set_m_accepted_bool(void *thisObj, bool m_accepted_)
120{
121 fromPtr(thisObj)->m_accepted = m_accepted_;
122}
123void c_KDDockWidgets__Event___set_m_spontaneous_bool(void *thisObj, bool m_spontaneous_)
124{
125 fromPtr(thisObj)->m_spontaneous = m_spontaneous_;
126}
127}
void c_KDDockWidgets__Event__accept(void *thisObj)
Definition Event_c.cpp:80
void c_KDDockWidgets__Event___set_m_accepted_bool(void *thisObj, bool m_accepted_)
Definition Event_c.cpp:119
void c_KDDockWidgets__Event__ignore(void *thisObj)
Definition Event_c.cpp:85
void c_KDDockWidgets__Event___set_m_spontaneous_bool(void *thisObj, bool m_spontaneous_)
Definition Event_c.cpp:123
int c_KDDockWidgets__Event__type(void *thisObj)
Definition Event_c.cpp:102
static KDDockWidgetsBindings_wrappersNS::Event_wrapper * fromWrapperPtr(void *ptr)
Definition Event_c.cpp:65
static KDDockWidgets::Event * fromPtr(void *ptr)
Definition Event_c.cpp:61
bool c_KDDockWidgets__Event__spontaneous(void *thisObj)
Definition Event_c.cpp:96
bool c_KDDockWidgets__Event___get_m_spontaneous(void *thisObj)
Definition Event_c.cpp:115
bool c_KDDockWidgets__Event__isAccepted(void *thisObj)
Definition Event_c.cpp:90
bool c_KDDockWidgets__Event___get_m_accepted(void *thisObj)
Definition Event_c.cpp:111
void * c_KDDockWidgets__Event__constructor_Type(int type)
Definition Event_c.cpp:74
void c_KDDockWidgets__Event_Finalizer(void *cppObj)
Definition Event_c.cpp:70
void c_KDDockWidgets__Event__destructor(void *thisObj)
Definition Event_c.cpp:107
Event_wrapper(KDDockWidgets::Event::Type type)
Definition Event_c.cpp:32
KDDockWidgets::Event::Type type() const
Definition Event_c.cpp:52
int(* CleanupCallback)(void *thisPtr)
Definition Config_c.cpp:21
static CleanupCallback s_cleanupCallback
Definition Config_c.cpp:22
Class to abstract QAction, so code still works with QtQuick and Flutter.

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDDockWidgets
Advanced Dock Widget Framework for Qt
https://www.kdab.com/development-resources/qt-tools/kddockwidgets/
Generated by doxygen 1.9.8