Monado OpenXR Runtime
comp_window_peek.h
Go to the documentation of this file.
1// Copyright 2022, Simon Zeni <simon@bl4ckb0ne.ca>
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Displays the content of one or both eye onto a desktop window
6 * @author Simon Zeni <simon@bl4ckb0ne.ca>
7 * @ingroup comp_main
8 */
9
10#pragma once
11
12#include "xrt/xrt_config_have.h"
13
14#ifndef XRT_FEATURE_WINDOW_PEEK
15#error "XRT_FEATURE_WINDOW_PEEK not enabled"
16#endif
17
18#include "os/os_threading.h"
19
20struct comp_compositor;
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26enum comp_window_peek_eye
27{
28 COMP_WINDOW_PEEK_EYE_LEFT = 0,
29 COMP_WINDOW_PEEK_EYE_RIGHT = 1,
30 COMP_WINDOW_PEEK_EYE_BOTH = 2,
31};
32
33struct comp_window_peek;
34
35struct comp_window_peek *
36comp_window_peek_create(struct comp_compositor *c);
37
38void
39comp_window_peek_destroy(struct comp_window_peek **w_ptr);
40
41void
42comp_window_peek_blit(struct comp_window_peek *w, VkImage src, int32_t width, int32_t height);
43
44/*!
45 *
46 * Getter for the peek window's eye enum.
47 * This is a getter function so that struct comp_window_peek can be private.
48 *
49 * @param[in] w The peek window struct this compositor has.
50 * @return The eye that the peek window wants to display.
51 *
52 */
53enum comp_window_peek_eye
55
56/*!
57 * Gets the required vulkan instance extensions for comp_window_peek support
58 *
59 * @param[inout] out_required_list list of string containing the required instance extensions to enable,
60 * the list may already contain some/all of the required, duplicates will
61 * not be added.
62 */
63bool
65
66#ifdef __cplusplus
67}
68#endif
enum comp_window_peek_eye comp_window_peek_get_eye(struct comp_window_peek *w)
Getter for the peek window's eye enum.
Definition: comp_window_peek.c:470
bool comp_window_peek_get_vk_instance_exts(struct u_string_list *out_required_list)
Gets the required vulkan instance extensions for comp_window_peek support.
Definition: comp_window_peek.c:476
Wrapper around OS threading native functions.
Main compositor struct tying everything in the compositor together.
Definition: comp_compositor.h:91
Definition: comp_window_peek.c:31
Definition: u_string_list.cpp:19