mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-30 05:44:52 +00:00
35 lines
509 B
C++
35 lines
509 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>
|
|
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;
|
|
};
|