io.qt.gui.QCursor Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.gui;
import io.qt.*;
/**
* Mouse cursor with an arbitrary shape
* Java wrapper for Qt class QCursor
*/
public class QCursor extends QtObject
implements java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
*
*/
public QCursor(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QCursor instance);
/**
* See QCursor:: QCursor(QBitmap, QBitmap, int, int)
*/
public QCursor(io.qt.gui.@NonNull QBitmap bitmap, io.qt.gui.@NonNull QBitmap mask, int hotX, int hotY){
super((QPrivateConstructor)null);
initialize_native(this, bitmap, mask, hotX, hotY);
}
private native static void initialize_native(QCursor instance, io.qt.gui.QBitmap bitmap, io.qt.gui.QBitmap mask, int hotX, int hotY);
/**
*
*/
public QCursor(io.qt.gui.@NonNull QCursor cursor){
super((QPrivateConstructor)null);
initialize_native(this, cursor);
}
private native static void initialize_native(QCursor instance, io.qt.gui.QCursor cursor);
/**
* See QCursor:: QCursor(QPixmap, int, int)
*/
public QCursor(io.qt.gui.@NonNull QPixmap pixmap, int hotX, int hotY){
super((QPrivateConstructor)null);
initialize_native(this, pixmap, hotX, hotY);
}
private native static void initialize_native(QCursor instance, io.qt.gui.QPixmap pixmap, int hotX, int hotY);
/**
* See QCursor:: QCursor(Qt::CursorShape)
*/
public QCursor(io.qt.core.Qt.@NonNull CursorShape shape){
super((QPrivateConstructor)null);
initialize_native(this, shape);
}
private native static void initialize_native(QCursor instance, io.qt.core.Qt.CursorShape shape);
/**
*
*/
@QtUninvokable
public final io.qt.gui.@NonNull QBitmap bitmap(){
return bitmap_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QBitmap bitmap_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final io.qt.core.@NonNull QPoint hotSpot(){
return hotSpot_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QPoint hotSpot_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final io.qt.gui.@NonNull QBitmap mask(){
return mask_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QBitmap mask_native_constfct(long __this__nativeId);
/**
* See operator<<(QDataStream&, QCursor)
*/
@QtUninvokable
public void writeTo(io.qt.core.@StrictNonNull QDataStream outS){
java.util.Objects.requireNonNull(outS, "Argument 'outS': null not expected.");
writeTo_native_ref_QDataStream(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(outS));
}
@QtUninvokable
private native void writeTo_native_ref_QDataStream(long __this__nativeId, long outS);
/**
* See QCursor:: operator=(QCursor)
*/
@QtUninvokable
public final void assign(io.qt.gui.@NonNull QCursor cursor){
assign_native_cref_QCursor(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(cursor));
}
@QtUninvokable
private native void assign_native_cref_QCursor(long __this__nativeId, long cursor);
/**
* See operator==(QCursor, QCursor)
*/
@QtUninvokable
public final boolean equals(io.qt.gui.@NonNull QCursor rhs){
return equals_native_cref_QCursor(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rhs));
}
@QtUninvokable
private native boolean equals_native_cref_QCursor(long __this__nativeId, long rhs);
/**
* See operator>>(QDataStream&, QCursor&)
*/
@QtUninvokable
public void readFrom(io.qt.core.@StrictNonNull QDataStream inS){
java.util.Objects.requireNonNull(inS, "Argument 'inS': null not expected.");
readFrom_native_ref_QDataStream(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(inS));
}
@QtUninvokable
private native void readFrom_native_ref_QDataStream(long __this__nativeId, long inS);
/**
*
*/
@QtUninvokable
public final io.qt.gui.@NonNull QPixmap pixmap(){
return pixmap_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QPixmap pixmap_native_constfct(long __this__nativeId);
/**
* See QCursor:: setShape(Qt::CursorShape)
*/
@QtUninvokable
public final void setShape(io.qt.core.Qt.@NonNull CursorShape newShape){
setShape_native_Qt_CursorShape(QtJambi_LibraryUtilities.internal.nativeId(this), newShape.value());
}
@QtUninvokable
private native void setShape_native_Qt_CursorShape(long __this__nativeId, int newShape);
/**
*
*/
@QtUninvokable
public final io.qt.core.Qt.@NonNull CursorShape shape(){
return io.qt.core.Qt.CursorShape.resolve(shape_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int shape_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final void swap(io.qt.gui.@StrictNonNull QCursor other){
java.util.Objects.requireNonNull(other, "Argument 'other': null not expected.");
swap_native_ref_QCursor(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native void swap_native_ref_QCursor(long __this__nativeId, long other);
/**
* See QCursor:: pos()
*/
public native static io.qt.core.@NonNull QPoint pos();
/**
* See QCursor:: pos(const QScreen*)
*/
public static io.qt.core.@NonNull QPoint pos(io.qt.gui.@Nullable QScreen screen){
return pos_native_const_QScreen_ptr(QtJambi_LibraryUtilities.internal.checkedNativeId(screen));
}
private native static io.qt.core.QPoint pos_native_const_QScreen_ptr(long screen);
/**
*
*/
public static void setPos(io.qt.core.@NonNull QPoint p){
setPos_native_cref_QPoint(QtJambi_LibraryUtilities.internal.checkedNativeId(p));
}
private native static void setPos_native_cref_QPoint(long p);
/**
* See QCursor:: setPos(QScreen*, QPoint)
*/
public static void setPos(io.qt.gui.@Nullable QScreen screen, io.qt.core.@NonNull QPoint p){
setPos_native_QScreen_ptr_cref_QPoint(QtJambi_LibraryUtilities.internal.checkedNativeId(screen), QtJambi_LibraryUtilities.internal.checkedNativeId(p));
}
private native static void setPos_native_QScreen_ptr_cref_QPoint(long screen, long p);
/**
* See QCursor:: setPos(QScreen*, int, int)
*/
public static void setPos(io.qt.gui.@Nullable QScreen screen, int x, int y){
setPos_native_QScreen_ptr_int_int(QtJambi_LibraryUtilities.internal.checkedNativeId(screen), x, y);
}
private native static void setPos_native_QScreen_ptr_int_int(long screen, int x, int y);
/**
*
*/
public native static void setPos(int x, int y);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QCursor(QPrivateConstructor p) { super(p); }
/**
* See operator==(QCursor, QCursor)
*/
@Override
@QtUninvokable
public boolean equals(Object other) {
if (other==null || other instanceof io.qt.gui.QCursor) {
return equals((io.qt.gui.QCursor) other);
}
return false;
}
/**
* Returns the objects's hash code computed by qHash(QCursor)
.
*/
@QtUninvokable
@Override
public int hashCode() {
return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native static int hashCode_native(long __this_nativeId);
/**
* See operator<<(QDebug, QCursor)
*/
@QtUninvokable
@Override
public @NonNull String toString() {
return toString_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private static native String toString_native(long __this_nativeId);
/**
* Creates and returns a copy of this object.
*/
@QtUninvokable
@Override
public QCursor clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QCursor clone_native(long __this_nativeId);
/**
* Overloaded constructor for {@link #QCursor(io.qt.gui.QBitmap, io.qt.gui.QBitmap, int, int)}
* with hotY = -1
.
*/
public QCursor(io.qt.gui.@NonNull QBitmap bitmap, io.qt.gui.@NonNull QBitmap mask, int hotX) {
this(bitmap, mask, hotX, (int)-1);
}
/**
* Overloaded constructor for {@link #QCursor(io.qt.gui.QBitmap, io.qt.gui.QBitmap, int, int)}
* with:
* hotX = -1
* hotY = -1
*
*/
public QCursor(io.qt.gui.@NonNull QBitmap bitmap, io.qt.gui.@NonNull QBitmap mask) {
this(bitmap, mask, (int)-1, (int)-1);
}
/**
* Overloaded constructor for {@link #QCursor(io.qt.gui.QPixmap, int, int)}
* with hotY = -1
.
*/
public QCursor(io.qt.gui.@NonNull QPixmap pixmap, int hotX) {
this(pixmap, hotX, (int)-1);
}
/**
* Overloaded constructor for {@link #QCursor(io.qt.gui.QPixmap, int, int)}
* with:
* hotX = -1
* hotY = -1
*
*/
public QCursor(io.qt.gui.@NonNull QPixmap pixmap) {
this(pixmap, (int)-1, (int)-1);
}
/**
* Overloaded function for {@link #assign(io.qt.gui.QCursor)}.
*/
@QtUninvokable
public final void assign(io.qt.core.Qt.@NonNull CursorShape cursor) {
assign(new io.qt.gui.QCursor(cursor));
}
/**
* Overloaded function for {@link #equals(io.qt.gui.QCursor)}.
*/
@QtUninvokable
public final boolean equals(io.qt.core.Qt.@NonNull CursorShape rhs) {
return equals(new io.qt.gui.QCursor(rhs));
}
}