]> Dogcows Code - chaz/openbox/blobdiff - openbox/hooks.h
Add a hook system. They hooks don't run yet but they parse from the config file.
[chaz/openbox] / openbox / hooks.h
diff --git a/openbox/hooks.h b/openbox/hooks.h
new file mode 100644 (file)
index 0000000..16ed632
--- /dev/null
@@ -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
This page took 0.025025 seconds and 4 git commands to generate.