mirror of
https://github.com/X11Libre/xserver.git
synced 2026-11-15 05:23:40 +00:00
Some checks are pending
Build X servers / xserver-build-ubuntu (push) Waiting to run
Build X servers / drivers-build-ubuntu (push) Waiting to run
Build X servers / xserver-build-mingw32-ubuntu (push) Waiting to run
Build X servers / xserver-build-macos (push) Waiting to run
Build X servers / xserver-build-freebsd (push) Waiting to run
Build X servers / xserver-build-dragonflybsd (push) Waiting to run
Build X servers / Release pushed tag (push) Blocked by required conditions
check PRs for merge conflicts / notify (push) Waiting to run
delete old workflow runs / delete_old_workflow_runs (push) Waiting to run
delete old workflow runs / purge_deleted_branch_workflows (push) Waiting to run
Replace complicated xace hook by simple and cheap callback. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
30 lines
768 B
C
30 lines
768 B
C
/* SPDX-License-Identifier: MIT OR X11
|
|
*
|
|
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
|
|
*/
|
|
#ifndef _XSERVER_DIX_DEVICES_PRIV_H
|
|
#define _XSERVER_DIX_DEVICES_PRIV_H
|
|
|
|
#include "include/callback.h"
|
|
#include "include/dix.h"
|
|
|
|
/*
|
|
* called when a client tries to access devices
|
|
*/
|
|
extern CallbackListPtr DeviceAccessCallback;
|
|
|
|
typedef struct {
|
|
ClientPtr client;
|
|
DeviceIntPtr dev;
|
|
Mask access_mode;
|
|
int status;
|
|
} DeviceAccessCallbackParam;
|
|
|
|
static inline int dixCallDeviceAccessCallback(ClientPtr client, DeviceIntPtr dev, Mask access_mode)
|
|
{
|
|
DeviceAccessCallbackParam rec = { client, dev, access_mode, Success };
|
|
CallCallbacks(&DeviceAccessCallback, &rec);
|
|
return rec.status;
|
|
}
|
|
|
|
#endif /* _XSERVER_DIX_DEVICES_PRIV_H */
|