Monado OpenXR Runtime
u_var.h File Reference

Variable tracking code. More...

#include "xrt/xrt_defines.h"
#include "util/u_logging.h"
Include dependency graph for u_var.h:

Go to the source code of this file.

Data Structures

struct  u_var_f32_arr
 Used to plot an array for values. More...
 
struct  u_var_timing
 Used to plot a graph of timing information. More...
 
struct  u_var_button
 Simple pushable button. More...
 
struct  u_var_combo
 Combo box information. More...
 
struct  u_var_draggable_f32
 Draggable single precision float information. More...
 
struct  u_var_draggable_u16
 Draggable usingned 16-bit integer information. More...
 
struct  u_var_histogram_f32
 Histogram based on single precision bars. More...
 
struct  u_var_curve_point
 A point on the curve, uses doubles like ImPlotPoint. More...
 
struct  u_var_curve
 A single curve on a plot. More...
 
struct  u_var_curves
 A collection of curves to be plotted. More...
 
struct  u_var_info
 Struct that keeps all of the information about the variable, some of the UI state is kept on it. More...
 
struct  u_var_root_info
 Struct containing the information about a root object. More...
 

Macros

#define U_VAR_NAME_STRING_SIZE   256
 Maximum string length for a tracked variable. More...
 
#define U_VAR_ADD_FUNCS()
 
#define ADD_FUNC(SUFFIX, TYPE, ENUM)   void u_var_add_##SUFFIX(void *, TYPE *, const char *);
 

Typedefs

typedef void(* u_var_button_cb) (void *)
 Callback for a button action. More...
 
typedef struct u_var_curve_point(* u_var_curve_getter) (void *data, int i)
 Callback for getting points on a curve. More...
 
typedef void(* u_var_root_cb) (struct u_var_root_info *info, void *)
 Callback for entering and leaving root nodes. More...
 
typedef void(* u_var_elm_cb) (struct u_var_info *info, void *)
 Callback on each variable a root node has. More...
 

Enumerations

enum  u_var_kind {
  U_VAR_KIND_BOOL , U_VAR_KIND_RGB_U8 , U_VAR_KIND_RGB_F32 , U_VAR_KIND_U8 ,
  U_VAR_KIND_U16 , U_VAR_KIND_U64 , U_VAR_KIND_I32 , U_VAR_KIND_I64 ,
  U_VAR_KIND_F32 , U_VAR_KIND_DRAGGABLE_F32 , U_VAR_KIND_F64 , U_VAR_KIND_F32_ARR ,
  U_VAR_KIND_TIMING , U_VAR_KIND_VEC3_I32 , U_VAR_KIND_VEC3_F32 , U_VAR_KIND_POSE ,
  U_VAR_KIND_SINK_DEBUG , U_VAR_KIND_NATIVE_IMAGES_DEBUG , U_VAR_KIND_LOG_LEVEL , U_VAR_KIND_RO_TEXT ,
  U_VAR_KIND_RO_FTEXT , U_VAR_KIND_RO_I32 , U_VAR_KIND_RO_U32 , U_VAR_KIND_RO_F32 ,
  U_VAR_KIND_RO_I64 , U_VAR_KIND_RO_U64 , U_VAR_KIND_RO_F64 , U_VAR_KIND_RO_VEC3_I32 ,
  U_VAR_KIND_RO_VEC3_F32 , U_VAR_KIND_RO_QUAT_F32 , U_VAR_KIND_RO_FF_F64 , U_VAR_KIND_RO_FF_VEC3_F32 ,
  U_VAR_KIND_GUI_HEADER , U_VAR_KIND_GUI_HEADER_BEGIN , U_VAR_KIND_GUI_HEADER_END , U_VAR_KIND_BUTTON ,
  U_VAR_KIND_COMBO , U_VAR_KIND_HISTOGRAM_F32 , U_VAR_KIND_DRAGGABLE_U16 , U_VAR_KIND_CURVE ,
  U_VAR_KIND_CURVES
}
 What kind of variable is this tracking. More...
 

