mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
C++: Hide internal macros from documentation
That's SIXTYFPS_GET_ITEM_VTABLE, SIXTYFPS_DLL_IMPORT and SIXTYFPS_QT_INTEGRATION
This commit is contained in:
parent
4c33a8f70b
commit
2e4abc61e0
3 changed files with 23 additions and 15 deletions
|
@ -204,16 +204,19 @@ inline vtable::Layout drop_in_place(ComponentRef component)
|
||||||
return vtable::Layout { sizeof(T), alignof(T) };
|
return vtable::Layout { sizeof(T), alignof(T) };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(DOXYGEN)
|
||||||
# if defined(_WIN32) || defined(_WIN64)
|
# if defined(_WIN32) || defined(_WIN64)
|
||||||
// On Windows cross-dll data relocations are not supported:
|
// On Windows cross-dll data relocations are not supported:
|
||||||
// https://docs.microsoft.com/en-us/cpp/c-language/rules-and-limitations-for-dllimport-dllexport?view=msvc-160
|
// https://docs.microsoft.com/en-us/cpp/c-language/rules-and-limitations-for-dllimport-dllexport?view=msvc-160
|
||||||
// so we have a relocation to a function that returns the address we seek. That
|
// so we have a relocation to a function that returns the address we seek. That
|
||||||
// relocation will be resolved to the locally linked stub library, the implementation of
|
// relocation will be resolved to the locally linked stub library, the implementation of
|
||||||
// which will be patched.
|
// which will be patched.
|
||||||
# define SIXTYFPS_GET_ITEM_VTABLE(VTableName) sixtyfps::private_api::sixtyfps_get_##VTableName()
|
# define SIXTYFPS_GET_ITEM_VTABLE(VTableName) \
|
||||||
|
sixtyfps::private_api::sixtyfps_get_##VTableName()
|
||||||
# else
|
# else
|
||||||
# define SIXTYFPS_GET_ITEM_VTABLE(VTableName) (&sixtyfps::private_api::VTableName)
|
# define SIXTYFPS_GET_ITEM_VTABLE(VTableName) (&sixtyfps::private_api::VTableName)
|
||||||
# endif
|
# endif
|
||||||
|
#endif // !defined(DOXYGEN)
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct ReturnWrapper
|
struct ReturnWrapper
|
||||||
|
|
|
@ -17,6 +17,7 @@ LICENSE END */
|
||||||
# define SIXTYFPS_TARGET_64
|
# define SIXTYFPS_TARGET_64
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(DOXYGEN)
|
||||||
# if defined(_MSC_VER)
|
# if defined(_MSC_VER)
|
||||||
# define SIXTYFPS_DLL_IMPORT __declspec(dllimport)
|
# define SIXTYFPS_DLL_IMPORT __declspec(dllimport)
|
||||||
# elif defined(__GNUC__)
|
# elif defined(__GNUC__)
|
||||||
|
@ -28,3 +29,4 @@ LICENSE END */
|
||||||
# else
|
# else
|
||||||
# define SIXTYFPS_DLL_IMPORT
|
# define SIXTYFPS_DLL_IMPORT
|
||||||
# endif
|
# endif
|
||||||
|
#endif // !defined(DOXYGEN)
|
|
@ -15,7 +15,10 @@ LICENSE END */
|
||||||
|
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
|
||||||
#define SIXTYFPS_QT_INTEGRATION // In the future, should be defined by cmake only if this is enabled
|
#if !defined(DOXYGEN)
|
||||||
|
# define SIXTYFPS_QT_INTEGRATION // In the future, should be defined by cmake only if this is
|
||||||
|
// enabled
|
||||||
|
#endif
|
||||||
#ifdef SIXTYFPS_QT_INTEGRATION
|
#ifdef SIXTYFPS_QT_INTEGRATION
|
||||||
class QWidget;
|
class QWidget;
|
||||||
#endif
|
#endif
|
||||||
|
@ -564,7 +567,7 @@ public:
|
||||||
cbindgen_private::sixtyfps_run_event_loop();
|
cbindgen_private::sixtyfps_run_event_loop();
|
||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
#ifdef SIXTYFPS_QT_INTEGRATION
|
#if defined(SIXTYFPS_QT_INTEGRATION) || defined(DOXYGEN)
|
||||||
/// Return a QWidget for this instance.
|
/// Return a QWidget for this instance.
|
||||||
/// This function is only available if the qt graphical backend was compiled in, and
|
/// This function is only available if the qt graphical backend was compiled in, and
|
||||||
/// it may return nullptr if the Qt backend is not used at runtime.
|
/// it may return nullptr if the Qt backend is not used at runtime.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue