mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 00:48:38 +00:00
qt: rebuild (QList/QSet using miqt_array pass by value)
This commit is contained in:
parent
b53707c7cf
commit
a7295e9292
@ -41,18 +41,18 @@ QsciLexer* QsciAbstractAPIs_Lexer(const QsciAbstractAPIs* self) {
|
||||
return self->lexer();
|
||||
}
|
||||
|
||||
void QsciAbstractAPIs_UpdateAutoCompletionList(QsciAbstractAPIs* self, struct miqt_array* /* of struct miqt_string */ context, struct miqt_array* /* of struct miqt_string */ list) {
|
||||
void QsciAbstractAPIs_UpdateAutoCompletionList(QsciAbstractAPIs* self, struct miqt_array /* of struct miqt_string */ context, struct miqt_array /* of struct miqt_string */ list) {
|
||||
QStringList context_QList;
|
||||
context_QList.reserve(context->len);
|
||||
struct miqt_string* context_arr = static_cast<struct miqt_string*>(context->data);
|
||||
for(size_t i = 0; i < context->len; ++i) {
|
||||
context_QList.reserve(context.len);
|
||||
struct miqt_string* context_arr = static_cast<struct miqt_string*>(context.data);
|
||||
for(size_t i = 0; i < context.len; ++i) {
|
||||
QString context_arr_i_QString = QString::fromUtf8(context_arr[i].data, context_arr[i].len);
|
||||
context_QList.push_back(context_arr_i_QString);
|
||||
}
|
||||
QStringList list_QList;
|
||||
list_QList.reserve(list->len);
|
||||
struct miqt_string* list_arr = static_cast<struct miqt_string*>(list->data);
|
||||
for(size_t i = 0; i < list->len; ++i) {
|
||||
list_QList.reserve(list.len);
|
||||
struct miqt_string* list_arr = static_cast<struct miqt_string*>(list.data);
|
||||
for(size_t i = 0; i < list.len; ++i) {
|
||||
QString list_arr_i_QString = QString::fromUtf8(list_arr[i].data, list_arr[i].len);
|
||||
list_QList.push_back(list_arr_i_QString);
|
||||
}
|
||||
@ -64,18 +64,18 @@ void QsciAbstractAPIs_AutoCompletionSelected(QsciAbstractAPIs* self, struct miqt
|
||||
self->autoCompletionSelected(selection_QString);
|
||||
}
|
||||
|
||||
struct miqt_array* QsciAbstractAPIs_CallTips(QsciAbstractAPIs* self, struct miqt_array* /* of struct miqt_string */ context, int commas, int style, struct miqt_array* /* of int */ shifts) {
|
||||
struct miqt_array QsciAbstractAPIs_CallTips(QsciAbstractAPIs* self, struct miqt_array /* of struct miqt_string */ context, int commas, int style, struct miqt_array /* of int */ shifts) {
|
||||
QStringList context_QList;
|
||||
context_QList.reserve(context->len);
|
||||
struct miqt_string* context_arr = static_cast<struct miqt_string*>(context->data);
|
||||
for(size_t i = 0; i < context->len; ++i) {
|
||||
context_QList.reserve(context.len);
|
||||
struct miqt_string* context_arr = static_cast<struct miqt_string*>(context.data);
|
||||
for(size_t i = 0; i < context.len; ++i) {
|
||||
QString context_arr_i_QString = QString::fromUtf8(context_arr[i].data, context_arr[i].len);
|
||||
context_QList.push_back(context_arr_i_QString);
|
||||
}
|
||||
QList<int> shifts_QList;
|
||||
shifts_QList.reserve(shifts->len);
|
||||
int* shifts_arr = static_cast<int*>(shifts->data);
|
||||
for(size_t i = 0; i < shifts->len; ++i) {
|
||||
shifts_QList.reserve(shifts.len);
|
||||
int* shifts_arr = static_cast<int*>(shifts.data);
|
||||
for(size_t i = 0; i < shifts.len; ++i) {
|
||||
shifts_QList.push_back(static_cast<int>(shifts_arr[i]));
|
||||
}
|
||||
QStringList _ret = self->callTips(context_QList, static_cast<int>(commas), static_cast<QsciScintilla::CallTipsStyle>(style), shifts_QList);
|
||||
@ -91,9 +91,9 @@ struct miqt_array* QsciAbstractAPIs_CallTips(QsciAbstractAPIs* self, struct miqt
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -86,8 +86,7 @@ func (this *QsciAbstractAPIs) UpdateAutoCompletionList(context []string, list []
|
||||
defer C.free(unsafe.Pointer(context_i_ms.data))
|
||||
context_CArray[i] = context_i_ms
|
||||
}
|
||||
context_ma := &C.struct_miqt_array{len: C.size_t(len(context)), data: unsafe.Pointer(context_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(context_ma))
|
||||
context_ma := C.struct_miqt_array{len: C.size_t(len(context)), data: unsafe.Pointer(context_CArray)}
|
||||
list_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(list))))
|
||||
defer C.free(unsafe.Pointer(list_CArray))
|
||||
for i := range list {
|
||||
@ -97,8 +96,7 @@ func (this *QsciAbstractAPIs) UpdateAutoCompletionList(context []string, list []
|
||||
defer C.free(unsafe.Pointer(list_i_ms.data))
|
||||
list_CArray[i] = list_i_ms
|
||||
}
|
||||
list_ma := &C.struct_miqt_array{len: C.size_t(len(list)), data: unsafe.Pointer(list_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(list_ma))
|
||||
list_ma := C.struct_miqt_array{len: C.size_t(len(list)), data: unsafe.Pointer(list_CArray)}
|
||||
C.QsciAbstractAPIs_UpdateAutoCompletionList(this.h, context_ma, list_ma)
|
||||
}
|
||||
|
||||
@ -120,16 +118,14 @@ func (this *QsciAbstractAPIs) CallTips(context []string, commas int, style QsciS
|
||||
defer C.free(unsafe.Pointer(context_i_ms.data))
|
||||
context_CArray[i] = context_i_ms
|
||||
}
|
||||
context_ma := &C.struct_miqt_array{len: C.size_t(len(context)), data: unsafe.Pointer(context_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(context_ma))
|
||||
context_ma := C.struct_miqt_array{len: C.size_t(len(context)), data: unsafe.Pointer(context_CArray)}
|
||||
shifts_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(shifts))))
|
||||
defer C.free(unsafe.Pointer(shifts_CArray))
|
||||
for i := range shifts {
|
||||
shifts_CArray[i] = (C.int)(shifts[i])
|
||||
}
|
||||
shifts_ma := &C.struct_miqt_array{len: C.size_t(len(shifts)), data: unsafe.Pointer(shifts_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(shifts_ma))
|
||||
var _ma *C.struct_miqt_array = C.QsciAbstractAPIs_CallTips(this.h, context_ma, (C.int)(commas), (C.int)(style), shifts_ma)
|
||||
shifts_ma := C.struct_miqt_array{len: C.size_t(len(shifts)), data: unsafe.Pointer(shifts_CArray)}
|
||||
var _ma C.struct_miqt_array = C.QsciAbstractAPIs_CallTips(this.h, context_ma, (C.int)(commas), (C.int)(style), shifts_ma)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -138,7 +134,6 @@ func (this *QsciAbstractAPIs) CallTips(context []string, commas int, style QsciS
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -28,9 +28,9 @@ void* QsciAbstractAPIs_Metacast(QsciAbstractAPIs* self, const char* param1);
|
||||
struct miqt_string QsciAbstractAPIs_Tr(const char* s);
|
||||
struct miqt_string QsciAbstractAPIs_TrUtf8(const char* s);
|
||||
QsciLexer* QsciAbstractAPIs_Lexer(const QsciAbstractAPIs* self);
|
||||
void QsciAbstractAPIs_UpdateAutoCompletionList(QsciAbstractAPIs* self, struct miqt_array* /* of struct miqt_string */ context, struct miqt_array* /* of struct miqt_string */ list);
|
||||
void QsciAbstractAPIs_UpdateAutoCompletionList(QsciAbstractAPIs* self, struct miqt_array /* of struct miqt_string */ context, struct miqt_array /* of struct miqt_string */ list);
|
||||
void QsciAbstractAPIs_AutoCompletionSelected(QsciAbstractAPIs* self, struct miqt_string selection);
|
||||
struct miqt_array* QsciAbstractAPIs_CallTips(QsciAbstractAPIs* self, struct miqt_array* /* of struct miqt_string */ context, int commas, int style, struct miqt_array* /* of int */ shifts);
|
||||
struct miqt_array QsciAbstractAPIs_CallTips(QsciAbstractAPIs* self, struct miqt_array /* of struct miqt_string */ context, int commas, int style, struct miqt_array /* of int */ shifts);
|
||||
struct miqt_string QsciAbstractAPIs_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciAbstractAPIs_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciAbstractAPIs_TrUtf82(const char* s, const char* c);
|
||||
|
@ -92,18 +92,18 @@ bool QsciAPIs_SavePrepared(const QsciAPIs* self) {
|
||||
return self->savePrepared();
|
||||
}
|
||||
|
||||
void QsciAPIs_UpdateAutoCompletionList(QsciAPIs* self, struct miqt_array* /* of struct miqt_string */ context, struct miqt_array* /* of struct miqt_string */ list) {
|
||||
void QsciAPIs_UpdateAutoCompletionList(QsciAPIs* self, struct miqt_array /* of struct miqt_string */ context, struct miqt_array /* of struct miqt_string */ list) {
|
||||
QStringList context_QList;
|
||||
context_QList.reserve(context->len);
|
||||
struct miqt_string* context_arr = static_cast<struct miqt_string*>(context->data);
|
||||
for(size_t i = 0; i < context->len; ++i) {
|
||||
context_QList.reserve(context.len);
|
||||
struct miqt_string* context_arr = static_cast<struct miqt_string*>(context.data);
|
||||
for(size_t i = 0; i < context.len; ++i) {
|
||||
QString context_arr_i_QString = QString::fromUtf8(context_arr[i].data, context_arr[i].len);
|
||||
context_QList.push_back(context_arr_i_QString);
|
||||
}
|
||||
QStringList list_QList;
|
||||
list_QList.reserve(list->len);
|
||||
struct miqt_string* list_arr = static_cast<struct miqt_string*>(list->data);
|
||||
for(size_t i = 0; i < list->len; ++i) {
|
||||
list_QList.reserve(list.len);
|
||||
struct miqt_string* list_arr = static_cast<struct miqt_string*>(list.data);
|
||||
for(size_t i = 0; i < list.len; ++i) {
|
||||
QString list_arr_i_QString = QString::fromUtf8(list_arr[i].data, list_arr[i].len);
|
||||
list_QList.push_back(list_arr_i_QString);
|
||||
}
|
||||
@ -115,18 +115,18 @@ void QsciAPIs_AutoCompletionSelected(QsciAPIs* self, struct miqt_string sel) {
|
||||
self->autoCompletionSelected(sel_QString);
|
||||
}
|
||||
|
||||
struct miqt_array* QsciAPIs_CallTips(QsciAPIs* self, struct miqt_array* /* of struct miqt_string */ context, int commas, int style, struct miqt_array* /* of int */ shifts) {
|
||||
struct miqt_array QsciAPIs_CallTips(QsciAPIs* self, struct miqt_array /* of struct miqt_string */ context, int commas, int style, struct miqt_array /* of int */ shifts) {
|
||||
QStringList context_QList;
|
||||
context_QList.reserve(context->len);
|
||||
struct miqt_string* context_arr = static_cast<struct miqt_string*>(context->data);
|
||||
for(size_t i = 0; i < context->len; ++i) {
|
||||
context_QList.reserve(context.len);
|
||||
struct miqt_string* context_arr = static_cast<struct miqt_string*>(context.data);
|
||||
for(size_t i = 0; i < context.len; ++i) {
|
||||
QString context_arr_i_QString = QString::fromUtf8(context_arr[i].data, context_arr[i].len);
|
||||
context_QList.push_back(context_arr_i_QString);
|
||||
}
|
||||
QList<int> shifts_QList;
|
||||
shifts_QList.reserve(shifts->len);
|
||||
int* shifts_arr = static_cast<int*>(shifts->data);
|
||||
for(size_t i = 0; i < shifts->len; ++i) {
|
||||
shifts_QList.reserve(shifts.len);
|
||||
int* shifts_arr = static_cast<int*>(shifts.data);
|
||||
for(size_t i = 0; i < shifts.len; ++i) {
|
||||
shifts_QList.push_back(static_cast<int>(shifts_arr[i]));
|
||||
}
|
||||
QStringList _ret = self->callTips(context_QList, static_cast<int>(commas), static_cast<QsciScintilla::CallTipsStyle>(style), shifts_QList);
|
||||
@ -142,9 +142,9 @@ struct miqt_array* QsciAPIs_CallTips(QsciAPIs* self, struct miqt_array* /* of st
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
@ -152,7 +152,7 @@ bool QsciAPIs_Event(QsciAPIs* self, QEvent* e) {
|
||||
return self->event(e);
|
||||
}
|
||||
|
||||
struct miqt_array* QsciAPIs_InstalledAPIFiles(const QsciAPIs* self) {
|
||||
struct miqt_array QsciAPIs_InstalledAPIFiles(const QsciAPIs* self) {
|
||||
QStringList _ret = self->installedAPIFiles();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
@ -166,9 +166,9 @@ struct miqt_array* QsciAPIs_InstalledAPIFiles(const QsciAPIs* self) {
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -144,8 +144,7 @@ func (this *QsciAPIs) UpdateAutoCompletionList(context []string, list []string)
|
||||
defer C.free(unsafe.Pointer(context_i_ms.data))
|
||||
context_CArray[i] = context_i_ms
|
||||
}
|
||||
context_ma := &C.struct_miqt_array{len: C.size_t(len(context)), data: unsafe.Pointer(context_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(context_ma))
|
||||
context_ma := C.struct_miqt_array{len: C.size_t(len(context)), data: unsafe.Pointer(context_CArray)}
|
||||
list_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(list))))
|
||||
defer C.free(unsafe.Pointer(list_CArray))
|
||||
for i := range list {
|
||||
@ -155,8 +154,7 @@ func (this *QsciAPIs) UpdateAutoCompletionList(context []string, list []string)
|
||||
defer C.free(unsafe.Pointer(list_i_ms.data))
|
||||
list_CArray[i] = list_i_ms
|
||||
}
|
||||
list_ma := &C.struct_miqt_array{len: C.size_t(len(list)), data: unsafe.Pointer(list_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(list_ma))
|
||||
list_ma := C.struct_miqt_array{len: C.size_t(len(list)), data: unsafe.Pointer(list_CArray)}
|
||||
C.QsciAPIs_UpdateAutoCompletionList(this.h, context_ma, list_ma)
|
||||
}
|
||||
|
||||
@ -178,16 +176,14 @@ func (this *QsciAPIs) CallTips(context []string, commas int, style QsciScintilla
|
||||
defer C.free(unsafe.Pointer(context_i_ms.data))
|
||||
context_CArray[i] = context_i_ms
|
||||
}
|
||||
context_ma := &C.struct_miqt_array{len: C.size_t(len(context)), data: unsafe.Pointer(context_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(context_ma))
|
||||
context_ma := C.struct_miqt_array{len: C.size_t(len(context)), data: unsafe.Pointer(context_CArray)}
|
||||
shifts_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(shifts))))
|
||||
defer C.free(unsafe.Pointer(shifts_CArray))
|
||||
for i := range shifts {
|
||||
shifts_CArray[i] = (C.int)(shifts[i])
|
||||
}
|
||||
shifts_ma := &C.struct_miqt_array{len: C.size_t(len(shifts)), data: unsafe.Pointer(shifts_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(shifts_ma))
|
||||
var _ma *C.struct_miqt_array = C.QsciAPIs_CallTips(this.h, context_ma, (C.int)(commas), (C.int)(style), shifts_ma)
|
||||
shifts_ma := C.struct_miqt_array{len: C.size_t(len(shifts)), data: unsafe.Pointer(shifts_CArray)}
|
||||
var _ma C.struct_miqt_array = C.QsciAPIs_CallTips(this.h, context_ma, (C.int)(commas), (C.int)(style), shifts_ma)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -196,7 +192,6 @@ func (this *QsciAPIs) CallTips(context []string, commas int, style QsciScintilla
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
@ -205,7 +200,7 @@ func (this *QsciAPIs) Event(e *qt.QEvent) bool {
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) InstalledAPIFiles() []string {
|
||||
var _ma *C.struct_miqt_array = C.QsciAPIs_InstalledAPIFiles(this.h)
|
||||
var _ma C.struct_miqt_array = C.QsciAPIs_InstalledAPIFiles(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -214,7 +209,6 @@ func (this *QsciAPIs) InstalledAPIFiles() []string {
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -40,11 +40,11 @@ struct miqt_string QsciAPIs_DefaultPreparedName(const QsciAPIs* self);
|
||||
bool QsciAPIs_IsPrepared(const QsciAPIs* self);
|
||||
bool QsciAPIs_LoadPrepared(QsciAPIs* self);
|
||||
bool QsciAPIs_SavePrepared(const QsciAPIs* self);
|
||||
void QsciAPIs_UpdateAutoCompletionList(QsciAPIs* self, struct miqt_array* /* of struct miqt_string */ context, struct miqt_array* /* of struct miqt_string */ list);
|
||||
void QsciAPIs_UpdateAutoCompletionList(QsciAPIs* self, struct miqt_array /* of struct miqt_string */ context, struct miqt_array /* of struct miqt_string */ list);
|
||||
void QsciAPIs_AutoCompletionSelected(QsciAPIs* self, struct miqt_string sel);
|
||||
struct miqt_array* QsciAPIs_CallTips(QsciAPIs* self, struct miqt_array* /* of struct miqt_string */ context, int commas, int style, struct miqt_array* /* of int */ shifts);
|
||||
struct miqt_array QsciAPIs_CallTips(QsciAPIs* self, struct miqt_array /* of struct miqt_string */ context, int commas, int style, struct miqt_array /* of int */ shifts);
|
||||
bool QsciAPIs_Event(QsciAPIs* self, QEvent* e);
|
||||
struct miqt_array* QsciAPIs_InstalledAPIFiles(const QsciAPIs* self);
|
||||
struct miqt_array QsciAPIs_InstalledAPIFiles(const QsciAPIs* self);
|
||||
void QsciAPIs_ApiPreparationCancelled(QsciAPIs* self);
|
||||
void QsciAPIs_connect_ApiPreparationCancelled(QsciAPIs* self, intptr_t slot);
|
||||
void QsciAPIs_ApiPreparationStarted(QsciAPIs* self);
|
||||
|
@ -12,16 +12,16 @@ bool QsciCommandSet_WriteSettings(QsciCommandSet* self, QSettings* qs) {
|
||||
return self->writeSettings(*qs);
|
||||
}
|
||||
|
||||
struct miqt_array* QsciCommandSet_Commands(QsciCommandSet* self) {
|
||||
struct miqt_array QsciCommandSet_Commands(QsciCommandSet* self) {
|
||||
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 = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -51,13 +51,12 @@ func (this *QsciCommandSet) WriteSettings(qs *qt.QSettings) bool {
|
||||
}
|
||||
|
||||
func (this *QsciCommandSet) Commands() []*QsciCommand {
|
||||
var _ma *C.struct_miqt_array = C.QsciCommandSet_Commands(this.h)
|
||||
var _ma C.struct_miqt_array = C.QsciCommandSet_Commands(this.h)
|
||||
_ret := make([]*QsciCommand, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QsciCommand)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = UnsafeNewQsciCommand(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ typedef struct QsciCommandSet QsciCommandSet;
|
||||
|
||||
bool QsciCommandSet_ReadSettings(QsciCommandSet* self, QSettings* qs);
|
||||
bool QsciCommandSet_WriteSettings(QsciCommandSet* self, QSettings* qs);
|
||||
struct miqt_array* QsciCommandSet_Commands(QsciCommandSet* self);
|
||||
struct miqt_array QsciCommandSet_Commands(QsciCommandSet* self);
|
||||
void QsciCommandSet_ClearKeys(QsciCommandSet* self);
|
||||
void QsciCommandSet_ClearAlternateKeys(QsciCommandSet* self);
|
||||
QsciCommand* QsciCommandSet_BoundTo(const QsciCommandSet* self, int key);
|
||||
|
@ -60,7 +60,7 @@ const char* QsciLexer_AutoCompletionFillups(const QsciLexer* self) {
|
||||
return (const char*) self->autoCompletionFillups();
|
||||
}
|
||||
|
||||
struct miqt_array* QsciLexer_AutoCompletionWordSeparators(const QsciLexer* self) {
|
||||
struct miqt_array QsciLexer_AutoCompletionWordSeparators(const QsciLexer* self) {
|
||||
QStringList _ret = self->autoCompletionWordSeparators();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
@ -74,9 +74,9 @@ struct miqt_array* QsciLexer_AutoCompletionWordSeparators(const QsciLexer* self)
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ func (this *QsciLexer) AutoCompletionFillups() string {
|
||||
}
|
||||
|
||||
func (this *QsciLexer) AutoCompletionWordSeparators() []string {
|
||||
var _ma *C.struct_miqt_array = C.QsciLexer_AutoCompletionWordSeparators(this.h)
|
||||
var _ma C.struct_miqt_array = C.QsciLexer_AutoCompletionWordSeparators(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -106,7 +106,6 @@ func (this *QsciLexer) AutoCompletionWordSeparators() []string {
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ const char* QsciLexer_Lexer(const QsciLexer* self);
|
||||
int QsciLexer_LexerId(const QsciLexer* self);
|
||||
QsciAbstractAPIs* QsciLexer_Apis(const QsciLexer* self);
|
||||
const char* QsciLexer_AutoCompletionFillups(const QsciLexer* self);
|
||||
struct miqt_array* QsciLexer_AutoCompletionWordSeparators(const QsciLexer* self);
|
||||
struct miqt_array QsciLexer_AutoCompletionWordSeparators(const QsciLexer* self);
|
||||
int QsciLexer_AutoIndentStyle(QsciLexer* self);
|
||||
const char* QsciLexer_BlockEnd(const QsciLexer* self);
|
||||
int QsciLexer_BlockLookback(const QsciLexer* self);
|
||||
|
@ -56,7 +56,7 @@ const char* QsciLexerCoffeeScript_Lexer(const QsciLexerCoffeeScript* self) {
|
||||
return (const char*) self->lexer();
|
||||
}
|
||||
|
||||
struct miqt_array* QsciLexerCoffeeScript_AutoCompletionWordSeparators(const QsciLexerCoffeeScript* self) {
|
||||
struct miqt_array QsciLexerCoffeeScript_AutoCompletionWordSeparators(const QsciLexerCoffeeScript* self) {
|
||||
QStringList _ret = self->autoCompletionWordSeparators();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
@ -70,9 +70,9 @@ struct miqt_array* QsciLexerCoffeeScript_AutoCompletionWordSeparators(const Qsci
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,7 @@ func (this *QsciLexerCoffeeScript) Lexer() string {
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) AutoCompletionWordSeparators() []string {
|
||||
var _ma *C.struct_miqt_array = C.QsciLexerCoffeeScript_AutoCompletionWordSeparators(this.h)
|
||||
var _ma C.struct_miqt_array = C.QsciLexerCoffeeScript_AutoCompletionWordSeparators(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -133,7 +133,6 @@ func (this *QsciLexerCoffeeScript) AutoCompletionWordSeparators() []string {
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ struct miqt_string QsciLexerCoffeeScript_Tr(const char* s);
|
||||
struct miqt_string QsciLexerCoffeeScript_TrUtf8(const char* s);
|
||||
const char* QsciLexerCoffeeScript_Language(const QsciLexerCoffeeScript* self);
|
||||
const char* QsciLexerCoffeeScript_Lexer(const QsciLexerCoffeeScript* self);
|
||||
struct miqt_array* QsciLexerCoffeeScript_AutoCompletionWordSeparators(const QsciLexerCoffeeScript* self);
|
||||
struct miqt_array QsciLexerCoffeeScript_AutoCompletionWordSeparators(const QsciLexerCoffeeScript* self);
|
||||
const char* QsciLexerCoffeeScript_BlockEnd(const QsciLexerCoffeeScript* self);
|
||||
const char* QsciLexerCoffeeScript_BlockStart(const QsciLexerCoffeeScript* self);
|
||||
const char* QsciLexerCoffeeScript_BlockStartKeyword(const QsciLexerCoffeeScript* self);
|
||||
|
@ -60,7 +60,7 @@ const char* QsciLexerCPP_Lexer(const QsciLexerCPP* self) {
|
||||
return (const char*) self->lexer();
|
||||
}
|
||||
|
||||
struct miqt_array* QsciLexerCPP_AutoCompletionWordSeparators(const QsciLexerCPP* self) {
|
||||
struct miqt_array QsciLexerCPP_AutoCompletionWordSeparators(const QsciLexerCPP* self) {
|
||||
QStringList _ret = self->autoCompletionWordSeparators();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
@ -74,9 +74,9 @@ struct miqt_array* QsciLexerCPP_AutoCompletionWordSeparators(const QsciLexerCPP*
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ func (this *QsciLexerCPP) Lexer() string {
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) AutoCompletionWordSeparators() []string {
|
||||
var _ma *C.struct_miqt_array = C.QsciLexerCPP_AutoCompletionWordSeparators(this.h)
|
||||
var _ma C.struct_miqt_array = C.QsciLexerCPP_AutoCompletionWordSeparators(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -171,7 +171,6 @@ func (this *QsciLexerCPP) AutoCompletionWordSeparators() []string {
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ struct miqt_string QsciLexerCPP_Tr(const char* s);
|
||||
struct miqt_string QsciLexerCPP_TrUtf8(const char* s);
|
||||
const char* QsciLexerCPP_Language(const QsciLexerCPP* self);
|
||||
const char* QsciLexerCPP_Lexer(const QsciLexerCPP* self);
|
||||
struct miqt_array* QsciLexerCPP_AutoCompletionWordSeparators(const QsciLexerCPP* self);
|
||||
struct miqt_array QsciLexerCPP_AutoCompletionWordSeparators(const QsciLexerCPP* self);
|
||||
const char* QsciLexerCPP_BlockEnd(const QsciLexerCPP* self);
|
||||
const char* QsciLexerCPP_BlockStart(const QsciLexerCPP* self);
|
||||
const char* QsciLexerCPP_BlockStartKeyword(const QsciLexerCPP* self);
|
||||
|
@ -56,7 +56,7 @@ const char* QsciLexerD_Lexer(const QsciLexerD* self) {
|
||||
return (const char*) self->lexer();
|
||||
}
|
||||
|
||||
struct miqt_array* QsciLexerD_AutoCompletionWordSeparators(const QsciLexerD* self) {
|
||||
struct miqt_array QsciLexerD_AutoCompletionWordSeparators(const QsciLexerD* self) {
|
||||
QStringList _ret = self->autoCompletionWordSeparators();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
@ -70,9 +70,9 @@ struct miqt_array* QsciLexerD_AutoCompletionWordSeparators(const QsciLexerD* sel
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ func (this *QsciLexerD) Lexer() string {
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) AutoCompletionWordSeparators() []string {
|
||||
var _ma *C.struct_miqt_array = C.QsciLexerD_AutoCompletionWordSeparators(this.h)
|
||||
var _ma C.struct_miqt_array = C.QsciLexerD_AutoCompletionWordSeparators(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -132,7 +132,6 @@ func (this *QsciLexerD) AutoCompletionWordSeparators() []string {
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ struct miqt_string QsciLexerD_Tr(const char* s);
|
||||
struct miqt_string QsciLexerD_TrUtf8(const char* s);
|
||||
const char* QsciLexerD_Language(const QsciLexerD* self);
|
||||
const char* QsciLexerD_Lexer(const QsciLexerD* self);
|
||||
struct miqt_array* QsciLexerD_AutoCompletionWordSeparators(const QsciLexerD* self);
|
||||
struct miqt_array QsciLexerD_AutoCompletionWordSeparators(const QsciLexerD* self);
|
||||
const char* QsciLexerD_BlockEnd(const QsciLexerD* self);
|
||||
const char* QsciLexerD_BlockStart(const QsciLexerD* self);
|
||||
const char* QsciLexerD_BlockStartKeyword(const QsciLexerD* self);
|
||||
|
@ -56,7 +56,7 @@ const char* QsciLexerLua_Lexer(const QsciLexerLua* self) {
|
||||
return (const char*) self->lexer();
|
||||
}
|
||||
|
||||
struct miqt_array* QsciLexerLua_AutoCompletionWordSeparators(const QsciLexerLua* self) {
|
||||
struct miqt_array QsciLexerLua_AutoCompletionWordSeparators(const QsciLexerLua* self) {
|
||||
QStringList _ret = self->autoCompletionWordSeparators();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
@ -70,9 +70,9 @@ struct miqt_array* QsciLexerLua_AutoCompletionWordSeparators(const QsciLexerLua*
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,7 @@ func (this *QsciLexerLua) Lexer() string {
|
||||
}
|
||||
|
||||
func (this *QsciLexerLua) AutoCompletionWordSeparators() []string {
|
||||
var _ma *C.struct_miqt_array = C.QsciLexerLua_AutoCompletionWordSeparators(this.h)
|
||||
var _ma C.struct_miqt_array = C.QsciLexerLua_AutoCompletionWordSeparators(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -129,7 +129,6 @@ func (this *QsciLexerLua) AutoCompletionWordSeparators() []string {
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ struct miqt_string QsciLexerLua_Tr(const char* s);
|
||||
struct miqt_string QsciLexerLua_TrUtf8(const char* s);
|
||||
const char* QsciLexerLua_Language(const QsciLexerLua* self);
|
||||
const char* QsciLexerLua_Lexer(const QsciLexerLua* self);
|
||||
struct miqt_array* QsciLexerLua_AutoCompletionWordSeparators(const QsciLexerLua* self);
|
||||
struct miqt_array QsciLexerLua_AutoCompletionWordSeparators(const QsciLexerLua* self);
|
||||
const char* QsciLexerLua_BlockStart(const QsciLexerLua* self);
|
||||
int QsciLexerLua_BraceStyle(const QsciLexerLua* self);
|
||||
QColor* QsciLexerLua_DefaultColor(const QsciLexerLua* self, int style);
|
||||
|
@ -56,7 +56,7 @@ const char* QsciLexerPascal_Lexer(const QsciLexerPascal* self) {
|
||||
return (const char*) self->lexer();
|
||||
}
|
||||
|
||||
struct miqt_array* QsciLexerPascal_AutoCompletionWordSeparators(const QsciLexerPascal* self) {
|
||||
struct miqt_array QsciLexerPascal_AutoCompletionWordSeparators(const QsciLexerPascal* self) {
|
||||
QStringList _ret = self->autoCompletionWordSeparators();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
@ -70,9 +70,9 @@ struct miqt_array* QsciLexerPascal_AutoCompletionWordSeparators(const QsciLexerP
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ func (this *QsciLexerPascal) Lexer() string {
|
||||
}
|
||||
|
||||
func (this *QsciLexerPascal) AutoCompletionWordSeparators() []string {
|
||||
var _ma *C.struct_miqt_array = C.QsciLexerPascal_AutoCompletionWordSeparators(this.h)
|
||||
var _ma C.struct_miqt_array = C.QsciLexerPascal_AutoCompletionWordSeparators(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -124,7 +124,6 @@ func (this *QsciLexerPascal) AutoCompletionWordSeparators() []string {
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ struct miqt_string QsciLexerPascal_Tr(const char* s);
|
||||
struct miqt_string QsciLexerPascal_TrUtf8(const char* s);
|
||||
const char* QsciLexerPascal_Language(const QsciLexerPascal* self);
|
||||
const char* QsciLexerPascal_Lexer(const QsciLexerPascal* self);
|
||||
struct miqt_array* QsciLexerPascal_AutoCompletionWordSeparators(const QsciLexerPascal* self);
|
||||
struct miqt_array QsciLexerPascal_AutoCompletionWordSeparators(const QsciLexerPascal* self);
|
||||
const char* QsciLexerPascal_BlockEnd(const QsciLexerPascal* self);
|
||||
const char* QsciLexerPascal_BlockStart(const QsciLexerPascal* self);
|
||||
const char* QsciLexerPascal_BlockStartKeyword(const QsciLexerPascal* self);
|
||||
|
@ -56,7 +56,7 @@ const char* QsciLexerPerl_Lexer(const QsciLexerPerl* self) {
|
||||
return (const char*) self->lexer();
|
||||
}
|
||||
|
||||
struct miqt_array* QsciLexerPerl_AutoCompletionWordSeparators(const QsciLexerPerl* self) {
|
||||
struct miqt_array QsciLexerPerl_AutoCompletionWordSeparators(const QsciLexerPerl* self) {
|
||||
QStringList _ret = self->autoCompletionWordSeparators();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
@ -70,9 +70,9 @@ struct miqt_array* QsciLexerPerl_AutoCompletionWordSeparators(const QsciLexerPer
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -141,7 +141,7 @@ func (this *QsciLexerPerl) Lexer() string {
|
||||
}
|
||||
|
||||
func (this *QsciLexerPerl) AutoCompletionWordSeparators() []string {
|
||||
var _ma *C.struct_miqt_array = C.QsciLexerPerl_AutoCompletionWordSeparators(this.h)
|
||||
var _ma C.struct_miqt_array = C.QsciLexerPerl_AutoCompletionWordSeparators(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -150,7 +150,6 @@ func (this *QsciLexerPerl) AutoCompletionWordSeparators() []string {
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ struct miqt_string QsciLexerPerl_Tr(const char* s);
|
||||
struct miqt_string QsciLexerPerl_TrUtf8(const char* s);
|
||||
const char* QsciLexerPerl_Language(const QsciLexerPerl* self);
|
||||
const char* QsciLexerPerl_Lexer(const QsciLexerPerl* self);
|
||||
struct miqt_array* QsciLexerPerl_AutoCompletionWordSeparators(const QsciLexerPerl* self);
|
||||
struct miqt_array QsciLexerPerl_AutoCompletionWordSeparators(const QsciLexerPerl* self);
|
||||
const char* QsciLexerPerl_BlockEnd(const QsciLexerPerl* self);
|
||||
const char* QsciLexerPerl_BlockStart(const QsciLexerPerl* self);
|
||||
int QsciLexerPerl_BraceStyle(const QsciLexerPerl* self);
|
||||
|
@ -56,7 +56,7 @@ const char* QsciLexerPython_Lexer(const QsciLexerPython* self) {
|
||||
return (const char*) self->lexer();
|
||||
}
|
||||
|
||||
struct miqt_array* QsciLexerPython_AutoCompletionWordSeparators(const QsciLexerPython* self) {
|
||||
struct miqt_array QsciLexerPython_AutoCompletionWordSeparators(const QsciLexerPython* self) {
|
||||
QStringList _ret = self->autoCompletionWordSeparators();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
@ -70,9 +70,9 @@ struct miqt_array* QsciLexerPython_AutoCompletionWordSeparators(const QsciLexerP
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ func (this *QsciLexerPython) Lexer() string {
|
||||
}
|
||||
|
||||
func (this *QsciLexerPython) AutoCompletionWordSeparators() []string {
|
||||
var _ma *C.struct_miqt_array = C.QsciLexerPython_AutoCompletionWordSeparators(this.h)
|
||||
var _ma C.struct_miqt_array = C.QsciLexerPython_AutoCompletionWordSeparators(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -139,7 +139,6 @@ func (this *QsciLexerPython) AutoCompletionWordSeparators() []string {
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ struct miqt_string QsciLexerPython_Tr(const char* s);
|
||||
struct miqt_string QsciLexerPython_TrUtf8(const char* s);
|
||||
const char* QsciLexerPython_Language(const QsciLexerPython* self);
|
||||
const char* QsciLexerPython_Lexer(const QsciLexerPython* self);
|
||||
struct miqt_array* QsciLexerPython_AutoCompletionWordSeparators(const QsciLexerPython* self);
|
||||
struct miqt_array QsciLexerPython_AutoCompletionWordSeparators(const QsciLexerPython* self);
|
||||
int QsciLexerPython_BlockLookback(const QsciLexerPython* self);
|
||||
const char* QsciLexerPython_BlockStart(const QsciLexerPython* self);
|
||||
int QsciLexerPython_BraceStyle(const QsciLexerPython* self);
|
||||
|
@ -54,7 +54,7 @@ struct miqt_string QsciScintilla_TrUtf8(const char* s) {
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_array* QsciScintilla_ApiContext(QsciScintilla* self, int pos, int* context_start, int* last_word_start) {
|
||||
struct miqt_array QsciScintilla_ApiContext(QsciScintilla* self, int pos, int* context_start, int* last_word_start) {
|
||||
QStringList _ret = self->apiContext(static_cast<int>(pos), static_cast<int&>(*context_start), static_cast<int&>(*last_word_start));
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
@ -68,9 +68,9 @@ struct miqt_array* QsciScintilla_ApiContext(QsciScintilla* self, int pos, int* c
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
@ -206,16 +206,16 @@ QColor* QsciScintilla_Color(const QsciScintilla* self) {
|
||||
return new QColor(self->color());
|
||||
}
|
||||
|
||||
struct miqt_array* QsciScintilla_ContractedFolds(const QsciScintilla* self) {
|
||||
struct miqt_array QsciScintilla_ContractedFolds(const QsciScintilla* self) {
|
||||
QList<int> _ret = self->contractedFolds();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
int* _arr = static_cast<int*>(malloc(sizeof(int) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = _ret[i];
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
@ -542,11 +542,11 @@ void QsciScintilla_SetAutoCompletionFillups(QsciScintilla* self, const char* fil
|
||||
self->setAutoCompletionFillups(fillups);
|
||||
}
|
||||
|
||||
void QsciScintilla_SetAutoCompletionWordSeparators(QsciScintilla* self, struct miqt_array* /* of struct miqt_string */ separators) {
|
||||
void QsciScintilla_SetAutoCompletionWordSeparators(QsciScintilla* self, struct miqt_array /* of struct miqt_string */ separators) {
|
||||
QStringList separators_QList;
|
||||
separators_QList.reserve(separators->len);
|
||||
struct miqt_string* separators_arr = static_cast<struct miqt_string*>(separators->data);
|
||||
for(size_t i = 0; i < separators->len; ++i) {
|
||||
separators_QList.reserve(separators.len);
|
||||
struct miqt_string* separators_arr = static_cast<struct miqt_string*>(separators.data);
|
||||
for(size_t i = 0; i < separators.len; ++i) {
|
||||
QString separators_arr_i_QString = QString::fromUtf8(separators_arr[i].data, separators_arr[i].len);
|
||||
separators_QList.push_back(separators_arr_i_QString);
|
||||
}
|
||||
@ -577,11 +577,11 @@ void QsciScintilla_SetCallTipsVisible(QsciScintilla* self, int nr) {
|
||||
self->setCallTipsVisible(static_cast<int>(nr));
|
||||
}
|
||||
|
||||
void QsciScintilla_SetContractedFolds(QsciScintilla* self, struct miqt_array* /* of int */ folds) {
|
||||
void QsciScintilla_SetContractedFolds(QsciScintilla* self, struct miqt_array /* of int */ folds) {
|
||||
QList<int> folds_QList;
|
||||
folds_QList.reserve(folds->len);
|
||||
int* folds_arr = static_cast<int*>(folds->data);
|
||||
for(size_t i = 0; i < folds->len; ++i) {
|
||||
folds_QList.reserve(folds.len);
|
||||
int* folds_arr = static_cast<int*>(folds.data);
|
||||
for(size_t i = 0; i < folds.len; ++i) {
|
||||
folds_QList.push_back(static_cast<int>(folds_arr[i]));
|
||||
}
|
||||
self->setContractedFolds(folds_QList);
|
||||
@ -788,11 +788,11 @@ void QsciScintilla_SetWrapIndentMode(QsciScintilla* self, int mode) {
|
||||
self->setWrapIndentMode(static_cast<QsciScintilla::WrapIndentMode>(mode));
|
||||
}
|
||||
|
||||
void QsciScintilla_ShowUserList(QsciScintilla* self, int id, struct miqt_array* /* of struct miqt_string */ list) {
|
||||
void QsciScintilla_ShowUserList(QsciScintilla* self, int id, struct miqt_array /* of struct miqt_string */ list) {
|
||||
QStringList list_QList;
|
||||
list_QList.reserve(list->len);
|
||||
struct miqt_string* list_arr = static_cast<struct miqt_string*>(list->data);
|
||||
for(size_t i = 0; i < list->len; ++i) {
|
||||
list_QList.reserve(list.len);
|
||||
struct miqt_string* list_arr = static_cast<struct miqt_string*>(list.data);
|
||||
for(size_t i = 0; i < list.len; ++i) {
|
||||
QString list_arr_i_QString = QString::fromUtf8(list_arr[i].data, list_arr[i].len);
|
||||
list_QList.push_back(list_arr_i_QString);
|
||||
}
|
||||
|
@ -290,7 +290,7 @@ func QsciScintilla_TrUtf8(s string) string {
|
||||
}
|
||||
|
||||
func (this *QsciScintilla) ApiContext(pos int, context_start *int, last_word_start *int) []string {
|
||||
var _ma *C.struct_miqt_array = C.QsciScintilla_ApiContext(this.h, (C.int)(pos), (*C.int)(unsafe.Pointer(context_start)), (*C.int)(unsafe.Pointer(last_word_start)))
|
||||
var _ma C.struct_miqt_array = C.QsciScintilla_ApiContext(this.h, (C.int)(pos), (*C.int)(unsafe.Pointer(context_start)), (*C.int)(unsafe.Pointer(last_word_start)))
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -299,7 +299,6 @@ func (this *QsciScintilla) ApiContext(pos int, context_start *int, last_word_sta
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
@ -433,13 +432,12 @@ func (this *QsciScintilla) Color() *qt.QColor {
|
||||
}
|
||||
|
||||
func (this *QsciScintilla) ContractedFolds() []int {
|
||||
var _ma *C.struct_miqt_array = C.QsciScintilla_ContractedFolds(this.h)
|
||||
var _ma C.struct_miqt_array = C.QsciScintilla_ContractedFolds(this.h)
|
||||
_ret := make([]int, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.int)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = (int)(_outCast[i])
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
@ -795,8 +793,7 @@ func (this *QsciScintilla) SetAutoCompletionWordSeparators(separators []string)
|
||||
defer C.free(unsafe.Pointer(separators_i_ms.data))
|
||||
separators_CArray[i] = separators_i_ms
|
||||
}
|
||||
separators_ma := &C.struct_miqt_array{len: C.size_t(len(separators)), data: unsafe.Pointer(separators_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(separators_ma))
|
||||
separators_ma := C.struct_miqt_array{len: C.size_t(len(separators)), data: unsafe.Pointer(separators_CArray)}
|
||||
C.QsciScintilla_SetAutoCompletionWordSeparators(this.h, separators_ma)
|
||||
}
|
||||
|
||||
@ -830,8 +827,7 @@ func (this *QsciScintilla) SetContractedFolds(folds []int) {
|
||||
for i := range folds {
|
||||
folds_CArray[i] = (C.int)(folds[i])
|
||||
}
|
||||
folds_ma := &C.struct_miqt_array{len: C.size_t(len(folds)), data: unsafe.Pointer(folds_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(folds_ma))
|
||||
folds_ma := C.struct_miqt_array{len: C.size_t(len(folds)), data: unsafe.Pointer(folds_CArray)}
|
||||
C.QsciScintilla_SetContractedFolds(this.h, folds_ma)
|
||||
}
|
||||
|
||||
@ -1048,8 +1044,7 @@ func (this *QsciScintilla) ShowUserList(id int, list []string) {
|
||||
defer C.free(unsafe.Pointer(list_i_ms.data))
|
||||
list_CArray[i] = list_i_ms
|
||||
}
|
||||
list_ma := &C.struct_miqt_array{len: C.size_t(len(list)), data: unsafe.Pointer(list_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(list_ma))
|
||||
list_ma := C.struct_miqt_array{len: C.size_t(len(list)), data: unsafe.Pointer(list_CArray)}
|
||||
C.QsciScintilla_ShowUserList(this.h, (C.int)(id), list_ma)
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ QMetaObject* QsciScintilla_MetaObject(const QsciScintilla* self);
|
||||
void* QsciScintilla_Metacast(QsciScintilla* self, const char* param1);
|
||||
struct miqt_string QsciScintilla_Tr(const char* s);
|
||||
struct miqt_string QsciScintilla_TrUtf8(const char* s);
|
||||
struct miqt_array* QsciScintilla_ApiContext(QsciScintilla* self, int pos, int* context_start, int* last_word_start);
|
||||
struct miqt_array QsciScintilla_ApiContext(QsciScintilla* self, int pos, int* context_start, int* last_word_start);
|
||||
void QsciScintilla_Annotate(QsciScintilla* self, int line, struct miqt_string text, int style);
|
||||
void QsciScintilla_Annotate2(QsciScintilla* self, int line, struct miqt_string text, QsciStyle* style);
|
||||
void QsciScintilla_Annotate3(QsciScintilla* self, int line, QsciStyledText* text);
|
||||
@ -84,7 +84,7 @@ void QsciScintilla_ClearFolds(QsciScintilla* self);
|
||||
void QsciScintilla_ClearIndicatorRange(QsciScintilla* self, int lineFrom, int indexFrom, int lineTo, int indexTo, int indicatorNumber);
|
||||
void QsciScintilla_ClearRegisteredImages(QsciScintilla* self);
|
||||
QColor* QsciScintilla_Color(const QsciScintilla* self);
|
||||
struct miqt_array* QsciScintilla_ContractedFolds(const QsciScintilla* self);
|
||||
struct miqt_array QsciScintilla_ContractedFolds(const QsciScintilla* self);
|
||||
void QsciScintilla_ConvertEols(QsciScintilla* self, int mode);
|
||||
QMenu* QsciScintilla_CreateStandardContextMenu(QsciScintilla* self);
|
||||
QsciDocument* QsciScintilla_Document(const QsciScintilla* self);
|
||||
@ -164,14 +164,14 @@ void QsciScintilla_SetFoldMarginColors(QsciScintilla* self, QColor* fore, QColor
|
||||
void QsciScintilla_SetAnnotationDisplay(QsciScintilla* self, int display);
|
||||
void QsciScintilla_SetAutoCompletionFillupsEnabled(QsciScintilla* self, bool enabled);
|
||||
void QsciScintilla_SetAutoCompletionFillups(QsciScintilla* self, const char* fillups);
|
||||
void QsciScintilla_SetAutoCompletionWordSeparators(QsciScintilla* self, struct miqt_array* /* of struct miqt_string */ separators);
|
||||
void QsciScintilla_SetAutoCompletionWordSeparators(QsciScintilla* self, struct miqt_array /* of struct miqt_string */ separators);
|
||||
void QsciScintilla_SetCallTipsBackgroundColor(QsciScintilla* self, QColor* col);
|
||||
void QsciScintilla_SetCallTipsForegroundColor(QsciScintilla* self, QColor* col);
|
||||
void QsciScintilla_SetCallTipsHighlightColor(QsciScintilla* self, QColor* col);
|
||||
void QsciScintilla_SetCallTipsPosition(QsciScintilla* self, int position);
|
||||
void QsciScintilla_SetCallTipsStyle(QsciScintilla* self, int style);
|
||||
void QsciScintilla_SetCallTipsVisible(QsciScintilla* self, int nr);
|
||||
void QsciScintilla_SetContractedFolds(QsciScintilla* self, struct miqt_array* /* of int */ folds);
|
||||
void QsciScintilla_SetContractedFolds(QsciScintilla* self, struct miqt_array /* of int */ folds);
|
||||
void QsciScintilla_SetDocument(QsciScintilla* self, QsciDocument* document);
|
||||
void QsciScintilla_AddEdgeColumn(QsciScintilla* self, int colnr, QColor* col);
|
||||
void QsciScintilla_ClearEdgeColumns(QsciScintilla* self);
|
||||
@ -220,7 +220,7 @@ void QsciScintilla_SetWhitespaceBackgroundColor(QsciScintilla* self, QColor* col
|
||||
void QsciScintilla_SetWhitespaceForegroundColor(QsciScintilla* self, QColor* col);
|
||||
void QsciScintilla_SetWhitespaceSize(QsciScintilla* self, int size);
|
||||
void QsciScintilla_SetWrapIndentMode(QsciScintilla* self, int mode);
|
||||
void QsciScintilla_ShowUserList(QsciScintilla* self, int id, struct miqt_array* /* of struct miqt_string */ list);
|
||||
void QsciScintilla_ShowUserList(QsciScintilla* self, int id, struct miqt_array /* of struct miqt_string */ list);
|
||||
QsciCommandSet* QsciScintilla_StandardCommands(const QsciScintilla* self);
|
||||
int QsciScintilla_TabDrawMode(const QsciScintilla* self);
|
||||
bool QsciScintilla_TabIndents(const QsciScintilla* self);
|
||||
|
@ -80,16 +80,16 @@ bool QAbstractEventDispatcher_UnregisterTimers(QAbstractEventDispatcher* self, Q
|
||||
return self->unregisterTimers(object);
|
||||
}
|
||||
|
||||
struct miqt_array* QAbstractEventDispatcher_RegisteredTimers(const QAbstractEventDispatcher* self, QObject* object) {
|
||||
struct miqt_array QAbstractEventDispatcher_RegisteredTimers(const QAbstractEventDispatcher* self, QObject* object) {
|
||||
QList<QAbstractEventDispatcher::TimerInfo> _ret = self->registeredTimers(object);
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
QAbstractEventDispatcher__TimerInfo** _arr = static_cast<QAbstractEventDispatcher__TimerInfo**>(malloc(sizeof(QAbstractEventDispatcher__TimerInfo*) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = new QAbstractEventDispatcher::TimerInfo(_ret[i]);
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ func (this *QAbstractEventDispatcher) UnregisterTimers(object *QObject) bool {
|
||||
}
|
||||
|
||||
func (this *QAbstractEventDispatcher) RegisteredTimers(object *QObject) []QAbstractEventDispatcher__TimerInfo {
|
||||
var _ma *C.struct_miqt_array = C.QAbstractEventDispatcher_RegisteredTimers(this.h, object.cPointer())
|
||||
var _ma C.struct_miqt_array = C.QAbstractEventDispatcher_RegisteredTimers(this.h, object.cPointer())
|
||||
_ret := make([]QAbstractEventDispatcher__TimerInfo, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QAbstractEventDispatcher__TimerInfo)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -118,7 +118,6 @@ func (this *QAbstractEventDispatcher) RegisteredTimers(object *QObject) []QAbstr
|
||||
_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
_ret[i] = *_lv_goptr
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ int QAbstractEventDispatcher_RegisterTimer(QAbstractEventDispatcher* self, int i
|
||||
void QAbstractEventDispatcher_RegisterTimer2(QAbstractEventDispatcher* self, int timerId, int interval, int timerType, QObject* object);
|
||||
bool QAbstractEventDispatcher_UnregisterTimer(QAbstractEventDispatcher* self, int timerId);
|
||||
bool QAbstractEventDispatcher_UnregisterTimers(QAbstractEventDispatcher* self, QObject* object);
|
||||
struct miqt_array* QAbstractEventDispatcher_RegisteredTimers(const QAbstractEventDispatcher* self, QObject* object);
|
||||
struct miqt_array QAbstractEventDispatcher_RegisteredTimers(const QAbstractEventDispatcher* self, QObject* object);
|
||||
int QAbstractEventDispatcher_RemainingTime(QAbstractEventDispatcher* self, int timerId);
|
||||
void QAbstractEventDispatcher_WakeUp(QAbstractEventDispatcher* self);
|
||||
void QAbstractEventDispatcher_Interrupt(QAbstractEventDispatcher* self);
|
||||
|
@ -96,16 +96,16 @@ bool QAbstractItemDelegate_HelpEvent(QAbstractItemDelegate* self, QHelpEvent* ev
|
||||
return self->helpEvent(event, view, *option, *index);
|
||||
}
|
||||
|
||||
struct miqt_array* QAbstractItemDelegate_PaintingRoles(const QAbstractItemDelegate* self) {
|
||||
struct miqt_array QAbstractItemDelegate_PaintingRoles(const QAbstractItemDelegate* self) {
|
||||
QVector<int> _ret = self->paintingRoles();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
int* _arr = static_cast<int*>(malloc(sizeof(int) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = _ret[i];
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -133,13 +133,12 @@ func (this *QAbstractItemDelegate) HelpEvent(event *QHelpEvent, view *QAbstractI
|
||||
}
|
||||
|
||||
func (this *QAbstractItemDelegate) PaintingRoles() []int {
|
||||
var _ma *C.struct_miqt_array = C.QAbstractItemDelegate_PaintingRoles(this.h)
|
||||
var _ma C.struct_miqt_array = C.QAbstractItemDelegate_PaintingRoles(this.h)
|
||||
_ret := make([]int, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.int)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = (int)(_outCast[i])
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ void QAbstractItemDelegate_UpdateEditorGeometry(const QAbstractItemDelegate* sel
|
||||
bool QAbstractItemDelegate_EditorEvent(QAbstractItemDelegate* self, QEvent* event, QAbstractItemModel* model, QStyleOptionViewItem* option, QModelIndex* index);
|
||||
struct miqt_string QAbstractItemDelegate_ElidedText(QFontMetrics* fontMetrics, int width, int mode, struct miqt_string text);
|
||||
bool QAbstractItemDelegate_HelpEvent(QAbstractItemDelegate* self, QHelpEvent* event, QAbstractItemView* view, QStyleOptionViewItem* option, QModelIndex* index);
|
||||
struct miqt_array* QAbstractItemDelegate_PaintingRoles(const QAbstractItemDelegate* self);
|
||||
struct miqt_array QAbstractItemDelegate_PaintingRoles(const QAbstractItemDelegate* self);
|
||||
void QAbstractItemDelegate_CommitData(QAbstractItemDelegate* self, QWidget* editor);
|
||||
void QAbstractItemDelegate_connect_CommitData(QAbstractItemDelegate* self, intptr_t slot);
|
||||
void QAbstractItemDelegate_CloseEditor(QAbstractItemDelegate* self, QWidget* editor);
|
||||
|
@ -269,7 +269,7 @@ bool QAbstractItemModel_SetHeaderData(QAbstractItemModel* self, int section, int
|
||||
return self->setHeaderData(static_cast<int>(section), static_cast<Qt::Orientation>(orientation), *value);
|
||||
}
|
||||
|
||||
struct miqt_array* QAbstractItemModel_MimeTypes(const QAbstractItemModel* self) {
|
||||
struct miqt_array QAbstractItemModel_MimeTypes(const QAbstractItemModel* self) {
|
||||
QStringList _ret = self->mimeTypes();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
@ -283,17 +283,17 @@ struct miqt_array* QAbstractItemModel_MimeTypes(const QAbstractItemModel* self)
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
QMimeData* QAbstractItemModel_MimeData(const QAbstractItemModel* self, struct miqt_array* /* of QModelIndex* */ indexes) {
|
||||
QMimeData* QAbstractItemModel_MimeData(const QAbstractItemModel* self, struct miqt_array /* of QModelIndex* */ indexes) {
|
||||
QModelIndexList indexes_QList;
|
||||
indexes_QList.reserve(indexes->len);
|
||||
QModelIndex** indexes_arr = static_cast<QModelIndex**>(indexes->data);
|
||||
for(size_t i = 0; i < indexes->len; ++i) {
|
||||
indexes_QList.reserve(indexes.len);
|
||||
QModelIndex** indexes_arr = static_cast<QModelIndex**>(indexes.data);
|
||||
for(size_t i = 0; i < indexes.len; ++i) {
|
||||
indexes_QList.push_back(*(indexes_arr[i]));
|
||||
}
|
||||
return self->mimeData(indexes_QList);
|
||||
@ -386,16 +386,16 @@ QModelIndex* QAbstractItemModel_Buddy(const QAbstractItemModel* self, QModelInde
|
||||
return new QModelIndex(self->buddy(*index));
|
||||
}
|
||||
|
||||
struct miqt_array* QAbstractItemModel_Match(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value) {
|
||||
struct miqt_array QAbstractItemModel_Match(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value) {
|
||||
QModelIndexList _ret = self->match(*start, static_cast<int>(role), *value);
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
QModelIndex** _arr = static_cast<QModelIndex**>(malloc(sizeof(QModelIndex*) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = new QModelIndex(_ret[i]);
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
@ -581,29 +581,29 @@ void QAbstractItemModel_Sort2(QAbstractItemModel* self, int column, int order) {
|
||||
self->sort(static_cast<int>(column), static_cast<Qt::SortOrder>(order));
|
||||
}
|
||||
|
||||
struct miqt_array* QAbstractItemModel_Match4(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value, int hits) {
|
||||
struct miqt_array QAbstractItemModel_Match4(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value, int hits) {
|
||||
QModelIndexList _ret = self->match(*start, static_cast<int>(role), *value, static_cast<int>(hits));
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
QModelIndex** _arr = static_cast<QModelIndex**>(malloc(sizeof(QModelIndex*) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = new QModelIndex(_ret[i]);
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
struct miqt_array* QAbstractItemModel_Match5(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) {
|
||||
struct miqt_array QAbstractItemModel_Match5(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) {
|
||||
QModelIndexList _ret = self->match(*start, static_cast<int>(role), *value, static_cast<int>(hits), static_cast<Qt::MatchFlags>(flags));
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
QModelIndex** _arr = static_cast<QModelIndex**>(malloc(sizeof(QModelIndex*) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = new QModelIndex(_ret[i]);
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
@ -611,11 +611,11 @@ bool QAbstractItemModel_CheckIndex2(const QAbstractItemModel* self, QModelIndex*
|
||||
return self->checkIndex(*index, static_cast<QAbstractItemModel::CheckIndexOptions>(options));
|
||||
}
|
||||
|
||||
void QAbstractItemModel_DataChanged3(QAbstractItemModel* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array* /* of int */ roles) {
|
||||
void QAbstractItemModel_DataChanged3(QAbstractItemModel* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) {
|
||||
QVector<int> roles_QList;
|
||||
roles_QList.reserve(roles->len);
|
||||
int* roles_arr = static_cast<int*>(roles->data);
|
||||
for(size_t i = 0; i < roles->len; ++i) {
|
||||
roles_QList.reserve(roles.len);
|
||||
int* roles_arr = static_cast<int*>(roles.data);
|
||||
for(size_t i = 0; i < roles.len; ++i) {
|
||||
roles_QList.push_back(static_cast<int>(roles_arr[i]));
|
||||
}
|
||||
self->dataChanged(*topLeft, *bottomRight, roles_QList);
|
||||
@ -635,19 +635,19 @@ void QAbstractItemModel_connect_DataChanged3(QAbstractItemModel* self, intptr_t
|
||||
for (size_t i = 0, e = roles_ret.length(); i < e; ++i) {
|
||||
roles_arr[i] = roles_ret[i];
|
||||
}
|
||||
struct miqt_array* roles_out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
roles_out->len = roles_ret.length();
|
||||
roles_out->data = static_cast<void*>(roles_arr);
|
||||
struct miqt_array* sigval3 = roles_out;
|
||||
struct miqt_array roles_out;
|
||||
roles_out.len = roles_ret.length();
|
||||
roles_out.data = static_cast<void*>(roles_arr);
|
||||
struct miqt_array sigval3 = roles_out;
|
||||
miqt_exec_callback_QAbstractItemModel_DataChanged3(slot, sigval1, sigval2, sigval3);
|
||||
});
|
||||
}
|
||||
|
||||
void QAbstractItemModel_LayoutChanged1(QAbstractItemModel* self, struct miqt_array* /* of QPersistentModelIndex* */ parents) {
|
||||
void QAbstractItemModel_LayoutChanged1(QAbstractItemModel* self, struct miqt_array /* of QPersistentModelIndex* */ parents) {
|
||||
QList<QPersistentModelIndex> parents_QList;
|
||||
parents_QList.reserve(parents->len);
|
||||
QPersistentModelIndex** parents_arr = static_cast<QPersistentModelIndex**>(parents->data);
|
||||
for(size_t i = 0; i < parents->len; ++i) {
|
||||
parents_QList.reserve(parents.len);
|
||||
QPersistentModelIndex** parents_arr = static_cast<QPersistentModelIndex**>(parents.data);
|
||||
for(size_t i = 0; i < parents.len; ++i) {
|
||||
parents_QList.push_back(*(parents_arr[i]));
|
||||
}
|
||||
self->layoutChanged(parents_QList);
|
||||
@ -661,19 +661,19 @@ void QAbstractItemModel_connect_LayoutChanged1(QAbstractItemModel* self, intptr_
|
||||
for (size_t i = 0, e = parents_ret.length(); i < e; ++i) {
|
||||
parents_arr[i] = new QPersistentModelIndex(parents_ret[i]);
|
||||
}
|
||||
struct miqt_array* parents_out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
parents_out->len = parents_ret.length();
|
||||
parents_out->data = static_cast<void*>(parents_arr);
|
||||
struct miqt_array* sigval1 = parents_out;
|
||||
struct miqt_array parents_out;
|
||||
parents_out.len = parents_ret.length();
|
||||
parents_out.data = static_cast<void*>(parents_arr);
|
||||
struct miqt_array sigval1 = parents_out;
|
||||
miqt_exec_callback_QAbstractItemModel_LayoutChanged1(slot, sigval1);
|
||||
});
|
||||
}
|
||||
|
||||
void QAbstractItemModel_LayoutChanged2(QAbstractItemModel* self, struct miqt_array* /* of QPersistentModelIndex* */ parents, int hint) {
|
||||
void QAbstractItemModel_LayoutChanged2(QAbstractItemModel* self, struct miqt_array /* of QPersistentModelIndex* */ parents, int hint) {
|
||||
QList<QPersistentModelIndex> parents_QList;
|
||||
parents_QList.reserve(parents->len);
|
||||
QPersistentModelIndex** parents_arr = static_cast<QPersistentModelIndex**>(parents->data);
|
||||
for(size_t i = 0; i < parents->len; ++i) {
|
||||
parents_QList.reserve(parents.len);
|
||||
QPersistentModelIndex** parents_arr = static_cast<QPersistentModelIndex**>(parents.data);
|
||||
for(size_t i = 0; i < parents.len; ++i) {
|
||||
parents_QList.push_back(*(parents_arr[i]));
|
||||
}
|
||||
self->layoutChanged(parents_QList, static_cast<QAbstractItemModel::LayoutChangeHint>(hint));
|
||||
@ -687,21 +687,21 @@ void QAbstractItemModel_connect_LayoutChanged2(QAbstractItemModel* self, intptr_
|
||||
for (size_t i = 0, e = parents_ret.length(); i < e; ++i) {
|
||||
parents_arr[i] = new QPersistentModelIndex(parents_ret[i]);
|
||||
}
|
||||
struct miqt_array* parents_out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
parents_out->len = parents_ret.length();
|
||||
parents_out->data = static_cast<void*>(parents_arr);
|
||||
struct miqt_array* sigval1 = parents_out;
|
||||
struct miqt_array parents_out;
|
||||
parents_out.len = parents_ret.length();
|
||||
parents_out.data = static_cast<void*>(parents_arr);
|
||||
struct miqt_array sigval1 = parents_out;
|
||||
QAbstractItemModel::LayoutChangeHint hint_ret = hint;
|
||||
int sigval2 = static_cast<int>(hint_ret);
|
||||
miqt_exec_callback_QAbstractItemModel_LayoutChanged2(slot, sigval1, sigval2);
|
||||
});
|
||||
}
|
||||
|
||||
void QAbstractItemModel_LayoutAboutToBeChanged1(QAbstractItemModel* self, struct miqt_array* /* of QPersistentModelIndex* */ parents) {
|
||||
void QAbstractItemModel_LayoutAboutToBeChanged1(QAbstractItemModel* self, struct miqt_array /* of QPersistentModelIndex* */ parents) {
|
||||
QList<QPersistentModelIndex> parents_QList;
|
||||
parents_QList.reserve(parents->len);
|
||||
QPersistentModelIndex** parents_arr = static_cast<QPersistentModelIndex**>(parents->data);
|
||||
for(size_t i = 0; i < parents->len; ++i) {
|
||||
parents_QList.reserve(parents.len);
|
||||
QPersistentModelIndex** parents_arr = static_cast<QPersistentModelIndex**>(parents.data);
|
||||
for(size_t i = 0; i < parents.len; ++i) {
|
||||
parents_QList.push_back(*(parents_arr[i]));
|
||||
}
|
||||
self->layoutAboutToBeChanged(parents_QList);
|
||||
@ -715,19 +715,19 @@ void QAbstractItemModel_connect_LayoutAboutToBeChanged1(QAbstractItemModel* self
|
||||
for (size_t i = 0, e = parents_ret.length(); i < e; ++i) {
|
||||
parents_arr[i] = new QPersistentModelIndex(parents_ret[i]);
|
||||
}
|
||||
struct miqt_array* parents_out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
parents_out->len = parents_ret.length();
|
||||
parents_out->data = static_cast<void*>(parents_arr);
|
||||
struct miqt_array* sigval1 = parents_out;
|
||||
struct miqt_array parents_out;
|
||||
parents_out.len = parents_ret.length();
|
||||
parents_out.data = static_cast<void*>(parents_arr);
|
||||
struct miqt_array sigval1 = parents_out;
|
||||
miqt_exec_callback_QAbstractItemModel_LayoutAboutToBeChanged1(slot, sigval1);
|
||||
});
|
||||
}
|
||||
|
||||
void QAbstractItemModel_LayoutAboutToBeChanged2(QAbstractItemModel* self, struct miqt_array* /* of QPersistentModelIndex* */ parents, int hint) {
|
||||
void QAbstractItemModel_LayoutAboutToBeChanged2(QAbstractItemModel* self, struct miqt_array /* of QPersistentModelIndex* */ parents, int hint) {
|
||||
QList<QPersistentModelIndex> parents_QList;
|
||||
parents_QList.reserve(parents->len);
|
||||
QPersistentModelIndex** parents_arr = static_cast<QPersistentModelIndex**>(parents->data);
|
||||
for(size_t i = 0; i < parents->len; ++i) {
|
||||
parents_QList.reserve(parents.len);
|
||||
QPersistentModelIndex** parents_arr = static_cast<QPersistentModelIndex**>(parents.data);
|
||||
for(size_t i = 0; i < parents.len; ++i) {
|
||||
parents_QList.push_back(*(parents_arr[i]));
|
||||
}
|
||||
self->layoutAboutToBeChanged(parents_QList, static_cast<QAbstractItemModel::LayoutChangeHint>(hint));
|
||||
@ -741,10 +741,10 @@ void QAbstractItemModel_connect_LayoutAboutToBeChanged2(QAbstractItemModel* self
|
||||
for (size_t i = 0, e = parents_ret.length(); i < e; ++i) {
|
||||
parents_arr[i] = new QPersistentModelIndex(parents_ret[i]);
|
||||
}
|
||||
struct miqt_array* parents_out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
parents_out->len = parents_ret.length();
|
||||
parents_out->data = static_cast<void*>(parents_arr);
|
||||
struct miqt_array* sigval1 = parents_out;
|
||||
struct miqt_array parents_out;
|
||||
parents_out.len = parents_ret.length();
|
||||
parents_out.data = static_cast<void*>(parents_arr);
|
||||
struct miqt_array sigval1 = parents_out;
|
||||
QAbstractItemModel::LayoutChangeHint hint_ret = hint;
|
||||
int sigval2 = static_cast<int>(hint_ret);
|
||||
miqt_exec_callback_QAbstractItemModel_LayoutAboutToBeChanged2(slot, sigval1, sigval2);
|
||||
|
@ -449,7 +449,7 @@ func (this *QAbstractItemModel) SetHeaderData(section int, orientation Orientati
|
||||
}
|
||||
|
||||
func (this *QAbstractItemModel) MimeTypes() []string {
|
||||
var _ma *C.struct_miqt_array = C.QAbstractItemModel_MimeTypes(this.h)
|
||||
var _ma C.struct_miqt_array = C.QAbstractItemModel_MimeTypes(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -458,7 +458,6 @@ func (this *QAbstractItemModel) MimeTypes() []string {
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
@ -468,8 +467,7 @@ func (this *QAbstractItemModel) MimeData(indexes []QModelIndex) *QMimeData {
|
||||
for i := range indexes {
|
||||
indexes_CArray[i] = indexes[i].cPointer()
|
||||
}
|
||||
indexes_ma := &C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(indexes_ma))
|
||||
indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)}
|
||||
return UnsafeNewQMimeData(unsafe.Pointer(C.QAbstractItemModel_MimeData(this.h, indexes_ma)))
|
||||
}
|
||||
|
||||
@ -561,7 +559,7 @@ func (this *QAbstractItemModel) Buddy(index *QModelIndex) *QModelIndex {
|
||||
}
|
||||
|
||||
func (this *QAbstractItemModel) Match(start *QModelIndex, role int, value *QVariant) []QModelIndex {
|
||||
var _ma *C.struct_miqt_array = C.QAbstractItemModel_Match(this.h, start.cPointer(), (C.int)(role), value.cPointer())
|
||||
var _ma C.struct_miqt_array = C.QAbstractItemModel_Match(this.h, start.cPointer(), (C.int)(role), value.cPointer())
|
||||
_ret := make([]QModelIndex, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -570,7 +568,6 @@ func (this *QAbstractItemModel) Match(start *QModelIndex, role int, value *QVari
|
||||
_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
_ret[i] = *_lv_goptr
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
@ -798,7 +795,7 @@ func (this *QAbstractItemModel) Sort2(column int, order SortOrder) {
|
||||
}
|
||||
|
||||
func (this *QAbstractItemModel) Match4(start *QModelIndex, role int, value *QVariant, hits int) []QModelIndex {
|
||||
var _ma *C.struct_miqt_array = C.QAbstractItemModel_Match4(this.h, start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits))
|
||||
var _ma C.struct_miqt_array = C.QAbstractItemModel_Match4(this.h, start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits))
|
||||
_ret := make([]QModelIndex, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -807,12 +804,11 @@ func (this *QAbstractItemModel) Match4(start *QModelIndex, role int, value *QVar
|
||||
_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
_ret[i] = *_lv_goptr
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QAbstractItemModel) Match5(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex {
|
||||
var _ma *C.struct_miqt_array = C.QAbstractItemModel_Match5(this.h, start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags))
|
||||
var _ma C.struct_miqt_array = C.QAbstractItemModel_Match5(this.h, start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags))
|
||||
_ret := make([]QModelIndex, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -821,7 +817,6 @@ func (this *QAbstractItemModel) Match5(start *QModelIndex, role int, value *QVar
|
||||
_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
_ret[i] = *_lv_goptr
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
@ -835,8 +830,7 @@ func (this *QAbstractItemModel) DataChanged3(topLeft *QModelIndex, bottomRight *
|
||||
for i := range roles {
|
||||
roles_CArray[i] = (C.int)(roles[i])
|
||||
}
|
||||
roles_ma := &C.struct_miqt_array{len: C.size_t(len(roles)), data: unsafe.Pointer(roles_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(roles_ma))
|
||||
roles_ma := C.struct_miqt_array{len: C.size_t(len(roles)), data: unsafe.Pointer(roles_CArray)}
|
||||
C.QAbstractItemModel_DataChanged3(this.h, topLeft.cPointer(), bottomRight.cPointer(), roles_ma)
|
||||
}
|
||||
func (this *QAbstractItemModel) OnDataChanged3(slot func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) {
|
||||
@ -844,7 +838,7 @@ func (this *QAbstractItemModel) OnDataChanged3(slot func(topLeft *QModelIndex, b
|
||||
}
|
||||
|
||||
//export miqt_exec_callback_QAbstractItemModel_DataChanged3
|
||||
func miqt_exec_callback_QAbstractItemModel_DataChanged3(cb C.intptr_t, topLeft *C.QModelIndex, bottomRight *C.QModelIndex, roles *C.struct_miqt_array) {
|
||||
func miqt_exec_callback_QAbstractItemModel_DataChanged3(cb C.intptr_t, topLeft *C.QModelIndex, bottomRight *C.QModelIndex, roles C.struct_miqt_array) {
|
||||
gofunc, ok := cgo.Handle(cb).Value().(func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int))
|
||||
if !ok {
|
||||
panic("miqt: callback of non-callback type (heap corruption?)")
|
||||
@ -853,13 +847,12 @@ func miqt_exec_callback_QAbstractItemModel_DataChanged3(cb C.intptr_t, topLeft *
|
||||
// Convert all CABI parameters to Go parameters
|
||||
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(topLeft))
|
||||
slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(bottomRight))
|
||||
var roles_ma *C.struct_miqt_array = roles
|
||||
var roles_ma C.struct_miqt_array = roles
|
||||
roles_ret := make([]int, int(roles_ma.len))
|
||||
roles_outCast := (*[0xffff]C.int)(unsafe.Pointer(roles_ma.data)) // hey ya
|
||||
for i := 0; i < int(roles_ma.len); i++ {
|
||||
roles_ret[i] = (int)(roles_outCast[i])
|
||||
}
|
||||
C.free(unsafe.Pointer(roles_ma))
|
||||
slotval3 := roles_ret
|
||||
|
||||
gofunc(slotval1, slotval2, slotval3)
|
||||
@ -871,8 +864,7 @@ func (this *QAbstractItemModel) LayoutChanged1(parents []QPersistentModelIndex)
|
||||
for i := range parents {
|
||||
parents_CArray[i] = parents[i].cPointer()
|
||||
}
|
||||
parents_ma := &C.struct_miqt_array{len: C.size_t(len(parents)), data: unsafe.Pointer(parents_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(parents_ma))
|
||||
parents_ma := C.struct_miqt_array{len: C.size_t(len(parents)), data: unsafe.Pointer(parents_CArray)}
|
||||
C.QAbstractItemModel_LayoutChanged1(this.h, parents_ma)
|
||||
}
|
||||
func (this *QAbstractItemModel) OnLayoutChanged1(slot func(parents []QPersistentModelIndex)) {
|
||||
@ -880,14 +872,14 @@ func (this *QAbstractItemModel) OnLayoutChanged1(slot func(parents []QPersistent
|
||||
}
|
||||
|
||||
//export miqt_exec_callback_QAbstractItemModel_LayoutChanged1
|
||||
func miqt_exec_callback_QAbstractItemModel_LayoutChanged1(cb C.intptr_t, parents *C.struct_miqt_array) {
|
||||
func miqt_exec_callback_QAbstractItemModel_LayoutChanged1(cb C.intptr_t, parents C.struct_miqt_array) {
|
||||
gofunc, ok := cgo.Handle(cb).Value().(func(parents []QPersistentModelIndex))
|
||||
if !ok {
|
||||
panic("miqt: callback of non-callback type (heap corruption?)")
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
var parents_ma *C.struct_miqt_array = parents
|
||||
var parents_ma C.struct_miqt_array = parents
|
||||
parents_ret := make([]QPersistentModelIndex, int(parents_ma.len))
|
||||
parents_outCast := (*[0xffff]*C.QPersistentModelIndex)(unsafe.Pointer(parents_ma.data)) // hey ya
|
||||
for i := 0; i < int(parents_ma.len); i++ {
|
||||
@ -896,7 +888,6 @@ func miqt_exec_callback_QAbstractItemModel_LayoutChanged1(cb C.intptr_t, parents
|
||||
parents_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
parents_ret[i] = *parents_lv_goptr
|
||||
}
|
||||
C.free(unsafe.Pointer(parents_ma))
|
||||
slotval1 := parents_ret
|
||||
|
||||
gofunc(slotval1)
|
||||
@ -908,8 +899,7 @@ func (this *QAbstractItemModel) LayoutChanged2(parents []QPersistentModelIndex,
|
||||
for i := range parents {
|
||||
parents_CArray[i] = parents[i].cPointer()
|
||||
}
|
||||
parents_ma := &C.struct_miqt_array{len: C.size_t(len(parents)), data: unsafe.Pointer(parents_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(parents_ma))
|
||||
parents_ma := C.struct_miqt_array{len: C.size_t(len(parents)), data: unsafe.Pointer(parents_CArray)}
|
||||
C.QAbstractItemModel_LayoutChanged2(this.h, parents_ma, (C.int)(hint))
|
||||
}
|
||||
func (this *QAbstractItemModel) OnLayoutChanged2(slot func(parents []QPersistentModelIndex, hint QAbstractItemModel__LayoutChangeHint)) {
|
||||
@ -917,14 +907,14 @@ func (this *QAbstractItemModel) OnLayoutChanged2(slot func(parents []QPersistent
|
||||
}
|
||||
|
||||
//export miqt_exec_callback_QAbstractItemModel_LayoutChanged2
|
||||
func miqt_exec_callback_QAbstractItemModel_LayoutChanged2(cb C.intptr_t, parents *C.struct_miqt_array, hint C.int) {
|
||||
func miqt_exec_callback_QAbstractItemModel_LayoutChanged2(cb C.intptr_t, parents C.struct_miqt_array, hint C.int) {
|
||||
gofunc, ok := cgo.Handle(cb).Value().(func(parents []QPersistentModelIndex, hint QAbstractItemModel__LayoutChangeHint))
|
||||
if !ok {
|
||||
panic("miqt: callback of non-callback type (heap corruption?)")
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
var parents_ma *C.struct_miqt_array = parents
|
||||
var parents_ma C.struct_miqt_array = parents
|
||||
parents_ret := make([]QPersistentModelIndex, int(parents_ma.len))
|
||||
parents_outCast := (*[0xffff]*C.QPersistentModelIndex)(unsafe.Pointer(parents_ma.data)) // hey ya
|
||||
for i := 0; i < int(parents_ma.len); i++ {
|
||||
@ -933,7 +923,6 @@ func miqt_exec_callback_QAbstractItemModel_LayoutChanged2(cb C.intptr_t, parents
|
||||
parents_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
parents_ret[i] = *parents_lv_goptr
|
||||
}
|
||||
C.free(unsafe.Pointer(parents_ma))
|
||||
slotval1 := parents_ret
|
||||
|
||||
slotval2 := (QAbstractItemModel__LayoutChangeHint)(hint)
|
||||
@ -947,8 +936,7 @@ func (this *QAbstractItemModel) LayoutAboutToBeChanged1(parents []QPersistentMod
|
||||
for i := range parents {
|
||||
parents_CArray[i] = parents[i].cPointer()
|
||||
}
|
||||
parents_ma := &C.struct_miqt_array{len: C.size_t(len(parents)), data: unsafe.Pointer(parents_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(parents_ma))
|
||||
parents_ma := C.struct_miqt_array{len: C.size_t(len(parents)), data: unsafe.Pointer(parents_CArray)}
|
||||
C.QAbstractItemModel_LayoutAboutToBeChanged1(this.h, parents_ma)
|
||||
}
|
||||
func (this *QAbstractItemModel) OnLayoutAboutToBeChanged1(slot func(parents []QPersistentModelIndex)) {
|
||||
@ -956,14 +944,14 @@ func (this *QAbstractItemModel) OnLayoutAboutToBeChanged1(slot func(parents []QP
|
||||
}
|
||||
|
||||
//export miqt_exec_callback_QAbstractItemModel_LayoutAboutToBeChanged1
|
||||
func miqt_exec_callback_QAbstractItemModel_LayoutAboutToBeChanged1(cb C.intptr_t, parents *C.struct_miqt_array) {
|
||||
func miqt_exec_callback_QAbstractItemModel_LayoutAboutToBeChanged1(cb C.intptr_t, parents C.struct_miqt_array) {
|
||||
gofunc, ok := cgo.Handle(cb).Value().(func(parents []QPersistentModelIndex))
|
||||
if !ok {
|
||||
panic("miqt: callback of non-callback type (heap corruption?)")
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
var parents_ma *C.struct_miqt_array = parents
|
||||
var parents_ma C.struct_miqt_array = parents
|
||||
parents_ret := make([]QPersistentModelIndex, int(parents_ma.len))
|
||||
parents_outCast := (*[0xffff]*C.QPersistentModelIndex)(unsafe.Pointer(parents_ma.data)) // hey ya
|
||||
for i := 0; i < int(parents_ma.len); i++ {
|
||||
@ -972,7 +960,6 @@ func miqt_exec_callback_QAbstractItemModel_LayoutAboutToBeChanged1(cb C.intptr_t
|
||||
parents_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
parents_ret[i] = *parents_lv_goptr
|
||||
}
|
||||
C.free(unsafe.Pointer(parents_ma))
|
||||
slotval1 := parents_ret
|
||||
|
||||
gofunc(slotval1)
|
||||
@ -984,8 +971,7 @@ func (this *QAbstractItemModel) LayoutAboutToBeChanged2(parents []QPersistentMod
|
||||
for i := range parents {
|
||||
parents_CArray[i] = parents[i].cPointer()
|
||||
}
|
||||
parents_ma := &C.struct_miqt_array{len: C.size_t(len(parents)), data: unsafe.Pointer(parents_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(parents_ma))
|
||||
parents_ma := C.struct_miqt_array{len: C.size_t(len(parents)), data: unsafe.Pointer(parents_CArray)}
|
||||
C.QAbstractItemModel_LayoutAboutToBeChanged2(this.h, parents_ma, (C.int)(hint))
|
||||
}
|
||||
func (this *QAbstractItemModel) OnLayoutAboutToBeChanged2(slot func(parents []QPersistentModelIndex, hint QAbstractItemModel__LayoutChangeHint)) {
|
||||
@ -993,14 +979,14 @@ func (this *QAbstractItemModel) OnLayoutAboutToBeChanged2(slot func(parents []QP
|
||||
}
|
||||
|
||||
//export miqt_exec_callback_QAbstractItemModel_LayoutAboutToBeChanged2
|
||||
func miqt_exec_callback_QAbstractItemModel_LayoutAboutToBeChanged2(cb C.intptr_t, parents *C.struct_miqt_array, hint C.int) {
|
||||
func miqt_exec_callback_QAbstractItemModel_LayoutAboutToBeChanged2(cb C.intptr_t, parents C.struct_miqt_array, hint C.int) {
|
||||
gofunc, ok := cgo.Handle(cb).Value().(func(parents []QPersistentModelIndex, hint QAbstractItemModel__LayoutChangeHint))
|
||||
if !ok {
|
||||
panic("miqt: callback of non-callback type (heap corruption?)")
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
var parents_ma *C.struct_miqt_array = parents
|
||||
var parents_ma C.struct_miqt_array = parents
|
||||
parents_ret := make([]QPersistentModelIndex, int(parents_ma.len))
|
||||
parents_outCast := (*[0xffff]*C.QPersistentModelIndex)(unsafe.Pointer(parents_ma.data)) // hey ya
|
||||
for i := 0; i < int(parents_ma.len); i++ {
|
||||
@ -1009,7 +995,6 @@ func miqt_exec_callback_QAbstractItemModel_LayoutAboutToBeChanged2(cb C.intptr_t
|
||||
parents_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
parents_ret[i] = *parents_lv_goptr
|
||||
}
|
||||
C.free(unsafe.Pointer(parents_ma))
|
||||
slotval1 := parents_ret
|
||||
|
||||
slotval2 := (QAbstractItemModel__LayoutChangeHint)(hint)
|
||||
|
@ -96,8 +96,8 @@ QVariant* QAbstractItemModel_Data(const QAbstractItemModel* self, QModelIndex* i
|
||||
bool QAbstractItemModel_SetData(QAbstractItemModel* self, QModelIndex* index, QVariant* value);
|
||||
QVariant* QAbstractItemModel_HeaderData(const QAbstractItemModel* self, int section, int orientation);
|
||||
bool QAbstractItemModel_SetHeaderData(QAbstractItemModel* self, int section, int orientation, QVariant* value);
|
||||
struct miqt_array* QAbstractItemModel_MimeTypes(const QAbstractItemModel* self);
|
||||
QMimeData* QAbstractItemModel_MimeData(const QAbstractItemModel* self, struct miqt_array* /* of QModelIndex* */ indexes);
|
||||
struct miqt_array QAbstractItemModel_MimeTypes(const QAbstractItemModel* self);
|
||||
QMimeData* QAbstractItemModel_MimeData(const QAbstractItemModel* self, struct miqt_array /* of QModelIndex* */ indexes);
|
||||
bool QAbstractItemModel_CanDropMimeData(const QAbstractItemModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent);
|
||||
bool QAbstractItemModel_DropMimeData(QAbstractItemModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent);
|
||||
int QAbstractItemModel_SupportedDropActions(const QAbstractItemModel* self);
|
||||
@ -119,7 +119,7 @@ bool QAbstractItemModel_CanFetchMore(const QAbstractItemModel* self, QModelIndex
|
||||
int QAbstractItemModel_Flags(const QAbstractItemModel* self, QModelIndex* index);
|
||||
void QAbstractItemModel_Sort(QAbstractItemModel* self, int column);
|
||||
QModelIndex* QAbstractItemModel_Buddy(const QAbstractItemModel* self, QModelIndex* index);
|
||||
struct miqt_array* QAbstractItemModel_Match(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value);
|
||||
struct miqt_array QAbstractItemModel_Match(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value);
|
||||
QSize* QAbstractItemModel_Span(const QAbstractItemModel* self, QModelIndex* index);
|
||||
bool QAbstractItemModel_CheckIndex(const QAbstractItemModel* self, QModelIndex* index);
|
||||
void QAbstractItemModel_DataChanged(QAbstractItemModel* self, QModelIndex* topLeft, QModelIndex* bottomRight);
|
||||
@ -154,18 +154,18 @@ bool QAbstractItemModel_InsertColumn2(QAbstractItemModel* self, int column, QMod
|
||||
bool QAbstractItemModel_RemoveRow2(QAbstractItemModel* self, int row, QModelIndex* parent);
|
||||
bool QAbstractItemModel_RemoveColumn2(QAbstractItemModel* self, int column, QModelIndex* parent);
|
||||
void QAbstractItemModel_Sort2(QAbstractItemModel* self, int column, int order);
|
||||
struct miqt_array* QAbstractItemModel_Match4(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value, int hits);
|
||||
struct miqt_array* QAbstractItemModel_Match5(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags);
|
||||
struct miqt_array QAbstractItemModel_Match4(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value, int hits);
|
||||
struct miqt_array QAbstractItemModel_Match5(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags);
|
||||
bool QAbstractItemModel_CheckIndex2(const QAbstractItemModel* self, QModelIndex* index, int options);
|
||||
void QAbstractItemModel_DataChanged3(QAbstractItemModel* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array* /* of int */ roles);
|
||||
void QAbstractItemModel_DataChanged3(QAbstractItemModel* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles);
|
||||
void QAbstractItemModel_connect_DataChanged3(QAbstractItemModel* self, intptr_t slot);
|
||||
void QAbstractItemModel_LayoutChanged1(QAbstractItemModel* self, struct miqt_array* /* of QPersistentModelIndex* */ parents);
|
||||
void QAbstractItemModel_LayoutChanged1(QAbstractItemModel* self, struct miqt_array /* of QPersistentModelIndex* */ parents);
|
||||
void QAbstractItemModel_connect_LayoutChanged1(QAbstractItemModel* self, intptr_t slot);
|
||||
void QAbstractItemModel_LayoutChanged2(QAbstractItemModel* self, struct miqt_array* /* of QPersistentModelIndex* */ parents, int hint);
|
||||
void QAbstractItemModel_LayoutChanged2(QAbstractItemModel* self, struct miqt_array /* of QPersistentModelIndex* */ parents, int hint);
|
||||
void QAbstractItemModel_connect_LayoutChanged2(QAbstractItemModel* self, intptr_t slot);
|
||||
void QAbstractItemModel_LayoutAboutToBeChanged1(QAbstractItemModel* self, struct miqt_array* /* of QPersistentModelIndex* */ parents);
|
||||
void QAbstractItemModel_LayoutAboutToBeChanged1(QAbstractItemModel* self, struct miqt_array /* of QPersistentModelIndex* */ parents);
|
||||
void QAbstractItemModel_connect_LayoutAboutToBeChanged1(QAbstractItemModel* self, intptr_t slot);
|
||||
void QAbstractItemModel_LayoutAboutToBeChanged2(QAbstractItemModel* self, struct miqt_array* /* of QPersistentModelIndex* */ parents, int hint);
|
||||
void QAbstractItemModel_LayoutAboutToBeChanged2(QAbstractItemModel* self, struct miqt_array /* of QPersistentModelIndex* */ parents, int hint);
|
||||
void QAbstractItemModel_connect_LayoutAboutToBeChanged2(QAbstractItemModel* self, intptr_t slot);
|
||||
void QAbstractItemModel_Delete(QAbstractItemModel* self);
|
||||
|
||||
|
@ -116,11 +116,11 @@ QModelIndex* QAbstractProxyModel_Sibling(const QAbstractProxyModel* self, int ro
|
||||
return new QModelIndex(self->sibling(static_cast<int>(row), static_cast<int>(column), *idx));
|
||||
}
|
||||
|
||||
QMimeData* QAbstractProxyModel_MimeData(const QAbstractProxyModel* self, struct miqt_array* /* of QModelIndex* */ indexes) {
|
||||
QMimeData* QAbstractProxyModel_MimeData(const QAbstractProxyModel* self, struct miqt_array /* of QModelIndex* */ indexes) {
|
||||
QModelIndexList indexes_QList;
|
||||
indexes_QList.reserve(indexes->len);
|
||||
QModelIndex** indexes_arr = static_cast<QModelIndex**>(indexes->data);
|
||||
for(size_t i = 0; i < indexes->len; ++i) {
|
||||
indexes_QList.reserve(indexes.len);
|
||||
QModelIndex** indexes_arr = static_cast<QModelIndex**>(indexes.data);
|
||||
for(size_t i = 0; i < indexes.len; ++i) {
|
||||
indexes_QList.push_back(*(indexes_arr[i]));
|
||||
}
|
||||
return self->mimeData(indexes_QList);
|
||||
@ -134,7 +134,7 @@ bool QAbstractProxyModel_DropMimeData(QAbstractProxyModel* self, QMimeData* data
|
||||
return self->dropMimeData(data, static_cast<Qt::DropAction>(action), static_cast<int>(row), static_cast<int>(column), *parent);
|
||||
}
|
||||
|
||||
struct miqt_array* QAbstractProxyModel_MimeTypes(const QAbstractProxyModel* self) {
|
||||
struct miqt_array QAbstractProxyModel_MimeTypes(const QAbstractProxyModel* self) {
|
||||
QStringList _ret = self->mimeTypes();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
@ -148,9 +148,9 @@ struct miqt_array* QAbstractProxyModel_MimeTypes(const QAbstractProxyModel* self
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -170,8 +170,7 @@ func (this *QAbstractProxyModel) MimeData(indexes []QModelIndex) *QMimeData {
|
||||
for i := range indexes {
|
||||
indexes_CArray[i] = indexes[i].cPointer()
|
||||
}
|
||||
indexes_ma := &C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(indexes_ma))
|
||||
indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)}
|
||||
return UnsafeNewQMimeData(unsafe.Pointer(C.QAbstractProxyModel_MimeData(this.h, indexes_ma)))
|
||||
}
|
||||
|
||||
@ -184,7 +183,7 @@ func (this *QAbstractProxyModel) DropMimeData(data *QMimeData, action DropAction
|
||||
}
|
||||
|
||||
func (this *QAbstractProxyModel) MimeTypes() []string {
|
||||
var _ma *C.struct_miqt_array = C.QAbstractProxyModel_MimeTypes(this.h)
|
||||
var _ma C.struct_miqt_array = C.QAbstractProxyModel_MimeTypes(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -193,7 +192,6 @@ func (this *QAbstractProxyModel) MimeTypes() []string {
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -53,10 +53,10 @@ void QAbstractProxyModel_Sort(QAbstractProxyModel* self, int column);
|
||||
QSize* QAbstractProxyModel_Span(const QAbstractProxyModel* self, QModelIndex* index);
|
||||
bool QAbstractProxyModel_HasChildren(const QAbstractProxyModel* self);
|
||||
QModelIndex* QAbstractProxyModel_Sibling(const QAbstractProxyModel* self, int row, int column, QModelIndex* idx);
|
||||
QMimeData* QAbstractProxyModel_MimeData(const QAbstractProxyModel* self, struct miqt_array* /* of QModelIndex* */ indexes);
|
||||
QMimeData* QAbstractProxyModel_MimeData(const QAbstractProxyModel* self, struct miqt_array /* of QModelIndex* */ indexes);
|
||||
bool QAbstractProxyModel_CanDropMimeData(const QAbstractProxyModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent);
|
||||
bool QAbstractProxyModel_DropMimeData(QAbstractProxyModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent);
|
||||
struct miqt_array* QAbstractProxyModel_MimeTypes(const QAbstractProxyModel* self);
|
||||
struct miqt_array QAbstractProxyModel_MimeTypes(const QAbstractProxyModel* self);
|
||||
int QAbstractProxyModel_SupportedDragActions(const QAbstractProxyModel* self);
|
||||
int QAbstractProxyModel_SupportedDropActions(const QAbstractProxyModel* self);
|
||||
struct miqt_string QAbstractProxyModel_Tr2(const char* s, const char* c);
|
||||
|
@ -95,16 +95,16 @@ void QAbstractScrollArea_AddScrollBarWidget(QAbstractScrollArea* self, QWidget*
|
||||
self->addScrollBarWidget(widget, static_cast<Qt::Alignment>(alignment));
|
||||
}
|
||||
|
||||
struct miqt_array* QAbstractScrollArea_ScrollBarWidgets(QAbstractScrollArea* self, int alignment) {
|
||||
struct miqt_array QAbstractScrollArea_ScrollBarWidgets(QAbstractScrollArea* self, int alignment) {
|
||||
QWidgetList _ret = self->scrollBarWidgets(static_cast<Qt::Alignment>(alignment));
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
QWidget** _arr = static_cast<QWidget**>(malloc(sizeof(QWidget*) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = _ret[i];
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -136,13 +136,12 @@ func (this *QAbstractScrollArea) AddScrollBarWidget(widget *QWidget, alignment A
|
||||
}
|
||||
|
||||
func (this *QAbstractScrollArea) ScrollBarWidgets(alignment AlignmentFlag) []*QWidget {
|
||||
var _ma *C.struct_miqt_array = C.QAbstractScrollArea_ScrollBarWidgets(this.h, (C.int)(alignment))
|
||||
var _ma C.struct_miqt_array = C.QAbstractScrollArea_ScrollBarWidgets(this.h, (C.int)(alignment))
|
||||
_ret := make([]*QWidget, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QWidget)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = UnsafeNewQWidget(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ void QAbstractScrollArea_SetHorizontalScrollBar(QAbstractScrollArea* self, QScro
|
||||
QWidget* QAbstractScrollArea_CornerWidget(const QAbstractScrollArea* self);
|
||||
void QAbstractScrollArea_SetCornerWidget(QAbstractScrollArea* self, QWidget* widget);
|
||||
void QAbstractScrollArea_AddScrollBarWidget(QAbstractScrollArea* self, QWidget* widget, int alignment);
|
||||
struct miqt_array* QAbstractScrollArea_ScrollBarWidgets(QAbstractScrollArea* self, int alignment);
|
||||
struct miqt_array QAbstractScrollArea_ScrollBarWidgets(QAbstractScrollArea* self, int alignment);
|
||||
QWidget* QAbstractScrollArea_Viewport(const QAbstractScrollArea* self);
|
||||
void QAbstractScrollArea_SetViewport(QAbstractScrollArea* self, QWidget* widget);
|
||||
QSize* QAbstractScrollArea_MaximumViewportSize(const QAbstractScrollArea* self);
|
||||
|
@ -54,24 +54,24 @@ void QAbstractTransition_SetTargetState(QAbstractTransition* self, QAbstractStat
|
||||
self->setTargetState(target);
|
||||
}
|
||||
|
||||
struct miqt_array* QAbstractTransition_TargetStates(const QAbstractTransition* self) {
|
||||
struct miqt_array QAbstractTransition_TargetStates(const QAbstractTransition* self) {
|
||||
QList<QAbstractState *> _ret = self->targetStates();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
QAbstractState** _arr = static_cast<QAbstractState**>(malloc(sizeof(QAbstractState*) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = _ret[i];
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
void QAbstractTransition_SetTargetStates(QAbstractTransition* self, struct miqt_array* /* of QAbstractState* */ targets) {
|
||||
void QAbstractTransition_SetTargetStates(QAbstractTransition* self, struct miqt_array /* of QAbstractState* */ targets) {
|
||||
QList<QAbstractState *> targets_QList;
|
||||
targets_QList.reserve(targets->len);
|
||||
QAbstractState** targets_arr = static_cast<QAbstractState**>(targets->data);
|
||||
for(size_t i = 0; i < targets->len; ++i) {
|
||||
targets_QList.reserve(targets.len);
|
||||
QAbstractState** targets_arr = static_cast<QAbstractState**>(targets.data);
|
||||
for(size_t i = 0; i < targets.len; ++i) {
|
||||
targets_QList.push_back(targets_arr[i]);
|
||||
}
|
||||
self->setTargetStates(targets_QList);
|
||||
@ -98,16 +98,16 @@ void QAbstractTransition_RemoveAnimation(QAbstractTransition* self, QAbstractAni
|
||||
self->removeAnimation(animation);
|
||||
}
|
||||
|
||||
struct miqt_array* QAbstractTransition_Animations(const QAbstractTransition* self) {
|
||||
struct miqt_array QAbstractTransition_Animations(const QAbstractTransition* self) {
|
||||
QList<QAbstractAnimation *> _ret = self->animations();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
QAbstractAnimation** _arr = static_cast<QAbstractAnimation**>(malloc(sizeof(QAbstractAnimation*) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = _ret[i];
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -91,13 +91,12 @@ func (this *QAbstractTransition) SetTargetState(target *QAbstractState) {
|
||||
}
|
||||
|
||||
func (this *QAbstractTransition) TargetStates() []*QAbstractState {
|
||||
var _ma *C.struct_miqt_array = C.QAbstractTransition_TargetStates(this.h)
|
||||
var _ma C.struct_miqt_array = C.QAbstractTransition_TargetStates(this.h)
|
||||
_ret := make([]*QAbstractState, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QAbstractState)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = UnsafeNewQAbstractState(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
@ -107,8 +106,7 @@ func (this *QAbstractTransition) SetTargetStates(targets []*QAbstractState) {
|
||||
for i := range targets {
|
||||
targets_CArray[i] = targets[i].cPointer()
|
||||
}
|
||||
targets_ma := &C.struct_miqt_array{len: C.size_t(len(targets)), data: unsafe.Pointer(targets_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(targets_ma))
|
||||
targets_ma := C.struct_miqt_array{len: C.size_t(len(targets)), data: unsafe.Pointer(targets_CArray)}
|
||||
C.QAbstractTransition_SetTargetStates(this.h, targets_ma)
|
||||
}
|
||||
|
||||
@ -133,13 +131,12 @@ func (this *QAbstractTransition) RemoveAnimation(animation *QAbstractAnimation)
|
||||
}
|
||||
|
||||
func (this *QAbstractTransition) Animations() []*QAbstractAnimation {
|
||||
var _ma *C.struct_miqt_array = C.QAbstractTransition_Animations(this.h)
|
||||
var _ma C.struct_miqt_array = C.QAbstractTransition_Animations(this.h)
|
||||
_ret := make([]*QAbstractAnimation, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QAbstractAnimation)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = UnsafeNewQAbstractAnimation(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -36,14 +36,14 @@ struct miqt_string QAbstractTransition_TrUtf8(const char* s);
|
||||
QState* QAbstractTransition_SourceState(const QAbstractTransition* self);
|
||||
QAbstractState* QAbstractTransition_TargetState(const QAbstractTransition* self);
|
||||
void QAbstractTransition_SetTargetState(QAbstractTransition* self, QAbstractState* target);
|
||||
struct miqt_array* QAbstractTransition_TargetStates(const QAbstractTransition* self);
|
||||
void QAbstractTransition_SetTargetStates(QAbstractTransition* self, struct miqt_array* /* of QAbstractState* */ targets);
|
||||
struct miqt_array QAbstractTransition_TargetStates(const QAbstractTransition* self);
|
||||
void QAbstractTransition_SetTargetStates(QAbstractTransition* self, struct miqt_array /* of QAbstractState* */ targets);
|
||||
int QAbstractTransition_TransitionType(const QAbstractTransition* self);
|
||||
void QAbstractTransition_SetTransitionType(QAbstractTransition* self, int typeVal);
|
||||
QStateMachine* QAbstractTransition_Machine(const QAbstractTransition* self);
|
||||
void QAbstractTransition_AddAnimation(QAbstractTransition* self, QAbstractAnimation* animation);
|
||||
void QAbstractTransition_RemoveAnimation(QAbstractTransition* self, QAbstractAnimation* animation);
|
||||
struct miqt_array* QAbstractTransition_Animations(const QAbstractTransition* self);
|
||||
struct miqt_array QAbstractTransition_Animations(const QAbstractTransition* self);
|
||||
struct miqt_string QAbstractTransition_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QAbstractTransition_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QAbstractTransition_TrUtf82(const char* s, const char* c);
|
||||
|
@ -357,29 +357,29 @@ bool QAccessibleTableCellInterface_IsSelected(const QAccessibleTableCellInterfac
|
||||
return self->isSelected();
|
||||
}
|
||||
|
||||
struct miqt_array* QAccessibleTableCellInterface_ColumnHeaderCells(const QAccessibleTableCellInterface* self) {
|
||||
struct miqt_array QAccessibleTableCellInterface_ColumnHeaderCells(const QAccessibleTableCellInterface* self) {
|
||||
QList<QAccessibleInterface *> _ret = self->columnHeaderCells();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
QAccessibleInterface** _arr = static_cast<QAccessibleInterface**>(malloc(sizeof(QAccessibleInterface*) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = _ret[i];
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
struct miqt_array* QAccessibleTableCellInterface_RowHeaderCells(const QAccessibleTableCellInterface* self) {
|
||||
struct miqt_array QAccessibleTableCellInterface_RowHeaderCells(const QAccessibleTableCellInterface* self) {
|
||||
QList<QAccessibleInterface *> _ret = self->rowHeaderCells();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
QAccessibleInterface** _arr = static_cast<QAccessibleInterface**>(malloc(sizeof(QAccessibleInterface*) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = _ret[i];
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
@ -427,16 +427,16 @@ int QAccessibleTableInterface_SelectedCellCount(const QAccessibleTableInterface*
|
||||
return self->selectedCellCount();
|
||||
}
|
||||
|
||||
struct miqt_array* QAccessibleTableInterface_SelectedCells(const QAccessibleTableInterface* self) {
|
||||
struct miqt_array QAccessibleTableInterface_SelectedCells(const QAccessibleTableInterface* self) {
|
||||
QList<QAccessibleInterface *> _ret = self->selectedCells();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
QAccessibleInterface** _arr = static_cast<QAccessibleInterface**>(malloc(sizeof(QAccessibleInterface*) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = _ret[i];
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
@ -478,29 +478,29 @@ int QAccessibleTableInterface_RowCount(const QAccessibleTableInterface* self) {
|
||||
return self->rowCount();
|
||||
}
|
||||
|
||||
struct miqt_array* QAccessibleTableInterface_SelectedColumns(const QAccessibleTableInterface* self) {
|
||||
struct miqt_array QAccessibleTableInterface_SelectedColumns(const QAccessibleTableInterface* self) {
|
||||
QList<int> _ret = self->selectedColumns();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
int* _arr = static_cast<int*>(malloc(sizeof(int) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = _ret[i];
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
struct miqt_array* QAccessibleTableInterface_SelectedRows(const QAccessibleTableInterface* self) {
|
||||
struct miqt_array QAccessibleTableInterface_SelectedRows(const QAccessibleTableInterface* self) {
|
||||
QList<int> _ret = self->selectedRows();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
int* _arr = static_cast<int*>(malloc(sizeof(int) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = _ret[i];
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
@ -558,7 +558,7 @@ struct miqt_string QAccessibleActionInterface_TrUtf8(const char* sourceText) {
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_array* QAccessibleActionInterface_ActionNames(const QAccessibleActionInterface* self) {
|
||||
struct miqt_array QAccessibleActionInterface_ActionNames(const QAccessibleActionInterface* self) {
|
||||
QStringList _ret = self->actionNames();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
@ -572,9 +572,9 @@ struct miqt_array* QAccessibleActionInterface_ActionNames(const QAccessibleActio
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
@ -607,7 +607,7 @@ void QAccessibleActionInterface_DoAction(QAccessibleActionInterface* self, struc
|
||||
self->doAction(actionName_QString);
|
||||
}
|
||||
|
||||
struct miqt_array* QAccessibleActionInterface_KeyBindingsForAction(const QAccessibleActionInterface* self, struct miqt_string actionName) {
|
||||
struct miqt_array QAccessibleActionInterface_KeyBindingsForAction(const QAccessibleActionInterface* self, struct miqt_string actionName) {
|
||||
QString actionName_QString = QString::fromUtf8(actionName.data, actionName.len);
|
||||
QStringList _ret = self->keyBindingsForAction(actionName_QString);
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
@ -622,9 +622,9 @@ struct miqt_array* QAccessibleActionInterface_KeyBindingsForAction(const QAccess
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -773,24 +773,22 @@ func (this *QAccessibleTableCellInterface) IsSelected() bool {
|
||||
}
|
||||
|
||||
func (this *QAccessibleTableCellInterface) ColumnHeaderCells() []*QAccessibleInterface {
|
||||
var _ma *C.struct_miqt_array = C.QAccessibleTableCellInterface_ColumnHeaderCells(this.h)
|
||||
var _ma C.struct_miqt_array = C.QAccessibleTableCellInterface_ColumnHeaderCells(this.h)
|
||||
_ret := make([]*QAccessibleInterface, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QAccessibleInterface)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = UnsafeNewQAccessibleInterface(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QAccessibleTableCellInterface) RowHeaderCells() []*QAccessibleInterface {
|
||||
var _ma *C.struct_miqt_array = C.QAccessibleTableCellInterface_RowHeaderCells(this.h)
|
||||
var _ma C.struct_miqt_array = C.QAccessibleTableCellInterface_RowHeaderCells(this.h)
|
||||
_ret := make([]*QAccessibleInterface, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QAccessibleInterface)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = UnsafeNewQAccessibleInterface(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
@ -878,13 +876,12 @@ func (this *QAccessibleTableInterface) SelectedCellCount() int {
|
||||
}
|
||||
|
||||
func (this *QAccessibleTableInterface) SelectedCells() []*QAccessibleInterface {
|
||||
var _ma *C.struct_miqt_array = C.QAccessibleTableInterface_SelectedCells(this.h)
|
||||
var _ma C.struct_miqt_array = C.QAccessibleTableInterface_SelectedCells(this.h)
|
||||
_ret := make([]*QAccessibleInterface, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QAccessibleInterface)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = UnsafeNewQAccessibleInterface(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
@ -919,24 +916,22 @@ func (this *QAccessibleTableInterface) RowCount() int {
|
||||
}
|
||||
|
||||
func (this *QAccessibleTableInterface) SelectedColumns() []int {
|
||||
var _ma *C.struct_miqt_array = C.QAccessibleTableInterface_SelectedColumns(this.h)
|
||||
var _ma C.struct_miqt_array = C.QAccessibleTableInterface_SelectedColumns(this.h)
|
||||
_ret := make([]int, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.int)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = (int)(_outCast[i])
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QAccessibleTableInterface) SelectedRows() []int {
|
||||
var _ma *C.struct_miqt_array = C.QAccessibleTableInterface_SelectedRows(this.h)
|
||||
var _ma C.struct_miqt_array = C.QAccessibleTableInterface_SelectedRows(this.h)
|
||||
_ret := make([]int, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.int)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = (int)(_outCast[i])
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
@ -1030,7 +1025,7 @@ func QAccessibleActionInterface_TrUtf8(sourceText string) string {
|
||||
}
|
||||
|
||||
func (this *QAccessibleActionInterface) ActionNames() []string {
|
||||
var _ma *C.struct_miqt_array = C.QAccessibleActionInterface_ActionNames(this.h)
|
||||
var _ma C.struct_miqt_array = C.QAccessibleActionInterface_ActionNames(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -1039,7 +1034,6 @@ func (this *QAccessibleActionInterface) ActionNames() []string {
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
@ -1078,7 +1072,7 @@ func (this *QAccessibleActionInterface) KeyBindingsForAction(actionName string)
|
||||
actionName_ms.data = C.CString(actionName)
|
||||
actionName_ms.len = C.size_t(len(actionName))
|
||||
defer C.free(unsafe.Pointer(actionName_ms.data))
|
||||
var _ma *C.struct_miqt_array = C.QAccessibleActionInterface_KeyBindingsForAction(this.h, actionName_ms)
|
||||
var _ma C.struct_miqt_array = C.QAccessibleActionInterface_KeyBindingsForAction(this.h, actionName_ms)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -1087,7 +1081,6 @@ func (this *QAccessibleActionInterface) KeyBindingsForAction(actionName string)
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -153,8 +153,8 @@ void QAccessibleValueInterface_OperatorAssign(QAccessibleValueInterface* self, Q
|
||||
void QAccessibleValueInterface_Delete(QAccessibleValueInterface* self);
|
||||
|
||||
bool QAccessibleTableCellInterface_IsSelected(const QAccessibleTableCellInterface* self);
|
||||
struct miqt_array* QAccessibleTableCellInterface_ColumnHeaderCells(const QAccessibleTableCellInterface* self);
|
||||
struct miqt_array* QAccessibleTableCellInterface_RowHeaderCells(const QAccessibleTableCellInterface* self);
|
||||
struct miqt_array QAccessibleTableCellInterface_ColumnHeaderCells(const QAccessibleTableCellInterface* self);
|
||||
struct miqt_array QAccessibleTableCellInterface_RowHeaderCells(const QAccessibleTableCellInterface* self);
|
||||
int QAccessibleTableCellInterface_ColumnIndex(const QAccessibleTableCellInterface* self);
|
||||
int QAccessibleTableCellInterface_RowIndex(const QAccessibleTableCellInterface* self);
|
||||
int QAccessibleTableCellInterface_ColumnExtent(const QAccessibleTableCellInterface* self);
|
||||
@ -167,15 +167,15 @@ QAccessibleInterface* QAccessibleTableInterface_Caption(const QAccessibleTableIn
|
||||
QAccessibleInterface* QAccessibleTableInterface_Summary(const QAccessibleTableInterface* self);
|
||||
QAccessibleInterface* QAccessibleTableInterface_CellAt(const QAccessibleTableInterface* self, int row, int column);
|
||||
int QAccessibleTableInterface_SelectedCellCount(const QAccessibleTableInterface* self);
|
||||
struct miqt_array* QAccessibleTableInterface_SelectedCells(const QAccessibleTableInterface* self);
|
||||
struct miqt_array QAccessibleTableInterface_SelectedCells(const QAccessibleTableInterface* self);
|
||||
struct miqt_string QAccessibleTableInterface_ColumnDescription(const QAccessibleTableInterface* self, int column);
|
||||
struct miqt_string QAccessibleTableInterface_RowDescription(const QAccessibleTableInterface* self, int row);
|
||||
int QAccessibleTableInterface_SelectedColumnCount(const QAccessibleTableInterface* self);
|
||||
int QAccessibleTableInterface_SelectedRowCount(const QAccessibleTableInterface* self);
|
||||
int QAccessibleTableInterface_ColumnCount(const QAccessibleTableInterface* self);
|
||||
int QAccessibleTableInterface_RowCount(const QAccessibleTableInterface* self);
|
||||
struct miqt_array* QAccessibleTableInterface_SelectedColumns(const QAccessibleTableInterface* self);
|
||||
struct miqt_array* QAccessibleTableInterface_SelectedRows(const QAccessibleTableInterface* self);
|
||||
struct miqt_array QAccessibleTableInterface_SelectedColumns(const QAccessibleTableInterface* self);
|
||||
struct miqt_array QAccessibleTableInterface_SelectedRows(const QAccessibleTableInterface* self);
|
||||
bool QAccessibleTableInterface_IsColumnSelected(const QAccessibleTableInterface* self, int column);
|
||||
bool QAccessibleTableInterface_IsRowSelected(const QAccessibleTableInterface* self, int row);
|
||||
bool QAccessibleTableInterface_SelectRow(QAccessibleTableInterface* self, int row);
|
||||
@ -187,11 +187,11 @@ void QAccessibleTableInterface_Delete(QAccessibleTableInterface* self);
|
||||
|
||||
struct miqt_string QAccessibleActionInterface_Tr(const char* sourceText);
|
||||
struct miqt_string QAccessibleActionInterface_TrUtf8(const char* sourceText);
|
||||
struct miqt_array* QAccessibleActionInterface_ActionNames(const QAccessibleActionInterface* self);
|
||||
struct miqt_array QAccessibleActionInterface_ActionNames(const QAccessibleActionInterface* self);
|
||||
struct miqt_string QAccessibleActionInterface_LocalizedActionName(const QAccessibleActionInterface* self, struct miqt_string name);
|
||||
struct miqt_string QAccessibleActionInterface_LocalizedActionDescription(const QAccessibleActionInterface* self, struct miqt_string name);
|
||||
void QAccessibleActionInterface_DoAction(QAccessibleActionInterface* self, struct miqt_string actionName);
|
||||
struct miqt_array* QAccessibleActionInterface_KeyBindingsForAction(const QAccessibleActionInterface* self, struct miqt_string actionName);
|
||||
struct miqt_array QAccessibleActionInterface_KeyBindingsForAction(const QAccessibleActionInterface* self, struct miqt_string actionName);
|
||||
struct miqt_string QAccessibleActionInterface_PressAction();
|
||||
struct miqt_string QAccessibleActionInterface_IncreaseAction();
|
||||
struct miqt_string QAccessibleActionInterface_DecreaseAction();
|
||||
|
@ -90,7 +90,7 @@ void* QAccessibleWidget_InterfaceCast(QAccessibleWidget* self, int t) {
|
||||
return self->interface_cast(static_cast<QAccessible::InterfaceType>(t));
|
||||
}
|
||||
|
||||
struct miqt_array* QAccessibleWidget_ActionNames(const QAccessibleWidget* self) {
|
||||
struct miqt_array QAccessibleWidget_ActionNames(const QAccessibleWidget* self) {
|
||||
QStringList _ret = self->actionNames();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
@ -104,9 +104,9 @@ struct miqt_array* QAccessibleWidget_ActionNames(const QAccessibleWidget* self)
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ void QAccessibleWidget_DoAction(QAccessibleWidget* self, struct miqt_string acti
|
||||
self->doAction(actionName_QString);
|
||||
}
|
||||
|
||||
struct miqt_array* QAccessibleWidget_KeyBindingsForAction(const QAccessibleWidget* self, struct miqt_string actionName) {
|
||||
struct miqt_array QAccessibleWidget_KeyBindingsForAction(const QAccessibleWidget* self, struct miqt_string actionName) {
|
||||
QString actionName_QString = QString::fromUtf8(actionName.data, actionName.len);
|
||||
QStringList _ret = self->keyBindingsForAction(actionName_QString);
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
@ -130,9 +130,9 @@ struct miqt_array* QAccessibleWidget_KeyBindingsForAction(const QAccessibleWidge
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ func (this *QAccessibleWidget) InterfaceCast(t QAccessible__InterfaceType) unsaf
|
||||
}
|
||||
|
||||
func (this *QAccessibleWidget) ActionNames() []string {
|
||||
var _ma *C.struct_miqt_array = C.QAccessibleWidget_ActionNames(this.h)
|
||||
var _ma C.struct_miqt_array = C.QAccessibleWidget_ActionNames(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -146,7 +146,6 @@ func (this *QAccessibleWidget) ActionNames() []string {
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
@ -163,7 +162,7 @@ func (this *QAccessibleWidget) KeyBindingsForAction(actionName string) []string
|
||||
actionName_ms.data = C.CString(actionName)
|
||||
actionName_ms.len = C.size_t(len(actionName))
|
||||
defer C.free(unsafe.Pointer(actionName_ms.data))
|
||||
var _ma *C.struct_miqt_array = C.QAccessibleWidget_KeyBindingsForAction(this.h, actionName_ms)
|
||||
var _ma C.struct_miqt_array = C.QAccessibleWidget_KeyBindingsForAction(this.h, actionName_ms)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -172,6 +171,5 @@ func (this *QAccessibleWidget) KeyBindingsForAction(actionName string) []string
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
@ -52,9 +52,9 @@ QAccessible__State* QAccessibleWidget_State(const QAccessibleWidget* self);
|
||||
QColor* QAccessibleWidget_ForegroundColor(const QAccessibleWidget* self);
|
||||
QColor* QAccessibleWidget_BackgroundColor(const QAccessibleWidget* self);
|
||||
void* QAccessibleWidget_InterfaceCast(QAccessibleWidget* self, int t);
|
||||
struct miqt_array* QAccessibleWidget_ActionNames(const QAccessibleWidget* self);
|
||||
struct miqt_array QAccessibleWidget_ActionNames(const QAccessibleWidget* self);
|
||||
void QAccessibleWidget_DoAction(QAccessibleWidget* self, struct miqt_string actionName);
|
||||
struct miqt_array* QAccessibleWidget_KeyBindingsForAction(const QAccessibleWidget* self, struct miqt_string actionName);
|
||||
struct miqt_array QAccessibleWidget_KeyBindingsForAction(const QAccessibleWidget* self, struct miqt_string actionName);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
|
@ -204,11 +204,11 @@ QKeySequence* QAction_Shortcut(const QAction* self) {
|
||||
return new QKeySequence(self->shortcut());
|
||||
}
|
||||
|
||||
void QAction_SetShortcuts(QAction* self, struct miqt_array* /* of QKeySequence* */ shortcuts) {
|
||||
void QAction_SetShortcuts(QAction* self, struct miqt_array /* of QKeySequence* */ shortcuts) {
|
||||
QList<QKeySequence> shortcuts_QList;
|
||||
shortcuts_QList.reserve(shortcuts->len);
|
||||
QKeySequence** shortcuts_arr = static_cast<QKeySequence**>(shortcuts->data);
|
||||
for(size_t i = 0; i < shortcuts->len; ++i) {
|
||||
shortcuts_QList.reserve(shortcuts.len);
|
||||
QKeySequence** shortcuts_arr = static_cast<QKeySequence**>(shortcuts.data);
|
||||
for(size_t i = 0; i < shortcuts.len; ++i) {
|
||||
shortcuts_QList.push_back(*(shortcuts_arr[i]));
|
||||
}
|
||||
self->setShortcuts(shortcuts_QList);
|
||||
@ -218,16 +218,16 @@ void QAction_SetShortcutsWithShortcuts(QAction* self, int shortcuts) {
|
||||
self->setShortcuts(static_cast<QKeySequence::StandardKey>(shortcuts));
|
||||
}
|
||||
|
||||
struct miqt_array* QAction_Shortcuts(const QAction* self) {
|
||||
struct miqt_array QAction_Shortcuts(const QAction* self) {
|
||||
QList<QKeySequence> _ret = self->shortcuts();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
QKeySequence** _arr = static_cast<QKeySequence**>(malloc(sizeof(QKeySequence*) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = new QKeySequence(_ret[i]);
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
@ -321,29 +321,29 @@ QWidget* QAction_ParentWidget(const QAction* self) {
|
||||
return self->parentWidget();
|
||||
}
|
||||
|
||||
struct miqt_array* QAction_AssociatedWidgets(const QAction* self) {
|
||||
struct miqt_array QAction_AssociatedWidgets(const QAction* self) {
|
||||
QList<QWidget *> _ret = self->associatedWidgets();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
QWidget** _arr = static_cast<QWidget**>(malloc(sizeof(QWidget*) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = _ret[i];
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
struct miqt_array* QAction_AssociatedGraphicsWidgets(const QAction* self) {
|
||||
struct miqt_array QAction_AssociatedGraphicsWidgets(const QAction* self) {
|
||||
QList<QGraphicsWidget *> _ret = self->associatedGraphicsWidgets();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
QGraphicsWidget** _arr = static_cast<QGraphicsWidget**>(malloc(sizeof(QGraphicsWidget*) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = _ret[i];
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -286,8 +286,7 @@ func (this *QAction) SetShortcuts(shortcuts []QKeySequence) {
|
||||
for i := range shortcuts {
|
||||
shortcuts_CArray[i] = shortcuts[i].cPointer()
|
||||
}
|
||||
shortcuts_ma := &C.struct_miqt_array{len: C.size_t(len(shortcuts)), data: unsafe.Pointer(shortcuts_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(shortcuts_ma))
|
||||
shortcuts_ma := C.struct_miqt_array{len: C.size_t(len(shortcuts)), data: unsafe.Pointer(shortcuts_CArray)}
|
||||
C.QAction_SetShortcuts(this.h, shortcuts_ma)
|
||||
}
|
||||
|
||||
@ -296,7 +295,7 @@ func (this *QAction) SetShortcutsWithShortcuts(shortcuts QKeySequence__StandardK
|
||||
}
|
||||
|
||||
func (this *QAction) Shortcuts() []QKeySequence {
|
||||
var _ma *C.struct_miqt_array = C.QAction_Shortcuts(this.h)
|
||||
var _ma C.struct_miqt_array = C.QAction_Shortcuts(this.h)
|
||||
_ret := make([]QKeySequence, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QKeySequence)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -305,7 +304,6 @@ func (this *QAction) Shortcuts() []QKeySequence {
|
||||
_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
_ret[i] = *_lv_goptr
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
@ -404,24 +402,22 @@ func (this *QAction) ParentWidget() *QWidget {
|
||||
}
|
||||
|
||||
func (this *QAction) AssociatedWidgets() []*QWidget {
|
||||
var _ma *C.struct_miqt_array = C.QAction_AssociatedWidgets(this.h)
|
||||
var _ma C.struct_miqt_array = C.QAction_AssociatedWidgets(this.h)
|
||||
_ret := make([]*QWidget, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QWidget)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = UnsafeNewQWidget(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QAction) AssociatedGraphicsWidgets() []*QGraphicsWidget {
|
||||
var _ma *C.struct_miqt_array = C.QAction_AssociatedGraphicsWidgets(this.h)
|
||||
var _ma C.struct_miqt_array = C.QAction_AssociatedGraphicsWidgets(this.h)
|
||||
_ret := make([]*QGraphicsWidget, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QGraphicsWidget)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = UnsafeNewQGraphicsWidget(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -71,9 +71,9 @@ void QAction_SetSeparator(QAction* self, bool b);
|
||||
bool QAction_IsSeparator(const QAction* self);
|
||||
void QAction_SetShortcut(QAction* self, QKeySequence* shortcut);
|
||||
QKeySequence* QAction_Shortcut(const QAction* self);
|
||||
void QAction_SetShortcuts(QAction* self, struct miqt_array* /* of QKeySequence* */ shortcuts);
|
||||
void QAction_SetShortcuts(QAction* self, struct miqt_array /* of QKeySequence* */ shortcuts);
|
||||
void QAction_SetShortcutsWithShortcuts(QAction* self, int shortcuts);
|
||||
struct miqt_array* QAction_Shortcuts(const QAction* self);
|
||||
struct miqt_array QAction_Shortcuts(const QAction* self);
|
||||
void QAction_SetShortcutContext(QAction* self, int context);
|
||||
int QAction_ShortcutContext(const QAction* self);
|
||||
void QAction_SetAutoRepeat(QAction* self, bool autoRepeat);
|
||||
@ -96,8 +96,8 @@ bool QAction_IsIconVisibleInMenu(const QAction* self);
|
||||
void QAction_SetShortcutVisibleInContextMenu(QAction* self, bool show);
|
||||
bool QAction_IsShortcutVisibleInContextMenu(const QAction* self);
|
||||
QWidget* QAction_ParentWidget(const QAction* self);
|
||||
struct miqt_array* QAction_AssociatedWidgets(const QAction* self);
|
||||
struct miqt_array* QAction_AssociatedGraphicsWidgets(const QAction* self);
|
||||
struct miqt_array QAction_AssociatedWidgets(const QAction* self);
|
||||
struct miqt_array QAction_AssociatedGraphicsWidgets(const QAction* self);
|
||||
void QAction_Trigger(QAction* self);
|
||||
void QAction_Hover(QAction* self);
|
||||
void QAction_SetChecked(QAction* self, bool checked);
|
||||
|
@ -63,16 +63,16 @@ void QActionGroup_RemoveAction(QActionGroup* self, QAction* a) {
|
||||
self->removeAction(a);
|
||||
}
|
||||
|
||||
struct miqt_array* QActionGroup_Actions(const QActionGroup* self) {
|
||||
struct miqt_array QActionGroup_Actions(const QActionGroup* self) {
|
||||
QList<QAction *> _ret = self->actions();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
QAction** _arr = static_cast<QAction**>(malloc(sizeof(QAction*) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = _ret[i];
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -111,13 +111,12 @@ func (this *QActionGroup) RemoveAction(a *QAction) {
|
||||
}
|
||||
|
||||
func (this *QActionGroup) Actions() []*QAction {
|
||||
var _ma *C.struct_miqt_array = C.QActionGroup_Actions(this.h)
|
||||
var _ma C.struct_miqt_array = C.QActionGroup_Actions(this.h)
|
||||
_ret := make([]*QAction, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QAction)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = UnsafeNewQAction(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ QAction* QActionGroup_AddAction(QActionGroup* self, QAction* a);
|
||||
QAction* QActionGroup_AddActionWithText(QActionGroup* self, struct miqt_string text);
|
||||
QAction* QActionGroup_AddAction2(QActionGroup* self, QIcon* icon, struct miqt_string text);
|
||||
void QActionGroup_RemoveAction(QActionGroup* self, QAction* a);
|
||||
struct miqt_array* QActionGroup_Actions(const QActionGroup* self);
|
||||
struct miqt_array QActionGroup_Actions(const QActionGroup* self);
|
||||
QAction* QActionGroup_CheckedAction(const QActionGroup* self);
|
||||
bool QActionGroup_IsExclusive(const QActionGroup* self);
|
||||
bool QActionGroup_IsEnabled(const QActionGroup* self);
|
||||
|
@ -118,29 +118,29 @@ QIcon* QApplication_WindowIcon() {
|
||||
return new QIcon(QApplication::windowIcon());
|
||||
}
|
||||
|
||||
struct miqt_array* QApplication_AllWidgets() {
|
||||
struct miqt_array QApplication_AllWidgets() {
|
||||
QWidgetList _ret = QApplication::allWidgets();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
QWidget** _arr = static_cast<QWidget**>(malloc(sizeof(QWidget*) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = _ret[i];
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
struct miqt_array* QApplication_TopLevelWidgets() {
|
||||
struct miqt_array QApplication_TopLevelWidgets() {
|
||||
QWidgetList _ret = QApplication::topLevelWidgets();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
QWidget** _arr = static_cast<QWidget**>(malloc(sizeof(QWidget*) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = _ret[i];
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -196,24 +196,22 @@ func QApplication_WindowIcon() *QIcon {
|
||||
}
|
||||
|
||||
func QApplication_AllWidgets() []*QWidget {
|
||||
var _ma *C.struct_miqt_array = C.QApplication_AllWidgets()
|
||||
var _ma C.struct_miqt_array = C.QApplication_AllWidgets()
|
||||
_ret := make([]*QWidget, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QWidget)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = UnsafeNewQWidget(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QApplication_TopLevelWidgets() []*QWidget {
|
||||
var _ma *C.struct_miqt_array = C.QApplication_TopLevelWidgets()
|
||||
var _ma C.struct_miqt_array = C.QApplication_TopLevelWidgets()
|
||||
_ret := make([]*QWidget, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QWidget)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = UnsafeNewQWidget(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -64,8 +64,8 @@ void QApplication_SetFont(QFont* param1);
|
||||
QFontMetrics* QApplication_FontMetrics();
|
||||
void QApplication_SetWindowIcon(QIcon* icon);
|
||||
QIcon* QApplication_WindowIcon();
|
||||
struct miqt_array* QApplication_AllWidgets();
|
||||
struct miqt_array* QApplication_TopLevelWidgets();
|
||||
struct miqt_array QApplication_AllWidgets();
|
||||
struct miqt_array QApplication_TopLevelWidgets();
|
||||
QDesktopWidget* QApplication_Desktop();
|
||||
QWidget* QApplication_ActivePopupWidget();
|
||||
QWidget* QApplication_ActiveModalWidget();
|
||||
|
@ -64,16 +64,16 @@ void QButtonGroup_RemoveButton(QButtonGroup* self, QAbstractButton* param1) {
|
||||
self->removeButton(param1);
|
||||
}
|
||||
|
||||
struct miqt_array* QButtonGroup_Buttons(const QButtonGroup* self) {
|
||||
struct miqt_array QButtonGroup_Buttons(const QButtonGroup* self) {
|
||||
QList<QAbstractButton *> _ret = self->buttons();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
QAbstractButton** _arr = static_cast<QAbstractButton**>(malloc(sizeof(QAbstractButton*) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = _ret[i];
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -101,13 +101,12 @@ func (this *QButtonGroup) RemoveButton(param1 *QAbstractButton) {
|
||||
}
|
||||
|
||||
func (this *QButtonGroup) Buttons() []*QAbstractButton {
|
||||
var _ma *C.struct_miqt_array = C.QButtonGroup_Buttons(this.h)
|
||||
var _ma C.struct_miqt_array = C.QButtonGroup_Buttons(this.h)
|
||||
_ret := make([]*QAbstractButton, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QAbstractButton)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = UnsafeNewQAbstractButton(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ void QButtonGroup_SetExclusive(QButtonGroup* self, bool exclusive);
|
||||
bool QButtonGroup_Exclusive(const QButtonGroup* self);
|
||||
void QButtonGroup_AddButton(QButtonGroup* self, QAbstractButton* param1);
|
||||
void QButtonGroup_RemoveButton(QButtonGroup* self, QAbstractButton* param1);
|
||||
struct miqt_array* QButtonGroup_Buttons(const QButtonGroup* self);
|
||||
struct miqt_array QButtonGroup_Buttons(const QButtonGroup* self);
|
||||
QAbstractButton* QButtonGroup_CheckedButton(const QButtonGroup* self);
|
||||
QAbstractButton* QButtonGroup_Button(const QButtonGroup* self, int id);
|
||||
void QButtonGroup_SetId(QButtonGroup* self, QAbstractButton* button, int id);
|
||||
|
@ -149,7 +149,7 @@ struct miqt_string QCalendar_StandaloneWeekDayName(const QCalendar* self, QLocal
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_array* QCalendar_AvailableCalendars() {
|
||||
struct miqt_array QCalendar_AvailableCalendars() {
|
||||
QStringList _ret = QCalendar::availableCalendars();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
@ -163,9 +163,9 @@ struct miqt_array* QCalendar_AvailableCalendars() {
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -193,7 +193,7 @@ func (this *QCalendar) StandaloneWeekDayName(locale *QLocale, day int) string {
|
||||
}
|
||||
|
||||
func QCalendar_AvailableCalendars() []string {
|
||||
var _ma *C.struct_miqt_array = C.QCalendar_AvailableCalendars()
|
||||
var _ma C.struct_miqt_array = C.QCalendar_AvailableCalendars()
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -202,7 +202,6 @@ func QCalendar_AvailableCalendars() []string {
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ struct miqt_string QCalendar_MonthName(const QCalendar* self, QLocale* locale, i
|
||||
struct miqt_string QCalendar_StandaloneMonthName(const QCalendar* self, QLocale* locale, int month);
|
||||
struct miqt_string QCalendar_WeekDayName(const QCalendar* self, QLocale* locale, int day);
|
||||
struct miqt_string QCalendar_StandaloneWeekDayName(const QCalendar* self, QLocale* locale, int day);
|
||||
struct miqt_array* QCalendar_AvailableCalendars();
|
||||
struct miqt_array QCalendar_AvailableCalendars();
|
||||
int QCalendar_DaysInMonth2(const QCalendar* self, int month, int year);
|
||||
struct miqt_string QCalendar_MonthName3(const QCalendar* self, QLocale* locale, int month, int year);
|
||||
struct miqt_string QCalendar_MonthName4(const QCalendar* self, QLocale* locale, int month, int year, int format);
|
||||
|
@ -221,11 +221,11 @@ QCborArray* QCborArray_OperatorShiftLeft(QCborArray* self, QCborValue* v) {
|
||||
return &_ret;
|
||||
}
|
||||
|
||||
QCborArray* QCborArray_FromStringList(struct miqt_array* /* of struct miqt_string */ list) {
|
||||
QCborArray* QCborArray_FromStringList(struct miqt_array /* of struct miqt_string */ list) {
|
||||
QStringList list_QList;
|
||||
list_QList.reserve(list->len);
|
||||
struct miqt_string* list_arr = static_cast<struct miqt_string*>(list->data);
|
||||
for(size_t i = 0; i < list->len; ++i) {
|
||||
list_QList.reserve(list.len);
|
||||
struct miqt_string* list_arr = static_cast<struct miqt_string*>(list.data);
|
||||
for(size_t i = 0; i < list.len; ++i) {
|
||||
QString list_arr_i_QString = QString::fromUtf8(list_arr[i].data, list_arr[i].len);
|
||||
list_QList.push_back(list_arr_i_QString);
|
||||
}
|
||||
|
@ -338,8 +338,7 @@ func QCborArray_FromStringList(list []string) *QCborArray {
|
||||
defer C.free(unsafe.Pointer(list_i_ms.data))
|
||||
list_CArray[i] = list_i_ms
|
||||
}
|
||||
list_ma := &C.struct_miqt_array{len: C.size_t(len(list)), data: unsafe.Pointer(list_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(list_ma))
|
||||
list_ma := C.struct_miqt_array{len: C.size_t(len(list)), data: unsafe.Pointer(list_CArray)}
|
||||
_ret := C.QCborArray_FromStringList(list_ma)
|
||||
_goptr := newQCborArray(_ret)
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
|
@ -88,7 +88,7 @@ bool QCborArray_Empty(const QCborArray* self);
|
||||
QCborArray* QCborArray_OperatorPlus(const QCborArray* self, QCborValue* v);
|
||||
QCborArray* QCborArray_OperatorPlusAssign(QCborArray* self, QCborValue* v);
|
||||
QCborArray* QCborArray_OperatorShiftLeft(QCborArray* self, QCborValue* v);
|
||||
QCborArray* QCborArray_FromStringList(struct miqt_array* /* of struct miqt_string */ list);
|
||||
QCborArray* QCborArray_FromStringList(struct miqt_array /* of struct miqt_string */ list);
|
||||
QCborArray* QCborArray_FromJsonArray(QJsonArray* array);
|
||||
QJsonArray* QCborArray_ToJsonArray(const QCborArray* self);
|
||||
void QCborArray_Delete(QCborArray* self);
|
||||
|
@ -45,16 +45,16 @@ void QCborMap_Clear(QCborMap* self) {
|
||||
self->clear();
|
||||
}
|
||||
|
||||
struct miqt_array* QCborMap_Keys(const QCborMap* self) {
|
||||
struct miqt_array QCborMap_Keys(const QCborMap* self) {
|
||||
QVector<QCborValue> _ret = self->keys();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
QCborValue** _arr = static_cast<QCborValue**>(malloc(sizeof(QCborValue*) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = new QCborValue(_ret[i]);
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ func (this *QCborMap) Clear() {
|
||||
}
|
||||
|
||||
func (this *QCborMap) Keys() []QCborValue {
|
||||
var _ma *C.struct_miqt_array = C.QCborMap_Keys(this.h)
|
||||
var _ma C.struct_miqt_array = C.QCborMap_Keys(this.h)
|
||||
_ret := make([]QCborValue, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QCborValue)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -91,7 +91,6 @@ func (this *QCborMap) Keys() []QCborValue {
|
||||
_vv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
_ret[i] = *_vv_goptr
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ QCborValue* QCborMap_ToCborValue(const QCborMap* self);
|
||||
ptrdiff_t QCborMap_Size(const QCborMap* self);
|
||||
bool QCborMap_IsEmpty(const QCborMap* self);
|
||||
void QCborMap_Clear(QCborMap* self);
|
||||
struct miqt_array* QCborMap_Keys(const QCborMap* self);
|
||||
struct miqt_array QCborMap_Keys(const QCborMap* self);
|
||||
QCborValue* QCborMap_Value(const QCborMap* self, long long key);
|
||||
QCborValue* QCborMap_Value2(const QCborMap* self, struct miqt_string key);
|
||||
QCborValue* QCborMap_Value3(const QCborMap* self, QCborValue* key);
|
||||
|
@ -96,7 +96,7 @@ void QColor_SetNamedColor(QColor* self, struct miqt_string name) {
|
||||
self->setNamedColor(name_QString);
|
||||
}
|
||||
|
||||
struct miqt_array* QColor_ColorNames() {
|
||||
struct miqt_array QColor_ColorNames() {
|
||||
QStringList _ret = QColor::colorNames();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
@ -110,9 +110,9 @@ struct miqt_array* QColor_ColorNames() {
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -173,7 +173,7 @@ func (this *QColor) SetNamedColor(name string) {
|
||||
}
|
||||
|
||||
func QColor_ColorNames() []string {
|
||||
var _ma *C.struct_miqt_array = C.QColor_ColorNames()
|
||||
var _ma C.struct_miqt_array = C.QColor_ColorNames()
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -182,7 +182,6 @@ func QColor_ColorNames() []string {
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ bool QColor_IsValid(const QColor* self);
|
||||
struct miqt_string QColor_Name(const QColor* self);
|
||||
struct miqt_string QColor_NameWithFormat(const QColor* self, int format);
|
||||
void QColor_SetNamedColor(QColor* self, struct miqt_string name);
|
||||
struct miqt_array* QColor_ColorNames();
|
||||
struct miqt_array QColor_ColorNames();
|
||||
int QColor_Spec(const QColor* self);
|
||||
int QColor_Alpha(const QColor* self);
|
||||
void QColor_SetAlpha(QColor* self, int alpha);
|
||||
|
@ -47,16 +47,16 @@ QColor* QColormap_ColorAt(const QColormap* self, unsigned int pixel) {
|
||||
return new QColor(self->colorAt(static_cast<uint>(pixel)));
|
||||
}
|
||||
|
||||
struct miqt_array* QColormap_Colormap(const QColormap* self) {
|
||||
struct miqt_array QColormap_Colormap(const QColormap* self) {
|
||||
const QVector<QColor> _ret = self->colormap();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
QColor** _arr = static_cast<QColor**>(malloc(sizeof(QColor*) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = new QColor(_ret[i]);
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,7 @@ func (this *QColormap) ColorAt(pixel uint) *QColor {
|
||||
}
|
||||
|
||||
func (this *QColormap) Colormap() []QColor {
|
||||
var _ma *C.struct_miqt_array = C.QColormap_Colormap(this.h)
|
||||
var _ma C.struct_miqt_array = C.QColormap_Colormap(this.h)
|
||||
_ret := make([]QColor, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QColor)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -108,7 +108,6 @@ func (this *QColormap) Colormap() []QColor {
|
||||
_vv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
_ret[i] = *_vv_goptr
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ int QColormap_Depth(const QColormap* self);
|
||||
int QColormap_Size(const QColormap* self);
|
||||
unsigned int QColormap_Pixel(const QColormap* self, QColor* color);
|
||||
QColor* QColormap_ColorAt(const QColormap* self, unsigned int pixel);
|
||||
struct miqt_array* QColormap_Colormap(const QColormap* self);
|
||||
struct miqt_array QColormap_Colormap(const QColormap* self);
|
||||
QColormap* QColormap_Instance1(int screen);
|
||||
void QColormap_Delete(QColormap* self);
|
||||
|
||||
|
@ -114,26 +114,26 @@ void QColumnView_SetPreviewWidget(QColumnView* self, QWidget* widget) {
|
||||
self->setPreviewWidget(widget);
|
||||
}
|
||||
|
||||
void QColumnView_SetColumnWidths(QColumnView* self, struct miqt_array* /* of int */ list) {
|
||||
void QColumnView_SetColumnWidths(QColumnView* self, struct miqt_array /* of int */ list) {
|
||||
QList<int> list_QList;
|
||||
list_QList.reserve(list->len);
|
||||
int* list_arr = static_cast<int*>(list->data);
|
||||
for(size_t i = 0; i < list->len; ++i) {
|
||||
list_QList.reserve(list.len);
|
||||
int* list_arr = static_cast<int*>(list.data);
|
||||
for(size_t i = 0; i < list.len; ++i) {
|
||||
list_QList.push_back(static_cast<int>(list_arr[i]));
|
||||
}
|
||||
self->setColumnWidths(list_QList);
|
||||
}
|
||||
|
||||
struct miqt_array* QColumnView_ColumnWidths(const QColumnView* self) {
|
||||
struct miqt_array QColumnView_ColumnWidths(const QColumnView* self) {
|
||||
QList<int> _ret = self->columnWidths();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
int* _arr = static_cast<int*>(malloc(sizeof(int) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = _ret[i];
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -167,19 +167,17 @@ func (this *QColumnView) SetColumnWidths(list []int) {
|
||||
for i := range list {
|
||||
list_CArray[i] = (C.int)(list[i])
|
||||
}
|
||||
list_ma := &C.struct_miqt_array{len: C.size_t(len(list)), data: unsafe.Pointer(list_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(list_ma))
|
||||
list_ma := C.struct_miqt_array{len: C.size_t(len(list)), data: unsafe.Pointer(list_CArray)}
|
||||
C.QColumnView_SetColumnWidths(this.h, list_ma)
|
||||
}
|
||||
|
||||
func (this *QColumnView) ColumnWidths() []int {
|
||||
var _ma *C.struct_miqt_array = C.QColumnView_ColumnWidths(this.h)
|
||||
var _ma C.struct_miqt_array = C.QColumnView_ColumnWidths(this.h)
|
||||
_ret := make([]int, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.int)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = (int)(_outCast[i])
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -55,8 +55,8 @@ void QColumnView_SetResizeGripsVisible(QColumnView* self, bool visible);
|
||||
bool QColumnView_ResizeGripsVisible(const QColumnView* self);
|
||||
QWidget* QColumnView_PreviewWidget(const QColumnView* self);
|
||||
void QColumnView_SetPreviewWidget(QColumnView* self, QWidget* widget);
|
||||
void QColumnView_SetColumnWidths(QColumnView* self, struct miqt_array* /* of int */ list);
|
||||
struct miqt_array* QColumnView_ColumnWidths(const QColumnView* self);
|
||||
void QColumnView_SetColumnWidths(QColumnView* self, struct miqt_array /* of int */ list);
|
||||
struct miqt_array QColumnView_ColumnWidths(const QColumnView* self);
|
||||
struct miqt_string QColumnView_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QColumnView_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QColumnView_TrUtf82(const char* s, const char* c);
|
||||
|
@ -282,11 +282,11 @@ void QComboBox_AddItem2(QComboBox* self, QIcon* icon, struct miqt_string text) {
|
||||
self->addItem(*icon, text_QString);
|
||||
}
|
||||
|
||||
void QComboBox_AddItems(QComboBox* self, struct miqt_array* /* of struct miqt_string */ texts) {
|
||||
void QComboBox_AddItems(QComboBox* self, struct miqt_array /* of struct miqt_string */ texts) {
|
||||
QStringList texts_QList;
|
||||
texts_QList.reserve(texts->len);
|
||||
struct miqt_string* texts_arr = static_cast<struct miqt_string*>(texts->data);
|
||||
for(size_t i = 0; i < texts->len; ++i) {
|
||||
texts_QList.reserve(texts.len);
|
||||
struct miqt_string* texts_arr = static_cast<struct miqt_string*>(texts.data);
|
||||
for(size_t i = 0; i < texts.len; ++i) {
|
||||
QString texts_arr_i_QString = QString::fromUtf8(texts_arr[i].data, texts_arr[i].len);
|
||||
texts_QList.push_back(texts_arr_i_QString);
|
||||
}
|
||||
@ -303,11 +303,11 @@ void QComboBox_InsertItem2(QComboBox* self, int index, QIcon* icon, struct miqt_
|
||||
self->insertItem(static_cast<int>(index), *icon, text_QString);
|
||||
}
|
||||
|
||||
void QComboBox_InsertItems(QComboBox* self, int index, struct miqt_array* /* of struct miqt_string */ texts) {
|
||||
void QComboBox_InsertItems(QComboBox* self, int index, struct miqt_array /* of struct miqt_string */ texts) {
|
||||
QStringList texts_QList;
|
||||
texts_QList.reserve(texts->len);
|
||||
struct miqt_string* texts_arr = static_cast<struct miqt_string*>(texts->data);
|
||||
for(size_t i = 0; i < texts->len; ++i) {
|
||||
texts_QList.reserve(texts.len);
|
||||
struct miqt_string* texts_arr = static_cast<struct miqt_string*>(texts.data);
|
||||
for(size_t i = 0; i < texts.len; ++i) {
|
||||
QString texts_arr_i_QString = QString::fromUtf8(texts_arr[i].data, texts_arr[i].len);
|
||||
texts_QList.push_back(texts_arr_i_QString);
|
||||
}
|
||||
|
@ -351,8 +351,7 @@ func (this *QComboBox) AddItems(texts []string) {
|
||||
defer C.free(unsafe.Pointer(texts_i_ms.data))
|
||||
texts_CArray[i] = texts_i_ms
|
||||
}
|
||||
texts_ma := &C.struct_miqt_array{len: C.size_t(len(texts)), data: unsafe.Pointer(texts_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(texts_ma))
|
||||
texts_ma := C.struct_miqt_array{len: C.size_t(len(texts)), data: unsafe.Pointer(texts_CArray)}
|
||||
C.QComboBox_AddItems(this.h, texts_ma)
|
||||
}
|
||||
|
||||
@ -382,8 +381,7 @@ func (this *QComboBox) InsertItems(index int, texts []string) {
|
||||
defer C.free(unsafe.Pointer(texts_i_ms.data))
|
||||
texts_CArray[i] = texts_i_ms
|
||||
}
|
||||
texts_ma := &C.struct_miqt_array{len: C.size_t(len(texts)), data: unsafe.Pointer(texts_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(texts_ma))
|
||||
texts_ma := C.struct_miqt_array{len: C.size_t(len(texts)), data: unsafe.Pointer(texts_CArray)}
|
||||
C.QComboBox_InsertItems(this.h, (C.int)(index), texts_ma)
|
||||
}
|
||||
|
||||
|
@ -100,10 +100,10 @@ QIcon* QComboBox_ItemIcon(const QComboBox* self, int index);
|
||||
QVariant* QComboBox_ItemData(const QComboBox* self, int index);
|
||||
void QComboBox_AddItem(QComboBox* self, struct miqt_string text);
|
||||
void QComboBox_AddItem2(QComboBox* self, QIcon* icon, struct miqt_string text);
|
||||
void QComboBox_AddItems(QComboBox* self, struct miqt_array* /* of struct miqt_string */ texts);
|
||||
void QComboBox_AddItems(QComboBox* self, struct miqt_array /* of struct miqt_string */ texts);
|
||||
void QComboBox_InsertItem(QComboBox* self, int index, struct miqt_string text);
|
||||
void QComboBox_InsertItem2(QComboBox* self, int index, QIcon* icon, struct miqt_string text);
|
||||
void QComboBox_InsertItems(QComboBox* self, int index, struct miqt_array* /* of struct miqt_string */ texts);
|
||||
void QComboBox_InsertItems(QComboBox* self, int index, struct miqt_array /* of struct miqt_string */ texts);
|
||||
void QComboBox_InsertSeparator(QComboBox* self, int index);
|
||||
void QComboBox_RemoveItem(QComboBox* self, int index);
|
||||
void QComboBox_SetItemText(QComboBox* self, int index, struct miqt_string text);
|
||||
|
@ -12,11 +12,11 @@ QCommandLineOption* QCommandLineOption_new(struct miqt_string name) {
|
||||
return new QCommandLineOption(name_QString);
|
||||
}
|
||||
|
||||
QCommandLineOption* QCommandLineOption_new2(struct miqt_array* /* of struct miqt_string */ names) {
|
||||
QCommandLineOption* QCommandLineOption_new2(struct miqt_array /* of struct miqt_string */ names) {
|
||||
QStringList names_QList;
|
||||
names_QList.reserve(names->len);
|
||||
struct miqt_string* names_arr = static_cast<struct miqt_string*>(names->data);
|
||||
for(size_t i = 0; i < names->len; ++i) {
|
||||
names_QList.reserve(names.len);
|
||||
struct miqt_string* names_arr = static_cast<struct miqt_string*>(names.data);
|
||||
for(size_t i = 0; i < names.len; ++i) {
|
||||
QString names_arr_i_QString = QString::fromUtf8(names_arr[i].data, names_arr[i].len);
|
||||
names_QList.push_back(names_arr_i_QString);
|
||||
}
|
||||
@ -29,11 +29,11 @@ QCommandLineOption* QCommandLineOption_new3(struct miqt_string name, struct miqt
|
||||
return new QCommandLineOption(name_QString, description_QString);
|
||||
}
|
||||
|
||||
QCommandLineOption* QCommandLineOption_new4(struct miqt_array* /* of struct miqt_string */ names, struct miqt_string description) {
|
||||
QCommandLineOption* QCommandLineOption_new4(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description) {
|
||||
QStringList names_QList;
|
||||
names_QList.reserve(names->len);
|
||||
struct miqt_string* names_arr = static_cast<struct miqt_string*>(names->data);
|
||||
for(size_t i = 0; i < names->len; ++i) {
|
||||
names_QList.reserve(names.len);
|
||||
struct miqt_string* names_arr = static_cast<struct miqt_string*>(names.data);
|
||||
for(size_t i = 0; i < names.len; ++i) {
|
||||
QString names_arr_i_QString = QString::fromUtf8(names_arr[i].data, names_arr[i].len);
|
||||
names_QList.push_back(names_arr_i_QString);
|
||||
}
|
||||
@ -60,11 +60,11 @@ QCommandLineOption* QCommandLineOption_new7(struct miqt_string name, struct miqt
|
||||
return new QCommandLineOption(name_QString, description_QString, valueName_QString, defaultValue_QString);
|
||||
}
|
||||
|
||||
QCommandLineOption* QCommandLineOption_new8(struct miqt_array* /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName) {
|
||||
QCommandLineOption* QCommandLineOption_new8(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName) {
|
||||
QStringList names_QList;
|
||||
names_QList.reserve(names->len);
|
||||
struct miqt_string* names_arr = static_cast<struct miqt_string*>(names->data);
|
||||
for(size_t i = 0; i < names->len; ++i) {
|
||||
names_QList.reserve(names.len);
|
||||
struct miqt_string* names_arr = static_cast<struct miqt_string*>(names.data);
|
||||
for(size_t i = 0; i < names.len; ++i) {
|
||||
QString names_arr_i_QString = QString::fromUtf8(names_arr[i].data, names_arr[i].len);
|
||||
names_QList.push_back(names_arr_i_QString);
|
||||
}
|
||||
@ -73,11 +73,11 @@ QCommandLineOption* QCommandLineOption_new8(struct miqt_array* /* of struct miqt
|
||||
return new QCommandLineOption(names_QList, description_QString, valueName_QString);
|
||||
}
|
||||
|
||||
QCommandLineOption* QCommandLineOption_new9(struct miqt_array* /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue) {
|
||||
QCommandLineOption* QCommandLineOption_new9(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue) {
|
||||
QStringList names_QList;
|
||||
names_QList.reserve(names->len);
|
||||
struct miqt_string* names_arr = static_cast<struct miqt_string*>(names->data);
|
||||
for(size_t i = 0; i < names->len; ++i) {
|
||||
names_QList.reserve(names.len);
|
||||
struct miqt_string* names_arr = static_cast<struct miqt_string*>(names.data);
|
||||
for(size_t i = 0; i < names.len; ++i) {
|
||||
QString names_arr_i_QString = QString::fromUtf8(names_arr[i].data, names_arr[i].len);
|
||||
names_QList.push_back(names_arr_i_QString);
|
||||
}
|
||||
@ -95,7 +95,7 @@ void QCommandLineOption_Swap(QCommandLineOption* self, QCommandLineOption* other
|
||||
self->swap(*other);
|
||||
}
|
||||
|
||||
struct miqt_array* QCommandLineOption_Names(const QCommandLineOption* self) {
|
||||
struct miqt_array QCommandLineOption_Names(const QCommandLineOption* self) {
|
||||
QStringList _ret = self->names();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
@ -109,9 +109,9 @@ struct miqt_array* QCommandLineOption_Names(const QCommandLineOption* self) {
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
@ -152,18 +152,18 @@ void QCommandLineOption_SetDefaultValue(QCommandLineOption* self, struct miqt_st
|
||||
self->setDefaultValue(defaultValue_QString);
|
||||
}
|
||||
|
||||
void QCommandLineOption_SetDefaultValues(QCommandLineOption* self, struct miqt_array* /* of struct miqt_string */ defaultValues) {
|
||||
void QCommandLineOption_SetDefaultValues(QCommandLineOption* self, struct miqt_array /* of struct miqt_string */ defaultValues) {
|
||||
QStringList defaultValues_QList;
|
||||
defaultValues_QList.reserve(defaultValues->len);
|
||||
struct miqt_string* defaultValues_arr = static_cast<struct miqt_string*>(defaultValues->data);
|
||||
for(size_t i = 0; i < defaultValues->len; ++i) {
|
||||
defaultValues_QList.reserve(defaultValues.len);
|
||||
struct miqt_string* defaultValues_arr = static_cast<struct miqt_string*>(defaultValues.data);
|
||||
for(size_t i = 0; i < defaultValues.len; ++i) {
|
||||
QString defaultValues_arr_i_QString = QString::fromUtf8(defaultValues_arr[i].data, defaultValues_arr[i].len);
|
||||
defaultValues_QList.push_back(defaultValues_arr_i_QString);
|
||||
}
|
||||
self->setDefaultValues(defaultValues_QList);
|
||||
}
|
||||
|
||||
struct miqt_array* QCommandLineOption_DefaultValues(const QCommandLineOption* self) {
|
||||
struct miqt_array QCommandLineOption_DefaultValues(const QCommandLineOption* self) {
|
||||
QStringList _ret = self->defaultValues();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
@ -177,9 +177,9 @@ struct miqt_array* QCommandLineOption_DefaultValues(const QCommandLineOption* se
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -70,8 +70,7 @@ func NewQCommandLineOption2(names []string) *QCommandLineOption {
|
||||
defer C.free(unsafe.Pointer(names_i_ms.data))
|
||||
names_CArray[i] = names_i_ms
|
||||
}
|
||||
names_ma := &C.struct_miqt_array{len: C.size_t(len(names)), data: unsafe.Pointer(names_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(names_ma))
|
||||
names_ma := C.struct_miqt_array{len: C.size_t(len(names)), data: unsafe.Pointer(names_CArray)}
|
||||
ret := C.QCommandLineOption_new2(names_ma)
|
||||
return newQCommandLineOption(ret)
|
||||
}
|
||||
@ -101,8 +100,7 @@ func NewQCommandLineOption4(names []string, description string) *QCommandLineOpt
|
||||
defer C.free(unsafe.Pointer(names_i_ms.data))
|
||||
names_CArray[i] = names_i_ms
|
||||
}
|
||||
names_ma := &C.struct_miqt_array{len: C.size_t(len(names)), data: unsafe.Pointer(names_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(names_ma))
|
||||
names_ma := C.struct_miqt_array{len: C.size_t(len(names)), data: unsafe.Pointer(names_CArray)}
|
||||
description_ms := C.struct_miqt_string{}
|
||||
description_ms.data = C.CString(description)
|
||||
description_ms.len = C.size_t(len(description))
|
||||
@ -168,8 +166,7 @@ func NewQCommandLineOption8(names []string, description string, valueName string
|
||||
defer C.free(unsafe.Pointer(names_i_ms.data))
|
||||
names_CArray[i] = names_i_ms
|
||||
}
|
||||
names_ma := &C.struct_miqt_array{len: C.size_t(len(names)), data: unsafe.Pointer(names_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(names_ma))
|
||||
names_ma := C.struct_miqt_array{len: C.size_t(len(names)), data: unsafe.Pointer(names_CArray)}
|
||||
description_ms := C.struct_miqt_string{}
|
||||
description_ms.data = C.CString(description)
|
||||
description_ms.len = C.size_t(len(description))
|
||||
@ -193,8 +190,7 @@ func NewQCommandLineOption9(names []string, description string, valueName string
|
||||
defer C.free(unsafe.Pointer(names_i_ms.data))
|
||||
names_CArray[i] = names_i_ms
|
||||
}
|
||||
names_ma := &C.struct_miqt_array{len: C.size_t(len(names)), data: unsafe.Pointer(names_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(names_ma))
|
||||
names_ma := C.struct_miqt_array{len: C.size_t(len(names)), data: unsafe.Pointer(names_CArray)}
|
||||
description_ms := C.struct_miqt_string{}
|
||||
description_ms.data = C.CString(description)
|
||||
description_ms.len = C.size_t(len(description))
|
||||
@ -220,7 +216,7 @@ func (this *QCommandLineOption) Swap(other *QCommandLineOption) {
|
||||
}
|
||||
|
||||
func (this *QCommandLineOption) Names() []string {
|
||||
var _ma *C.struct_miqt_array = C.QCommandLineOption_Names(this.h)
|
||||
var _ma C.struct_miqt_array = C.QCommandLineOption_Names(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -229,7 +225,6 @@ func (this *QCommandLineOption) Names() []string {
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
@ -281,13 +276,12 @@ func (this *QCommandLineOption) SetDefaultValues(defaultValues []string) {
|
||||
defer C.free(unsafe.Pointer(defaultValues_i_ms.data))
|
||||
defaultValues_CArray[i] = defaultValues_i_ms
|
||||
}
|
||||
defaultValues_ma := &C.struct_miqt_array{len: C.size_t(len(defaultValues)), data: unsafe.Pointer(defaultValues_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(defaultValues_ma))
|
||||
defaultValues_ma := C.struct_miqt_array{len: C.size_t(len(defaultValues)), data: unsafe.Pointer(defaultValues_CArray)}
|
||||
C.QCommandLineOption_SetDefaultValues(this.h, defaultValues_ma)
|
||||
}
|
||||
|
||||
func (this *QCommandLineOption) DefaultValues() []string {
|
||||
var _ma *C.struct_miqt_array = C.QCommandLineOption_DefaultValues(this.h)
|
||||
var _ma C.struct_miqt_array = C.QCommandLineOption_DefaultValues(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -296,7 +290,6 @@ func (this *QCommandLineOption) DefaultValues() []string {
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -20,24 +20,24 @@ typedef struct QCommandLineOption QCommandLineOption;
|
||||
#endif
|
||||
|
||||
QCommandLineOption* QCommandLineOption_new(struct miqt_string name);
|
||||
QCommandLineOption* QCommandLineOption_new2(struct miqt_array* /* of struct miqt_string */ names);
|
||||
QCommandLineOption* QCommandLineOption_new2(struct miqt_array /* of struct miqt_string */ names);
|
||||
QCommandLineOption* QCommandLineOption_new3(struct miqt_string name, struct miqt_string description);
|
||||
QCommandLineOption* QCommandLineOption_new4(struct miqt_array* /* of struct miqt_string */ names, struct miqt_string description);
|
||||
QCommandLineOption* QCommandLineOption_new4(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description);
|
||||
QCommandLineOption* QCommandLineOption_new5(QCommandLineOption* other);
|
||||
QCommandLineOption* QCommandLineOption_new6(struct miqt_string name, struct miqt_string description, struct miqt_string valueName);
|
||||
QCommandLineOption* QCommandLineOption_new7(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue);
|
||||
QCommandLineOption* QCommandLineOption_new8(struct miqt_array* /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName);
|
||||
QCommandLineOption* QCommandLineOption_new9(struct miqt_array* /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue);
|
||||
QCommandLineOption* QCommandLineOption_new8(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName);
|
||||
QCommandLineOption* QCommandLineOption_new9(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue);
|
||||
void QCommandLineOption_OperatorAssign(QCommandLineOption* self, QCommandLineOption* other);
|
||||
void QCommandLineOption_Swap(QCommandLineOption* self, QCommandLineOption* other);
|
||||
struct miqt_array* QCommandLineOption_Names(const QCommandLineOption* self);
|
||||
struct miqt_array QCommandLineOption_Names(const QCommandLineOption* self);
|
||||
void QCommandLineOption_SetValueName(QCommandLineOption* self, struct miqt_string name);
|
||||
struct miqt_string QCommandLineOption_ValueName(const QCommandLineOption* self);
|
||||
void QCommandLineOption_SetDescription(QCommandLineOption* self, struct miqt_string description);
|
||||
struct miqt_string QCommandLineOption_Description(const QCommandLineOption* self);
|
||||
void QCommandLineOption_SetDefaultValue(QCommandLineOption* self, struct miqt_string defaultValue);
|
||||
void QCommandLineOption_SetDefaultValues(QCommandLineOption* self, struct miqt_array* /* of struct miqt_string */ defaultValues);
|
||||
struct miqt_array* QCommandLineOption_DefaultValues(const QCommandLineOption* self);
|
||||
void QCommandLineOption_SetDefaultValues(QCommandLineOption* self, struct miqt_array /* of struct miqt_string */ defaultValues);
|
||||
struct miqt_array QCommandLineOption_DefaultValues(const QCommandLineOption* self);
|
||||
int QCommandLineOption_Flags(const QCommandLineOption* self);
|
||||
void QCommandLineOption_SetFlags(QCommandLineOption* self, int aflags);
|
||||
void QCommandLineOption_SetHidden(QCommandLineOption* self, bool hidden);
|
||||
|
@ -47,11 +47,11 @@ bool QCommandLineParser_AddOption(QCommandLineParser* self, QCommandLineOption*
|
||||
return self->addOption(*commandLineOption);
|
||||
}
|
||||
|
||||
bool QCommandLineParser_AddOptions(QCommandLineParser* self, struct miqt_array* /* of QCommandLineOption* */ options) {
|
||||
bool QCommandLineParser_AddOptions(QCommandLineParser* self, struct miqt_array /* of QCommandLineOption* */ options) {
|
||||
QList<QCommandLineOption> options_QList;
|
||||
options_QList.reserve(options->len);
|
||||
QCommandLineOption** options_arr = static_cast<QCommandLineOption**>(options->data);
|
||||
for(size_t i = 0; i < options->len; ++i) {
|
||||
options_QList.reserve(options.len);
|
||||
QCommandLineOption** options_arr = static_cast<QCommandLineOption**>(options.data);
|
||||
for(size_t i = 0; i < options.len; ++i) {
|
||||
options_QList.push_back(*(options_arr[i]));
|
||||
}
|
||||
return self->addOptions(options_QList);
|
||||
@ -91,11 +91,11 @@ void QCommandLineParser_ClearPositionalArguments(QCommandLineParser* self) {
|
||||
self->clearPositionalArguments();
|
||||
}
|
||||
|
||||
void QCommandLineParser_Process(QCommandLineParser* self, struct miqt_array* /* of struct miqt_string */ arguments) {
|
||||
void QCommandLineParser_Process(QCommandLineParser* self, struct miqt_array /* of struct miqt_string */ arguments) {
|
||||
QStringList arguments_QList;
|
||||
arguments_QList.reserve(arguments->len);
|
||||
struct miqt_string* arguments_arr = static_cast<struct miqt_string*>(arguments->data);
|
||||
for(size_t i = 0; i < arguments->len; ++i) {
|
||||
arguments_QList.reserve(arguments.len);
|
||||
struct miqt_string* arguments_arr = static_cast<struct miqt_string*>(arguments.data);
|
||||
for(size_t i = 0; i < arguments.len; ++i) {
|
||||
QString arguments_arr_i_QString = QString::fromUtf8(arguments_arr[i].data, arguments_arr[i].len);
|
||||
arguments_QList.push_back(arguments_arr_i_QString);
|
||||
}
|
||||
@ -106,11 +106,11 @@ void QCommandLineParser_ProcessWithApp(QCommandLineParser* self, QCoreApplicatio
|
||||
self->process(*app);
|
||||
}
|
||||
|
||||
bool QCommandLineParser_Parse(QCommandLineParser* self, struct miqt_array* /* of struct miqt_string */ arguments) {
|
||||
bool QCommandLineParser_Parse(QCommandLineParser* self, struct miqt_array /* of struct miqt_string */ arguments) {
|
||||
QStringList arguments_QList;
|
||||
arguments_QList.reserve(arguments->len);
|
||||
struct miqt_string* arguments_arr = static_cast<struct miqt_string*>(arguments->data);
|
||||
for(size_t i = 0; i < arguments->len; ++i) {
|
||||
arguments_QList.reserve(arguments.len);
|
||||
struct miqt_string* arguments_arr = static_cast<struct miqt_string*>(arguments.data);
|
||||
for(size_t i = 0; i < arguments.len; ++i) {
|
||||
QString arguments_arr_i_QString = QString::fromUtf8(arguments_arr[i].data, arguments_arr[i].len);
|
||||
arguments_QList.push_back(arguments_arr_i_QString);
|
||||
}
|
||||
@ -145,7 +145,7 @@ struct miqt_string QCommandLineParser_Value(const QCommandLineParser* self, stru
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_array* QCommandLineParser_Values(const QCommandLineParser* self, struct miqt_string name) {
|
||||
struct miqt_array QCommandLineParser_Values(const QCommandLineParser* self, struct miqt_string name) {
|
||||
QString name_QString = QString::fromUtf8(name.data, name.len);
|
||||
QStringList _ret = self->values(name_QString);
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
@ -160,9 +160,9 @@ struct miqt_array* QCommandLineParser_Values(const QCommandLineParser* self, str
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
@ -181,7 +181,7 @@ struct miqt_string QCommandLineParser_ValueWithOption(const QCommandLineParser*
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_array* QCommandLineParser_ValuesWithOption(const QCommandLineParser* self, QCommandLineOption* option) {
|
||||
struct miqt_array QCommandLineParser_ValuesWithOption(const QCommandLineParser* self, QCommandLineOption* option) {
|
||||
QStringList _ret = self->values(*option);
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
@ -195,13 +195,13 @@ struct miqt_array* QCommandLineParser_ValuesWithOption(const QCommandLineParser*
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
struct miqt_array* QCommandLineParser_PositionalArguments(const QCommandLineParser* self) {
|
||||
struct miqt_array QCommandLineParser_PositionalArguments(const QCommandLineParser* self) {
|
||||
QStringList _ret = self->positionalArguments();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
@ -215,13 +215,13 @@ struct miqt_array* QCommandLineParser_PositionalArguments(const QCommandLinePars
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
struct miqt_array* QCommandLineParser_OptionNames(const QCommandLineParser* self) {
|
||||
struct miqt_array QCommandLineParser_OptionNames(const QCommandLineParser* self) {
|
||||
QStringList _ret = self->optionNames();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
@ -235,13 +235,13 @@ struct miqt_array* QCommandLineParser_OptionNames(const QCommandLineParser* self
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
struct miqt_array* QCommandLineParser_UnknownOptionNames(const QCommandLineParser* self) {
|
||||
struct miqt_array QCommandLineParser_UnknownOptionNames(const QCommandLineParser* self) {
|
||||
QStringList _ret = self->unknownOptionNames();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
@ -255,9 +255,9 @@ struct miqt_array* QCommandLineParser_UnknownOptionNames(const QCommandLineParse
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
@ -98,8 +98,7 @@ func (this *QCommandLineParser) AddOptions(options []QCommandLineOption) bool {
|
||||
for i := range options {
|
||||
options_CArray[i] = options[i].cPointer()
|
||||
}
|
||||
options_ma := &C.struct_miqt_array{len: C.size_t(len(options)), data: unsafe.Pointer(options_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(options_ma))
|
||||
options_ma := C.struct_miqt_array{len: C.size_t(len(options)), data: unsafe.Pointer(options_CArray)}
|
||||
return (bool)(C.QCommandLineParser_AddOptions(this.h, options_ma))
|
||||
}
|
||||
|
||||
@ -158,8 +157,7 @@ func (this *QCommandLineParser) Process(arguments []string) {
|
||||
defer C.free(unsafe.Pointer(arguments_i_ms.data))
|
||||
arguments_CArray[i] = arguments_i_ms
|
||||
}
|
||||
arguments_ma := &C.struct_miqt_array{len: C.size_t(len(arguments)), data: unsafe.Pointer(arguments_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(arguments_ma))
|
||||
arguments_ma := C.struct_miqt_array{len: C.size_t(len(arguments)), data: unsafe.Pointer(arguments_CArray)}
|
||||
C.QCommandLineParser_Process(this.h, arguments_ma)
|
||||
}
|
||||
|
||||
@ -177,8 +175,7 @@ func (this *QCommandLineParser) Parse(arguments []string) bool {
|
||||
defer C.free(unsafe.Pointer(arguments_i_ms.data))
|
||||
arguments_CArray[i] = arguments_i_ms
|
||||
}
|
||||
arguments_ma := &C.struct_miqt_array{len: C.size_t(len(arguments)), data: unsafe.Pointer(arguments_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(arguments_ma))
|
||||
arguments_ma := C.struct_miqt_array{len: C.size_t(len(arguments)), data: unsafe.Pointer(arguments_CArray)}
|
||||
return (bool)(C.QCommandLineParser_Parse(this.h, arguments_ma))
|
||||
}
|
||||
|
||||
@ -213,7 +210,7 @@ func (this *QCommandLineParser) Values(name string) []string {
|
||||
name_ms.data = C.CString(name)
|
||||
name_ms.len = C.size_t(len(name))
|
||||
defer C.free(unsafe.Pointer(name_ms.data))
|
||||
var _ma *C.struct_miqt_array = C.QCommandLineParser_Values(this.h, name_ms)
|
||||
var _ma C.struct_miqt_array = C.QCommandLineParser_Values(this.h, name_ms)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -222,7 +219,6 @@ func (this *QCommandLineParser) Values(name string) []string {
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
@ -238,7 +234,7 @@ func (this *QCommandLineParser) ValueWithOption(option *QCommandLineOption) stri
|
||||
}
|
||||
|
||||
func (this *QCommandLineParser) ValuesWithOption(option *QCommandLineOption) []string {
|
||||
var _ma *C.struct_miqt_array = C.QCommandLineParser_ValuesWithOption(this.h, option.cPointer())
|
||||
var _ma C.struct_miqt_array = C.QCommandLineParser_ValuesWithOption(this.h, option.cPointer())
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -247,12 +243,11 @@ func (this *QCommandLineParser) ValuesWithOption(option *QCommandLineOption) []s
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QCommandLineParser) PositionalArguments() []string {
|
||||
var _ma *C.struct_miqt_array = C.QCommandLineParser_PositionalArguments(this.h)
|
||||
var _ma C.struct_miqt_array = C.QCommandLineParser_PositionalArguments(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -261,12 +256,11 @@ func (this *QCommandLineParser) PositionalArguments() []string {
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QCommandLineParser) OptionNames() []string {
|
||||
var _ma *C.struct_miqt_array = C.QCommandLineParser_OptionNames(this.h)
|
||||
var _ma C.struct_miqt_array = C.QCommandLineParser_OptionNames(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -275,12 +269,11 @@ func (this *QCommandLineParser) OptionNames() []string {
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QCommandLineParser) UnknownOptionNames() []string {
|
||||
var _ma *C.struct_miqt_array = C.QCommandLineParser_UnknownOptionNames(this.h)
|
||||
var _ma C.struct_miqt_array = C.QCommandLineParser_UnknownOptionNames(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
@ -289,7 +282,6 @@ func (this *QCommandLineParser) UnknownOptionNames() []string {
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
|
@ -29,26 +29,26 @@ struct miqt_string QCommandLineParser_TrUtf8(const char* sourceText);
|
||||
void QCommandLineParser_SetSingleDashWordOptionMode(QCommandLineParser* self, int parsingMode);
|
||||
void QCommandLineParser_SetOptionsAfterPositionalArgumentsMode(QCommandLineParser* self, int mode);
|
||||
bool QCommandLineParser_AddOption(QCommandLineParser* self, QCommandLineOption* commandLineOption);
|
||||
bool QCommandLineParser_AddOptions(QCommandLineParser* self, struct miqt_array* /* of QCommandLineOption* */ options);
|
||||
bool QCommandLineParser_AddOptions(QCommandLineParser* self, struct miqt_array /* of QCommandLineOption* */ options);
|
||||
QCommandLineOption* QCommandLineParser_AddVersionOption(QCommandLineParser* self);
|
||||
QCommandLineOption* QCommandLineParser_AddHelpOption(QCommandLineParser* self);
|
||||
void QCommandLineParser_SetApplicationDescription(QCommandLineParser* self, struct miqt_string description);
|
||||
struct miqt_string QCommandLineParser_ApplicationDescription(const QCommandLineParser* self);
|
||||
void QCommandLineParser_AddPositionalArgument(QCommandLineParser* self, struct miqt_string name, struct miqt_string description);
|
||||
void QCommandLineParser_ClearPositionalArguments(QCommandLineParser* self);
|
||||
void QCommandLineParser_Process(QCommandLineParser* self, struct miqt_array* /* of struct miqt_string */ arguments);
|
||||
void QCommandLineParser_Process(QCommandLineParser* self, struct miqt_array /* of struct miqt_string */ arguments);
|
||||
void QCommandLineParser_ProcessWithApp(QCommandLineParser* self, QCoreApplication* app);
|
||||
bool QCommandLineParser_Parse(QCommandLineParser* self, struct miqt_array* /* of struct miqt_string */ arguments);
|
||||
bool QCommandLineParser_Parse(QCommandLineParser* self, struct miqt_array /* of struct miqt_string */ arguments);
|
||||
struct miqt_string QCommandLineParser_ErrorText(const QCommandLineParser* self);
|
||||
bool QCommandLineParser_IsSet(const QCommandLineParser* self, struct miqt_string name);
|
||||
struct miqt_string QCommandLineParser_Value(const QCommandLineParser* self, struct miqt_string name);
|
||||
struct miqt_array* QCommandLineParser_Values(const QCommandLineParser* self, struct miqt_string name);
|
||||
struct miqt_array QCommandLineParser_Values(const QCommandLineParser* self, struct miqt_string name);
|
||||
bool QCommandLineParser_IsSetWithOption(const QCommandLineParser* self, QCommandLineOption* option);
|
||||
struct miqt_string QCommandLineParser_ValueWithOption(const QCommandLineParser* self, QCommandLineOption* option);
|
||||
struct miqt_array* QCommandLineParser_ValuesWithOption(const QCommandLineParser* self, QCommandLineOption* option);
|
||||
struct miqt_array* QCommandLineParser_PositionalArguments(const QCommandLineParser* self);
|
||||
struct miqt_array* QCommandLineParser_OptionNames(const QCommandLineParser* self);
|
||||
struct miqt_array* QCommandLineParser_UnknownOptionNames(const QCommandLineParser* self);
|
||||
struct miqt_array QCommandLineParser_ValuesWithOption(const QCommandLineParser* self, QCommandLineOption* option);
|
||||
struct miqt_array QCommandLineParser_PositionalArguments(const QCommandLineParser* self);
|
||||
struct miqt_array QCommandLineParser_OptionNames(const QCommandLineParser* self);
|
||||
struct miqt_array QCommandLineParser_UnknownOptionNames(const QCommandLineParser* self);
|
||||
struct miqt_string QCommandLineParser_HelpText(const QCommandLineParser* self);
|
||||
struct miqt_string QCommandLineParser_Tr2(const char* sourceText, const char* disambiguation);
|
||||
struct miqt_string QCommandLineParser_Tr3(const char* sourceText, const char* disambiguation, int n);
|
||||
|
@ -22,11 +22,11 @@ QCompleter* QCompleter_new2(QAbstractItemModel* model) {
|
||||
return new QCompleter(model);
|
||||
}
|
||||
|
||||
QCompleter* QCompleter_new3(struct miqt_array* /* of struct miqt_string */ completions) {
|
||||
QCompleter* QCompleter_new3(struct miqt_array /* of struct miqt_string */ completions) {
|
||||
QStringList completions_QList;
|
||||
completions_QList.reserve(completions->len);
|
||||
struct miqt_string* completions_arr = static_cast<struct miqt_string*>(completions->data);
|
||||
for(size_t i = 0; i < completions->len; ++i) {
|
||||
completions_QList.reserve(completions.len);
|
||||
struct miqt_string* completions_arr = static_cast<struct miqt_string*>(completions.data);
|
||||
for(size_t i = 0; i < completions.len; ++i) {
|
||||
QString completions_arr_i_QString = QString::fromUtf8(completions_arr[i].data, completions_arr[i].len);
|
||||
completions_QList.push_back(completions_arr_i_QString);
|
||||
}
|
||||
@ -41,11 +41,11 @@ QCompleter* QCompleter_new5(QAbstractItemModel* model, QObject* parent) {
|
||||
return new QCompleter(model, parent);
|
||||
}
|
||||
|
||||
QCompleter* QCompleter_new6(struct miqt_array* /* of struct miqt_string */ completions, QObject* parent) {
|
||||
QCompleter* QCompleter_new6(struct miqt_array /* of struct miqt_string */ completions, QObject* parent) {
|
||||
QStringList completions_QList;
|
||||
completions_QList.reserve(completions->len);
|
||||
struct miqt_string* completions_arr = static_cast<struct miqt_string*>(completions->data);
|
||||
for(size_t i = 0; i < completions->len; ++i) {
|
||||
completions_QList.reserve(completions.len);
|
||||
struct miqt_string* completions_arr = static_cast<struct miqt_string*>(completions.data);
|
||||
for(size_t i = 0; i < completions.len; ++i) {
|
||||
QString completions_arr_i_QString = QString::fromUtf8(completions_arr[i].data, completions_arr[i].len);
|
||||
completions_QList.push_back(completions_arr_i_QString);
|
||||
}
|
||||
@ -236,7 +236,7 @@ struct miqt_string QCompleter_PathFromIndex(const QCompleter* self, QModelIndex*
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_array* QCompleter_SplitPath(const QCompleter* self, struct miqt_string path) {
|
||||
struct miqt_array QCompleter_SplitPath(const QCompleter* self, struct miqt_string path) {
|
||||
QString path_QString = QString::fromUtf8(path.data, path.len);
|
||||
QStringList _ret = self->splitPath(path_QString);
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
@ -251,9 +251,9 @@ struct miqt_array* QCompleter_SplitPath(const QCompleter* self, struct miqt_stri
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
struct miqt_array _out;
|
||||
_out.len = _ret.length();
|
||||
_out.data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user