All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.qt.core.QMutex Maven / Gradle / Ivy

package io.qt.core;


/**
 * 

Access serialization between threads

*

Java wrapper for Qt class QMutex

*/ public class QMutex extends io.qt.core.QBasicMutex { /** *

Java wrapper for Qt enum QMutex::RecursionMode

*/ public enum RecursionMode implements io.qt.QtEnumerator { NonRecursive(0), Recursive(1); private RecursionMode(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 RecursionMode resolve(int value) { switch (value) { case 0: return NonRecursive; case 1: return Recursive; default: throw new io.qt.QNoSuchEnumValueException(value); } } private final int value; } /** *

See QMutex::QMutex()

*/ public QMutex(){ super((QPrivateConstructor)null); initialize_native(this); } private native static void initialize_native(QMutex instance); /** *

See QMutex::QMutex(QMutex::RecursionMode)

*/ public QMutex(io.qt.core.QMutex.RecursionMode mode){ super((QPrivateConstructor)null); initialize_native(this, mode); } private native static void initialize_native(QMutex instance, io.qt.core.QMutex.RecursionMode mode); /** *

See QBasicMutex::lock()

*/ @io.qt.QtUninvokable public final void lock(){ lock_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native void lock_native(long __this__nativeId); /** *

See QMutex::tryLock(int)

*/ @io.qt.QtUninvokable public final boolean tryLock(int timeout){ return tryLock_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), timeout); } @io.qt.QtUninvokable private native boolean tryLock_native_int(long __this__nativeId, int timeout); /** *

See QBasicMutex::try_lock()

*/ @io.qt.QtUninvokable public final boolean tryLock(){ return tryLock_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native boolean tryLock_native(long __this__nativeId); /** *

See QBasicMutex::unlock()

*/ @io.qt.QtUninvokable public final void unlock(){ unlock_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native void unlock_native(long __this__nativeId); /** * Constructor for internal use only. * @param p expected to be null. */ @io.qt.NativeAccess protected QMutex(QPrivateConstructor p) { super(p); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy