Class XRPermissionRequest
- All Implemented Interfaces:
Proxy, PermissionRequest
A permission request for accessing virtual reality (VR) and augmented reality (AR) devices, including sensors and head-mounted displays.
WebKitXRPermissionRequest represents a request for permission to decide whether WebKit can initialize an XR session through the WebXR API.
When a WebKitXRPermissionRequest is not handled by the user, it is denied by default.
- Since:
- 2.52
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInner class implementing a builder pattern to construct a GObject with properties.static classNested classes/interfaces inherited from class GObject
GObject.NotifyCallback, GObject.ObjectClassNested classes/interfaces inherited from interface PermissionRequest
PermissionRequest.PermissionRequest$Impl, PermissionRequest.PermissionRequestInterface -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new XRPermissionRequest.XRPermissionRequest(MemorySegment address) Create a XRPermissionRequest instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected XRPermissionRequestasParent()Return this instance as if it were its parent type.static XRPermissionRequest.Builder<? extends XRPermissionRequest.Builder> builder()AXRPermissionRequest.Builderobject constructs aXRPermissionRequestwith the specified properties.Gets the optional features that need user consent.Gets the required features that need user consent.Gets the features requested by the origin for the XR device, which are either granted by default or have been explicitly granted by the user.static MemoryLayoutThe memory layout of the native struct.Gets the full set of optional features requested by the web application.Gets the full set of required features requested by the web application.Gets the security origin that initiated the permission request.Gets the session mode for which permission is being requested.static @Nullable TypegetType()Get the GType of the XRPermissionRequest class.voidsetGrantedOptionalFeatures(Set<XRSessionFeatures> granted) Sets which optional features should be granted if the permission request is allowed.voidsetGrantedOptionalFeatures(XRSessionFeatures... granted) Sets which optional features should be granted if the permission request is allowed.Methods inherited from class GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newv, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withPropertiesMethods inherited from class TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class ProxyInstance
equals, handle, hashCodeMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PermissionRequest
allow, deny
-
Constructor Details
-
XRPermissionRequest
Create a XRPermissionRequest instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
XRPermissionRequest
public XRPermissionRequest()Create a new XRPermissionRequest.
-
-
Method Details
-
getType
Get the GType of the XRPermissionRequest class.- Returns:
- the GType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
Return this instance as if it were its parent type. Comparable to the Javasuperkeyword, but ensures the parent typeclass is also used in native code. -
getConsentOptionalFeatures
Gets the optional features that need user consent.
These features can be granted by calling webkit_xr_permission_request_set_granted_optional_features() before allowing the request with webkit_permission_request_allow().
- Returns:
- a
WebKitXRSessionFeaturesflag combination - Since:
- 2.52
-
getConsentRequiredFeatures
Gets the required features that need user consent.
These features are automatically granted if the request is allowed with webkit_permission_request_allow().
- Returns:
- a
WebKitXRSessionFeaturesflag combination - Since:
- 2.52
-
getGrantedFeatures
Gets the features requested by the origin for the XR device, which are either granted by default or have been explicitly granted by the user.- Returns:
- a
WebKitXRSessionFeaturesflag combination - Since:
- 2.52
-
getOptionalFeaturesRequested
Gets the full set of optional features requested by the web application.
This includes both already granted features and those requiring consent.
- Returns:
- a
WebKitXRSessionFeaturesflag combination - Since:
- 2.52
-
getRequiredFeaturesRequested
Gets the full set of required features requested by the web application.
This includes both already granted features and those requiring consent.
- Returns:
- a
WebKitXRSessionFeaturesflag combination - Since:
- 2.52
-
getSecurityOrigin
Gets the security origin that initiated the permission request.- Returns:
- the
WebKitSecurityOriginthat initiated the request - Since:
- 2.52
-
getSessionMode
Gets the session mode for which permission is being requested.- Returns:
- a
WebKitXRSessionMode - Since:
- 2.52
-
setGrantedOptionalFeatures
Sets which optional features should be granted if the permission request is allowed.
This function should be called with a subset of the features from webkit_xr_permission_request_get_consent_optional_features() before calling webkit_permission_request_allow(). If the request is denied, no features are granted, regardless of what is set here.
- Parameters:
granted- granted features- Since:
- 2.52
-
setGrantedOptionalFeatures
Sets which optional features should be granted if the permission request is allowed.
This function should be called with a subset of the features from webkit_xr_permission_request_get_consent_optional_features() before calling webkit_permission_request_allow(). If the request is denied, no features are granted, regardless of what is set here.
- Parameters:
granted- granted features- Since:
- 2.52
-
builder
AXRPermissionRequest.Builderobject constructs aXRPermissionRequestwith the specified properties. Use the variousset...()methods to set properties, and finish construction withXRPermissionRequest.Builder.build().- Returns:
- the builder object
-