Monado OpenXR Runtime
comp_window_xcb.c File Reference

XCB window code. More...

#include <xcb/xcb.h>
#include <xcb/randr.h>
#include "util/u_misc.h"
#include "xrt/xrt_compiler.h"
#include "main/comp_window.h"
Include dependency graph for comp_window_xcb.c:

Data Structures

struct  comp_window_xcb_display
 Xcb display, xrandr output. More...
 
struct  comp_window_xcb
 A xcb connection and window. More...
 

Functions

static void comp_window_xcb_destroy (struct comp_target *ct)
 
static void comp_window_xcb_flush (struct comp_target *ct)
 
static XRT_MAYBE_UNUSED void comp_window_xcb_list_screens (struct comp_window_xcb *w, xcb_screen_t *screen)
 
static bool comp_window_xcb_init (struct comp_target *ct)
 
static struct comp_window_xcb_displaycomp_window_xcb_current_display (struct comp_window_xcb *w)
 
static bool comp_window_xcb_init_swapchain (struct comp_target *ct, uint32_t width, uint32_t height)
 
static int comp_window_xcb_connect (struct comp_window_xcb *w)
 
static void comp_window_xcb_create_window (struct comp_window_xcb *w, VkExtent2D extent)
 
static void comp_window_xcb_get_randr_outputs (struct comp_window_xcb *w)
 
static void comp_window_xcb_connect_delete_event (struct comp_window_xcb *w)
 
static void comp_window_xcb_set_full_screen (struct comp_window_xcb *w)
 
static xcb_atom_t comp_window_xcb_get_atom (struct comp_window_xcb *w, const char *name)
 
static VkResult comp_window_xcb_create_surface (struct comp_window_xcb *w, VkSurfaceKHR *out_surface)
 
static void comp_window_xcb_update_window_title (struct comp_target *ct, const char *title)
 
static struct vk_bundleget_vk (struct comp_window_xcb *cwx)
 
struct comp_targetcomp_window_xcb_create (struct comp_compositor *c)
 
static bool select_new_current_display (struct comp_target *ct)
 
static bool detect (const struct comp_target_factory *ctf, struct comp_compositor *c)
 
static bool create_target (const struct comp_target_factory *ctf, struct comp_compositor *c, struct comp_target **out_ct)
 

Variables

static const char * instance_extensions []
 
const struct comp_target_factory comp_target_factory_xcb
 

Detailed Description

Variable Documentation

◆ comp_target_factory_xcb

const struct comp_target_factory comp_target_factory_xcb
Initial value:
= {
.name = "X11(XCB) Windowed",
.identifier = "x11",
.requires_vulkan_for_create = false,
.is_deferred = true,
.required_instance_version = 0,
.required_instance_extensions = instance_extensions,
.required_instance_extension_count = ARRAY_SIZE(instance_extensions),
.optional_device_extensions = NULL,
.optional_device_extension_count = 0,
.detect = detect,
.create_target = create_target,
}
#define ARRAY_SIZE(a)
Array size helper.
Definition: xrt_compiler.h:30

◆ instance_extensions

const char* instance_extensions[]
static
Initial value:
= {
VK_KHR_XCB_SURFACE_EXTENSION_NAME,
}