aboutsummaryrefslogtreecommitdiffstats
path: root/action.h
diff options
context:
space:
mode:
authorgotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2007-03-28 17:11:37 +0000
committergotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2007-03-28 17:11:37 +0000
commit4b54df524a318680d93382f8253c8da5a7546b58 (patch)
tree24cb2f61910d7591856616af9330e9c7d3b60f64 /action.h
downloaddzen-4b54df524a318680d93382f8253c8da5a7546b58.tar.gz
dzen-4b54df524a318680d93382f8253c8da5a7546b58.zip
0.1.9 initial svn release
git-svn-id: http://dzen.googlecode.com/svn/trunk@1 f2baff5b-bf2c-0410-a398-912abdc3d8b2
Diffstat (limited to 'action.h')
-rw-r--r--action.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/action.h b/action.h
new file mode 100644
index 0000000..9db6531
--- /dev/null
+++ b/action.h
@@ -0,0 +1,69 @@
+/*
+ * (C)opyright MMVII Robert Manea <rob dot manea at gmail dot com>
+ * See LICENSE file for license details.
+ *
+ */
+
+#include <pthread.h>
+
+/* Event, Action data structures */
+typedef struct AS As;
+typedef struct EV Ev;
+
+enum ev_id {
+ /* internal events, should not be used by the user */
+ exposetitle, exposeslave,
+ /* mouse buttons */
+ button1, button2, button3, button4, button5,
+ /* entering/leaving windows */
+ entertitle, leavetitle, enterslave, leaveslave,
+ /* external signals */
+ sigusr1, sigusr2
+};
+
+struct event_lookup {
+ char *name;
+ int id;
+};
+
+struct action_lookup {
+ char *name;
+ int (*handler)(char **);
+};
+
+struct AS {
+ char *options[256];
+ int (*handler)(char **);
+};
+
+struct EV {
+ int isset;
+ As *action[256];
+};
+
+extern Ev ev_table[256];
+
+/* utility functions */
+void do_action(int);
+int get_ev_id(char *);
+void * get_action_handler(char *);
+void fill_ev_table(char *);
+
+/* action handlers */
+int a_exposetitle(char **);
+int a_exposeslave(char **);
+int a_print(char **);
+int a_exit(char **);
+int a_exec(char **);
+int a_collapse(char **);
+int a_uncollapse(char **);
+int a_stick(char **);
+int a_unstick(char **);
+int a_togglestick(char **);
+int a_scrollup(char **);
+int a_scrolldown(char **);
+int a_hide(char **);
+int a_unhide(char **);
+int a_menuprint(char **);
+int a_menuexec(char **);
+