mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-30 13:51:13 +00:00
reformat
This commit is contained in:
parent
dc276290e9
commit
619e21295d
4 changed files with 26 additions and 33 deletions
|
@ -18,7 +18,8 @@ struct Property
|
|||
set(value);
|
||||
}*/
|
||||
|
||||
void set(const T &value) const {
|
||||
void set(const T &value) const
|
||||
{
|
||||
this->value = value;
|
||||
internal::sixtyfps_property_set_changed(&inner);
|
||||
}
|
||||
|
@ -37,8 +38,7 @@ struct Property
|
|||
[](void *user_data, const internal::EvaluationContext *context, void *value) {
|
||||
*reinterpret_cast<T *>(value) = (*reinterpret_cast<F *>(user_data))(context);
|
||||
},
|
||||
new F(binding),
|
||||
[](void *user_data) { delete reinterpret_cast<F *>(user_data); });
|
||||
new F(binding), [](void *user_data) { delete reinterpret_cast<F *>(user_data); });
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
#pragma once
|
||||
|
||||
template<typename T>
|
||||
struct VRefMut {
|
||||
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 VRef = VRefMut<T>;
|
||||
template<typename T>
|
||||
using VBox = VRefMut<T>;
|
||||
|
||||
/*
|
||||
template<typename T>
|
||||
|
@ -23,4 +26,3 @@ struct VRef {
|
|||
const void *instance;
|
||||
};
|
||||
*/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue