aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/events.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/events.h')
-rw-r--r--src/events.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/events.h b/src/events.h
index 8e89899..73d0712 100644
--- a/src/events.h
+++ b/src/events.h
@@ -31,18 +31,47 @@ enum event_type {
LAST_EVENT
};
+typedef struct _Event Event;
+struct _Event;
+
void
event_buffer_timeout(guint sec);
void
replay_buffered_events();
+/*
+ * build event string
+ */
+Event *
+format_event(int type, const gchar *custom_event, ...) G_GNUC_NULL_TERMINATED;
+
+Event *
+vformat_event(int type, const gchar *custom_event, va_list vargs);
+
+/*
+ * send a already formatted event string over the supported interfaces.
+ * returned event string should be freed by `event_free`
+ */
void
-vsend_event(int type, const gchar *custom_event, va_list vargs);
+send_formatted_event(const Event *event);
+/*
+ * frees a event string
+ */
+void
+event_free(Event *event);
+
+/*
+ * build event string and send over the supported interfaces
+ * this is the same as calling `format_event` and then `send_formatted_event`
+ */
void
send_event(int type, const gchar *custom_event, ...) G_GNUC_NULL_TERMINATED;
+void
+vsend_event(int type, const gchar *custom_event, va_list vargs);
+
gchar *
get_modifier_mask(guint state);