diff options
author | keis <keijser@gmail.com> | 2011-09-11 15:58:45 +0200 |
---|---|---|
committer | keis <keijser@gmail.com> | 2011-09-11 16:11:37 +0200 |
commit | eabeb419e37673ebd79c9c1355eac82068393103 (patch) | |
tree | 37994e13bef1ea0bd70509bd2f383a8dadb170f2 /src/events.h | |
parent | bd7b9d09e56897b1d03e23080dedf86c7be2bb21 (diff) |
remove event formatting from run_parsed_command
* split event formatting and sending into separate functions
and expose both in events.h
* make it possible to format array of strings
Diffstat (limited to 'src/events.h')
-rw-r--r-- | src/events.h | 31 |
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); |