io.qt.gui.QPaintDevice Maven / Gradle / Ivy
package io.qt.gui;
/**
* The base class of objects that can be painted on with QPainter
* Java wrapper for Qt class QPaintDevice
* Following functions are protected in the Qt interface, all implementations of this interface may implement these function:
*
*
* @io.qt.QtUninvokable
* protected void initPainter(io.qt.gui.QPainter painter){
* QPaintDevice.MemberAccess.of(this).initPainter(painter);
* }
*
* @io.qt.QtUninvokable
* protected int metric(io.qt.gui.QPaintDevice.PaintDeviceMetric metric){
* return QPaintDevice.MemberAccess.of(this).metric(metric);
* }
*
* @io.qt.QtUninvokable
* protected io.qt.gui.QPaintDevice redirected(io.qt.core.QPoint offset){
* return QPaintDevice.MemberAccess.of(this).redirected(offset);
* }
*
* @io.qt.QtUninvokable
* protected io.qt.gui.QPainter sharedPainter(){
* return QPaintDevice.MemberAccess.of(this).sharedPainter();
* }
*
*
*/
public interface QPaintDevice extends io.qt.QtObjectInterface
{
/**
* Java wrapper for Qt enum QPaintDevice::PaintDeviceMetric
*/
public enum PaintDeviceMetric implements io.qt.QtEnumerator {
PdmWidth(1),
PdmHeight(2),
PdmWidthMM(3),
PdmHeightMM(4),
PdmNumColors(5),
PdmDepth(6),
PdmDpiX(7),
PdmDpiY(8),
PdmPhysicalDpiX(9),
PdmPhysicalDpiY(10),
PdmDevicePixelRatio(11),
PdmDevicePixelRatioScaled(12);
private PaintDeviceMetric(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static PaintDeviceMetric resolve(int value) {
switch (value) {
case 1: return PdmWidth;
case 2: return PdmHeight;
case 3: return PdmWidthMM;
case 4: return PdmHeightMM;
case 5: return PdmNumColors;
case 6: return PdmDepth;
case 7: return PdmDpiX;
case 8: return PdmDpiY;
case 9: return PdmPhysicalDpiX;
case 10: return PdmPhysicalDpiY;
case 11: return PdmDevicePixelRatio;
case 12: return PdmDevicePixelRatioScaled;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Implementor class for interface {@link io.qt.gui.QPaintDevice}
*/
public static abstract class Impl extends io.qt.QtObject
implements io.qt.gui.QPaintDevice
{
static {
QtJambi_LibraryUtilities.initialize();
}
@io.qt.NativeAccess
private static final class ConcreteWrapper extends QPaintDevice.Impl {
@io.qt.NativeAccess
private ConcreteWrapper(QPrivateConstructor p) { super(p); }
@Override
@io.qt.QtUninvokable
public io.qt.gui.QPaintEngine paintEngine(){
return paintEngine_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static io.qt.gui.QPaintEngine paintEngine_native_constfct(long __this__nativeId);
}
/**
* See QPaintDevice::QPaintDevice()
*/
protected Impl(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QPaintDevice instance);
/**
* See QPaintDevice::colorCount()const
*/
@io.qt.QtUninvokable
public final int colorCount(){
return colorCount_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static int colorCount_native_constfct(long __this__nativeId);
/**
* See QPaintDevice::depth()const
*/
@io.qt.QtUninvokable
public final int depth(){
return depth_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static int depth_native_constfct(long __this__nativeId);
/**
* See QPaintDevice::devicePixelRatio()const
*/
@io.qt.QtUninvokable
public final double devicePixelRatio(){
return devicePixelRatio_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static double devicePixelRatio_native_constfct(long __this__nativeId);
/**
* See QPaintDevice::devicePixelRatioF()const
*/
@io.qt.QtUninvokable
public final double devicePixelRatioF(){
return devicePixelRatioF_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static double devicePixelRatioF_native_constfct(long __this__nativeId);
/**
* See QPaintDevice::height()const
*/
@io.qt.QtUninvokable
public final int height(){
return height_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static int height_native_constfct(long __this__nativeId);
/**
* See QPaintDevice::heightMM()const
*/
@io.qt.QtUninvokable
public final int heightMM(){
return heightMM_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static int heightMM_native_constfct(long __this__nativeId);
/**
* See QPaintDevice::logicalDpiX()const
*/
@io.qt.QtUninvokable
public final int logicalDpiX(){
return logicalDpiX_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static int logicalDpiX_native_constfct(long __this__nativeId);
/**
* See QPaintDevice::logicalDpiY()const
*/
@io.qt.QtUninvokable
public final int logicalDpiY(){
return logicalDpiY_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static int logicalDpiY_native_constfct(long __this__nativeId);
/**
* See QPaintDevice::paintingActive()const
*/
@io.qt.QtUninvokable
public final boolean paintingActive(){
return paintingActive_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static boolean paintingActive_native_constfct(long __this__nativeId);
/**
* See QPaintDevice::physicalDpiX()const
*/
@io.qt.QtUninvokable
public final int physicalDpiX(){
return physicalDpiX_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static int physicalDpiX_native_constfct(long __this__nativeId);
/**
* See QPaintDevice::physicalDpiY()const
*/
@io.qt.QtUninvokable
public final int physicalDpiY(){
return physicalDpiY_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static int physicalDpiY_native_constfct(long __this__nativeId);
/**
* See QPaintDevice::width()const
*/
@io.qt.QtUninvokable
public final int width(){
return width_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static int width_native_constfct(long __this__nativeId);
/**
* See QPaintDevice::widthMM()const
*/
@io.qt.QtUninvokable
public final int widthMM(){
return widthMM_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static int widthMM_native_constfct(long __this__nativeId);
@io.qt.QtUninvokable
protected void initPainter(io.qt.gui.QPainter painter){
initPainter_native_QPainter_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(painter));
}
private native static void initPainter_native_QPainter_ptr_constfct(long __this__nativeId, long painter);
/**
* See QPaintDevice::metric(QPaintDevice::PaintDeviceMetric)const
*/
@io.qt.QtUninvokable
protected int metric(io.qt.gui.QPaintDevice.PaintDeviceMetric metric){
return metric_native_QPaintDevice_PaintDeviceMetric_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), metric.value());
}
private native static int metric_native_QPaintDevice_PaintDeviceMetric_constfct(long __this__nativeId, int metric);
/**
* See QPaintDevice::paintEngine()const
*/
@io.qt.QtUninvokable
public abstract io.qt.gui.QPaintEngine paintEngine();
private native static io.qt.gui.QPaintEngine paintEngine_native_constfct(long __this__nativeId);
@io.qt.QtUninvokable
protected io.qt.gui.QPaintDevice redirected(io.qt.core.QPoint offset){
return redirected_native_QPoint_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), offset);
}
private native static io.qt.gui.QPaintDevice redirected_native_QPoint_ptr_constfct(long __this__nativeId, io.qt.core.QPoint offset);
@io.qt.QtUninvokable
protected io.qt.gui.QPainter sharedPainter(){
return sharedPainter_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static io.qt.gui.QPainter sharedPainter_native_constfct(long __this__nativeId);
private native static double devicePixelRatioFScale();
/**
* Constructor for internal use only.
* @param p expected to be null
.
*/
@io.qt.NativeAccess
protected Impl(QPrivateConstructor p) { super(p); }
@io.qt.QtUninvokable
static io.qt.gui.QPainter getSharedPainter(QPaintDevice instance){
return sharedPainter_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(instance));
}
@io.qt.QtUninvokable
static io.qt.gui.QPaintDevice getRedirected(QPaintDevice instance, io.qt.core.QPoint offset){
return redirected_native_QPoint_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(instance), offset);
}
}
/**
* See QPaintDevice::colorCount()const
*/
@io.qt.QtDeclaredFinal
@io.qt.QtUninvokable
public default int colorCount(){
return Impl.colorCount_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice::depth()const
*/
@io.qt.QtDeclaredFinal
@io.qt.QtUninvokable
public default int depth(){
return Impl.depth_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice::devicePixelRatio()const
*/
@io.qt.QtDeclaredFinal
@io.qt.QtUninvokable
public default double devicePixelRatio(){
return Impl.devicePixelRatio_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice::devicePixelRatioF()const
*/
@io.qt.QtDeclaredFinal
@io.qt.QtUninvokable
public default double devicePixelRatioF(){
return Impl.devicePixelRatioF_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice::height()const
*/
@io.qt.QtDeclaredFinal
@io.qt.QtUninvokable
public default int height(){
return Impl.height_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice::heightMM()const
*/
@io.qt.QtDeclaredFinal
@io.qt.QtUninvokable
public default int heightMM(){
return Impl.heightMM_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice::logicalDpiX()const
*/
@io.qt.QtDeclaredFinal
@io.qt.QtUninvokable
public default int logicalDpiX(){
return Impl.logicalDpiX_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice::logicalDpiY()const
*/
@io.qt.QtDeclaredFinal
@io.qt.QtUninvokable
public default int logicalDpiY(){
return Impl.logicalDpiY_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice::paintingActive()const
*/
@io.qt.QtDeclaredFinal
@io.qt.QtUninvokable
public default boolean paintingActive(){
return Impl.paintingActive_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice::physicalDpiX()const
*/
@io.qt.QtDeclaredFinal
@io.qt.QtUninvokable
public default int physicalDpiX(){
return Impl.physicalDpiX_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice::physicalDpiY()const
*/
@io.qt.QtDeclaredFinal
@io.qt.QtUninvokable
public default int physicalDpiY(){
return Impl.physicalDpiY_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice::width()const
*/
@io.qt.QtDeclaredFinal
@io.qt.QtUninvokable
public default int width(){
return Impl.width_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice::widthMM()const
*/
@io.qt.QtDeclaredFinal
@io.qt.QtUninvokable
public default int widthMM(){
return Impl.widthMM_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice::paintEngine()const
*/
@io.qt.QtUninvokable
public io.qt.gui.QPaintEngine paintEngine();
public static double devicePixelRatioFScale(){
return Impl.devicePixelRatioFScale();
}
public static class MemberAccess extends io.qt.MemberAccess {
private MemberAccess(QPaintDevice instance){
super(instance);
}
@io.qt.QtUninvokable
public void initPainter(io.qt.gui.QPainter painter){
QPaintDevice instance = instance();
QPaintDevice.Impl.initPainter_native_QPainter_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(instance), QtJambi_LibraryUtilities.internal.checkedNativeId(painter));
}
@io.qt.QtUninvokable
public int metric(io.qt.gui.QPaintDevice.PaintDeviceMetric metric){
QPaintDevice instance = instance();
return QPaintDevice.Impl.metric_native_QPaintDevice_PaintDeviceMetric_constfct(QtJambi_LibraryUtilities.internal.nativeId(instance), metric.value());
}
@io.qt.QtUninvokable
public io.qt.gui.QPaintDevice redirected(io.qt.core.QPoint offset){
QPaintDevice instance = instance();
return QPaintDevice.Impl.redirected_native_QPoint_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(instance), offset);
}
@io.qt.QtUninvokable
public io.qt.gui.QPainter sharedPainter(){
QPaintDevice instance = instance();
return QPaintDevice.Impl.sharedPainter_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(instance));
}
public static MemberAccess of(QPaintDevice instance){
Class> callerClass = QtJambi_LibraryUtilities.internal.callerClassProvider().get();
if(!QPaintDevice.class.isAssignableFrom(callerClass) || !callerClass.isInstance(instance))
throw new RuntimeException("Access to restricted functions of class QPaintDevice is only granted from inside a user-implemented subclass.");
return QtJambi_LibraryUtilities.internal.findMemberAccess(instance, QPaintDevice.class, MemberAccess.class);
}
}
}