summaryrefslogtreecommitdiff
path: root/openbox/hooks.h
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2008-02-29 23:16:31 -0500
committerDana Jansens <danakj@orodu.net>2008-02-29 23:37:57 -0500
commitdb781556d63d1a50bd1b1b4b6b5423ef703bf2c7 (patch)
tree8418803f72b28ce910d6e11f59237aa8a1b4089f /openbox/hooks.h
parent173b9b764887929b7ff5d30b3e33f0602b0afda6 (diff)
Add a hook system. They hooks don't run yet but they parse from the config file.
Diffstat (limited to 'openbox/hooks.h')
-rw-r--r--openbox/hooks.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/openbox/hooks.h b/openbox/hooks.h
new file mode 100644
index 00000000..16ed6321
--- /dev/null
+++ b/openbox/hooks.h
@@ -0,0 +1,43 @@
+#ifndef ob__hooks_h
+#define ob__hooks_h
+
+#include <glib.h>
+
+struct _ObActionsAct;
+struct _ObClient;
+
+typedef enum {
+ OB_HOOK_INVALID,
+ OB_HOOK_WIN_NEW,
+ OB_HOOK_WIN_CLOSE,
+ OB_HOOK_WIN_VISIBLE,
+ OB_HOOK_WIN_INVISIBLE,
+ OB_HOOK_WIN_ICONIC,
+ OB_HOOK_WIN_UNICONIC,
+ OB_HOOK_WIN_MAX,
+ OB_HOOK_WIN_UNMAX,
+ OB_HOOK_WIN_SHADE,
+ OB_HOOK_WIN_UNSHADE,
+ OB_HOOK_WIN_FOCUS,
+ OB_HOOK_WIN_UNFOCUS,
+ OB_HOOK_WIN_CURRENT_DESK,
+ OB_HOOK_WIN_OTHER_DESK,
+ OB_HOOK_WIN_DECORATED,
+ OB_HOOK_WIN_UNDECORATED,
+ OB_NUM_HOOKS
+} ObHook;
+
+void hooks_startup(gboolean reconfig);
+void hooks_shutdown(gboolean reconfig);
+
+ObHook hooks_hook_from_name(const gchar *n);
+
+/*! Run a hook.
+ @param on TRUE if the hook is being run cuz a state was turned on, FALSE
+ if a state was turned off
+*/
+void hooks_fire(ObHook hook, struct _ObClient *c);
+
+void hooks_add(ObHook hook, struct _ObActionsAct *act);
+
+#endif