]> Dogcows Code - chaz/openbox/blobdiff - openbox/hooks.h
Make clang happier
[chaz/openbox] / openbox / hooks.h
index 3211d7cf7770ff33e152dbe3d8c6f8c8f6d29cab..322f952d02a69e9b6dfc23f775342032360f8d2d 100644 (file)
@@ -1,56 +1,42 @@
-#ifndef __hooks_h
-#define __hooks_h
-
-#include "clientwrap.h"
-#include <Python.h>
-
-void hooks_startup();
-void hooks_shutdown();
-
-struct HookObject;
-
-struct HookObject *hooks_create(char *name);
-
-struct HookObject *hook_startup;
-struct HookObject *hook_shutdown;
-struct HookObject *hook_visibledesktop;
-struct HookObject *hook_numdesktops;
-struct HookObject *hook_desktopnames;
-struct HookObject *hook_showdesktop;
-struct HookObject *hook_screenconfiguration;
-struct HookObject *hook_screenarea;
-struct HookObject *hook_managed;
-struct HookObject *hook_closed;
-struct HookObject *hook_bell;
-struct HookObject *hook_urgent;
-struct HookObject *hook_pointerenter;
-struct HookObject *hook_pointerleave;
-struct HookObject *hook_focused;
-struct HookObject *hook_requestactivate;
-struct HookObject *hook_title;
-struct HookObject *hook_desktop;
-struct HookObject *hook_iconic;
-struct HookObject *hook_shaded;
-struct HookObject *hook_maximized;
-struct HookObject *hook_fullscreen;
-struct HookObject *hook_visible;
-struct HookObject *hook_configuration;
-
-#define HOOKFIRE(hook, ...)                              \
-{                                                        \
-    PyObject *args = Py_BuildValue(__VA_ARGS__);         \
-    g_assert(args != NULL);                              \
-    hooks_fire(hook_##hook, args);                       \
-    Py_DECREF(args);                                     \
-}
-
-#define HOOKFIRECLIENT(hook, client)                     \
-{                                                        \
-    hooks_fire_client(hook_##hook, client);              \
-}
-
-void hooks_fire(struct HookObject *hook, PyObject *args);
-
-void hooks_fire_client(struct HookObject *hook, struct Client *client);
+#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_DESK_CHANGE,
+    OB_HOOK_WIN_DECORATED,
+    OB_HOOK_WIN_UNDECORATED,
+    OB_HOOK_SCREEN_DESK_CHANGE,
+    OB_NUM_HOOKS
+} ObHook;
+
+void hooks_startup(gboolean reconfig);
+void hooks_shutdown(gboolean reconfig);
+
+ObHook hooks_hook_from_name(const gchar *n);
+
+void hooks_queue(ObHook hook, struct _ObClient *c);
+void hooks_run(ObHook hook, struct _ObClient *c);
+
+void hooks_add(ObHook hook, struct _ObActionsAct *act);
+
+void hooks_run_queue(void);
 
 #endif
This page took 0.021281 seconds and 4 git commands to generate.