miqt/qt/gen_qpixmapcache.cpp

107 lines
2.7 KiB
C++
Raw Normal View History

#include <QPixmap>
#include <QPixmapCache>
2024-08-29 19:01:51 +12:00
#define WORKAROUND_INNER_CLASS_DEFINITION_QPixmapCache__Key
#include <QString>
2024-08-29 19:01:51 +12:00
#include <QByteArray>
#include <cstring>
#include <qpixmapcache.h>
2024-08-29 19:01:51 +12:00
#include "gen_qpixmapcache.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
} /* extern C */
#endif
2025-02-01 13:45:16 +13:00
int QPixmapCache_cacheLimit() {
return QPixmapCache::cacheLimit();
}
2025-02-01 13:45:16 +13:00
void QPixmapCache_setCacheLimit(int cacheLimit) {
QPixmapCache::setCacheLimit(static_cast<int>(cacheLimit));
}
2025-02-01 13:45:16 +13:00
QPixmap* QPixmapCache_find(struct miqt_string key) {
QString key_QString = QString::fromUtf8(key.data, key.len);
return QPixmapCache::find(key_QString);
}
2025-02-01 13:45:16 +13:00
bool QPixmapCache_find2(struct miqt_string key, QPixmap* pixmap) {
QString key_QString = QString::fromUtf8(key.data, key.len);
return QPixmapCache::find(key_QString, *pixmap);
}
2025-02-01 13:45:16 +13:00
bool QPixmapCache_find3(struct miqt_string key, QPixmap* pixmap) {
QString key_QString = QString::fromUtf8(key.data, key.len);
return QPixmapCache::find(key_QString, pixmap);
}
2025-02-01 13:45:16 +13:00
bool QPixmapCache_find4(QPixmapCache__Key* key, QPixmap* pixmap) {
2024-08-29 19:01:51 +12:00
return QPixmapCache::find(*key, pixmap);
}
2025-02-01 13:45:16 +13:00
bool QPixmapCache_insert(struct miqt_string key, QPixmap* pixmap) {
QString key_QString = QString::fromUtf8(key.data, key.len);
return QPixmapCache::insert(key_QString, *pixmap);
}
2025-02-01 13:45:16 +13:00
QPixmapCache__Key* QPixmapCache_insertWithPixmap(QPixmap* pixmap) {
return new QPixmapCache::Key(QPixmapCache::insert(*pixmap));
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QPixmapCache_replace(QPixmapCache__Key* key, QPixmap* pixmap) {
2024-08-29 19:01:51 +12:00
return QPixmapCache::replace(*key, *pixmap);
}
2025-02-01 13:45:16 +13:00
void QPixmapCache_remove(struct miqt_string key) {
QString key_QString = QString::fromUtf8(key.data, key.len);
QPixmapCache::remove(key_QString);
}
2025-02-01 13:45:16 +13:00
void QPixmapCache_removeWithKey(QPixmapCache__Key* key) {
2024-08-29 19:01:51 +12:00
QPixmapCache::remove(*key);
}
2025-02-01 13:45:16 +13:00
void QPixmapCache_clear() {
QPixmapCache::clear();
}
2025-02-01 13:45:16 +13:00
void QPixmapCache_delete(QPixmapCache* self) {
delete self;
}
2024-12-07 17:15:57 +13:00
QPixmapCache__Key* QPixmapCache__Key_new() {
return new QPixmapCache::Key();
2024-08-29 19:01:51 +12:00
}
2024-12-07 17:15:57 +13:00
QPixmapCache__Key* QPixmapCache__Key_new2(QPixmapCache__Key* other) {
return new QPixmapCache::Key(*other);
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QPixmapCache__Key_operatorEqual(const QPixmapCache__Key* self, QPixmapCache__Key* key) {
return (*self == *key);
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QPixmapCache__Key_operatorNotEqual(const QPixmapCache__Key* self, QPixmapCache__Key* key) {
return (*self != *key);
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
void QPixmapCache__Key_operatorAssign(QPixmapCache__Key* self, QPixmapCache__Key* other) {
self->operator=(*other);
}
2025-02-01 13:45:16 +13:00
void QPixmapCache__Key_swap(QPixmapCache__Key* self, QPixmapCache__Key* other) {
2024-08-29 19:01:51 +12:00
self->swap(*other);
}
2025-02-01 13:45:16 +13:00
bool QPixmapCache__Key_isValid(const QPixmapCache__Key* self) {
return self->isValid();
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
void QPixmapCache__Key_delete(QPixmapCache__Key* self) {
delete self;
2024-08-29 19:01:51 +12:00
}