X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fhooks.h;fp=openbox%2Fhooks.h;h=16ed6321e76b92632eb92d3f7b7f086822fccd18;hb=db781556d63d1a50bd1b1b4b6b5423ef703bf2c7;hp=0000000000000000000000000000000000000000;hpb=173b9b764887929b7ff5d30b3e33f0602b0afda6;p=chaz%2Fopenbox 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 + +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