mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-27 20:42:25 +00:00

Removed the drop and create from the ComponentVTable: since we are not using VBox<ComponentVTable>, this simplifies a bit the code of the interpreter and everything else. But there is still a lot of changes everywhere to support that the Component is pinned. This is just for the component. Which would be required if later we want to access the properties as Pin<Property<_>>. But we have not yet ability to do projections
38 lines
546 B
C++
38 lines
546 B
C++
#pragma once
|
|
|
|
template<typename T>
|
|
struct VRefMut
|
|
{
|
|
const T *vtable;
|
|
void *instance;
|
|
};
|
|
|
|
// For the C++'s purpose, they are all the same
|
|
template<typename T>
|
|
using VRef = VRefMut<T>;
|
|
template<typename T>
|
|
using VBox = VRefMut<T>;
|
|
|
|
template<typename T>
|
|
using Pin = T;
|
|
|
|
/*
|
|
template<typename T>
|
|
struct VBox {
|
|
const T *vtable;
|
|
void *instance;
|
|
};
|
|
|
|
template<typename T>
|
|
struct VRef {
|
|
const T *vtable;
|
|
const void *instance;
|
|
};
|
|
*/
|
|
|
|
template<typename Base, typename T>
|
|
struct VOffset
|
|
{
|
|
const T *vtable;
|
|
uintptr_t offset;
|
|
};
|