diff options
Diffstat (limited to 'src/scripts.h')
-rw-r--r-- | src/scripts.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/scripts.h b/src/scripts.h index 77a400a8..f7a29ca5 100644 --- a/src/scripts.h +++ b/src/scripts.h @@ -47,6 +47,7 @@ enum SIGNALS { SCRIPTS_SIG_STATUS_BAR, SCRIPTS_SIG_TAB_BUTTON_PRESS, SCRIPTS_SIG_CHANGE_MODE, + SCRIPTS_SIG_EXECUTE_COMMAND, SCRIPTS_SIG_LAST, } ; @@ -73,12 +74,18 @@ gboolean scripts_execute_one(const char *script); void scripts_completion_activate(void); #define EMIT_SCRIPT(sig) ((dwb.misc.script_signals & (1<<SCRIPTS_SIG_##sig))) -#define SCRIPTS_EMIT_RETURN(signal, json, val) G_STMT_START \ +#define SCRIPTS_EMIT_RETURN(signal, json) G_STMT_START \ if (scripts_emit(&signal)) { \ g_free(json); \ return true; \ } else g_free(json); \ G_STMT_END +#define SCRIPTS_EMIT_RETURN_ARG(signal, json, val) G_STMT_START \ + if (scripts_emit(&signal)) { \ + g_free(json); \ + return val; \ + } else g_free(json); \ +G_STMT_END #define SCRIPTS_EMIT(signal, json) G_STMT_START \ if (scripts_emit(&signal)) { \ g_free(json); \ |