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>
|
#define | P(...) fprintf(stdout, __VA_ARGS__) |
|
#define | PE(...) fprintf(stderr, __VA_ARGS__) |
|
#define | CHECK_ID_EXIT(ID) |
|
|
typedef enum op_mode | op_mode_t |
|
|
enum | op_mode {
MODE_GET
, MODE_SET_PRIMARY
, MODE_SET_FOCUSED
, MODE_TOGGLE_IO
,
MODE_RECENTER
, MODE_GET_BRIGHTNESS
, MODE_SET_BRIGHTNESS
, MODE_GET
,
MODE_SET_PRIMARY
, MODE_SET_FOCUSED
, MODE_TOGGLE_IO
} |
|
|
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[]) |
|
◆ 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)