Monado OpenXR Runtime
oxr_event.c File Reference

Holds event related functions. More...

#include "os/os_threading.h"
#include "util/u_misc.h"
#include "oxr_objects.h"
#include "oxr_logger.h"
#include "oxr_conversions.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
Include dependency graph for oxr_event.c:

Data Structures

struct  oxr_event
 

Macros

#define ALLOC(log, inst, event, extra)
 

Functions

void lock (struct oxr_instance *inst)
 
void unlock (struct oxr_instance *inst)
 
void * oxr_event_extra (struct oxr_event *event)
 
struct oxr_eventpop (struct oxr_instance *inst)
 
void push (struct oxr_instance *inst, struct oxr_event *event)
 
static XrResult oxr_event_alloc (struct oxr_logger *log, struct oxr_instance *inst, size_t size, struct oxr_event **out_event)
 
static bool is_session_link_to_event (struct oxr_event *event, XrSession session)
 
XrResult oxr_event_push_XrEventDataSessionStateChanged (struct oxr_logger *log, struct oxr_session *sess, XrSessionState state, XrTime time)
 
XrResult oxr_event_push_XrEventDataInteractionProfileChanged (struct oxr_logger *log, struct oxr_session *sess)
 
XrResult oxr_event_push_XrEventDataReferenceSpaceChangePending (struct oxr_logger *log, struct oxr_session *sess, XrReferenceSpaceType referenceSpaceType, XrTime changeTime, XrBool32 poseValid, const XrPosef *poseInPreviousSpace)
 
XrResult oxr_event_remove_session_events (struct oxr_logger *log, struct oxr_session *sess)
 This clears all pending events refers to the given session. More...
 
XrResult oxr_poll_event (struct oxr_logger *log, struct oxr_instance *inst, XrEventDataBuffer *eventData)
 Will return one event if available, also drain the sessions event queues. More...
 

Detailed Description

Holds event related functions.

Author
Jakob Bornecrantz jakob.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m

Macro Definition Documentation

◆ ALLOC

#define ALLOC (   log,
  inst,
  event,
  extra 
)
Value:
do { \
XrResult ret = oxr_event_alloc(log, inst, sizeof(**extra), event); \
if (ret != XR_SUCCESS) { \
return ret; \
} \
*((void **)extra) = oxr_event_extra(*event); \
} while (false)