C Specification

The xrGetInputSourceLocalizedName function is defined as:

XrResult xrGetInputSourceLocalizedName(
    XrSession                                   session,
    XrPath                                      source,
    XrInputSourceLocalizedNameFlags             whichComponents,
    uint32_t                                    bufferCapacityInput,
    uint32_t*                                   bufferCountOutput,
    char*                                       buffer);

Parameters

Parameter Descriptions
  • session is a handle to the XrSession associated with the action that reported this source.

  • source is an XrPath representing the source. Typically this was returned by a call to xrGetBoundSourcesForAction.

  • whichComponents is any set of flags from XrInputSourceLocalizedNameFlagBits.

  • bufferCapacityInput is the capacity of the buffer, or 0 to indicate a request to retrieve the required capacity.

  • bufferCountOutput is a pointer to the count of name characters written (including the terminating \0), or a pointer to the required capacity in the case that bufferCapacityInput is 0.

  • buffer is a pointer to an application-allocated buffer that will be filled with the source name. It can be NULL if bufferCapacityInput is 0.

  • See Buffer Size Parameters chapter for a detailed description of retrieving the required buffer size.

Description

xrGetInputSourceLocalizedName returns a string for the input source in the current system locale. This string is appropriate for showing to users.

Valid Usage (Implicit)
  • session must be a valid XrSession handle

  • whichComponents must be a valid combination of XrInputSourceLocalizedNameFlagBits values

  • whichComponents must not be 0

  • If bufferCapacityInput is not 0, bufferCapacityInput must be a valid uint32_t value

  • If bufferCountOutput is not NULL, bufferCountOutput must be a pointer to a uint32_t value

  • If bufferCapacityInput is not 0, buffer must be a pointer to an array of bufferCapacityInput char values

Return Codes
On success, this command returns
  • XR_SUCCESS

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_PATH_INVALID

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_SIZE_INSUFFICIENT

See Also

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.