mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 08:58:37 +00:00
112 lines
2.9 KiB
C++
112 lines
2.9 KiB
C++
#include <QPixmap>
|
|
#include <QPixmapCache>
|
|
#define WORKAROUND_INNER_CLASS_DEFINITION_QPixmapCache__Key
|
|
#include <QString>
|
|
#include <QByteArray>
|
|
#include <cstring>
|
|
#include <qpixmapcache.h>
|
|
#include "gen_qpixmapcache.h"
|
|
|
|
#ifndef _Bool
|
|
#define _Bool bool
|
|
#endif
|
|
#include "_cgo_export.h"
|
|
|
|
int QPixmapCache_CacheLimit() {
|
|
return QPixmapCache::cacheLimit();
|
|
}
|
|
|
|
void QPixmapCache_SetCacheLimit(int cacheLimit) {
|
|
QPixmapCache::setCacheLimit(static_cast<int>(cacheLimit));
|
|
}
|
|
|
|
QPixmap* QPixmapCache_Find(struct miqt_string key) {
|
|
QString key_QString = QString::fromUtf8(key.data, key.len);
|
|
return QPixmapCache::find(key_QString);
|
|
}
|
|
|
|
bool QPixmapCache_Find2(struct miqt_string key, QPixmap* pixmap) {
|
|
QString key_QString = QString::fromUtf8(key.data, key.len);
|
|
return QPixmapCache::find(key_QString, *pixmap);
|
|
}
|
|
|
|
bool QPixmapCache_Find3(struct miqt_string key, QPixmap* pixmap) {
|
|
QString key_QString = QString::fromUtf8(key.data, key.len);
|
|
return QPixmapCache::find(key_QString, pixmap);
|
|
}
|
|
|
|
bool QPixmapCache_Find4(QPixmapCache__Key* key, QPixmap* pixmap) {
|
|
return QPixmapCache::find(*key, pixmap);
|
|
}
|
|
|
|
bool QPixmapCache_Insert(struct miqt_string key, QPixmap* pixmap) {
|
|
QString key_QString = QString::fromUtf8(key.data, key.len);
|
|
return QPixmapCache::insert(key_QString, *pixmap);
|
|
}
|
|
|
|
QPixmapCache__Key* QPixmapCache_InsertWithPixmap(QPixmap* pixmap) {
|
|
return new QPixmapCache::Key(QPixmapCache::insert(*pixmap));
|
|
}
|
|
|
|
bool QPixmapCache_Replace(QPixmapCache__Key* key, QPixmap* pixmap) {
|
|
return QPixmapCache::replace(*key, *pixmap);
|
|
}
|
|
|
|
void QPixmapCache_Remove(struct miqt_string key) {
|
|
QString key_QString = QString::fromUtf8(key.data, key.len);
|
|
QPixmapCache::remove(key_QString);
|
|
}
|
|
|
|
void QPixmapCache_RemoveWithKey(QPixmapCache__Key* key) {
|
|
QPixmapCache::remove(*key);
|
|
}
|
|
|
|
void QPixmapCache_Clear() {
|
|
QPixmapCache::clear();
|
|
}
|
|
|
|
void QPixmapCache_Delete(QPixmapCache* self, bool isSubclass) {
|
|
if (isSubclass) {
|
|
delete dynamic_cast<QPixmapCache*>( self );
|
|
} else {
|
|
delete self;
|
|
}
|
|
}
|
|
|
|
QPixmapCache__Key* QPixmapCache__Key_new() {
|
|
return new QPixmapCache::Key();
|
|
}
|
|
|
|
QPixmapCache__Key* QPixmapCache__Key_new2(QPixmapCache__Key* other) {
|
|
return new QPixmapCache::Key(*other);
|
|
}
|
|
|
|
bool QPixmapCache__Key_OperatorEqual(const QPixmapCache__Key* self, QPixmapCache__Key* key) {
|
|
return (*self == *key);
|
|
}
|
|
|
|
bool QPixmapCache__Key_OperatorNotEqual(const QPixmapCache__Key* self, QPixmapCache__Key* key) {
|
|
return (*self != *key);
|
|
}
|
|
|
|
void QPixmapCache__Key_OperatorAssign(QPixmapCache__Key* self, QPixmapCache__Key* other) {
|
|
self->operator=(*other);
|
|
}
|
|
|
|
void QPixmapCache__Key_Swap(QPixmapCache__Key* self, QPixmapCache__Key* other) {
|
|
self->swap(*other);
|
|
}
|
|
|
|
bool QPixmapCache__Key_IsValid(const QPixmapCache__Key* self) {
|
|
return self->isValid();
|
|
}
|
|
|
|
void QPixmapCache__Key_Delete(QPixmapCache__Key* self, bool isSubclass) {
|
|
if (isSubclass) {
|
|
delete dynamic_cast<QPixmapCache::Key*>( self );
|
|
} else {
|
|
delete self;
|
|
}
|
|
}
|
|
|