io.qt.webengine.core.QWebEngineScript Maven / Gradle / Ivy
Show all versions of qtjambi-webenginecore Show documentation
package io.qt.webengine.core;
import io.qt.*;
/**
* Encapsulates a JavaScript program
* Java wrapper for Qt class QWebEngineScript
*/
public class QWebEngineScript extends QtObject
implements java.lang.Cloneable
{
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(QWebEngineScript.class);
/**
* Java wrapper for Qt enum QWebEngineScript::InjectionPoint
*/
public enum InjectionPoint implements QtEnumerator {
/**
* Representing QWebEngineScript:: Deferred
*/
Deferred(0),
/**
* Representing QWebEngineScript:: DocumentReady
*/
DocumentReady(1),
/**
* Representing QWebEngineScript:: DocumentCreation
*/
DocumentCreation(2);
static {
QtJambi_LibraryUtilities.initialize();
}
private InjectionPoint(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
@Override
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull InjectionPoint resolve(int value) {
switch (value) {
case 0: return Deferred;
case 1: return DocumentReady;
case 2: return DocumentCreation;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Java wrapper for Qt enum QWebEngineScript::ScriptWorldId
*/
public enum ScriptWorldId implements QtEnumerator {
/**
* Representing QWebEngineScript:: MainWorld
*/
MainWorld(0),
/**
* Representing QWebEngineScript:: ApplicationWorld
*/
ApplicationWorld(1),
/**
* Representing QWebEngineScript:: UserWorld
*/
UserWorld(2);
static {
QtJambi_LibraryUtilities.initialize();
}
private ScriptWorldId(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
@Override
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull ScriptWorldId resolve(int value) {
switch (value) {
case 0: return MainWorld;
case 1: return ApplicationWorld;
case 2: return UserWorld;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QWebEngineScript:: QWebEngineScript()
*/
public QWebEngineScript(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QWebEngineScript instance);
/**
* See QWebEngineScript:: QWebEngineScript(QWebEngineScript)
* @param other
*/
public QWebEngineScript(io.qt.webengine.core.@NonNull QWebEngineScript other){
super((QPrivateConstructor)null);
initialize_native(this, other);
}
private native static void initialize_native(QWebEngineScript instance, io.qt.webengine.core.QWebEngineScript other);
/**
* See QWebEngineScript:: injectionPoint()const
* @return
*/
@QtPropertyReader(name="injectionPoint")
@QtUninvokable
public final io.qt.webengine.core.QWebEngineScript.@NonNull InjectionPoint injectionPoint(){
return io.qt.webengine.core.QWebEngineScript.InjectionPoint.resolve(injectionPoint_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int injectionPoint_native_constfct(long __this__nativeId);
/**
* See QWebEngineScript:: name()const
* @return
*/
@QtPropertyReader(name="name")
@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 QWebEngineScript:: operator=(QWebEngineScript)
* @param other
*/
@QtUninvokable
public final void assign(io.qt.webengine.core.@NonNull QWebEngineScript other){
assign_native_cref_QWebEngineScript(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native void assign_native_cref_QWebEngineScript(long __this__nativeId, long other);
/**
* See QWebEngineScript:: operator==(QWebEngineScript)const
* @param other
* @return
*/
@QtUninvokable
public final boolean equals(io.qt.webengine.core.@NonNull QWebEngineScript other){
return equals_native_cref_QWebEngineScript_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native boolean equals_native_cref_QWebEngineScript_constfct(long __this__nativeId, long other);
/**
* See QWebEngineScript:: runsOnSubFrames()const
* @return
*/
@QtPropertyReader(name="runsOnSubFrames")
@QtUninvokable
public final boolean runsOnSubFrames(){
return runsOnSubFrames_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean runsOnSubFrames_native_constfct(long __this__nativeId);
/**
* See QWebEngineScript:: setInjectionPoint(QWebEngineScript::InjectionPoint)
* @param arg__1
*/
@QtPropertyWriter(name="injectionPoint")
@QtUninvokable
public final void setInjectionPoint(io.qt.webengine.core.QWebEngineScript.@NonNull InjectionPoint arg__1){
setInjectionPoint_native_QWebEngineScript_InjectionPoint(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1.value());
}
@QtUninvokable
private native void setInjectionPoint_native_QWebEngineScript_InjectionPoint(long __this__nativeId, int arg__1);
/**
* See QWebEngineScript:: setName(QString)
* @param arg__1
*/
@QtPropertyWriter(name="name")
@QtUninvokable
public final void setName(java.lang.@NonNull String arg__1){
setName_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1);
}
@QtUninvokable
private native void setName_native_cref_QString(long __this__nativeId, java.lang.String arg__1);
/**
* See QWebEngineScript:: setRunsOnSubFrames(bool)
* @param on
*/
@QtPropertyWriter(name="runsOnSubFrames")
@QtUninvokable
public final void setRunsOnSubFrames(boolean on){
setRunsOnSubFrames_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), on);
}
@QtUninvokable
private native void setRunsOnSubFrames_native_bool(long __this__nativeId, boolean on);
/**
* See QWebEngineScript:: setSourceCode(QString)
* @param arg__1
*/
@QtPropertyWriter(name="sourceCode")
@QtUninvokable
public final void setSourceCode(java.lang.@NonNull String arg__1){
setSourceCode_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1);
}
@QtUninvokable
private native void setSourceCode_native_cref_QString(long __this__nativeId, java.lang.String arg__1);
/**
* See QWebEngineScript:: setSourceUrl(QUrl)
* @param url
*/
@QtPropertyWriter(name="sourceUrl")
@QtUninvokable
public final void setSourceUrl(io.qt.core.@NonNull QUrl url){
setSourceUrl_native_cref_QUrl(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(url));
}
@QtUninvokable
private native void setSourceUrl_native_cref_QUrl(long __this__nativeId, long url);
/**
* See QWebEngineScript:: setWorldId(quint32)
* @param arg__1
*/
@QtPropertyWriter(name="worldId")
@QtUninvokable
public final void setWorldId(int arg__1){
setWorldId_native_quint32(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1);
}
@QtUninvokable
private native void setWorldId_native_quint32(long __this__nativeId, int arg__1);
/**
* See QWebEngineScript:: sourceCode()const
* @return
*/
@QtPropertyReader(name="sourceCode")
@QtUninvokable
public final java.lang.@NonNull String sourceCode(){
return sourceCode_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String sourceCode_native_constfct(long __this__nativeId);
/**
* See QWebEngineScript:: sourceUrl()const
* @return
*/
@QtPropertyReader(name="sourceUrl")
@QtUninvokable
public final io.qt.core.@NonNull QUrl sourceUrl(){
return sourceUrl_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QUrl sourceUrl_native_constfct(long __this__nativeId);
/**
* See QWebEngineScript:: swap(QWebEngineScript&)
* @param other
*/
@QtUninvokable
public final void swap(io.qt.webengine.core.@StrictNonNull QWebEngineScript other){
java.util.Objects.requireNonNull(other, "Argument 'other': null not expected.");
swap_native_ref_QWebEngineScript(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native void swap_native_ref_QWebEngineScript(long __this__nativeId, long other);
/**
* See QWebEngineScript:: worldId()const
* @return
*/
@QtPropertyReader(name="worldId")
@QtUninvokable
public final int worldId(){
return worldId_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int worldId_native_constfct(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QWebEngineScript(QPrivateConstructor p) { super(p); }
/**
* See QWebEngineScript:: operator==(QWebEngineScript)const
*/
@Override
@QtUninvokable
public boolean equals(Object other) {
if (other==null || other instanceof io.qt.webengine.core.QWebEngineScript) {
return equals((io.qt.webengine.core.QWebEngineScript) other);
}
return false;
}
/**
* Returns the objects's hash code computed by qHash(QWebEngineScript)
.
*/
@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, QWebEngineScript)
*/
@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.
See QWebEngineScript:: QWebEngineScript(QWebEngineScript)
*/
@QtUninvokable
@Override
public QWebEngineScript clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QWebEngineScript clone_native(long __this_nativeId);
/**
* @hidden
* Kotlin property getter. In Java use {@link #injectionPoint()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final io.qt.webengine.core.QWebEngineScript.@NonNull InjectionPoint getInjectionPoint() {
return injectionPoint();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #name()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final java.lang.@NonNull String getName() {
return name();
}
/**
* @deprecated Use {@link #assign(io.qt.webengine.core.QWebEngineScript)} instead.
*/
@Deprecated
@QtUninvokable
public final void set(io.qt.webengine.core.@NonNull QWebEngineScript other) {
assign(other);
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #runsOnSubFrames()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final boolean getRunsOnSubFrames() {
return runsOnSubFrames();
}
/**
* Overloaded function for {@link #setSourceUrl(io.qt.core.QUrl)}.
*/
@QtUninvokable
public final void setSourceUrl(java.lang.@NonNull String url) {
setSourceUrl(new io.qt.core.QUrl(url));
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #sourceCode()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final java.lang.@NonNull String getSourceCode() {
return sourceCode();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #sourceUrl()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final io.qt.core.@NonNull QUrl getSourceUrl() {
return sourceUrl();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #worldId()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final int getWorldId() {
return worldId();
}
}