#ifndef HOOK_H
#define HOOK_H
-#include <glib-2.0/glib.h>
+#include <glib.h>
/* A hook is a function to call with the supplied hook data, and with
call site specific data (e.g., hooks for events are called with a
pointer to the current event). */
-
-typedef void (*lttv_hook)(void *hook_data, void *call_data);
+// MD compile fix: int instead of bool as return value
+typedef int (*lttv_hook)(void *hook_data, void *call_data);
/* A list of hooks allows registering hooks to be called later. */
void lttv_hooks_add(lttv_hooks *h, lttv_hook f, void *hook_data);
-void lttv_hooks_call(lttv_hooks *h, void *call_data);
+void lttv_hooks_remove(lttv_hooks *h, lttv_hook f, void *hook_data);
+
+unsigned lttv_hooks_number(lttv_hooks *h);
+
+void lttv_hooks_get(lttv_hooks *h, unsigned i, lttv_hook *f, void **hook_data);
+
+void lttv_hooks_remove_by_position(lttv_hooks *h, unsigned i);
+
+int lttv_hooks_call(lttv_hooks *h, void *call_data);
+
+int lttv_hooks_call_check(lttv_hooks *h, void *call_data);
/* Sometimes different hooks need to be called based on the case. The