io.qt.gui.QInputDevice Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.gui;
import io.qt.*;
/**
* Describes a device from which a QInputEvent originates
* Java wrapper for Qt class QInputDevice
* This class was introduced in Qt 6.0.
*/
public class QInputDevice extends io.qt.core.QObject
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QInputDevice.class);
/**
* Java wrapper for Qt enum QInputDevice::Capability
*
* @see Capabilities
*/
public enum Capability implements QtFlagEnumerator {
/**
* Representing QInputDevice:: Capability:: None
*/
None(0),
/**
* Representing QInputDevice:: Capability:: Position
*/
Position(1),
/**
* Representing QInputDevice:: Capability:: Area
*/
Area(2),
/**
* Representing QInputDevice:: Capability:: Pressure
*/
Pressure(4),
/**
* Representing QInputDevice:: Capability:: Velocity
*/
Velocity(8),
/**
* Representing QInputDevice:: Capability:: NormalizedPosition
*/
NormalizedPosition(32),
/**
* Representing QInputDevice:: Capability:: MouseEmulation
*/
MouseEmulation(64),
/**
* Representing QInputDevice:: Capability:: PixelScroll
*/
PixelScroll(128),
/**
* Representing QInputDevice:: Capability:: Scroll
*/
Scroll(256),
/**
* Representing QInputDevice:: Capability:: Hover
*/
Hover(512),
/**
* Representing QInputDevice:: Capability:: Rotation
*/
Rotation(1024),
/**
* Representing QInputDevice:: Capability:: XTilt
*/
XTilt(2048),
/**
* Representing QInputDevice:: Capability:: YTilt
*/
YTilt(4096),
/**
* Representing QInputDevice:: Capability:: TangentialPressure
*/
TangentialPressure(8192),
/**
* Representing QInputDevice:: Capability:: ZPosition
*/
ZPosition(16384),
/**
* Representing QInputDevice:: Capability:: All
*/
All(2147483647);
static {
QtJambi_LibraryUtilities.initialize();
}
private Capability(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
@Override
public int value() {
return value;
}
/**
* Create a QFlags of the enum entry.
* @return QFlags
*/
@Override
public @NonNull Capabilities asFlags() {
return new Capabilities(value);
}
/**
* Combines this entry with other enum entry.
* @param e enum entry
* @return new flag
*/
public @NonNull Capabilities combined(@NonNull Capability e) {
return asFlags().setFlag(e, true);
}
/**
* Excludes other enum entry from a flag of this entry.
* @param e enum entry
* @return new flag
*/
public @NonNull Capabilities cleared(@NonNull Capability e) {
return asFlags().setFlag(e, false);
}
/**
* Creates a new {@link Capabilities} from the entries.
* @param values entries
* @return new flag
*/
public static @NonNull Capabilities flags(@Nullable Capability @NonNull... values) {
return new Capabilities(values);
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull Capability resolve(int value) {
switch (value) {
case 0: return None;
case 1: return Position;
case 2: return Area;
case 4: return Pressure;
case 8: return Velocity;
case 32: return NormalizedPosition;
case 64: return MouseEmulation;
case 128: return PixelScroll;
case 256: return Scroll;
case 512: return Hover;
case 1024: return Rotation;
case 2048: return XTilt;
case 4096: return YTilt;
case 8192: return TangentialPressure;
case 16384: return ZPosition;
case 2147483647: return All;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* {@link QFlags} type for enum {@link Capability}
*/
public static final class Capabilities extends QFlags implements Comparable {
private static final long serialVersionUID = 0x956707b38f6e6caeL;
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Creates a new Capabilities where the flags in args
are set.
* @param args enum entries
*/
public Capabilities(@Nullable Capability @NonNull... args){
super(args);
}
/**
* Creates a new Capabilities with given value
.
* @param value
*/
public Capabilities(int value) {
super(value);
}
/**
* Combines this flags with enum entry.
* @param e enum entry
* @return new Capabilities
*/
@Override
public final @NonNull Capabilities combined(@StrictNonNull Capability e){
return new Capabilities(value() | e.value());
}
/**
* Sets the flag e
* @param e enum entry
* @return this
*/
@Override
public final @NonNull Capabilities setFlag(@Nullable Capability e){
return setFlag(e, true);
}
/**
* Sets or clears the flag flag
* @param e enum entry
* @param on set (true) or clear (false)
* @return this
*/
@Override
public final @NonNull Capabilities setFlag(@Nullable Capability e, boolean on){
if (on) {
setValue(value() | e.value());
}else {
setValue(value() & ~e.value());
}
return this;
}
/**
* Returns an array of flag objects represented by this Capabilities.
* @return array of enum entries
*/
@Override
public final @NonNull Capability @NonNull[] flags(){
return super.flags(Capability.values());
}
/**
* {@inheritDoc}
*/
@Override
public final @NonNull Capabilities clone(){
return new Capabilities(value());
}
/**
* {@inheritDoc}
*/
@Override
public final int compareTo(@StrictNonNull Capabilities other){
return Integer.compare(value(), other.value());
}
}
/**
* Java wrapper for Qt enum QInputDevice::DeviceType
*
* @see DeviceTypes
*/
public enum DeviceType implements QtFlagEnumerator {
/**
* Representing QInputDevice:: DeviceType:: Unknown
*/
Unknown(0),
/**
* Representing QInputDevice:: DeviceType:: Mouse
*/
Mouse(1),
/**
* Representing QInputDevice:: DeviceType:: TouchScreen
*/
TouchScreen(2),
/**
* Representing QInputDevice:: DeviceType:: TouchPad
*/
TouchPad(4),
/**
* Representing QInputDevice:: DeviceType:: Puck
*/
Puck(8),
/**
* Representing QInputDevice:: DeviceType:: Stylus
*/
Stylus(16),
/**
* Representing QInputDevice:: DeviceType:: Airbrush
*/
Airbrush(32),
/**
* Representing QInputDevice:: DeviceType:: Keyboard
*/
Keyboard(4096),
/**
* Representing QInputDevice:: DeviceType:: AllDevices
*/
AllDevices(2147483647);
static {
QtJambi_LibraryUtilities.initialize();
}
private DeviceType(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
@Override
public int value() {
return value;
}
/**
* Create a QFlags of the enum entry.
* @return QFlags
*/
@Override
public @NonNull DeviceTypes asFlags() {
return new DeviceTypes(value);
}
/**
* Combines this entry with other enum entry.
* @param e enum entry
* @return new flag
*/
public @NonNull DeviceTypes combined(@NonNull DeviceType e) {
return asFlags().setFlag(e, true);
}
/**
* Excludes other enum entry from a flag of this entry.
* @param e enum entry
* @return new flag
*/
public @NonNull DeviceTypes cleared(@NonNull DeviceType e) {
return asFlags().setFlag(e, false);
}
/**
* Creates a new {@link DeviceTypes} from the entries.
* @param values entries
* @return new flag
*/
public static @NonNull DeviceTypes flags(@Nullable DeviceType @NonNull... values) {
return new DeviceTypes(values);
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull DeviceType resolve(int value) {
switch (value) {
case 0: return Unknown;
case 1: return Mouse;
case 2: return TouchScreen;
case 4: return TouchPad;
case 8: return Puck;
case 16: return Stylus;
case 32: return Airbrush;
case 4096: return Keyboard;
case 2147483647: return AllDevices;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* {@link QFlags} type for enum {@link DeviceType}
*/
public static final class DeviceTypes extends QFlags implements Comparable {
private static final long serialVersionUID = 0xd632ea65f9eb037cL;
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Creates a new DeviceTypes where the flags in args
are set.
* @param args enum entries
*/
public DeviceTypes(@Nullable DeviceType @NonNull... args){
super(args);
}
/**
* Creates a new DeviceTypes with given value
.
* @param value
*/
public DeviceTypes(int value) {
super(value);
}
/**
* Combines this flags with enum entry.
* @param e enum entry
* @return new DeviceTypes
*/
@Override
public final @NonNull DeviceTypes combined(@StrictNonNull DeviceType e){
return new DeviceTypes(value() | e.value());
}
/**
* Sets the flag e
* @param e enum entry
* @return this
*/
@Override
public final @NonNull DeviceTypes setFlag(@Nullable DeviceType e){
return setFlag(e, true);
}
/**
* Sets or clears the flag flag
* @param e enum entry
* @param on set (true) or clear (false)
* @return this
*/
@Override
public final @NonNull DeviceTypes setFlag(@Nullable DeviceType e, boolean on){
if (on) {
setValue(value() | e.value());
}else {
setValue(value() & ~e.value());
}
return this;
}
/**
* Returns an array of flag objects represented by this DeviceTypes.
* @return array of enum entries
*/
@Override
public final @NonNull DeviceType @NonNull[] flags(){
return super.flags(DeviceType.values());
}
/**
* {@inheritDoc}
*/
@Override
public final @NonNull DeviceTypes clone(){
return new DeviceTypes(value());
}
/**
* {@inheritDoc}
*/
@Override
public final int compareTo(@StrictNonNull DeviceTypes other){
return Integer.compare(value(), other.value());
}
}
/**
* See QInputDevice:: availableVirtualGeometryChanged(QRect)
*/
@QtPropertyNotify(name="availableVirtualGeometry")
public final @NonNull Signal1 availableVirtualGeometryChanged = new Signal1<>();
/**
* See QInputDevice:: QInputDevice(QObject*)
*/
public QInputDevice(io.qt.core.@Nullable QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, parent);
}
private native static void initialize_native(QInputDevice instance, io.qt.core.QObject parent);
/**
* See QInputDevice:: QInputDevice(QString, qint64, QInputDevice::DeviceType, QString, QObject*)
*/
public QInputDevice(java.lang.@NonNull String name, long systemId, io.qt.gui.QInputDevice.@NonNull DeviceType type, java.lang.@NonNull String seatName, io.qt.core.@Nullable QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, name, systemId, type, seatName, parent);
}
private native static void initialize_native(QInputDevice instance, java.lang.String name, long systemId, io.qt.gui.QInputDevice.DeviceType type, java.lang.String seatName, io.qt.core.QObject parent);
/**
* See QInputDevice:: availableVirtualGeometry()const
*/
@QtPropertyReader(name="availableVirtualGeometry")
@QtUninvokable
public final io.qt.core.@NonNull QRect availableVirtualGeometry(){
return availableVirtualGeometry_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QRect availableVirtualGeometry_native_constfct(long __this__nativeId);
/**
* See QInputDevice:: capabilities()const
*/
@QtPropertyReader(name="capabilities")
@QtPropertyConstant
@QtUninvokable
public final io.qt.gui.QInputDevice.@NonNull Capabilities capabilities(){
return new io.qt.gui.QInputDevice.Capabilities(capabilities_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int capabilities_native_constfct(long __this__nativeId);
/**
* See QInputDevice:: hasCapability(QInputDevice::Capability)const
*/
@QtUninvokable
public final boolean hasCapability(io.qt.gui.QInputDevice.@NonNull Capability cap){
return hasCapability_native_QInputDevice_Capability_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), cap.value());
}
@QtUninvokable
private native boolean hasCapability_native_QInputDevice_Capability_constfct(long __this__nativeId, int cap);
/**
*
*/
@QtPropertyReader(name="name")
@QtPropertyConstant
@QtUninvokable
public final java.lang.@NonNull String name(){
return name_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String name_native_constfct(long __this__nativeId);
/**
* See QInputDevice:: operator==(QInputDevice)const
*/
@QtUninvokable
public final boolean equals(io.qt.gui.@StrictNonNull QInputDevice other){
java.util.Objects.requireNonNull(other, "Argument 'other': null not expected.");
return equals_native_cref_QInputDevice_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native boolean equals_native_cref_QInputDevice_constfct(long __this__nativeId, long other);
/**
* See QInputDevice:: seatName()const
*/
@QtPropertyReader(name="seatName")
@QtPropertyConstant
@QtUninvokable
public final java.lang.@NonNull String seatName(){
return seatName_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String seatName_native_constfct(long __this__nativeId);
/**
* See QInputDevice:: systemId()const
*/
@QtPropertyReader(name="systemId")
@QtPropertyConstant
@QtUninvokable
public final long systemId(){
return systemId_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native long systemId_native_constfct(long __this__nativeId);
/**
*
*/
@QtPropertyReader(name="type")
@QtPropertyConstant
@QtUninvokable
public final io.qt.gui.QInputDevice.@NonNull DeviceType type(){
return io.qt.gui.QInputDevice.DeviceType.resolve(type_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int type_native_constfct(long __this__nativeId);
/**
*
*/
public native static io.qt.core.@NonNull QList devices();
/**
* See QInputDevice:: primaryKeyboard(QString)
*/
public native static io.qt.gui.@Nullable QInputDevice primaryKeyboard(java.lang.@NonNull String seatName);
/**
*
* This function was introduced in Qt 6.3.
*/
public native static io.qt.core.@NonNull QStringList seatNames();
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QInputDevice(QPrivateConstructor p) { super(p); }
/**
* Constructor for internal use only.
* It is not allowed to call the declarative constructor from inside Java.
* @hidden
*/
@NativeAccess
protected QInputDevice(QDeclarativeConstructor constructor) {
super((QPrivateConstructor)null);
initialize_native(this, constructor);
}
@QtUninvokable
private static native void initialize_native(QInputDevice instance, QDeclarativeConstructor constructor);
/**
* See QInputDevice:: operator==(QInputDevice)const
*/
@Override
@QtUninvokable
public boolean equals(Object other) {
if (other==null || other instanceof io.qt.gui.QInputDevice) {
return equals((io.qt.gui.QInputDevice) other);
}
return false;
}
/**
* See operator<<(QDebug, const QInputDevice*)
*/
@QtUninvokable
@Override
public @NonNull String toString() {
return toString_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private static native String toString_native(long __this_nativeId);
/**
* Overloaded constructor for {@link #QInputDevice(io.qt.core.QObject)}
* with parent = null
.
*/
public QInputDevice() {
this((io.qt.core.QObject)null);
}
/**
* Overloaded constructor for {@link #QInputDevice(java.lang.String, long, io.qt.gui.QInputDevice.DeviceType, java.lang.String, io.qt.core.QObject)}
* with parent = null
.
*/
public QInputDevice(java.lang.@NonNull String name, long systemId, io.qt.gui.QInputDevice.@NonNull DeviceType type, java.lang.@NonNull String seatName) {
this(name, systemId, type, seatName, (io.qt.core.QObject)null);
}
/**
* Overloaded constructor for {@link #QInputDevice(java.lang.String, long, io.qt.gui.QInputDevice.DeviceType, java.lang.String, io.qt.core.QObject)}
* with:
* seatName = (String)null
* parent = null
*
*/
public QInputDevice(java.lang.@NonNull String name, long systemId, io.qt.gui.QInputDevice.@NonNull DeviceType type) {
this(name, systemId, type, (String)null, (io.qt.core.QObject)null);
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #availableVirtualGeometry()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final io.qt.core.@NonNull QRect getAvailableVirtualGeometry() {
return availableVirtualGeometry();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #capabilities()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final io.qt.gui.QInputDevice.@NonNull Capabilities getCapabilities() {
return capabilities();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #name()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final java.lang.@NonNull String getName() {
return name();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #seatName()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final java.lang.@NonNull String getSeatName() {
return seatName();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #systemId()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final long getSystemId() {
return systemId();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #type()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final io.qt.gui.QInputDevice.@NonNull DeviceType getType() {
return type();
}
/**
* Overloaded function for {@link #primaryKeyboard(java.lang.String)}
* with seatName = (String)null
.
*/
public static io.qt.gui.@Nullable QInputDevice primaryKeyboard() {
return primaryKeyboard((String)null);
}
}