Monado OpenXR Runtime
example.c File Reference

Small cli application to demonstrate use of libmonado. More...

#include "monado.h"
#include <ctype.h>
#include <limits.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include <stdbool.h>
Include dependency graph for example.c:

Macros

#define P(...)   fprintf(stdout, __VA_ARGS__)
 
#define PE(...)   fprintf(stderr, __VA_ARGS__)
 
#define CHECK_ID_EXIT(ID)
 

Typedefs

typedef enum op_mode op_mode_t
 

Enumerations

enum  op_mode {
  MODE_GET , MODE_SET_PRIMARY , MODE_SET_FOCUSED , MODE_TOGGLE_IO ,
  MODE_RECENTER , MODE_GET , MODE_SET_PRIMARY , MODE_SET_FOCUSED ,
  MODE_TOGGLE_IO
}
 

Functions

int get_mode (mnd_root_t *root)
 
int set_primary (mnd_root_t *root, int client_index)
 
int set_focused (mnd_root_t *root, int client_index)
 
int toggle_io (mnd_root_t *root, int client_index)
 
int main (int argc, char *argv[])
 

Detailed Description

Small cli application to demonstrate use of libmonado.

Author
Rylie Pavlik rylie.nosp@m..pav.nosp@m.lik@c.nosp@m.olla.nosp@m.bora..nosp@m.com
Pete Black pblac.nosp@m.k@co.nosp@m.llabo.nosp@m.ra.c.nosp@m.om

Macro Definition Documentation

◆ CHECK_ID_EXIT

#define CHECK_ID_EXIT (   ID)
Value:
do { \
if (ID < 0 || ID > INT_MAX) { \
PE("Invalid client index %i.\n", s_val); \
exit(1); \
} \
} while (false)