]> icculus.org git repositories - mikachu/openbox.git/blob - openbox/hooks.h
change some of the hooks, and add all the hooks to the code so that they run
[mikachu/openbox.git] / openbox / hooks.h
1 #ifndef ob__hooks_h
2 #define ob__hooks_h
3
4 #include <glib.h>
5
6 struct _ObActionsAct;
7 struct _ObClient;
8
9 typedef enum {
10     OB_HOOK_INVALID,
11     OB_HOOK_WIN_NEW,
12     OB_HOOK_WIN_CLOSE,
13     OB_HOOK_WIN_VISIBLE,
14     OB_HOOK_WIN_INVISIBLE,
15     OB_HOOK_WIN_ICONIC,
16     OB_HOOK_WIN_UNICONIC,
17     OB_HOOK_WIN_MAX,
18     OB_HOOK_WIN_UNMAX,
19     OB_HOOK_WIN_SHADE,
20     OB_HOOK_WIN_UNSHADE,
21     OB_HOOK_WIN_FOCUS,
22     OB_HOOK_WIN_UNFOCUS,
23     OB_HOOK_WIN_DESK_CHANGE,
24     OB_HOOK_WIN_DECORATED,
25     OB_HOOK_WIN_UNDECORATED,
26     OB_HOOK_SCREEN_DESK_CHANGE,
27     OB_NUM_HOOKS
28 } ObHook;
29
30 void hooks_startup(gboolean reconfig);
31 void hooks_shutdown(gboolean reconfig);
32
33 ObHook hooks_hook_from_name(const gchar *n);
34
35 /*! Run a hook.
36   @param on TRUE if the hook is being run cuz a state was turned on, FALSE
37             if a state was turned off
38 */
39 void hooks_run(ObHook hook, struct _ObClient *c);
40
41 void hooks_add(ObHook hook, struct _ObActionsAct *act);
42
43 #endif