Functions

void u_var_add_root (void *root, const char *c_name, bool suffix_with_number)
 Add a named root object, the u_var subsystem is completely none-invasive to the object it's tracking. More...
 
void u_var_remove_root (void *root)
 Remove the root node. More...
 
void u_var_visit (u_var_root_cb enter_cb, u_var_root_cb exit_cb, u_var_elm_cb elem_cb, void *priv)
 Visit all root nodes and their variables. More...
 
void u_var_force_on (void)
 This forces the variable tracking code to on, it is disabled by default. More...
 
void u_var_add_bool (void *, bool *, const char *)
 
void u_var_add_rgb_u8 (void *, struct xrt_colour_rgb_u8 *, const char *)
 
void u_var_add_rgb_f32 (void *, struct xrt_colour_rgb_f32 *, const char *)
 
void u_var_add_u8 (void *, uint8_t *, const char *)
 
void u_var_add_u16 (void *, uint16_t *, const char *)
 
void u_var_add_u64 (void *, uint64_t *, const char *)
 
void u_var_add_i32 (void *, int32_t *, const char *)
 
void u_var_add_i64 (void *, int64_t *, const char *)
 
void u_var_add_f32 (void *, float *, const char *)
 
void u_var_add_f64 (void *, double *, const char *)
 
void u_var_add_f32_arr (void *, struct u_var_f32_arr *, const char *)
 
void u_var_add_f32_timing (void *, struct u_var_timing *, const char *)
 
void u_var_add_vec3_i32 (void *, struct xrt_vec3_i32 *, const char *)
 
void u_var_add_vec3_f32 (void *, struct xrt_vec3 *, const char *)
 
void u_var_add_pose (void *, struct xrt_pose *, const char *)
 
void u_var_add_sink_debug (void *, struct u_sink_debug *, const char *)
 
void u_var_add_native_images_debug (void *, struct u_native_images_debug *, const char *)
 
void u_var_add_log_level (void *, enum u_logging_level *, const char *)
 
void u_var_add_ro_text (void *, const char *, const char *)
 
void u_var_add_ro_ftext (void *, const char *, const char *)
 
void u_var_add_ro_i32 (void *, int32_t *, const char *)
 
void u_var_add_ro_u32 (void *, uint32_t *, const char *)
 
void u_var_add_ro_f32 (void *, float *, const char *)
 
void u_var_add_ro_i64 (void *, int64_t *, const char *)
 
void u_var_add_ro_u64 (void *, uint64_t *, const char *)
 
void u_var_add_ro_f64 (void *, double *, const char *)
 
void u_var_add_ro_vec3_i32 (void *, struct xrt_vec3_i32 *, const char *)
 
void u_var_add_ro_vec3_f32 (void *, struct xrt_vec3 *, const char *)
 
void u_var_add_ro_quat_f32 (void *, struct xrt_quat *, const char *)
 
void u_var_add_ro_ff_f64 (void *, struct m_ff_f64 *, const char *)
 
void u_var_add_ro_ff_vec3_f32 (void *, struct m_ff_vec3_f32 *, const char *)
 
void u_var_add_gui_header (void *, bool *, const char *)
 
void u_var_add_gui_header_begin (void *, bool *, const char *)
 
void u_var_add_gui_header_end (void *, bool *, const char *)
 
void u_var_add_button (void *, struct u_var_button *, const char *)
 
void u_var_add_combo (void *, struct u_var_combo *, const char *)
 
void u_var_add_draggable_f32 (void *, struct u_var_draggable_f32 *, const char *)
 
void u_var_add_draggable_u16 (void *, struct u_var_draggable_u16 *, const char *)
 
void u_var_add_histogram_f32 (void *, struct u_var_histogram_f32 *, const char *)
 
void u_var_add_curve (void *, struct u_var_curve *, const char *)
 
void u_var_add_curves (void *, struct u_var_curves *, const char *)
 

Detailed Description

Variable tracking code.

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