2016-06-26 23:05:19 +02:00
/**
* \ file DOtherSide . h
* \ brief The DOtherSide API file
2016-07-05 23:34:13 +02:00
* \ author Filippo Cucchetto
2016-06-26 23:05:19 +02:00
*
* This file contains all the functions from creating or manipulating the QML
* environement
*/
2014-07-19 18:26:08 +02:00
# ifndef DOTHERSIDE_H
# define DOTHERSIDE_H
2015-03-11 21:32:45 +01:00
# ifdef WIN32
# define DOS_API __declspec( dllexport )
2016-04-12 23:58:53 +02:00
# define DOS_CALL __cdecl
2015-03-11 21:32:45 +01:00
# else
2016-01-02 16:48:16 +01:00
# define DOS_API
2016-04-12 23:58:53 +02:00
# define DOS_CALL
2015-03-11 21:32:45 +01:00
# endif
2015-11-23 21:33:17 +01:00
# include <DOtherSide/DOtherSideTypes.h>
2015-01-26 21:26:21 +01:00
2014-07-19 18:26:08 +02:00
# ifdef __cplusplus
extern " C "
{
# endif
2016-07-05 23:34:13 +02:00
/// \defgroup QGuiApplication QGuiApplication
/// \brief Functions related to the QGuiApplication class
/// @{
/// \brief Return the QCore::applicationDirPath
/// \return The QCore::applicationDirPath as a UTF-8 string
/// \note The returned string should be deleted by the calling code by using
/// the dos_chararray_delete() function
2017-07-06 14:53:57 +02:00
DOS_API char * DOS_CALL dos_qcoreapplication_application_dir_path ( void ) ;
2015-12-05 18:15:01 +01:00
2016-07-05 23:34:13 +02:00
/// \brief Create a QGuiApplication
/// \note The created QGuiApplication should be freed by calling dos_qguiapplication_delete()
2017-07-06 14:53:57 +02:00
DOS_API void DOS_CALL dos_qguiapplication_create ( void ) ;
2016-07-05 23:34:13 +02:00
/// \brief Calls the QGuiApplication::exec() function of the current QGuiApplication
/// \note A QGuiApplication should have been already created through dos_qguiapplication_create()
2017-07-06 14:53:57 +02:00
DOS_API void DOS_CALL dos_qguiapplication_exec ( void ) ;
2016-07-05 23:34:13 +02:00
/// \brief Calls the QGuiApplication::quit() function of the current QGuiApplication
/// \note A QGuiApplication should have been already created through dos_qguiapplication_create()
2017-07-06 14:53:57 +02:00
DOS_API void DOS_CALL dos_qguiapplication_quit ( void ) ;
2016-07-05 23:34:13 +02:00
/// \brief Free the memory of the current QGuiApplication
/// \note A QGuiApplication should have been already created through dos_qguiapplication_create()
2017-07-06 14:53:57 +02:00
DOS_API void DOS_CALL dos_qguiapplication_delete ( void ) ;
2015-01-31 14:20:36 +01:00
2016-07-05 23:34:13 +02:00
/// @}
/// \defgroup QApplication QApplication
/// \brief Functions related to the QApplication class
/// @{
/// \brief Create a QApplication
/// \note The created QApplication should be freed by calling dos_qapplication_delete()
2017-07-06 14:53:57 +02:00
DOS_API void DOS_CALL dos_qapplication_create ( void ) ;
2016-07-05 23:34:13 +02:00
/// \brief Calls the QApplication::exec() function of the current QGuiApplication
/// \note A QApplication should have been already created through dos_qapplication_create()
2017-07-06 14:53:57 +02:00
DOS_API void DOS_CALL dos_qapplication_exec ( void ) ;
2016-07-05 23:34:13 +02:00
/// \brief Calls the QApplication::quit() function of the current QGuiApplication
/// \note A QApplication should have been already created through dos_qapplication_create()
2017-07-06 14:53:57 +02:00
DOS_API void DOS_CALL dos_qapplication_quit ( void ) ;
2016-07-05 23:34:13 +02:00
/// \brief Free the memory of the current QApplication
/// \note A QApplication should have been already created through dos_qapplication_create()
2017-07-06 14:53:57 +02:00
DOS_API void DOS_CALL dos_qapplication_delete ( void ) ;
2015-01-31 14:20:36 +01:00
2016-07-05 23:34:13 +02:00
/// @}
/// \defgroup QQmlApplicationEngine QQmlApplicationEngine
/// \brief Functions related to the QQmlApplicationEngine class
/// @{
/// \brief Create a new QQmlApplicationEngine
/// \return A new QQmlApplicationEngine
/// \note The returned QQmlApplicationEngine should be freed by using dos_qqmlapplicationengine_delete(DosQQmlApplicationEngine*)
2017-07-06 14:53:57 +02:00
DOS_API DosQQmlApplicationEngine * DOS_CALL dos_qqmlapplicationengine_create ( void ) ;
2016-07-05 23:34:13 +02:00
/// \brief Calls the QQmlApplicationEngine::load function
/// \param vptr The QQmlApplicationEngine
/// \param filename The file to load. The file is relative to the directory that contains the application executable
2016-06-26 18:46:03 +02:00
DOS_API void DOS_CALL dos_qqmlapplicationengine_load ( DosQQmlApplicationEngine * vptr , const char * filename ) ;
2016-07-05 23:34:13 +02:00
/// \brief Calls the QQmlApplicationEngine::load function
/// \param vptr The QQmlApplicationEngine
/// \param url The QUrl of the file to load
2016-06-26 18:46:03 +02:00
DOS_API void DOS_CALL dos_qqmlapplicationengine_load_url ( DosQQmlApplicationEngine * vptr , DosQUrl * url ) ;
2016-07-05 23:34:13 +02:00
/// \brief Calls the QQmlApplicationEngine::loadData function
/// \param vptr The QQmlApplicationEngine
/// \param data The UTF-8 string of the QML to load
2016-06-26 18:46:03 +02:00
DOS_API void DOS_CALL dos_qqmlapplicationengine_load_data ( DosQQmlApplicationEngine * vptr , const char * data ) ;
2016-07-05 23:34:13 +02:00
/// \brief Calls the QQmlApplicationEngine::addImportPath function
/// \param vptr The QQmlApplicationEngine
/// \param path The path to be added to the list of import paths
2016-06-26 18:46:03 +02:00
DOS_API void DOS_CALL dos_qqmlapplicationengine_add_import_path ( DosQQmlApplicationEngine * vptr , const char * path ) ;
2016-07-05 23:34:13 +02:00
/// \brief Calls the QQmlApplicationEngine::context
/// \param vptr The QQmlApplicationEngine
/// \return A pointer to a QQmlContext. This should not be stored nor made available to the binded language if
/// you can't guarantee that this QQmlContext should not live more that its Engine. This context is owned by
/// the engine and so it should die with the engine.
2016-04-12 23:58:53 +02:00
DOS_API DosQQmlContext * DOS_CALL dos_qqmlapplicationengine_context ( DosQQmlApplicationEngine * vptr ) ;
2016-07-05 23:34:13 +02:00
2018-02-12 21:45:21 +00:00
/// \brief Calls the QQMLApplicationengine::addImageProvider
/// \param vptr The QQmlApplicationEngine
/// \param vptr_i A QQuickImageProvider, the QQmlApplicationEngine takes ownership of this pointer
DOS_API void DOS_CALL dos_qqmlapplicationengine_addImageProvider ( DosQQmlApplicationEngine * vptr , const char * name , DosQQuickImageProvider * vptr_i ) ;
2016-07-05 23:34:13 +02:00
/// \brief Free the memory allocated for the given QQmlApplicationEngine
/// \param vptr The QQmlApplicationEngine
2016-06-26 18:46:03 +02:00
DOS_API void DOS_CALL dos_qqmlapplicationengine_delete ( DosQQmlApplicationEngine * vptr ) ;
2015-01-31 14:20:36 +01:00
2016-07-05 23:34:13 +02:00
/// @}
2018-02-12 21:45:21 +00:00
/// \defgroup QQuickImageProvider QQuickImageProvider
/// \brief Functions related to the QQuickImageProvider class
/// @{
/// \brief Create a new QQuickImageProvider
/// \return A new QQuickImageProvider
/// \note The returned QQuickImageProvider should be freed by using dos_qquickimageprovider_delete(DosQQuickImageProvider*) unless the QQuickImageProvider has been bound to a QQmlApplicationEngine
DOS_API DosQQuickImageProvider * DOS_CALL dos_qquickimageprovider_create ( PixmapCallback callback ) ;
/// \breif Frees a QQuickImageProvider
DOS_API void DOS_CALL dos_qquickimageprovider_delete ( DosQQuickImageProvider * vptr ) ;
/// @}
/// \defgroup QPixmap QPixmap
/// \brief Functions related to the QPixmap class
/// @{
/// \brief Create a new QPixmap
DOS_API DosPixmap * DOS_CALL dos_qpixmap_create ( int width , int height ) ;
/// \brief Frees a QPixmap
DOS_API void DOS_CALL dos_qpixmap_delete ( DosPixmap * vptr ) ;
/// \brief Load image data into a QPixmap from an image file
DOS_API void DOS_CALL dos_qpixmap_load ( DosPixmap * vptr , const char * filepath , const char * format ) ;
/// \brief Load image data into a QPixmap from a buffer
DOS_API void DOS_CALL dos_qpixmap_loadFromData ( DosPixmap * vptr , const unsigned char * data , unsigned int len ) ;
/// \brief Fill a QPixmap with a single color
DOS_API void DOS_CALL dos_qpixmap_fill ( DosPixmap * vptr , unsigned char r , unsigned char g , unsigned char b , unsigned char a ) ;
2018-02-12 23:29:20 +01:00
/// \brief Calls the QPixmap::operator=(const QPixmap&) function
/// \param vptr The left hand side QPixmap
/// \param other The right hand side QPixmap
DOS_API void DOS_CALL dos_qpixmap_assign ( DosPixmap * vptr , const DosPixmap * other ) ;
/// \brief Calls the QPixmap::isNull
/// \return True if the QPixmap is null, false otherwise
DOS_API bool DOS_CALL dos_qpixmap_isNull ( DosPixmap * vptr ) ;
2018-02-12 21:45:21 +00:00
/// @}
2017-08-24 22:52:39 +02:00
/// \defgroup QQuickStyle QQuickStyle
/// \brief Functions related to the QQuickStyle class
/// @{
/// \brief Set the QtQuickControls2 style
DOS_API void DOS_CALL dos_qquickstyle_set_style ( const char * style ) ;
/// \brief Set the QtQuickControls2 fallback style
DOS_API void DOS_CALL dos_qquickstyle_set_fallback_style ( const char * style ) ;
/// @}
2016-07-05 23:34:13 +02:00
2018-02-12 21:45:21 +00:00
2016-07-05 23:34:13 +02:00
/// \defgroup QQuickView QQuickView
/// \brief Functions related to the QQuickView class
/// @{
2016-07-08 20:04:33 +02:00
/// \brief Create a new QQuickView
/// \return A new QQuickView
/// \note The returned QQuickView should be freed by using dos_qquickview_delete(DosQQuickview*)
2017-07-06 14:53:57 +02:00
DOS_API DosQQuickView * DOS_CALL dos_qquickview_create ( void ) ;
2016-07-08 20:04:33 +02:00
/// \brief Calls the QQuickView::show() function
/// \param vptr The QQuickView
2016-06-26 18:46:03 +02:00
DOS_API void DOS_CALL dos_qquickview_show ( DosQQuickView * vptr ) ;
2016-07-08 20:04:33 +02:00
/// \brief Calls the QQuickView::source() function
/// \param vptr The QQuickView
/// \return The QQuickView source as an UTF-8 string
/// \note The returned string should be freed by using the dos_chararray_delete() function
2016-06-26 15:05:38 +02:00
DOS_API char * DOS_CALL dos_qquickview_source ( const DosQQuickView * vptr ) ;
2016-07-08 20:04:33 +02:00
/// \brief Calls the QQuickView::setSource() function
/// \param vptr The QQuickView
/// \param url The source QUrl
2016-07-10 00:38:57 +02:00
DOS_API void DOS_CALL dos_qquickview_set_source_url ( DosQQuickView * vptr , DosQUrl * url ) ;
2016-07-08 20:04:33 +02:00
/// \brief Calls the QQuickView::setSource() function
/// \param vptr The QQuickView
/// \param filename The source path as an UTF-8 string. The path is relative to the directory
/// that contains the application executable
2016-07-10 00:38:57 +02:00
DOS_API void DOS_CALL dos_qquickview_set_source ( DosQQuickView * vptr , const char * filename ) ;
2016-07-08 20:04:33 +02:00
/// \brief Calls the QQuickView::setResizeMode() function
/// \param vptr The QQuickView
/// \param resizeMode The resize mode
2016-07-10 00:38:57 +02:00
DOS_API void DOS_CALL dos_qquickview_set_resize_mode ( DosQQuickView * vptr , int resizeMode ) ;
2016-07-08 20:04:33 +02:00
/// \brief Free the memory allocated for the given QQuickView
/// \param vptr The QQuickView
2016-07-10 00:38:57 +02:00
DOS_API void DOS_CALL dos_qquickview_delete ( DosQQuickView * vptr ) ;
2016-07-08 20:04:33 +02:00
/// \brief Return the QQuickView::rootContext() as a QQuickContext
/// \param vptr The QQuickView
2016-04-12 23:58:53 +02:00
DOS_API DosQQmlContext * DOS_CALL dos_qquickview_rootContext ( DosQQuickView * vptr ) ;
2016-01-02 16:48:16 +01:00
2016-07-05 23:34:13 +02:00
/// @}
2016-07-08 20:04:33 +02:00
/// \defgroup QQmlContext QQmlContext
/// \brief Functions related to the QQmlContext class
/// @{
/// \brief Calls the QQmlContext::baseUrl function
/// \return The QQmlContext url as an UTF-8 string
/// \note The returned string should be freed using with the dos_chararray_delete() function
2016-06-26 15:05:38 +02:00
DOS_API char * DOS_CALL dos_qqmlcontext_baseUrl ( const DosQQmlContext * vptr ) ;
2016-06-18 21:17:28 +02:00
2016-07-08 20:04:33 +02:00
/// \brief Sets a property inside the context
/// \param vptr The DosQQmlContext
/// \param name The property name. The string is owned by the caller thus it will not be deleted by the library
/// \param value The property value. The DosQVariant is owned by the caller thus it will not be deleted by the library
DOS_API void DOS_CALL dos_qqmlcontext_setcontextproperty ( DosQQmlContext * vptr , const char * name , DosQVariant * value ) ;
2015-01-31 14:20:36 +01:00
2016-07-08 20:04:33 +02:00
/// @}
/// \defgroup String String
/// \brief Functions related to strings
/// @{
/// \brief Free the memory allocated for the given UTF-8 string
/// \param ptr The UTF-8 string to be freed
2016-04-12 23:58:53 +02:00
DOS_API void DOS_CALL dos_chararray_delete ( char * ptr ) ;
2015-01-31 14:20:36 +01:00
2016-07-08 20:04:33 +02:00
/// @}
/// \defgroup QVariant QVariant
/// \brief Functions related to the QVariant class
/// @{
2016-07-04 18:20:02 +02:00
/// Delete a DosQVariantArray
DOS_API void DOS_CALL dos_qvariantarray_delete ( DosQVariantArray * ptr ) ;
2016-07-08 20:04:33 +02:00
/// \brief Create a new QVariant (null)
/// \return The a new QVariant
/// \note The returned QVariant should be freed using dos_qvariant_delete()
2017-07-06 14:53:57 +02:00
DOS_API DosQVariant * DOS_CALL dos_qvariant_create ( void ) ;
2016-07-08 20:04:33 +02:00
/// \brief Create a new QVariant holding an int value
/// \return The a new QVariant
/// \param value The int value
/// \note The returned QVariant should be freed using dos_qvariant_delete()
2016-04-12 23:58:53 +02:00
DOS_API DosQVariant * DOS_CALL dos_qvariant_create_int ( int value ) ;
2016-07-08 20:04:33 +02:00
/// \brief Create a new QVariant holding a bool value
/// \return The a new QVariant
/// \param value The bool value
/// \note The returned QVariant should be freed using dos_qvariant_delete()
2016-04-12 23:58:53 +02:00
DOS_API DosQVariant * DOS_CALL dos_qvariant_create_bool ( bool value ) ;
2016-07-08 20:04:33 +02:00
/// \brief Create a new QVariant holding a string value
/// \return The a new QVariant
/// \param value The string value
/// \note The returned QVariant should be freed using dos_qvariant_delete()
/// \note The given string is copied inside the QVariant and will not be deleted
2016-04-12 23:58:53 +02:00
DOS_API DosQVariant * DOS_CALL dos_qvariant_create_string ( const char * value ) ;
2016-07-08 20:04:33 +02:00
/// \brief Create a new QVariant holding a QObject value
/// \return The a new QVariant
/// \param value The QObject value
/// \note The returned QVariant should be freed using dos_qvariant_delete()
2016-04-12 23:58:53 +02:00
DOS_API DosQVariant * DOS_CALL dos_qvariant_create_qobject ( DosQObject * value ) ;
2016-07-08 20:04:33 +02:00
/// \brief Create a new QVariant with the same value of the one given as argument
/// \return The a new QVariant
/// \param value The QVariant to which copy its value
/// \note The returned QVariant should be freed using dos_qvariant_delete()
2016-06-26 15:05:38 +02:00
DOS_API DosQVariant * DOS_CALL dos_qvariant_create_qvariant ( const DosQVariant * value ) ;
2016-07-08 20:04:33 +02:00
/// \brief Create a new QVariant holding a float value
/// \return The a new QVariant
/// \param value The float value
/// \note The returned QVariant should be freed using dos_qvariant_delete()
2016-04-12 23:58:53 +02:00
DOS_API DosQVariant * DOS_CALL dos_qvariant_create_float ( float value ) ;
2016-07-08 20:04:33 +02:00
/// \brief Create a new QVariant holding a double value
/// \return The a new QVariant
/// \param value The double value
/// \note The returned QVariant should be freed using dos_qvariant_delete()
2016-04-12 23:58:53 +02:00
DOS_API DosQVariant * DOS_CALL dos_qvariant_create_double ( double value ) ;
2016-07-08 20:04:33 +02:00
2016-07-10 00:38:57 +02:00
/// \brief Create a new QVariant holding a QVariantList
/// \return A new QVariant
/// \param size The size of the QVariant array
/// \param array The array of QVariant that will be inserted in the inner QVariantList
/// \note The \p array is owned by the caller thus it will not be deleted
2017-04-09 14:34:47 +02:00
DOS_API DosQVariant * DOS_CALL dos_qvariant_create_array ( int size , DosQVariant * * array ) ;
2016-07-09 18:31:22 +02:00
2016-07-08 20:04:33 +02:00
/// \brief Calls the QVariant::setValue<int>() function
/// \param vptr The QVariant
/// \param value The int value
2016-07-10 00:38:57 +02:00
DOS_API void DOS_CALL dos_qvariant_setInt ( DosQVariant * vptr , int value ) ;
2016-07-08 20:04:33 +02:00
/// \brief Calls the QVariant::setValue<bool>() function
/// \param vptr The QVariant
/// \param value The bool value
2016-07-10 00:38:57 +02:00
DOS_API void DOS_CALL dos_qvariant_setBool ( DosQVariant * vptr , bool value ) ;
2016-07-08 20:04:33 +02:00
2016-07-10 00:38:57 +02:00
/// \brief Calls the QVariant::setValue<float>() function
2016-07-08 20:04:33 +02:00
/// \param vptr The QVariant
/// \param value The float value
2016-07-10 00:38:57 +02:00
DOS_API void DOS_CALL dos_qvariant_setFloat ( DosQVariant * vptr , float value ) ;
2016-07-08 20:04:33 +02:00
2016-07-10 00:38:57 +02:00
/// \brief Calls the QVariant::setValue<double>() function
2016-07-08 20:04:33 +02:00
/// \param vptr The QVariant
/// \param value The double value
2016-07-10 00:38:57 +02:00
DOS_API void DOS_CALL dos_qvariant_setDouble ( DosQVariant * vptr , double value ) ;
2016-07-08 20:04:33 +02:00
2016-07-10 00:38:57 +02:00
/// \brief Calls the QVariant::setValue<QString>() function
2016-07-08 20:04:33 +02:00
/// \param vptr The QVariant
/// \param value The string value
/// \note The string argument is copied inside the QVariant and it will not be deleted
2016-07-10 00:38:57 +02:00
DOS_API void DOS_CALL dos_qvariant_setString ( DosQVariant * vptr , const char * value ) ;
2016-07-08 20:04:33 +02:00
2016-07-10 00:38:57 +02:00
/// \brief Calls the QVariant::setValue<QObject*>() function
2016-07-08 20:04:33 +02:00
/// \param vptr The QVariant
/// \param value The string value
/// \note The string argument is copied inside the QVariant and it will not be deleted
2016-07-10 00:38:57 +02:00
DOS_API void DOS_CALL dos_qvariant_setQObject ( DosQVariant * vptr , DosQObject * value ) ;
2016-07-08 20:04:33 +02:00
2016-07-10 00:38:57 +02:00
/// \brief Calls the QVariant::setValue<QVariantList>() function
/// \param vptr The QVariant
/// \param size The size of the \p array
/// \param array The array of QVariant use for setting the inner QVariantList
2017-04-09 14:34:47 +02:00
DOS_API void DOS_CALL dos_qvariant_setArray ( DosQVariant * vptr , int size , DosQVariant * * array ) ;
2016-07-09 18:31:22 +02:00
2016-07-08 20:04:33 +02:00
/// \brief Calls the QVariant::isNull function
/// \return True if the QVariant is null, false otherwise
/// \param vptr The QVariant
2016-07-10 00:38:57 +02:00
DOS_API bool DOS_CALL dos_qvariant_isnull ( const DosQVariant * vptr ) ;
2016-07-08 20:04:33 +02:00
/// \brief Free the memory allocated for the given QVariant
/// \param vptr The QVariant
2016-07-10 00:38:57 +02:00
DOS_API void DOS_CALL dos_qvariant_delete ( DosQVariant * vptr ) ;
2016-07-08 20:04:33 +02:00
/// \brief Calls the QVariant::operator=(const QVariant&) function
/// \param vptr The QVariant (left side)
/// \param other The QVariant (right side)
2016-07-10 00:38:57 +02:00
DOS_API void DOS_CALL dos_qvariant_assign ( DosQVariant * vptr , const DosQVariant * other ) ;
2016-07-08 20:04:33 +02:00
/// \brief Calls the QVariant::value<int>() function
/// \param vptr The QVariant
/// \return The int value
2016-07-10 00:38:57 +02:00
DOS_API int DOS_CALL dos_qvariant_toInt ( const DosQVariant * vptr ) ;
2016-07-08 20:04:33 +02:00
/// \brief Calls the QVariant::value<bool>() function
/// \param vptr The QVariant
/// \return The bool value
2016-07-10 00:38:57 +02:00
DOS_API bool DOS_CALL dos_qvariant_toBool ( const DosQVariant * vptr ) ;
2016-07-08 20:04:33 +02:00
/// \brief Calls the QVariant::value<QString>() function
/// \param vptr The QVariant
/// \return The string value
/// \note The returned string should be freed by using dos_chararray_delete()
2016-07-10 00:38:57 +02:00
DOS_API char * DOS_CALL dos_qvariant_toString ( const DosQVariant * vptr ) ;
2016-07-08 20:04:33 +02:00
/// \brief Calls the QVariant::value<float>() function
/// \param vptr The QVariant
/// \return The float value
2016-07-10 00:38:57 +02:00
DOS_API float DOS_CALL dos_qvariant_toFloat ( const DosQVariant * vptr ) ;
2016-07-08 20:04:33 +02:00
/// \brief Calls the QVariant::value<double>() function
/// \param vptr The QVariant
/// \return The double value
2016-07-10 00:38:57 +02:00
DOS_API double DOS_CALL dos_qvariant_toDouble ( const DosQVariant * vptr ) ;
2016-07-08 20:04:33 +02:00
2016-07-10 00:38:57 +02:00
/// \brief Calls the QVariant::value<QVariantList>() function
/// \param vptr The QVariant
/// \return The QVariantList value as an array
2017-04-09 14:34:47 +02:00
DOS_API DosQVariantArray * DOS_CALL dos_qvariant_toArray ( const DosQVariant * vptr ) ;
2016-07-09 18:31:22 +02:00
2016-07-08 20:04:33 +02:00
/// \brief Calls the QVariant::value<QObject*>() function
/// \param vptr The QVariant
/// \return The QObject* value
/// \note Storing the returned QObject* is higly dengerous and depends on how you managed the memory
/// of QObjects in the binded language
2016-06-19 18:17:48 +02:00
DOS_API DosQObject * DOS_CALL dos_qvariant_toQObject ( const DosQVariant * vptr ) ;
2015-01-31 14:20:36 +01:00
2016-07-08 20:04:33 +02:00
/// @}
/// \defgroup QMetaObject QMetaObject
/// \brief Functions related to the QMetaObject class
/// @{
/// \brief Create a new QMetaObject
2016-07-10 16:51:15 +02:00
/// \param superClassMetaObject The superclass metaobject
2016-07-08 20:04:33 +02:00
/// \param className The class name
/// \param signalDefinitions The SignalDefinitions
/// \param slotDefinitions The SlotDefinitions struct
/// \param propertyDefinitions The PropertyDefinitions struct
/// \note The returned QMetaObject should be freed using dos_qmetaobject_delete().
2016-07-09 16:18:50 +02:00
/// \attention The QMetaObject should live more than the QObject it refears to.
/// Depending on the implementation usually the QMetaObject should be modeled as static variable
/// So with a lifetime equals to the entire application
2016-04-12 23:58:53 +02:00
DOS_API DosQMetaObject * DOS_CALL dos_qmetaobject_create ( DosQMetaObject * superClassMetaObject ,
const char * className ,
const SignalDefinitions * signalDefinitions ,
const SlotDefinitions * slotDefinitions ,
const PropertyDefinitions * propertyDefinitions ) ;
2016-07-08 20:04:33 +02:00
/// \brief Free the memory allocated for the given QMetaObject
/// \param vptr The QMetaObject
2016-04-12 23:58:53 +02:00
DOS_API void DOS_CALL dos_qmetaobject_delete ( DosQMetaObject * vptr ) ;
2015-12-28 13:21:02 +01:00
2016-07-08 20:04:33 +02:00
/// @}
2017-03-22 21:21:57 +01:00
/// \defgroup QAbstractListModel QAbstractItemModel
/// \brief Functions related to the QAbstractListModel class
/// @{
/// \brief Return QMetaObject associated to the QAbstractListModel class
/// \return The QMetaObject of the QAbstractListModel class
/// \note The returned QMetaObject should be freed using dos_qmetaobject_delete().
2017-07-06 14:53:57 +02:00
DOS_API DosQMetaObject * DOS_CALL dos_qabstractlistmodel_qmetaobject ( void ) ;
2017-03-22 21:21:57 +01:00
/// \brief Create a new QAbstractListModel
/// \param callbackObject The pointer of QAbstractListModel in the binded language
/// \param metaObject The QMetaObject for this QAbstractListModel
/// \param dObjectCallback The callback for handling the properties read/write and slots execution
2017-04-02 14:47:42 +02:00
/// \param callbacks The QAbstractItemModel callbacks
2017-03-22 21:21:57 +01:00
DOS_API DosQAbstractListModel * DOS_CALL dos_qabstractlistmodel_create ( void * callbackObject ,
DosQMetaObject * metaObject ,
DObjectCallback dObjectCallback ,
2017-04-09 14:34:47 +02:00
DosQAbstractItemModelCallbacks * callbacks ) ;
2017-03-25 15:08:04 +01:00
/// \brief Calls the default QAbstractListModel::index() function
2017-04-09 14:31:45 +02:00
DOS_API DosQModelIndex * DOS_CALL dos_qabstractlistmodel_index ( DosQAbstractListModel * vptr ,
2017-04-09 14:34:47 +02:00
int row , int column , DosQModelIndex * parent ) ;
2017-03-25 15:08:04 +01:00
/// \brief Calls the default QAbstractListModel::parent() function
2017-04-09 14:31:45 +02:00
DOS_API DosQModelIndex * DOS_CALL dos_qabstractlistmodel_parent ( DosQAbstractListModel * vptr ,
2017-04-09 14:34:47 +02:00
DosQModelIndex * child ) ;
2017-03-25 15:08:04 +01:00
/// \brief Calls the default QAbstractListModel::columnCount() function
DOS_API int DOS_CALL dos_qabstractlistmodel_columnCount ( DosQAbstractListModel * vptr ,
2017-04-09 14:34:47 +02:00
DosQModelIndex * parent ) ;
2017-03-25 15:08:04 +01:00
2017-03-22 21:25:36 +01:00
/// @}
/// \defgroup QAbstractTableModel QAbstractTableModel
/// \brief Functions related to the QAbstractTableModel class
/// @{
/// \brief Return QMetaObject associated to the QAbstractTableModel class
/// \return The QMetaObject of the QAbstractTableModel class
/// \note The returned QMetaObject should be freed using dos_qmetaobject_delete().
2017-07-06 14:53:57 +02:00
DOS_API DosQMetaObject * DOS_CALL dos_qabstracttablemodel_qmetaobject ( void ) ;
2017-03-22 21:25:36 +01:00
/// \brief Create a new QAbstractTableModel
/// \param callbackObject The pointer of QAbstractTableModel in the binded language
/// \param metaObject The QMetaObject for this QAbstractTableModel
/// \param dObjectCallback The callback for handling the properties read/write and slots execution
2017-04-02 14:47:42 +02:00
/// \param callbacks The QAbstractItemModel callbacks
2017-03-25 15:08:04 +01:00
DOS_API DosQAbstractTableModel * DOS_CALL dos_qabstracttablemodel_create ( void * callbackObject ,
2017-04-09 14:34:47 +02:00
DosQMetaObject * metaObject ,
DObjectCallback dObjectCallback ,
DosQAbstractItemModelCallbacks * callbacks ) ;
2017-03-25 15:08:04 +01:00
/// \brief Calls the default QAbstractTableModel::index() function
2017-04-09 14:31:45 +02:00
DOS_API DosQModelIndex * DOS_CALL dos_qabstracttablemodel_index ( DosQAbstractTableModel * vptr ,
2017-04-09 14:34:47 +02:00
int row , int column , DosQModelIndex * parent ) ;
2017-03-25 15:08:04 +01:00
/// \brief Calls the default QAbstractTableModel::parent() function
2017-04-09 14:31:45 +02:00
DOS_API DosQModelIndex * DOS_CALL dos_qabstracttablemodel_parent ( DosQAbstractTableModel * vptr ,
2017-04-09 14:34:47 +02:00
DosQModelIndex * child ) ;
2017-03-25 15:08:04 +01:00
2017-03-22 21:21:57 +01:00
/// @}
2017-03-05 18:18:30 +01:00
/// \defgroup QAbstractItemModel QAbstractItemModel
/// \brief Functions related to the QAbstractItemModel class
2016-07-08 20:04:33 +02:00
/// @{
2017-03-05 18:18:30 +01:00
/// \brief Return QMetaObject associated to the QAbstractItemModel class
/// \return The QMetaObject of the QAbstractItemModel class
2016-07-08 20:04:33 +02:00
/// \note The returned QMetaObject should be freed using dos_qmetaobject_delete().
2017-07-06 14:53:57 +02:00
DOS_API DosQMetaObject * DOS_CALL dos_qabstractitemmodel_qmetaobject ( void ) ;
2016-07-08 20:04:33 +02:00
2017-03-05 18:18:30 +01:00
/// \brief Create a new QAbstractItemModel
/// \param callbackObject The pointer of QAbstractItemModel in the binded language
/// \param metaObject The QMetaObject for this QAbstractItemModel
2016-07-10 01:24:53 +02:00
/// \param dObjectCallback The callback for handling the properties read/write and slots execution
2017-04-02 14:47:42 +02:00
/// \param callbacks The QAbstractItemModel callbacks
/// \note The callbacks struct is copied so you can freely delete after calling this function
2017-03-05 18:18:30 +01:00
DOS_API DosQAbstractItemModel * DOS_CALL dos_qabstractitemmodel_create ( void * callbackObject ,
2016-04-12 23:58:53 +02:00
DosQMetaObject * metaObject ,
DObjectCallback dObjectCallback ,
2017-04-09 14:34:47 +02:00
DosQAbstractItemModelCallbacks * callbacks ) ;
2017-04-02 14:47:42 +02:00
/// \brief Calls the QAbstractItemModel::setData function
2017-04-09 14:34:47 +02:00
DOS_API bool DOS_CALL dos_qabstractitemmodel_setData ( DosQAbstractItemModel * vptr , DosQModelIndex * index , DosQVariant * data , int role ) ;
2017-04-02 14:47:42 +02:00
/// \brief Calls the QAbstractItemModel::roleNames function
2017-04-09 14:31:45 +02:00
DOS_API DosQHashIntQByteArray * DOS_CALL dos_qabstractitemmodel_roleNames ( DosQAbstractItemModel * vptr ) ;
2017-04-02 14:47:42 +02:00
/// \brief Calls the QAbstractItemModel::flags function
2017-04-09 14:34:47 +02:00
DOS_API int DOS_CALL dos_qabstractitemmodel_flags ( DosQAbstractItemModel * vptr , DosQModelIndex * index ) ;
2017-04-02 14:47:42 +02:00
/// \brief Calls the QAbstractItemModel::headerData function
2017-04-09 14:31:45 +02:00
DOS_API DosQVariant * DOS_CALL dos_qabstractitemmodel_headerData ( DosQAbstractItemModel * vptr , int section , int orientation , int role ) ;
2016-07-10 01:24:53 +02:00
2017-04-02 16:12:18 +02:00
/// \brief Calls the QAbstractItemModel::hasChildren function
2017-04-09 14:34:47 +02:00
DOS_API bool DOS_CALL dos_qabstractitemmodel_hasChildren ( DosQAbstractItemModel * vptr , DosQModelIndex * parentIndex ) ;
2017-04-02 16:12:18 +02:00
2017-04-17 00:52:43 +04:00
/// \brief Calls the QAbstractItemModel::hasIndex function
DOS_API bool DOS_CALL dos_qabstractitemmodel_hasIndex ( DosQAbstractItemModel * vptr , int row , int column , DosQModelIndex * dosParentIndex ) ;
2017-04-02 16:12:18 +02:00
/// \brief Calls the QAbstractItemModel::canFetchMore function
2017-04-09 14:34:47 +02:00
DOS_API bool DOS_CALL dos_qabstractitemmodel_canFetchMore ( DosQAbstractItemModel * vptr , DosQModelIndex * parentIndex ) ;
2017-04-02 16:12:18 +02:00
/// \brief Calls the QAbstractItemModel::fetchMore function
2017-04-09 14:34:47 +02:00
DOS_API void DOS_CALL dos_qabstractitemmodel_fetchMore ( DosQAbstractItemModel * vptr , DosQModelIndex * parentIndex ) ;
2017-04-02 16:12:18 +02:00
2017-03-05 18:18:30 +01:00
/// \brief Calls the QAbstractItemModel::beginInsertRows() function
/// \param vptr The QAbstractItemModel
2016-07-10 01:24:53 +02:00
/// \param parent The parent QModelIndex
/// \param first The first row in the range
/// \param last The last row in the range
/// \note The \p parent QModelIndex is owned by the caller thus it will not be deleted
2017-03-05 18:18:30 +01:00
DOS_API void DOS_CALL dos_qabstractitemmodel_beginInsertRows ( DosQAbstractItemModel * vptr , DosQModelIndex * parent , int first , int last ) ;
2016-07-10 01:24:53 +02:00
2017-03-05 18:18:30 +01:00
/// \brief Calls the QAbstractItemModel::endInsertRows() function
/// \param vptr The QAbstractItemModel
DOS_API void DOS_CALL dos_qabstractitemmodel_endInsertRows ( DosQAbstractItemModel * vptr ) ;
2016-07-10 01:24:53 +02:00
2017-03-05 18:18:30 +01:00
/// \brief Calls the QAbstractItemModel::beginRemovetRows() function
/// \param vptr The QAbstractItemModel
2016-07-10 01:24:53 +02:00
/// \param parent The parent QModelIndex
/// \param first The first column in the range
/// \param last The last column in the range
/// \note The \p parent QModelIndex is owned by the caller thus it will not be deleted
2017-03-05 18:18:30 +01:00
DOS_API void DOS_CALL dos_qabstractitemmodel_beginRemoveRows ( DosQAbstractItemModel * vptr , DosQModelIndex * parent , int first , int last ) ;
2016-07-10 01:24:53 +02:00
2017-03-05 18:18:30 +01:00
/// \brief Calls the QAbstractItemModel::endRemoveRows() function
/// \param vptr The QAbstractItemModel
DOS_API void DOS_CALL dos_qabstractitemmodel_endRemoveRows ( DosQAbstractItemModel * vptr ) ;
2016-07-10 01:24:53 +02:00
2017-03-05 18:37:49 +01:00
/// \brief Calls the QAbstractItemModel::beginInsertColumns() function
/// \param vptr The QAbstractItemModel
/// \param parent The parent QModelIndex
/// \param first The first column in the range
/// \param last The last column in the range
/// \note The \p parent QModelIndex is owned by the caller thus it will not be deleted
DOS_API void DOS_CALL dos_qabstractitemmodel_beginInsertColumns ( DosQAbstractItemModel * vptr , DosQModelIndex * parent , int first , int last ) ;
/// \brief Calls the QAbstractItemModel::endInsertColumns() function
/// \param vptr The QAbstractItemModel
DOS_API void DOS_CALL dos_qabstractitemmodel_endInsertColumns ( DosQAbstractItemModel * vptr ) ;
/// \brief Calls the QAbstractItemModel::beginRemovetColumns() function
/// \param vptr The QAbstractItemModel
/// \param parent The parent QModelIndex
/// \param first The first column in the range
/// \param last The last column in the range
/// \note The \p parent QModelIndex is owned by the caller thus it will not be deleted
DOS_API void DOS_CALL dos_qabstractitemmodel_beginRemoveColumns ( DosQAbstractItemModel * vptr , DosQModelIndex * parent , int first , int last ) ;
/// \brief Calls the QAbstractItemModel::endRemoveColumns() function
/// \param vptr The QAbstractItemModel
DOS_API void DOS_CALL dos_qabstractitemmodel_endRemoveColumns ( DosQAbstractItemModel * vptr ) ;
2017-03-05 18:18:30 +01:00
/// \brief Calls the QAbstractItemModel::beginResetModel() function
/// \param vptr The QAbstractItemModel
DOS_API void DOS_CALL dos_qabstractitemmodel_beginResetModel ( DosQAbstractItemModel * vptr ) ;
2016-07-10 01:24:53 +02:00
2017-03-05 18:18:30 +01:00
/// \brief Calls the QAbstractItemModel::endResetModel() function
/// \param vptr The QAbstractItemModel
DOS_API void DOS_CALL dos_qabstractitemmodel_endResetModel ( DosQAbstractItemModel * vptr ) ;
2016-06-19 18:17:48 +02:00
2016-07-10 00:43:30 +02:00
/// \brief Emit the dataChanged signal
2017-03-05 18:18:30 +01:00
/// \param vptr The DosQAbstractItemModel pointer
2016-07-10 00:43:30 +02:00
/// \param topLeft The topLeft DosQModelIndex
/// \param bottomRight The bottomright DosQModelIndex
/// \param rolesPtr The roles array
/// \param rolesLength The roles array length
/// \note The \p topLeft, \p bottomRight and \p rolesPtr arguments are owned by the caller thus they will not be deleted
2017-03-05 18:18:30 +01:00
DOS_API void DOS_CALL dos_qabstractitemmodel_dataChanged ( DosQAbstractItemModel * vptr ,
2016-06-19 18:17:48 +02:00
const DosQModelIndex * topLeft ,
const DosQModelIndex * bottomRight ,
int * rolesPtr , int rolesLength ) ;
2017-03-05 19:06:07 +01:00
2017-03-25 15:08:04 +01:00
/// \brief Calls the QAbstractItemModel::createIndex() function
2017-04-09 14:31:45 +02:00
DOS_API DosQModelIndex * DOS_CALL dos_qabstractitemmodel_createIndex ( DosQAbstractItemModel * vptr ,
2017-07-06 14:54:38 +02:00
int row , int column , void * data ) ;
2017-03-22 22:23:17 +01:00
2017-03-25 15:08:04 +01:00
/// \brief Calls the default QAbstractItemModel::setData() function
DOS_API bool DOS_CALL dos_qabstractitemmodel_setData ( DosQAbstractItemModel * vptr ,
2017-04-09 14:34:47 +02:00
DosQModelIndex * index , DosQVariant * value , int role ) ;
2017-03-25 15:08:04 +01:00
/// \brief Calls the default QAbstractItemModel::roleNames() function
2017-04-09 14:31:45 +02:00
DOS_API DosQHashIntQByteArray * DOS_CALL dos_qabstractitemmodel_roleNames ( DosQAbstractItemModel * vptr ) ;
2017-03-25 15:08:04 +01:00
/// \brief Calls the default QAbstractItemModel::flags() function
DOS_API int DOS_CALL dos_qabstractitemmodel_flags ( DosQAbstractItemModel * vptr ,
2017-04-09 14:34:47 +02:00
DosQModelIndex * index ) ;
2017-03-25 15:08:04 +01:00
/// \brief Calls the default QAbstractItemModel::headerData() function
2017-04-09 14:31:45 +02:00
DOS_API DosQVariant * DOS_CALL dos_qabstractitemmodel_headerData ( DosQAbstractItemModel * vptr ,
2017-03-25 15:08:04 +01:00
int section , int orientation , int role ) ;
2017-03-22 22:23:17 +01:00
2016-07-08 20:04:33 +02:00
/// @}
/// \defgroup QObject QObject
/// \brief Functions related to the QObject class
/// @{
/// \brief Return QMetaObject associated to the QObject class
/// \return The QMetaObject of the QObject class
/// \note The returned QObject should be freed using dos_qmetaobject_delete().
2017-07-06 14:53:57 +02:00
DOS_API DosQMetaObject * DOS_CALL dos_qobject_qmetaobject ( void ) ;
2016-07-08 20:04:33 +02:00
2016-07-09 18:20:00 +02:00
/// \brief Create a new QObject
2016-07-10 16:51:15 +02:00
/// \param dObjectPointer The pointer of the QObject in the binded language
2016-07-09 18:20:00 +02:00
/// \param metaObject The QMetaObject associated to the given QObject
/// \param dObjectCallback The callback called from QML whenever a slot or property
/// should be in read, write or invoked
/// \return A new QObject
/// \note The returned QObject should be freed by calling dos_qobject_delete()
2016-07-10 16:51:15 +02:00
/// \note The \p dObjectPointer is usefull for forwarding a property read/slot to the correct
/// object in the binded language in the callback
2016-04-12 23:58:53 +02:00
DOS_API DosQObject * DOS_CALL dos_qobject_create ( void * dObjectPointer ,
DosQMetaObject * metaObject ,
DObjectCallback dObjectCallback ) ;
2016-07-08 20:04:33 +02:00
2016-07-09 18:20:00 +02:00
/// \brief Emit a signal definited in a QObject
2016-07-10 16:51:15 +02:00
/// \param vptr The QObject
2016-07-09 18:20:00 +02:00
/// \param name The signal name
/// \param parametersCount The number of parameters in the \p parameters array
/// \param parameters An array of DosQVariant with the values of signal arguments
2016-04-12 23:58:53 +02:00
DOS_API void DOS_CALL dos_qobject_signal_emit ( DosQObject * vptr ,
const char * name ,
int parametersCount ,
void * * parameters ) ;
2016-07-08 20:04:33 +02:00
2016-04-12 23:58:53 +02:00
DOS_API bool DOS_CALL dos_qobject_signal_connect ( DosQObject * senderVPtr ,
const char * signal ,
DosQObject * receiverVPtr ,
const char * method ,
int type ) ;
2016-07-08 20:04:33 +02:00
2016-04-12 23:58:53 +02:00
DOS_API bool DOS_CALL dos_qobject_signal_disconnect ( DosQObject * senderVPtr ,
const char * signal ,
DosQObject * receiverVPtr ,
const char * method ) ;
2016-06-26 23:05:19 +02:00
2016-07-08 20:04:33 +02:00
/// \brief Return the DosQObject objectName
/// \param vptr The DosQObject pointer
/// \return A string in UTF8 format
2016-07-09 16:18:50 +02:00
/// \note The returned string should be freed using the dos_chararray_delete() function
2016-06-26 15:05:38 +02:00
DOS_API char * DOS_CALL dos_qobject_objectName ( const DosQObject * vptr ) ;
2016-06-18 21:17:28 +02:00
2016-07-08 20:04:33 +02:00
/// \brief Calls the QObject::setObjectName() function
/// \param vptr The QObject
/// \param name A pointer to an UTF-8 string
/// \note The \p name string is owned by the caller thus it will not be deleted
2016-06-26 18:46:03 +02:00
DOS_API void DOS_CALL dos_qobject_setObjectName ( DosQObject * vptr , const char * name ) ;
2016-06-18 21:17:28 +02:00
2016-07-08 20:04:33 +02:00
/// \brief Free the memory allocated for the QObject
/// \param vptr The QObject
2016-06-26 18:46:03 +02:00
DOS_API void DOS_CALL dos_qobject_delete ( DosQObject * vptr ) ;
2015-01-31 14:20:36 +01:00
2016-07-08 20:04:33 +02:00
/// @}
/// \defgroup QModelIndex QModelIndex
/// \brief Functions related to the QModelIndex class
/// @{
2016-07-09 18:20:00 +02:00
/// \brief Create a new QModelIndex()
/// \note The returned QModelIndex should be freed by calling the dos_qmodelindex_delete() function
2017-07-06 14:53:57 +02:00
DOS_API DosQModelIndex * DOS_CALL dos_qmodelindex_create ( void ) ;
2016-07-09 18:20:00 +02:00
/// \brief Create a new QModelIndex() copy constructed with given index
/// \note The returned QModelIndex should be freed by calling the dos_qmodelindex_delete() function
2016-04-12 23:58:53 +02:00
DOS_API DosQModelIndex * DOS_CALL dos_qmodelindex_create_qmodelindex ( DosQModelIndex * index ) ;
2016-07-09 18:20:00 +02:00
/// \brief Free the memory allocated for the QModelIndex
/// \param vptr The QModelIndex
2016-04-12 23:58:53 +02:00
DOS_API void DOS_CALL dos_qmodelindex_delete ( DosQModelIndex * vptr ) ;
2016-07-09 18:20:00 +02:00
/// \brief Calls the QModelIndex::row() function
/// \param vptr The QModelIndex
/// \return The QModelIndex row
2016-06-19 12:20:00 +02:00
DOS_API int DOS_CALL dos_qmodelindex_row ( const DosQModelIndex * vptr ) ;
2016-07-09 18:20:00 +02:00
/// \brief Calls the QModelIndex::column() function
/// \param vptr The QModelIndex
/// \return The QModelIndex column
2016-06-19 12:20:00 +02:00
DOS_API int DOS_CALL dos_qmodelindex_column ( const DosQModelIndex * vptr ) ;
2016-07-09 18:20:00 +02:00
/// \brief Calls the QModelIndex::isvalid() function
/// \param vptr The QModelIndex
/// \return True if the QModelIndex is valid, false otherwise
2016-06-19 12:20:00 +02:00
DOS_API bool DOS_CALL dos_qmodelindex_isValid ( const DosQModelIndex * vptr ) ;
2016-07-09 18:20:00 +02:00
/// \brief Calls the QModelIndex::data() function
/// \param vptr The QModelIndex
2016-07-10 16:51:15 +02:00
/// \param role The model role to which we want the data
2016-07-09 18:20:00 +02:00
/// \return The QVariant associated at the given role
/// \note The returned QVariant should be freed by calling the dos_qvariant_delete() function
2016-06-26 14:43:53 +02:00
DOS_API DosQVariant * DOS_CALL dos_qmodelindex_data ( const DosQModelIndex * vptr , int role ) ;
2016-07-09 18:20:00 +02:00
/// \brief Calls the QModelIndex::parent() function
/// \param vptr The QModelIndex
/// \return The model parent QModelIndex
/// \note The returned QModelIndex should be freed by calling the dos_qmodelindex_delete() function
2016-06-19 12:20:00 +02:00
DOS_API DosQModelIndex * DOS_CALL dos_qmodelindex_parent ( const DosQModelIndex * vptr ) ;
2016-07-09 18:20:00 +02:00
/// \brief Calls the QModelIndex::child() function
/// \param vptr The QModelIndex
/// \param row The child row
/// \param column The child column
/// \return The model child QModelIndex at the given \p row and \p column
/// \note The returned QModelIndex should be freed by calling the dos_qmodelindex_delete() function
2016-06-19 12:20:00 +02:00
DOS_API DosQModelIndex * DOS_CALL dos_qmodelindex_child ( const DosQModelIndex * vptr , int row , int column ) ;
2016-07-09 18:20:00 +02:00
/// \brief Calls the QModelIndex::sibling() function
/// \param vptr The QModelIndex
/// \param row The sibling row
/// \param column The sibling column
/// \return The model sibling QModelIndex at the given \p row and \p column
/// \note The returned QModelIndex should be freed by calling the dos_qmodelindex_delete() function
2016-06-19 12:20:00 +02:00
DOS_API DosQModelIndex * DOS_CALL dos_qmodelindex_sibling ( const DosQModelIndex * vptr , int row , int column ) ;
2016-07-09 18:20:00 +02:00
/// \brief Calls the QModelIndex::operator=(const QModelIndex&) function
/// \param l The left side QModelIndex
/// \param r The right side QModelIndex
2017-04-13 14:35:49 +02:00
DOS_API void DOS_CALL dos_qmodelindex_assign ( DosQModelIndex * l , const DosQModelIndex * r ) ;
/// \brief Calls the QModelIndex::internalPointer function
/// \param vptr The QModelIndex
/// \return The internal pointer
DOS_API void * DOS_CALL dos_qmodelindex_internalPointer ( DosQModelIndex * vptr ) ;
2015-01-31 14:20:36 +01:00
2016-07-08 20:04:33 +02:00
/// @}
2016-07-10 16:51:15 +02:00
/// \defgroup QHash QHash
2016-07-09 18:20:00 +02:00
/// \brief Functions related to the QHash class
/// @{
/// \brief Create a new QHash<int, QByteArray>
/// \return A new QHash<int, QByteArray>
/// \note The retuned QHash<int, QByteArray> should be freed using
/// the dos_qhash_int_qbytearray_delete(DosQHashIntQByteArray *) function
2017-07-06 14:53:57 +02:00
DOS_API DosQHashIntQByteArray * DOS_CALL dos_qhash_int_qbytearray_create ( void ) ;
2016-07-09 18:20:00 +02:00
/// \brief Free the memory allocated for the QHash<int, QByteArray>
/// \param vptr The QHash<int, QByteArray>
2016-06-26 18:46:03 +02:00
DOS_API void DOS_CALL dos_qhash_int_qbytearray_delete ( DosQHashIntQByteArray * vptr ) ;
2016-07-09 18:20:00 +02:00
/// \brief Calls the QHash<int, QByteArray>::insert() function
/// \param vptr The QHash<int, QByteArray>
/// \param key The key
/// \param value The UTF-8 string
/// \note The \p value string is owned by the caller thus it will not be freed
2016-06-26 18:46:03 +02:00
DOS_API void DOS_CALL dos_qhash_int_qbytearray_insert ( DosQHashIntQByteArray * vptr , int key , const char * value ) ;
2015-01-31 14:20:36 +01:00
2016-07-09 18:20:00 +02:00
/// \brief Calls the QHash<int, QByteArray>::value() function
/// \param vptr The QHash<int, QByteArray>
/// \param key The key to which retrive the value
/// \return The UTF-8 string associated to the given value
/// \note The returned string should be freed by calling the dos_chararray_delete() function
DOS_API char * DOS_CALL dos_qhash_int_qbytearray_value ( const DosQHashIntQByteArray * vptr , int key ) ;
/// @}
/// \defgroup QResource QResource
/// \brief Functions related to the QResource class
/// @{
/// Register the given .rcc (compiled) file in the resource system
2016-04-12 23:58:53 +02:00
DOS_API void DOS_CALL dos_qresource_register ( const char * filename ) ;
2015-12-05 17:33:54 +01:00
2016-07-09 18:20:00 +02:00
/// @}
2016-07-09 16:18:50 +02:00
/// \defgroup QUrl QUrl
/// \brief Functions related to the QUrl class
/// @{
/// \brief Create a new QUrl
/// \param url The UTF-8 string that represents an url
/// \param parsingMode The parsing mode
/// \note The retuned QUrl should be freed using the dos_qurl_delete() function
2016-04-12 23:58:53 +02:00
DOS_API DosQUrl * DOS_CALL dos_qurl_create ( const char * url , int parsingMode ) ;
2016-07-09 16:18:50 +02:00
/// \brief Free the memory allocated for the QUrl
/// \param vptr The QUrl to be freed
2017-04-09 14:31:45 +02:00
DOS_API void DOS_CALL dos_qurl_delete ( DosQUrl * vptr ) ;
2016-07-09 16:18:50 +02:00
/// \brief Calls the QUrl::toString() function
/// \param vptr The QUrl
/// \return The url as an UTF-8 string
/// \note The returned string should be freed using the dos_chararray_delete() function
2016-06-26 15:05:38 +02:00
DOS_API char * DOS_CALL dos_qurl_to_string ( const DosQUrl * vptr ) ;
2016-07-09 16:18:50 +02:00
/// \brief Class the QUrl::isValid() function
/// \param vptr The QUrl
/// \return True if the QUrl is valid, false otherwise
2016-06-26 15:05:38 +02:00
DOS_API bool dos_qurl_isValid ( const DosQUrl * vptr ) ;
2015-12-05 17:33:54 +01:00
2016-07-09 16:18:50 +02:00
/// @}
/// \defgroup QDeclarative QDeclarative
/// \brief Functions related to the QDeclarative module
/// @{
/// \brief Register a type in order to be instantiable from QML
/// \return An integer value that represents the registration ID in the
/// qml environment
/// \note The \p qmlRegisterType is owned by the caller thus it will not be freed
2016-04-12 23:58:53 +02:00
DOS_API int DOS_CALL dos_qdeclarative_qmlregistertype ( const QmlRegisterType * qmlRegisterType ) ;
2016-07-09 16:18:50 +02:00
/// \brief Register a singleton type in order to be accessible from QML
/// \return An integer value that represents the registration ID in the
/// \note The \p qmlRegisterType is owned by the caller thus it will not be freed
2016-04-12 23:58:53 +02:00
DOS_API int DOS_CALL dos_qdeclarative_qmlregistersingletontype ( const QmlRegisterType * qmlRegisterType ) ;
2016-01-24 22:03:12 +01:00
2016-07-09 16:18:50 +02:00
/// @}
2014-07-19 18:26:08 +02:00
# ifdef __cplusplus
}
# endif
# endif // DOTHERSIDE_H