mirror of
https://github.com/mappu/miqt.git
synced 2025-01-21 06:00:38 +00:00
a0c6344ecd
The expected type of the callback is already known from the AST - this change reduces dependency on cgo specifics and makes the generated C ABI entirely cgo-independent - in particular, there is no need to include `_cgo_export.h` any more.
62 lines
1.6 KiB
C++
62 lines
1.6 KiB
C++
#include <QMarginsF>
|
|
#include <QPageLayout>
|
|
#include <QPageRanges>
|
|
#include <QPageSize>
|
|
#include <QPagedPaintDevice>
|
|
#include <QPaintDevice>
|
|
#include <qpagedpaintdevice.h>
|
|
#include "gen_qpagedpaintdevice.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
} /* extern C */
|
|
#endif
|
|
|
|
void QPagedPaintDevice_virtbase(QPagedPaintDevice* src, QPaintDevice** outptr_QPaintDevice) {
|
|
*outptr_QPaintDevice = static_cast<QPaintDevice*>(src);
|
|
}
|
|
|
|
bool QPagedPaintDevice_NewPage(QPagedPaintDevice* self) {
|
|
return self->newPage();
|
|
}
|
|
|
|
bool QPagedPaintDevice_SetPageLayout(QPagedPaintDevice* self, QPageLayout* pageLayout) {
|
|
return self->setPageLayout(*pageLayout);
|
|
}
|
|
|
|
bool QPagedPaintDevice_SetPageSize(QPagedPaintDevice* self, QPageSize* pageSize) {
|
|
return self->setPageSize(*pageSize);
|
|
}
|
|
|
|
bool QPagedPaintDevice_SetPageOrientation(QPagedPaintDevice* self, int orientation) {
|
|
return self->setPageOrientation(static_cast<QPageLayout::Orientation>(orientation));
|
|
}
|
|
|
|
bool QPagedPaintDevice_SetPageMargins(QPagedPaintDevice* self, QMarginsF* margins, int units) {
|
|
return self->setPageMargins(*margins, static_cast<QPageLayout::Unit>(units));
|
|
}
|
|
|
|
QPageLayout* QPagedPaintDevice_PageLayout(const QPagedPaintDevice* self) {
|
|
return new QPageLayout(self->pageLayout());
|
|
}
|
|
|
|
void QPagedPaintDevice_SetPageRanges(QPagedPaintDevice* self, QPageRanges* ranges) {
|
|
self->setPageRanges(*ranges);
|
|
}
|
|
|
|
QPageRanges* QPagedPaintDevice_PageRanges(const QPagedPaintDevice* self) {
|
|
return new QPageRanges(self->pageRanges());
|
|
}
|
|
|
|
void QPagedPaintDevice_Delete(QPagedPaintDevice* self, bool isSubclass) {
|
|
if (isSubclass) {
|
|
delete dynamic_cast<QPagedPaintDevice*>( self );
|
|
} else {
|
|
delete self;
|
|
}
|
|
}
|
|
|