2024-11-06 05:30:07 +00:00
|
|
|
#include <QList>
|
|
|
|
#include <QSettings>
|
|
|
|
#include <qscicommandset.h>
|
|
|
|
#include "gen_qscicommandset.h"
|
2024-12-11 06:55:47 +00:00
|
|
|
|
|
|
|
#ifndef _Bool
|
|
|
|
#define _Bool bool
|
|
|
|
#endif
|
2024-11-06 05:30:07 +00:00
|
|
|
#include "_cgo_export.h"
|
|
|
|
|
|
|
|
bool QsciCommandSet_ReadSettings(QsciCommandSet* self, QSettings* qs) {
|
|
|
|
return self->readSettings(*qs);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QsciCommandSet_WriteSettings(QsciCommandSet* self, QSettings* qs) {
|
|
|
|
return self->writeSettings(*qs);
|
|
|
|
}
|
|
|
|
|
2024-11-17 06:21:37 +00:00
|
|
|
struct miqt_array /* of QsciCommand* */ QsciCommandSet_Commands(QsciCommandSet* self) {
|
2024-11-06 05:30:07 +00:00
|
|
|
QList<QsciCommand *>& _ret = self->commands();
|
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
|
|
|
QsciCommand** _arr = static_cast<QsciCommand**>(malloc(sizeof(QsciCommand*) * _ret.length()));
|
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
|
|
_arr[i] = _ret[i];
|
|
|
|
}
|
|
|
|
struct miqt_array _out;
|
|
|
|
_out.len = _ret.length();
|
|
|
|
_out.data = static_cast<void*>(_arr);
|
|
|
|
return _out;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QsciCommandSet_ClearKeys(QsciCommandSet* self) {
|
|
|
|
self->clearKeys();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QsciCommandSet_ClearAlternateKeys(QsciCommandSet* self) {
|
|
|
|
self->clearAlternateKeys();
|
|
|
|
}
|
|
|
|
|
|
|
|
QsciCommand* QsciCommandSet_BoundTo(const QsciCommandSet* self, int key) {
|
|
|
|
return self->boundTo(static_cast<int>(key));
|
|
|
|
}
|
|
|
|
|
|
|
|
QsciCommand* QsciCommandSet_Find(const QsciCommandSet* self, int command) {
|
|
|
|
return self->find(static_cast<QsciCommand::Command>(command));
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QsciCommandSet_ReadSettings2(QsciCommandSet* self, QSettings* qs, const char* prefix) {
|
|
|
|
return self->readSettings(*qs, prefix);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QsciCommandSet_WriteSettings2(QsciCommandSet* self, QSettings* qs, const char* prefix) {
|
|
|
|
return self->writeSettings(*qs, prefix);
|
|
|
|
}
|
|
|
|
|