Started using doxygen

This commit is contained in:
Filippo Cucchetto 2016-06-26 23:05:19 +02:00
parent a86aa43a97
commit 4ecd9c8c53
4 changed files with 2451 additions and 53 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@ nimcache
*.user *.user
.idea .idea
*.orig *.orig
doc

2330
doxygen_config Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,11 @@
/**
* \file DOtherSide.h
* \brief The DOtherSide API file
*
* This file contains all the functions from creating or manipulating the QML
* environement
*/
#ifndef DOTHERSIDE_H #ifndef DOTHERSIDE_H
#define DOTHERSIDE_H #define DOTHERSIDE_H
@ -53,15 +61,19 @@ DOS_API DosQQmlContext *DOS_CALL dos_qquickview_rootContext(DosQQuickView *vptr)
// QQmlContext // QQmlContext
DOS_API char *DOS_CALL dos_qqmlcontext_baseUrl(const DosQQmlContext *vptr); DOS_API char *DOS_CALL dos_qqmlcontext_baseUrl(const DosQQmlContext *vptr);
/// Sets a property inside the context /**
/// @param vptr The DosQQmlContext * \brief Sets a property inside the context
/// @param name The property name. The string is owned by the caller thus it will not be deleted by the library * \param vptr The DosQQmlContext
/// @param value The property value. The DosQVariant is owned by the caller thus it will not be deleted by the library * \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); DOS_API void DOS_CALL dos_qqmlcontext_setcontextproperty(DosQQmlContext *vptr, const char *name, DosQVariant *value);
// CharArray // CharArray
/// Delete a string /**
/// @param ptr The string * \brief Delete a string
* \param ptr The string
*/
DOS_API void DOS_CALL dos_chararray_delete(char *ptr); DOS_API void DOS_CALL dos_chararray_delete(char *ptr);
// QVariant // QVariant
@ -116,12 +128,14 @@ DOS_API void DOS_CALL dos_qabstractlistmodel_endRemoveRows (DosQAbstractListMod
DOS_API void DOS_CALL dos_qabstractlistmodel_beginResetModel(DosQAbstractListModel *vptr); DOS_API void DOS_CALL dos_qabstractlistmodel_beginResetModel(DosQAbstractListModel *vptr);
DOS_API void DOS_CALL dos_qabstractlistmodel_endResetModel (DosQAbstractListModel *vptr); DOS_API void DOS_CALL dos_qabstractlistmodel_endResetModel (DosQAbstractListModel *vptr);
/// Emit the dataChanged signal /**
/// @param vptr The DosQAbstractListModel pointer * \brief Emit the dataChanged signal
/// @param topLeft The topLeft DosQModelIndex. The index is owned by the caller thus it will not be deleted * \param vptr The DosQAbstractListModel pointer
/// @param bottomRight The bottomright DosQModelIndex. The index is owned by the caller thus it will not be deleted * \param topLeft The topLeft DosQModelIndex. The index is owned by the caller thus it will not be deleted
/// @param rolesPtr The roles array. The pointer is owned by the caller and thus it will not be deleted * \param bottomRight The bottomright DosQModelIndex. The index is owned by the caller thus it will not be deleted
/// @param rolesLength The roles array length * \param rolesPtr The roles array. The pointer is owned by the caller and thus it will not be deleted
* \param rolesLength The roles array length
*/
DOS_API void DOS_CALL dos_qabstractlistmodel_dataChanged(DosQAbstractListModel *vptr, DOS_API void DOS_CALL dos_qabstractlistmodel_dataChanged(DosQAbstractListModel *vptr,
const DosQModelIndex *topLeft, const DosQModelIndex *topLeft,
const DosQModelIndex *bottomRight, const DosQModelIndex *bottomRight,
@ -145,20 +159,25 @@ DOS_API bool DOS_CALL dos_qobject_signal_disconnect(DosQObject *senderVPtr,
const char *signal, const char *signal,
DosQObject *receiverVPtr, DosQObject *receiverVPtr,
const char *method); const char *method);
/// Return the DosQObject objectName
/// @param vptr The DosQObject pointer /**
/// @return A string in UTF8 format. The ownership is transferred to the caller thus * \brief Return the DosQObject objectName
/// it's his responsability to free the string * \param vptr The DosQObject pointer
* \return A string in UTF8 format. The ownership is transferred to the caller thus it's his responsability to free the string
*/
DOS_API char *DOS_CALL dos_qobject_objectName(const DosQObject *vptr); DOS_API char *DOS_CALL dos_qobject_objectName(const DosQObject *vptr);
/// Sets the DosQObject objectName /**
/// @param vptr the DosQObject pointer * \brief Sets the DosQObject objectName
/// @param name a pointer to a UTF8 string. The string is owned by the caller thus * \param vptr the DosQObject pointer
/// it will not be deleted. * \param name a pointer to a UTF8 string. The string is owned by the caller thus it will not be deleted.
*/
DOS_API void DOS_CALL dos_qobject_setObjectName(DosQObject *vptr, const char *name); DOS_API void DOS_CALL dos_qobject_setObjectName(DosQObject *vptr, const char *name);
/// Delete the DosQObject /**
/// @param vptr the DosQObject pointer * \brief Delete the DosQObject
* \param vptr the DosQObject pointer
*/
DOS_API void DOS_CALL dos_qobject_delete(DosQObject *vptr); DOS_API void DOS_CALL dos_qobject_delete(DosQObject *vptr);
// QModelIndex // QModelIndex

View File

@ -1,6 +1,15 @@
/**
* @file DOtherSideTypes.h
* @brief The DOtherSide types
*
* This file contains all the type definitions for structs and callbacks
* used by the DOtherSide library
*/
#ifndef DOTHERSIDETYPES_H #ifndef DOTHERSIDETYPES_H
#define DOTHERSIDETYPES_H #define DOTHERSIDETYPES_H
#ifdef WIN32 #ifdef WIN32
#define DOS_CALL __cdecl #define DOS_CALL __cdecl
#else #else
@ -13,53 +22,92 @@ extern "C"
{ {
#endif #endif
// Raw data types /// \brief A pointer to a QVariant
typedef void DosQVariant; typedef void DosQVariant;
/// \brief A pointer to a QModelIndex
typedef void DosQModelIndex; typedef void DosQModelIndex;
/// \brief A pointer to a QAbstractListModel
typedef void DosQAbstractListModel; typedef void DosQAbstractListModel;
/// \brief A pointer to a QQmlApplicationEngine
typedef void DosQQmlApplicationEngine; typedef void DosQQmlApplicationEngine;
/// \brief A pointer to a QQuickView
typedef void DosQQuickView; typedef void DosQQuickView;
/// \brief A pointer to a QQmlContext
typedef void DosQQmlContext; typedef void DosQQmlContext;
/// \brief A pointer to a QHash<int,QByteArray>
typedef void DosQHashIntQByteArray; typedef void DosQHashIntQByteArray;
/// \brief A pointer to a QUrl
typedef void DosQUrl; typedef void DosQUrl;
/// \brief A pointer to a QMetaObject
typedef void DosQMetaObject; typedef void DosQMetaObject;
/// \brief A pointer to a QObject
typedef void DosQObject; typedef void DosQObject;
// Raw function types /**
typedef void (DOS_CALL *Function)(void *); * \brief Called when a slot should be executed
* \param self The pointer to the QObject in the binded language
/// Called when a slot should be executed * \param slotName The slotName as DosQVariant. It should not be deleted
/// @param self The pointer to the QObject in the binded language * \param argc The number of arguments
/// @param slotName The slotName as DosQVariant. It should not be deleted * \param argv An array of DosQVariant pointers. They should not be deleted
/// @param argc The number of arguments */
/// @param argv An array of DosQVariant pointers. They should not be deleted
typedef void (DOS_CALL *DObjectCallback)(void *self, DosQVariant *slotName, int argc, DosQVariant **argv); typedef void (DOS_CALL *DObjectCallback)(void *self, DosQVariant *slotName, int argc, DosQVariant **argv);
/// Called when the QAbstractListModel::rowCount method must be executed /**
/// @param self The pointer to the QAbstractListModel in the binded language * \brief Called when the QAbstractListModel::rowCount method must be executed
/// @param index The parent DosQModelIndex. It should not be deleted * \param self The pointer to the QAbstractListModel in the binded language
/// @param result The rowCount result. This must be deferenced and filled from the binded language. * \param index The parent DosQModelIndex. It should not be deleted
/// It should not be deleted * \param result The rowCount result. This must be deferenced and filled from the binded language. It should not be deleted
typedef void (DOS_CALL *RowCountCallback) (void *self, const DosQModelIndex *parent, int *result); */
typedef void (DOS_CALL *RowCountCallback)(void *self, const DosQModelIndex *parent, int *result);
/// Called when the QAbstractListModel::columnCount method must be executed /**
/// @param self The pointer to the QAbstractListModel in the binded language * \brief Called when the QAbstractListModel::columnCount method must be executed
/// @param index The parent DosQModelIndex. It should not be deleted * \param self The pointer to the QAbstractListModel in the binded language
/// @param result The rowCount result. This must be deferenced and filled from the binded language. * \param index The parent DosQModelIndex. It should not be deleted
/// It should not be deleted * \param result The rowCount result. This must be deferenced and filled from the binded language. It should not be deleted
typedef void (DOS_CALL *ColumnCountCallback) (void *self, const DosQModelIndex *parent, int *result); */
typedef void (DOS_CALL *ColumnCountCallback)(void *self, const DosQModelIndex *parent, int *result);
/**
* \brief Called when the QAbstractListModel::data method must be executed
* \param self The pointer to the QAbstractListModel in the binded language
* \param index The DosQModelIndex to which we request the data. It should not be deleted
* \param result The DosQVariant result. This must be deferenced and filled from the binded language.
* It should not be deleted. See dos_qvariant_assign or other DosQVariant setters
*/
typedef void (DOS_CALL *DataCallback)(void *self, const DosQModelIndex *index, int role, DosQVariant *result);
/**
* \brief Called when the QAbstractListModel::setData method must be executed
*/
typedef void (DOS_CALL *SetDataCallback)(void *self, const DosQModelIndex *index, const DosQVariant *value, int role, bool *result);
/**
* \brief Called when the QAbstractListModel::roleNames method must be executed
*/
typedef void (DOS_CALL *RoleNamesCallback)(void *self, DosQHashIntQByteArray *result);
/**
* \brief Called when the QAbstractListModel::flags method must be called
*/
typedef void (DOS_CALL *FlagsCallback)(void *self, const DosQModelIndex *index, int *result);
/**
* \brief Called when the QAbstractListModel::headerData method must be called
*/
typedef void (DOS_CALL *HeaderDataCallback)(void *self, int section, int orientation, int role, DosQVariant *result);
/// Called when the QAbstractListModel::data method must be executed
/// @param self The pointer to the QAbstractListModel in the binded language
/// @param index The DosQModelIndex to which we request the data. It should not be deleted
/// @param result The DosQVariant result. This must be deferenced and filled from the binded language.
/// It should not be deleted. See dos_qvariant_assign or other DosQVariant setters
typedef void (DOS_CALL *DataCallback) (void *self, const DosQModelIndex *index, int role, DosQVariant *result);
typedef void (DOS_CALL *SetDataCallback) (void *self, const DosQModelIndex *index, const DosQVariant *value, int role, bool *result);
typedef void (DOS_CALL *RoleNamesCallback) (void *self, DosQHashIntQByteArray *result);
typedef void (DOS_CALL *FlagsCallback) (void *self, const DosQModelIndex *index, int *result);
typedef void (DOS_CALL *HeaderDataCallback) (void *self, int section, int orientation, int role, DosQVariant *result);
typedef void (DOS_CALL *CreateDObject)(int, void *, void **, void **); typedef void (DOS_CALL *CreateDObject)(int, void *, void **, void **);
typedef void (DOS_CALL *DeleteDObject)(int, void *); typedef void (DOS_CALL *DeleteDObject)(int, void *);
struct QmlRegisterType { struct QmlRegisterType {