aboutsummaryrefslogtreecommitdiffstats
path: root/libaxl.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2020-06-20 20:57:49 +0200
committerMattias Andrée <maandree@kth.se>2020-06-20 20:57:49 +0200
commitf9d0ddbf9024aa434898bb90a640cc45ce35a95f (patch)
treefa1945d8facbda91db1ec87915ba26ee7e6a1e2a /libaxl.h
parentMisc. (diff)
downloadlibaxl-f9d0ddbf9024aa434898bb90a640cc45ce35a95f.tar.gz
libaxl-f9d0ddbf9024aa434898bb90a640cc45ce35a95f.tar.bz2
libaxl-f9d0ddbf9024aa434898bb90a640cc45ce35a95f.tar.xz
Add LIBAXL_SYNTHETIC_EVENT_BIT
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libaxl.h')
-rw-r--r--libaxl.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/libaxl.h b/libaxl.h
index 7b6d733..e3e452c 100644
--- a/libaxl.h
+++ b/libaxl.h
@@ -50,14 +50,22 @@ typedef struct libaxl_context LIBAXL_CONTEXT; /* TODO man */
#define LIBAXL_ERROR_INVALID_HANDSHAKE_RESPONSE -12
#define LIBAXL_ERROR_OUT_OF_RESOURCE_IDS -13
#define LIBAXL_ERROR_PROTOCOL_NOT_SUPPORTED -14
+#define LIBAXL_ERROR_USER_DOES_NOT_EXIST -15
+#define LIBAXL_ERROR_USER_DOES_NOT_HAVE_A_HOME -16
-union libaxl_input { /* TODO doc, man */
+union libaxl_input { /* TODO doc, man (also LIBAXL_SYNTHETIC_EVENT_BIT) */
uint8_t type;
union libaxl_error error; /* if .type = LIBAXL_ERROR */
union libaxl_reply reply; /* if .type = LIBAXL_REPLY */
union libaxl_event event; /* otherwise (.type = event type) */
};
+/**
+ * Bit that is set in `.type` of `union libaxl_input` if the
+ * event a synthetic event.
+ */
+#define LIBAXL_SYNTHETIC_EVENT_BIT 0x80U
+
_LIBAXL_GCC_ONLY(__attribute__((__malloc__, __warn_unused_result__)))
LIBAXL_CONNECTION *libaxl_connect(const char *restrict, char **restrict); /* TODO man doc */