summaryrefslogtreecommitdiff
path: root/src/scripts.h
diff options
context:
space:
mode:
authorportix <none@none>2013-02-21 00:42:04 +0100
committerportix <none@none>2013-02-21 00:42:04 +0100
commit6cee1844ce6467b53285701039c047d550b5c858 (patch)
tree9fd6ff23ecc356cf0e2fa12523cac2a3c69d7da0 /src/scripts.h
parent427ead3f7118d8bfc39424dc4ba0f98065314811 (diff)
downloaddwb-6cee1844ce6467b53285701039c047d550b5c858.zip
New signal 'executeCommand'
Diffstat (limited to 'src/scripts.h')
-rw-r--r--src/scripts.h9
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); \