diff options
author | Andrew Eikum <aeikum@codeweavers.com> | 2015-06-04 13:23:19 -0500 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2015-06-10 14:14:25 +1000 |
commit | 5dc2a9aae46352f1f35d3ba122da04727789a15d (patch) | |
tree | 115efbb4bc00c121c84ff64c8f31f0fe0bced8c7 /Xext/xace.c | |
parent | fa12f2c150b2f50de9dac4a2b09265f13af353af (diff) |
xace: Add XaceHookIsSet helper function
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xext/xace.c')
-rw-r--r-- | Xext/xace.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Xext/xace.c b/Xext/xace.c index d77b3126a..b3c67f632 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -213,6 +213,21 @@ XaceHook(int hook, ...) return prv ? *prv : Success; } +/* XaceHookIsSet + * + * Utility function to determine whether there are any callbacks listening on a + * particular XACE hook. + * + * Returns non-zero if there is a callback, zero otherwise. + */ +int +XaceHookIsSet(int hook) +{ + if (hook < 0 || hook >= XACE_NUM_HOOKS) + return 0; + return XaceHooks[hook] != NULL; +} + /* XaceCensorImage * * Called after pScreen->GetImage to prevent pieces or trusted windows from |