Monado OpenXR Runtime
qwerty_interface.h
Go to the documentation of this file.
1// Copyright 2021, Mateo de Mayo.
2// Copyright 2023, Collabora, Ltd.
3// SPDX-License-Identifier: BSL-1.0
4/*!
5 * @file
6 * @brief Interface to @ref drv_qwerty.
7 * @author Mateo de Mayo <mateodemayo@gmail.com>
8 * @ingroup drv_qwerty
9 */
10
11#pragma once
12
13#include "xrt/xrt_compiler.h"
14
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20
21typedef union SDL_Event SDL_Event;
22
23/*!
24 * @defgroup drv_qwerty Qwerty driver
25 * @ingroup drv
26 *
27 * @brief Driver for emulated HMD and controllers through keyboard and mouse.
28 */
29
30/*!
31 * @dir drivers/qwerty
32 *
33 * @brief @ref drv_qwerty files.
34 */
35
36/*!
37 * Process an SDL_Event (like a key press) and dispatches a suitable action
38 * to the appropriate qwerty_device.
39 *
40 * @note A qwerty_controller might not be in use (for example if you have
41 * physical controllers connected), though its memory will be modified by these
42 * events regardless. A qwerty_hmd not in use will not be modified as it never
43 * gets created.
44 *
45 * @ingroup drv_qwerty
46 */
47void
48qwerty_process_event(struct xrt_device **xdevs, size_t xdev_count, SDL_Event event);
49
50/*!
51 * Create all qwerty devices.
52 *
53 * @ingroup drv_qwerty
54 */
57 struct xrt_device **out_hmd,
58 struct xrt_device **out_left,
59 struct xrt_device **out_right);
60
61
62#ifdef __cplusplus
63}
64#endif
u_logging_level
Logging level enum.
Definition: u_logging.h:43
xrt_result_t qwerty_create_devices(enum u_logging_level log_level, struct xrt_device **out_hmd, struct xrt_device **out_left, struct xrt_device **out_right)
Create all qwerty devices.
Definition: qwerty_prober.c:25
void qwerty_process_event(struct xrt_device **xdevs, size_t xdev_count, SDL_Event event)
Process an SDL_Event (like a key press) and dispatches a suitable action to the appropriate qwerty_de...
Definition: qwerty_sdl.c:99
enum xrt_result xrt_result_t
Result type used across Monado.
A single HMD or input device.
Definition: xrt_device.h:241
Header holding common defines.