Expand description
Raw bindings to the QAROS streaming C API (qar_streaming.h).
The header’s public qar_* functions are static inline wrappers that
forward to the exported qar_impl_* symbols, so these bindings target the
qar_impl_* symbols directly. All of them are reached through a
QarApi function table, which comes from one of two loading modes:
QarApi::load_default(default): findsqar-streaming-c.dllwith the runtime lookup every QAROS binding follows (already loaded, beside the binding, the runtime of the QAROS instanceQAR_INSTANCEnames, the installed QAROS,PATH), opens it at runtime and resolves every symbol up front.QarApi::loadopens one given file instead. A missing symbol is aLoadErrorlisting all missing names, instead of the header’sabort()at the first call.QarApi::linked(featurelink): the symbols are declaredextern "C"and resolved by the import libraryqar-streaming-c.lib; the DLL must be present at process start.
The header’s qar_*_default() initializers are also static inline and
absent from the binary; defaults ports them, including the
QarStructureHeader stamping every init structure needs.
Bindings are generated per target by cargo xtask bindgen and committed:
x86_64-pc-windows-msvc (the runtime’s platform, with the D3D11 types as
opaque structs), x86_64-unknown-linux-gnu (libqar-streaming-c.so), and
one development target without a runtime, for building and testing against
qaros-stub (aarch64-apple-darwin, used on every macOS host), which carries the D3D11
types and functions too so that the stub can emulate the D3D11 render sender.
cargo xtask bindgen <target> and a
cfg entry below add another target.
Modules§
- defaults
- Ports of the header’s
static inlineqar_*_default()initializers.
Macros§
- qar_
impl_ function_ list - Invokes
$callback!with every exportedqar_impl_*declaration.
Structs§
- ID3D11
Device1 - ID3D11
Device Context1 - ID3D11
Texture2D - IDXGI
Keyed Mutex - Lookup
Attempt - One place the default lookup looked at and what it met there.
- QarAction
Severity - @brief Mirrors qar::ActionSeverity for progress callbacks.
- QarApi
- Table of the exported
qar_impl_*functions. - QarApp
Scale Sensitivity Mode - QarApp
State - @deprecated Read qar_peer_spec_get_presence() and QarPeerPresence instead. Every session claims QAR_APP_STATE_RUNNING as soon as it is created, so UNKNOWN, INITIALIZING and RUNNING say nothing beyond “the peer joined”, and a peer is never “fully configured” by this value. Kept, with its values, for applications that already read it; qar_peer_spec_get_app_state() keeps working.
- QarApp
Volume Axis Flags - QarApp
Volume Controller RayLine Style - QarApp
Volume Controller RayStyle - QarApp
Volume Editing Status - @brief Whether a peer is editing the volume itself - moving or resizing its box. A peer manipulating the app with a gesture is not editing it; see qar_app_volume_get_gesture_holder().
- QarApp
Volume Gesture Allowed Peers Ext - @brief Extension: the peers whose gestures may move or scale the app.
- QarApp
Volume Gesture Configuration - QarApp
Volume Gesture Handle - QarApp
Volume Gesture Mapping Rule - QarApp
Volume Handle - QarApp
Volume Id - @brief App volume identifier (fixed-size).
- QarApp
Volume Init - QarApp
Volume Lifetime Status - QarApp
Volume Size - @brief The three frames every app volume API is expressed in.
- QarApp
World Anchor - QarCancel
Token Handle - QarColor
- QarColor
Alpha Mode - @brief What a stream’s colour alpha means.
- QarColor
Encoding - @brief What the numbers in a render sender’s colour texture mean.
- QarDXGI
Keyed Mutex Sync - QarDevice
Category - @brief What kind of device a peer is (qar_peer_spec_get_category()).
- QarDevice
Hands With Joints - QarForget
Init - @brief Teardown — erase a persisted identity slot.
- QarFov
- @brief Field of view of one render view, in view space: angles in radians from the view’s -Z axis, OpenXR signs - left and down negative, right and up positive.
- QarFrame
Layout - QarGeo
Anchor Frame - @brief Fully defined anchor frame in world coordinates.
- QarGesture
AppTransform Mapping - QarGesture
Kind - QarGesture
Phase - QarGpu
Device IdType - QarGraphicsAPI
- QarGraphics
Device Disabled Ext - @brief Creates the session without a graphics device.
- QarGraphics
Device Id - @brief Selects the graphics adapter used while initializing a C API session.
- QarGui
Panel Content Type - QarGui
Panel Gesture Handle - QarGui
Panel Gesture Kind - @brief What a contact on a GUI panel was recognised as.
- QarGui
Panel Handle - QarGui
Panel Id - @brief GUI panel identifier (fixed-size).
- QarGui
Panel Init - QarGui
Panel Point - @brief A position on a GUI panel, in panel-content-space pixels.
- QarGui
Panel Served Content Ext - @brief Extension that creates a GUI panel showing a page of a content bundle.
- QarGui
Panel Size - @brief The three frames every GUI panel API is expressed in.
- QarGui
Panel State - QarGui
Panel Stream IdExt - @brief Extension that creates a GUI panel showing a logical video stream.
- QarGui
Panel UrlExt - @brief Extension that creates a GUI panel showing a website URL.
- QarHand
Joint - QarHand
Joint Location - @brief One XR_EXT_hand_tracking joint.
- QarHand
Joint Velocity - @brief Velocity of one joint.
- QarHand
Joints - @brief One hand’s tracking state.
- QarHandedness
- @brief Left or right.
- QarImage
Size - @brief Image size (pixels).
- QarJoin
HubAs Member Init - @brief Join the QAROS hub on this PC to a primary hub as its member (qar_runtime_join_hub_as_member).
- QarLibrary
Init - @brief Library initialization parameters.
- QarLog
Severity - @brief Logging severity filter.
- QarMember
HubInvitation AppGrant Ext - @brief Extension: the invitation also grants one remote app on the joining PC, chained into QarMemberHubInvitationInit.header.next.
- QarMember
HubInvitation Handle - QarMember
HubInvitation Init - @brief Create a member-hub invitation on the primary hub of this PC (qar_runtime_create_member_hub_invitation).
- QarMember
HubInvitation Permission Flag Bits - @brief The permissions a member-hub invitation grants at the primary hub (QarMemberHubInvitationInit::permissions).
- QarNear
Far - @brief Near and far clip distances along a view’s -Z, in the units of the poses the view was rendered with: app units for a render sender bound to an app volume. near > far declares reverse-Z.
- QarOnboard
Code Ext - @brief Extension: onboard with a short pairing code minted for the hub’s operators.
- QarOnboard
Host Ext - @brief Extension: override the hub discovery endpoint for qar_runtime_onboard when QarOnboardCodeExt is chained.
- QarOnboard
Init - @brief Base init for full onboarding.
- QarOnboard
Invite Ext - @brief Extension: onboard from a full invite blob - a co-process invite (qar_session_request_onboarding_invite) or the launch invite QAROS hands an app it starts.
- QarOnboard
Local AppExt - @brief Extension: join the QAROS hub installed on this PC as a local source app, with no code.
- QarOnboard
Local AppTag Ext - @brief Extension: the app tag of a local source app, telling several instances of one approved app apart.
- QarOnboard
Peer IdExt - @brief Extension: join the session under a peer id chosen by the caller.
- QarOnboard
Remote AppGrant Ext - @brief Extension: redeem a remote-app grant while onboarding as a local app on another PC, chained into QarOnboardInit.header.next next to QarOnboardLocalAppExt (with any other mode: QAR_STATUS_ARGUMENT_NOT_SUPPORTED).
- QarOnboarding
Id - @brief Identity slot key, generated by the runtime on first onboard.
- QarOnboarding
Invite Handle - QarOpen
Qaros View Info - @brief Which QAROS view qar_session_open_qaros_view() opens.
- QarPanel
Content Bundle Id - @brief Names one content bundle: the peer that published it and serves its files, and its name, unique per publisher.
- QarPanel
Content File - @brief One file handed to qar_panel_content_publish_files().
- QarPanel
Content Message - @brief A message a served panel sent to its content owner.
- QarPeer
Device Identity - @brief Extension: the device this application describes itself as.
- QarPeer
Id - @brief Peer identifier.
- QarPeer
Presence - @brief Whether a peer is here, as an application should act on it.
- QarPeer
Presentation - @brief Presentation metadata advertised to other peers.
- QarPeer
Role - @brief What a peer is in the streaming graph (qar_peer_spec_get_role()).
- QarPeer
Spec Handle - QarPixel
Format - QarPose
- @brief Pose combining position and orientation. Its space is named by the field or function holding it; see @ref qar_coordinate_systems.
- QarQaros
Device Kind - @brief The device type a QAR_QAROS_VIEW_DEVICE_SETUP view shows the setup of.
- QarQaros
View - @brief A predefined view of the QAROS Visualizer an app can open with qar_session_open_qaros_view(). Each is the dialog a qaros://visualizer link of the same name opens.
- QarQuaternion
- @brief Rotation quaternion, Hamilton, stored x, y, z, w. Its space is named by the field or function holding it; see @ref qar_coordinate_systems.
- QarRejoin
Init - @brief Continue / rejoin the last persisted session (situation: continue).
- QarRender
Frame Info Handle - QarRender
Frame Show - @brief Parameters describing how to present/show a rendered frame.
- QarRender
Frame Show View Overrides Ext - @brief Extension: override per-view pose/FOV for this frame.
- QarRender
Frame View - QarRender
Frame View Override - @brief Per-view pose/FOV override entry.
- QarRender
Loop - When a render sender’s application renders its frames.
- QarRender
Sender Alpha Mode Ext - @brief Declares what a render sender’s colour alpha means.
- QarRender
Sender Color Encoding Ext - @brief Declares what the numbers in a render sender’s colour texture mean.
- QarRender
Sender Init - @brief Rendering stream sender configuration.
- QarRender
Sender Render Loop Ext - @brief Declares when a render sender’s application renders.
- QarRender
Sender Stream State - What a render sender’s stream is doing right now, as qar_render_sender_get_stream_state() reports it. Values are append-only.
- QarRender
Stream Request Handle - QarRender
Stream Sender Handle - QarRequest
Invite Init - @brief Mint a co-process invite: a one-time invite for a process this app starts on the same PC (a companion in another language, a helper process).
- QarResult
- @brief Result returned by most API calls.
- QarRuntime
Ephemeral Storage Ext - @brief Extension: keep this runtime’s identities in memory only.
- QarRuntime
Handle - QarRuntime
Info - @brief What the loaded qar-streaming-c reports about itself (qar_runtime_info).
- QarRuntime
Init - @brief Runtime initialization parameters.
- QarSession
Change Cause - @brief Why the session moved into another session id.
- QarSession
Handle - QarSession
Id - @brief Session identifier (fixed-size).
- QarSession
Invite Target AppInit - @brief Ask this machine’s hub to start a target app for one AR device.
- QarSession
Lifecycle Info - @brief One state of a session’s lifecycle.
- QarSession
Lifecycle State - @brief Where a session stands in its hub’s session lifecycle.
- QarStatus
Code - @brief Status codes exposed by the C API.
- QarStream
Id - @brief Stream identifier (fixed-size).
- QarStream
Params D3D11 - QarStream
Params Vulkan - The application’s own Vulkan device for a sender or receiver. It must be on the session’s GPU, the adapter qar_session_get_graphics_device_id() reports; a device on another GPU is refused with QAR_STATUS_MEDIA_STREAMING_DEVICE_ON_ANOTHER_ADAPTER.
- QarStructure
Header - QarStructure
Type - @brief Structure type enumeration for init structures and extensions.
- QarSync
Frame D3D11 - QarSync
Frame Vulkan - QarTexture
Size - @brief Texture description including format and array layers.
- QarTime
Point - @brief Wall-clock instant: nanoseconds since the Unix epoch (UTC).
- QarVector3
- @brief 3D vector. Its space is named by the field or function holding it; see @ref qar_coordinate_systems.
- QarVector3d
- @brief Double-precision 3D vector.
- QarVideo
Frame Cpu - QarVideo
Frame D3D11 - QarVideo
Frame Layout - @brief Video frame layout with views and backing textures.
- QarVideo
Frame View - @brief Video sub-stream view into a texture.
- QarVideo
Frame View Eye - QarVideo
Frame View Type - QarVideo
Frame Vulkan - QarVideo
Sender Handle - QarVideo
Sender Init - Configuration for a logical video sender whose StreamId is generated by the library. Exactly one extension is required for a GPU API:
- QarVideo
Texture Cpu - QarVideo
Texture D3D11 - QarVideo
Texture Vulkan - QarWorld
Reference System - @brief World reference systems for geographic positioning.
- VkDevice_
T - VkPhysical
Device_ T - _LUID
Enums§
- Load
Error - Why
QarApi::loadfailed. - Lookup
Outcome - What the lookup met at one place.
- Lookup
Step - One place the default lookup considers, in lookup order. Its
Displayis the name the lookup’s messages give the place (QAR_INSTANCEforLookupStep::Instance).
Constants§
- DEFAULT_
INSTANCE_ NAME - The name of the installed (
HKLM) instance:QAR_INSTANCE=defaultloads the installed QAROS’s runtime. - INSTALL_
FOLDER_ VALUE - The value under
INSTALL_REGISTRY_KEYthat holds the installation folder; a per-user instance record may hold one too. - INSTALL_
REGISTRY_ KEY - The registry key, under
HKEY_LOCAL_MACHINE, where the QAROS installer records its folder (step 3, and thedefaultinstance of step 2). - INSTANCES_
REGISTRY_ KEY - The key, under
HKEY_CURRENT_USER, holding one per-user record per named instance (step 2): the same records the runtime reads to pick the hub of a named instance. - INSTANCE_
NAME_ MAX_ LENGTH - The longest instance name. A name is 1 to 64 characters of
A-Z a-z 0-9 . _ -. - INSTANCE_
RUNTIME_ FOLDER_ VALUE - The value of a per-user instance record naming the folder that holds that instance’s runtime (a development hub records its build output there).
- INSTANCE_
VARIABLE - The environment variable naming the QAROS instance an application belongs to (step 2): the runtime is loaded from that instance’s folder, and enrols with that instance’s hub. A QAROS development hub sets it for the apps it starts. Read on Windows only.
- LIBRARY_
FILE_ NAME - File name of the C API library inside the binary package’s
bin/. - QAR_
HAND_ JOINT_ COUNT - QAR_
MAX_ APP_ TAG_ LENGTH - QAR_
MAX_ APP_ VOLUME_ GESTURE_ MAPPING_ RULES - QAR_
MAX_ FRAME_ TEXTURES - QAR_
MAX_ FRAME_ VIEWS - QAR_
MAX_ ID_ LENGTH - QAR_
MAX_ STRING_ LENGTH - QAR_
ORIENTATION_ TRACKED_ BIT - QAR_
ORIENTATION_ VALID_ BIT - QAR_
PANEL_ CONTENT_ BUNDLE_ NAME_ MAX - QAR_
POSITION_ TRACKED_ BIT - QAR_
POSITION_ VALID_ BIT - QAR_
SYMBOL_ OPTIONAL_ ACTIVE - QAR_
SYMBOL_ OPTIONAL_ DEPRECATED - QAR_
SYMBOL_ OPTIONAL_ OPTIONAL_ SYMBOL - QAR_
UUID_ TEXT_ BUFFER_ SIZE - QAR_
UUID_ TEXT_ LENGTH - SYMBOL_
NAMES - Every
qar_impl_*symbol this binding requires, in table order.
Functions§
- installed_
bin_ folder <InstallFolder>\binof the QAROS installed on this PC, read fromHKLM\SOFTWARE\Quaternar\QAROS.Nonewhen QAROS is not installed, and always outside Windows.- instance_
runtime_ folder - The folder holding the runtime of QAROS instance
instance, as step 2 of the default lookup picks it: fordefaultthe installed QAROS’s<InstallFolder>\bin(installed_bin_folder); for any other name the fully qualified valueRuntimeFolderofHKCU\SOFTWARE\Quaternar\QAROS\Instances\<name>, which a QAROS development hub writes for the apps it starts, else that record’s fully qualified<InstallFolder>\bin.Nonewhen the name is not valid (crate::is_valid_instance_name), no folder is recorded, or outside Windows, which has no instance records. - is_
valid_ instance_ name - Whether
nameis a QAROS instance name: 1 toINSTANCE_NAME_MAX_LENGTHcharacters ofA-Z a-z 0-9 . _ -. - open_
package_ ⚠library - Opens a library file with the search rules
QarApi::loaduses: from its absolute path, its dependencies from its own folder and System32. For other libraries of a QAROS build, such as the test-only counterparts library. - requested_
instance - The value of
QAR_INSTANCE, exactly as set, when it is set and not empty (read lossily when it is not Unicode, which no instance name is). The default lookup reads it on Windows only.
Type Aliases§
- DWORD
- LONG
- LUID
- QarApp
Volume - App volume (opaque)
- QarApp
Volume Gesture - One mapped gesture on an app volume (opaque). Valid only for the duration of the callback it is handed to; see qar_app_volumes_subscribe_gesture_events.
- QarApp
Volume Gesture Mode Id - @brief Names one of an app volume’s gesture modes.
- QarCancel
Token - @name Opaque handles @{ */ /// Cancellation token (opaque)
- QarGui
Panel - GUI panel (opaque)
- QarGui
Panel Gesture - One recognised gesture on a GUI panel (opaque). Valid only for the duration of the callback it is handed to; see qar_gui_panels_subscribe_gesture_events.
- QarLuid
- QarMember
HubInvitation - Member-hub invitation (opaque) — a primary hub’s signed invitation that joins the QAROS hub on another PC to its session as a member (see qar_runtime_create_member_hub_invitation, qar_runtime_join_hub_as_member). A secret bearer credential: send it only over a trusted channel and never log it.
- QarMember
HubInvitation Permission Flags - A combination of QarMemberHubInvitationPermissionFlagBits.
- QarOnboarding
Invite - Onboarding invite (opaque) — a full invite blob: a co-process invite this app requested (qar_session_request_onboarding_invite) or the launch invite QAROS hands an app it starts; redeemed with QarOnboardInviteExt in qar_runtime_onboard.
- QarPeer
Spec - Peer spec (opaque)
- QarRender
Frame Info - Frame info for current render (opaque)
- QarRender
Sender - Render stream sender (opaque)
- QarRender
Stream Request - Pending render stream request (opaque)
- QarRuntime
- Runtime instance (opaque)
- QarSession
- Session instance (opaque)
- QarVideo
Sender - Producer-owned logical video sender (opaque).
- VkDevice
- VkDevice
Memory - VkFence
- VkFlags
- VkFormat
Feature Flags - VkImage
- VkImage
Layout - VkPhysical
Device - VkSemaphore
- qar_
app_ volume_ gesture_ event_ callback_ t - @brief Receives one mapped gesture on a subscribed app volume.
- qar_
app_ volume_ update_ callback_ t - qar_
gui_ panel_ gesture_ event_ callback_ t - @brief Receives one recognised gesture on a subscribed GUI panel.
- qar_
gui_ panel_ update_ callback_ t - qar_
panel_ content_ message_ callback_ t - @brief Called once per message a panel showing the bundle sent.
- qar_
peer_ update_ callback_ t - @brief Callback invoked when a peer spec changes.
- qar_
progress_ callback_ t - @brief Shared progress callback (mirrors qar::ActionProgress).
- qar_
render_ sender_ begin_ frame_ callback_ t - qar_
render_ sender_ create_ callback_ t - qar_
render_ sender_ request_ callback_ t - Callback invoked for each pending render stream request.
- qar_
runtime_ onboard_ result_ callback_ t - @brief Result callback for the runtime onboarding / rejoin async calls.
- qar_
session_ lifecycle_ callback_ t - @brief Callback of qar_session_subscribe_lifecycle().
- qar_
session_ request_ invite_ result_ callback_ t - @brief Result callback for qar_session_request_onboarding_invite_async.
- qar_
target_ app_ invite_ result_ callback_ t - @brief Result callback for qar_session_invite_target_app_async.
- qar_
target_ app_ kill_ result_ callback_ t - @brief Result callback for qar_session_kill_target_app_async.