Monado OpenXR Runtime
Loading...
Searching...
No Matches
oxr_bindings Namespace Reference

Functions

 get_verify_switch_body (dict_of_lists, profile, profile_name, tab_char)
 
 get_verify_func_switch (dict_of_lists, profile, profile_name, availability)
 
 get_verify_func_body (profile, dict_name, availability)
 
 get_verify_func (profile, dict_name, suffix)
 
 get_verify_functions (profile)
 
 get_component_binding_point_paths (component)
 
 quote_str_or_null (value)
 
 get_upgrade_target_paths (identifier)
 
 should_generate_upgrade (identifier)
 
 get_dpad_binding_point_enum (path)
 
 get_component_priority_group (component)
 
 get_binding_value_transform (binding_path)
 
 get_profile_binding_point_paths (profile)
 
 validate_profile_templates (profile)
 
 validate_rebindings (bindings, rebindings)
 
 is_rebinding_helper (rebinding)
 
 get_expanded_rebinding_entries (name, rebinding, rebindings, errors=None, stack=None)
 
 iter_rebinding_bindings (rebinding)
 
 append_binding_point_template (lines, idx, kind, subaction_path, steamvr_path, localized_name, priority_group, path, upgrade_targets=None, dpad_binding_point="OXR_DPAD_BINDING_POINT_NONE", dpad_emulation_path=None, value_transform="OXR_BINDING_VALUE_TRANSFORM_NONE", input_value="0", output_value="0")
 
 generate_profile_template_entry (profile)
 
 generate_rebinding_profile_template_entry (name, rebinding)
 
 generate_bindings_c (output, b, rebindings)
 
 generate_bindings_h (output, b, rebindings)
 
 main ()
 

Detailed Description

Generate OpenXR binding code using the auxiliary bindings scripts.

Function Documentation

◆ generate_bindings_c()

oxr_bindings.generate_bindings_c (   output,
  b,
  rebindings 
)
Generate the file to verify subpaths on a interaction profile.

References generate_profile_template_entry(), and get_verify_functions().

Referenced by main().

◆ generate_bindings_h()

oxr_bindings.generate_bindings_h (   output,
  b,
  rebindings 
)
Generate header for the verify subpaths functions.

Referenced by main().

◆ generate_profile_template_entry()

oxr_bindings.generate_profile_template_entry (   profile)
Generate a single oxr_profile_template entry. Returns a string.

References get_component_binding_point_paths(), get_upgrade_target_paths(), iter_rebinding_bindings(), and validate_profile_templates().

Referenced by generate_bindings_c().

◆ get_component_binding_point_paths()

oxr_bindings.get_component_binding_point_paths (   component)
Return every concrete binding point path emitted for a component.

Referenced by generate_profile_template_entry(), and get_profile_binding_point_paths().

◆ get_profile_binding_point_paths()

oxr_bindings.get_profile_binding_point_paths (   profile)
Return all paths accepted by generated binding point templates.

References get_component_binding_point_paths().

Referenced by validate_profile_templates(), and validate_rebindings().

◆ get_upgrade_target_paths()

oxr_bindings.get_upgrade_target_paths (   identifier)
Return concrete binding point paths for each action kind upgrade.

References get_upgrade_target_paths().

Referenced by generate_profile_template_entry(), get_upgrade_target_paths(), and validate_profile_templates().

◆ get_verify_func()

oxr_bindings.get_verify_func (   profile,
  dict_name,
  suffix 
)
returns a list of lines

References get_verify_func_body().

Referenced by get_verify_functions().

◆ get_verify_func_body()

oxr_bindings.get_verify_func_body (   profile,
  dict_name,
  availability 
)
returns a list of lines

References get_verify_func_body(), and get_verify_func_switch().

Referenced by get_verify_func(), and get_verify_func_body().

◆ get_verify_func_switch()

oxr_bindings.get_verify_func_switch (   dict_of_lists,
  profile,
  profile_name,
  availability 
)
Generate function to check if a string is in a set of strings.
Input is a dict where keys are length and
the values are lists of strings of that length. And a suffix if any.
Returns a list of lines.

References get_verify_switch_body(), and bindings.is_valid_version().

Referenced by get_verify_func_body().

◆ get_verify_functions()

oxr_bindings.get_verify_functions (   profile)
returns a list of lines

References get_verify_func(), and bindings.is_valid_version().

Referenced by generate_bindings_c().

◆ get_verify_switch_body()

oxr_bindings.get_verify_switch_body (   dict_of_lists,
  profile,
  profile_name,
  tab_char 
)
Generate function to check if a string is in a set of strings.
Input is a dict where keys are length and
the values are lists of strings of that length. And a suffix if any.
Returns a list of lines.

Referenced by get_verify_func_switch().

◆ iter_rebinding_bindings()

oxr_bindings.iter_rebinding_bindings (   rebinding)
Yield enabled source and target rebinding paths.

Referenced by generate_profile_template_entry().

◆ main()

oxr_bindings.main ( )
Handle command line and generate file(s).

References generate_bindings_c(), generate_bindings_h(), main(), and validate_rebindings().

Referenced by main().

◆ validate_profile_templates()

oxr_bindings.validate_profile_templates (   profile)
Validate generated profile template metadata before writing C code.

References get_profile_binding_point_paths(), and get_upgrade_target_paths().

Referenced by generate_profile_template_entry().

◆ validate_rebindings()

oxr_bindings.validate_rebindings (   bindings,
  rebindings 
)
Validate rebinding JSON against generated binding point paths.

References get_profile_binding_point_paths().

Referenced by main().