summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--man/Makefile.am5
-rw-r--r--man/XI.xml443
-rw-r--r--src/Makefile.am6
-rw-r--r--src/XAllowDv.c84
-rw-r--r--src/XChAccRl.c62
-rw-r--r--src/XClrAcc.c63
-rw-r--r--src/XDenyDev.c69
-rw-r--r--src/XPermDev.c69
-rw-r--r--src/XQryAccRl.c99
10 files changed, 1 insertions, 901 deletions
diff --git a/configure.ac b/configure.ac
index 0d96acb..fdfab4e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,7 +15,7 @@ AC_PROG_CC
AC_PROG_LIBTOOL
# Checks for pkg-config packages
-PKG_CHECK_MODULES(XI, [xproto >= 7.0.13] [x11 >= 1.1.99.1] [xextproto >= 7.0.3] [xext >= 1.0.99.1] [inputproto >= 1.9.99.5])
+PKG_CHECK_MODULES(XI, [xproto >= 7.0.13] [x11 >= 1.1.99.1] [xextproto >= 7.0.3] [xext >= 1.0.99.1] [inputproto >= 1.9.99.6])
AC_SUBST(XI_CFLAGS)
AC_SUBST(XI_LIBS)
diff --git a/man/Makefile.am b/man/Makefile.am
index 153d4dd..91ce945 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -67,13 +67,9 @@ XI_manpages = \
XFreeDeviceList \
XOpenDevice \
XCloseDevice \
- XPermitDevices \
- XDenyDevices \
- XChangeAccessRule \
XQueryDevicePointer \
XQueryInputVersion \
XGetExtensionVersion \
- XQueryWindowAccess \
XSelectExtensionEvent \
XGetSelectedExtensionEvents \
XSetClientPointer \
@@ -83,7 +79,6 @@ XI_manpages = \
XSetDeviceFocus \
XGetDeviceFocus \
XWarpDevicePointer \
- XWindowClearAccess \
XListDeviceProperties \
XGetDeviceProperty \
XChangeDeviceProperty \
diff --git a/man/XI.xml b/man/XI.xml
index dae0911..2d9bfc7 100644
--- a/man/XI.xml
+++ b/man/XI.xml
@@ -5284,449 +5284,6 @@
</refsect1>
</refentry>
-<refentry id="XPermitDevices.man">
- <refentryinfo>
- <productname>__vendorversion__</productname>
- <pubdate>February 14, 2008</pubdate>
- <authorgroup>
- <author>
- <firstname>Peter</firstname><surname>Hutterer</surname>
- <contrib>Specification and implementation.</contrib>
- </author>
- </authorgroup>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>XPermitDevices, XDenyDevices, XChangeAccessRule</refentrytitle>
- <manvolnum>__libmansuffix__</manvolnum>
- <refmiscinfo class='source'>__xorgversion__</refmiscinfo>
- <refmiscinfo class='manual'>XINPUT FUNCTIONS</refmiscinfo>
-</refmeta>
- <refnamediv>
- <refname>XPermitDevices</refname>
- <refname>XDenyDevices</refname>
- <refname>XChangeAccessRule</refname>
- <refpurpose>change access rules to the window.</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <title>Syntax</title>
- <funcsynopsis>
- <funcsynopsisinfo>#include &lt;X11/extensions/XInput.h&gt;</funcsynopsisinfo>
- <funcprototype>
- <funcdef>Status <function>XPermitDevices</function></funcdef>
- <paramdef>Display *<parameter>display</parameter></paramdef>
- <paramdef>Window <parameter>win</parameter></paramdef>
- <paramdef>XID* <parameter>deviceids</parameter></paramdef>
- <paramdef>int <parameter>num_devices</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>Status <function>XDenyDevices</function></funcdef>
- <paramdef>Display *<parameter>display</parameter></paramdef>
- <paramdef>Window <parameter>win</parameter></paramdef>
- <paramdef>XID* <parameter>deviceids</parameter></paramdef>
- <paramdef>int <parameter>num_devices</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>Status <function>XChangeAccessRule</function></funcdef>
- <paramdef>Display *<parameter>display</parameter></paramdef>
- <paramdef>Window <parameter>win</parameter></paramdef>
- <paramdef>int <parameter>rule</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
-
- <refsect1><title>Arguments</title>
- <para>
- <variablelist>
- <varlistentry>
- <term><parameter>deviceids</parameter></term>
- <listitem><para>Specifies a list of device IDs to
- deny/restrict access.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>display</parameter></term>
- <listitem><para>Specifies the connection to the X server.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>num_devices</parameter></term>
- <listitem><para>Specifies the number of elements in
- <parameter>deviceids</parameter>.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>rule</parameter></term>
- <listitem>
- <para>Specifies the default access rule for
- <parameter>win</parameter>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><parameter>win</parameter></term>
- <listitem>
- <para>
- Specifies the window.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </refsect1>
-
- <refsect1><title>Description</title>
- <para>
- Each window features an Access Control List (ACL) to permit or deny
- devices from sending events from this window. This is intended to
- be used to restrict devices from accessing certain UI elements
- in a multi-user environment. It is not to be used as a security
- feature.
- </para>
- <para>
- Access rules work hierarchically and if any parent window has an
- access rule defined, it applies to all child windows unless
- overridden in the child window.
- </para>
- <para>
- Each window's default rule determines the default access mode. If
- the default rule is <constant>WindowAccessDenyAll</constant>, no
- device can send events to this window. If the default rule is
- <constant>WindowAccessNoRule</constant>, any device can access the
- window, unless a parent has
- <constant>WindowAccessDenyAll</constant> set. If the default rule
- is <constant>WindowAccessAllowAll</constant>, any device can
- access the window.
- </para>
- <para>
- If a device is specified in the window's deny list, it is denied
- access to this window, regardless of the access rule.
- If a device is specified in the window's perm list, this
- device is allowed to access this window regardless of the parent
- window's settings, the deny list, and the default rule.
- </para>
- <para>
- <function>XPermitDevices</function> and
- <function>XDenyDevices</function> set the window's perm list
- or deny list to the devices specified in
- <parameter>deviceids</parameter>. Any previous setting is
- overwritten.
- </para>
- <para>
- <function>XPermitDevices</function> and
- <function>XDenyDevices</function> can generate a
- <errorname>BadDevice</errorname> and a
- <errorname>BadWindow</errorname> error.
- </para>
- <para>
- <function>XChangeAccessRule</function> sets the default acess rule
- for <parameter>window</parameter>. If <parameter>rule</parameter>
- is <constant>WindowAccessDenyAll</constant>, all devices are
- denied access to this window. If <parameter>rule</parameter> is
- <constant>WindowAccessAllowAll</constant>, all devices are
- permitted access to this window. Otherwise, if
- <constant>WindowAccessNoRule</constant> is given, the default rule
- is reset and all devices are able to send events to the window
- unless a parent window restricts access.
- </para>
- <para>
- <function>XChangeAccessRule</function> can generate a
- <errorname>BadDevice</errorname> and a
- <errorname>BadValue</errorname> error.
- </para>
- </refsect1>
-
- <refsect1><title>Diagnosis</title>
- <para>
- <variablelist>
- <varlistentry>
- <term><errorname>BadDevice</errorname></term>
- <listitem><para>An invalid device was specified. The
- device does not exist.
-</para></listitem>
-
- </varlistentry>
- <varlistentry>
- <term><errorname>BadWindow</errorname></term>
- <listitem><para>A value for a Window argument does not
- name a defined window.
-</para></listitem>
- </varlistentry>
- <varlistentry>
- <term><errorname>BadValue</errorname></term>
- <listitem><para>Some numeric value falls out of the
- allowed range.
-</para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </refsect1>
- <refsect1><title>See also</title>
- <para>
- <function>XWindowClearAccess</function>,
- <function>XQueryWindowAccess</function>
- </para>
- </refsect1>
-</refentry>
-
-<refentry id="XWindowClearAccess.man">
- <refentryinfo>
- <productname>__vendorversion__</productname>
- <pubdate>February 14, 2008</pubdate>
- <authorgroup>
- <author>
- <firstname>Peter</firstname><surname>Hutterer</surname>
- <contrib>Specification and implementation.</contrib>
- </author>
- </authorgroup>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>XWindowClearAccess</refentrytitle>
- <manvolnum>__libmansuffix__</manvolnum>
- <refmiscinfo class='source'>__xorgversion__</refmiscinfo>
- <refmiscinfo class='manual'>XINPUT FUNCTIONS</refmiscinfo>
-</refmeta>
- <refnamediv>
- <refname>XWindowClearAccess</refname>
- <refpurpose>remove access rules for the window.</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <title>Syntax</title>
- <funcsynopsis>
- <funcsynopsisinfo>#include &lt;X11/extensions/XInput.h&gt;</funcsynopsisinfo>
- <funcprototype>
- <funcdef>Status <function>XWindowClearAccess</function></funcdef>
- <paramdef>Display *<parameter>display</parameter></paramdef>
- <paramdef>Window <parameter>win</parameter></paramdef>
- <paramdef>int <parameter>what</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
-
- <refsect1><title>Arguments</title>
- <para>
- <variablelist>
- <varlistentry>
- <term><parameter>display</parameter></term>
- <listitem><para>Specifies the connection to the X server.
-</para></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>what</parameter></term>
- <listitem><para>Specifies the access restrictions to
- remove.
-</para></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>win</parameter></term>
- <listitem>
- <para>
- Specifies the window.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </refsect1>
-
- <refsect1><title>Description</title>
- <para>
- <function>XWindowClearAccess</function> removes an access control
- restriction from <parameter>window</parameter>. The bitmask
- <parameter>what</parameter> defines which restrictions to remove.
- </para>
- <para>
- If <constant>WindowAccessClearPerm</constant> is set, the
- perm list of <parameter>win</parameter> is removed. If
- <constant>WindowAccessClearDeny</constant> is set, the deny list
- of <parameter>win</parameter> is removed. If
- <constant>WindowAccessClearRule</constant> is set, the default
- rule of the window is set to
- <constant>WindowAccessNoRule</constant>. If
- <parameter>what</parameter> is equal to
- <constant>WindowAccessClearAll</constant>, the window is reset to
- the neutral state (neither explicitly permitting nor denying
- access).
- </para>
- <para>
- <function>XWindowClearAccess</function> can generate a
- <errorname>BadValue</errorname> and a
- <errorname>BadWindow</errorname> error.
- </para>
- </refsect1>
-
- <refsect1><title>Diagnosis</title>
- <para>
- <variablelist>
- <varlistentry>
- <term><errorname>BadValue</errorname></term>
- <listitem><para>A value is outside of the permitted range.
-</para></listitem>
-
- </varlistentry>
- <varlistentry>
- <term><errorname>BadWindow</errorname></term>
- <listitem><para>A value for a Window argument does not
- name a defined window.
-</para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </refsect1>
- <refsect1><title>See also</title>
- <para>
- <function>XPermitDevices</function>,
- <function>XDenyDevices</function>,
- <function>XChangeAccessRule</function>,
- <function>XQueryWindowAccess</function>
- </para>
- </refsect1>
-</refentry>
-
-<refentry id="XQueryWindowAccess.man">
- <refentryinfo>
- <productname>__vendorversion__</productname>
- <pubdate>February 14, 2008</pubdate>
- <authorgroup>
- <author>
- <firstname>Peter</firstname><surname>Hutterer</surname>
- <contrib>Specification and implementation.</contrib>
- </author>
- </authorgroup>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>XQueryWindowAccess</refentrytitle>
- <manvolnum>__libmansuffix__</manvolnum>
- <refmiscinfo class='source'>__xorgversion__</refmiscinfo>
- <refmiscinfo class='manual'>XINPUT FUNCTIONS</refmiscinfo>
-</refmeta>
- <refnamediv>
- <refname>XQueryWindowAccess</refname>
- <refpurpose>query access rules of the window.</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <title>Syntax</title>
- <funcsynopsis>
- <funcsynopsisinfo>#include &lt;X11/extensions/XInput.h&gt;</funcsynopsisinfo>
- <funcprototype>
- <funcdef>Status <function>XQueryWindowAccess</function></funcdef>
- <paramdef>Display *<parameter>display</parameter></paramdef>
- <paramdef>Window <parameter>win</parameter></paramdef>
- <paramdef>int *<parameter>rule_return</parameter></paramdef>
- <paramdef>XID **<parameter>permdevices_return</parameter></paramdef>
- <paramdef>int *<parameter>nperm_return</parameter></paramdef>
- <paramdef>XID **<parameter>denydevices_return</parameter></paramdef>
- <paramdef>int *<parameter>ndeny_return</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
-
- <refsect1><title>Arguments</title>
- <para>
- <variablelist>
- <varlistentry>
- <term><parameter>display</parameter></term>
- <listitem><para>Specifies the connection to the X server.
-</para></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>rule_return</parameter></term>
- <listitem><para>The default rule of the window.
-</para></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>permdevices_return</parameter></term>
- <listitem><para>List of devices explicitly allowed to access the
- window.
-</para></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>denydevices_return</parameter></term>
- <listitem><para>List of devices explicitly denied access the
- window.
-</para></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>nperm_return</parameter></term>
- <listitem><para>Number of elements in
- <parameter>permdevices_return</parameter>.
-</para></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>ndeny_return</parameter></term>
- <listitem><para>Number of elements in
- <parameter>denydevices_return</parameter>.
-</para></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>win</parameter></term>
- <listitem>
- <para>
- Specifies the window.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </refsect1>
-
- <refsect1><title>Description</title>
- <para>
- <function>XQueryWindowAccess</function> queries
- <parameter>win</parameter> for its current access control
- restriction settings.
- </para>
- <para>
- The value of <parameter>rule_return</parameter> can be either
- <constant>WindowAccessNoRule</constant> or
- <constant>WindowAccessDenyAll</constant>.
- </para>
- <para>
- If <parameter>nperm_return</parameter> is non-zero,
- <parameter>permdevices_return</parameter> points to a list of
- device IDs that are permitted access to the window.
- </para>
- <para>
- If <parameter>ndeny_return</parameter> is non-zero,
- <parameter>denydevices_return</parameter> points to a list of
- device IDs that are denied access to the window.
- </para>
- <para>
- It is the caller's responsibility to free the memory returned in
- <parameter>permdevices_return</parameter> and
- <parameter>denydevices_return</parameter>.
- </para>
- <para>
- <function>XQueryWindowAccess</function> can generate a
- <errorname>BadWindow</errorname> error.
- </para>
- </refsect1>
-
- <refsect1><title>Diagnosis</title>
- <para>
- <variablelist>
- <varlistentry>
- <term><errorname>BadWindow</errorname></term>
- <listitem><para>A value for a Window argument does not
- name a defined window.
-</para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </refsect1>
- <refsect1><title>See also</title>
- <para>
- <function>XPermitDevices</function>,
- <function>XDenyDevices</function>,
- <function>XChangeAccessRule</function>,
- <function>XWindowClearAcess</function>
- </para>
- </refsect1>
-</refentry>
-
<refentry id="XiSelectEvent.man">
<refentryinfo>
<productname>__vendorversion__</productname>
diff --git a/src/Makefile.am b/src/Makefile.am
index df7d375..0d6071c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,8 +3,6 @@
lib_LTLIBRARIES = libXi.la
libXi_la_SOURCES = \
- XAllowDv.c \
- XChAccRl.c \
XChDevHier.c \
XChDProp.c \
XChgDCtl.c \
@@ -13,11 +11,9 @@ libXi_la_SOURCES = \
XChgKMap.c \
XChgPnt.c \
XChgProp.c \
- XClrAcc.c \
XCloseDev.c \
XDefDevCur.c \
XDelDProp.c \
- XDenyDev.c \
XDevBell.c \
XExtGrabDev.c \
XExtToWire.c \
@@ -39,8 +35,6 @@ libXi_la_SOURCES = \
XListDev.c \
XListDProp.c \
XOpenDev.c \
- XPermDev.c \
- XQryAccRl.c \
XQueryDv.c \
XQueryDvPtr.c \
XSelect.c \
diff --git a/src/XAllowDv.c b/src/XAllowDv.c
deleted file mode 100644
index d19443d..0000000
--- a/src/XAllowDv.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/************************************************************
-
-Copyright 1989, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-Copyright 1989 by Hewlett-Packard Company, Palo Alto, California.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Hewlett-Packard not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-********************************************************/
-
-/***********************************************************************
- *
- * XAllowDeviceEvents - Thaw a frozen extension device.
- *
- */
-
-#include <X11/extensions/XI.h>
-#include <X11/extensions/XIproto.h>
-#include <X11/Xlibint.h>
-#include <X11/extensions/XInput.h>
-#include <X11/extensions/extutil.h>
-#include "XIint.h"
-
-int
-XAllowDeviceEvents(
- register Display *dpy,
- XDevice *dev,
- int event_mode,
- Time time)
-{
- xAllowDeviceEventsReq *req;
- XExtDisplayInfo *info = XInput_find_display(dpy);
-
- LockDisplay(dpy);
- if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1)
- return (NoSuchExtension);
-
- GetReq(AllowDeviceEvents, req);
- req->reqType = info->codes->major_opcode;
- req->ReqType = X_AllowDeviceEvents;
- req->deviceid = dev->device_id;
- req->mode = event_mode;
- req->time = time;
-
- UnlockDisplay(dpy);
- SyncHandle();
- return (Success);
-}
diff --git a/src/XChAccRl.c b/src/XChAccRl.c
deleted file mode 100644
index bd57e3f..0000000
--- a/src/XChAccRl.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/************************************************************
-
-Copyright 2007 Peter Hutterer <peter@cs.unisa.edu.au>
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-
-/***********************************************************************
- *
- * XChangeAccessRule - Change default rule for a window.
- *
- */
-
-#include <X11/extensions/XI.h>
-#include <X11/extensions/XIproto.h>
-#include <X11/Xlibint.h>
-#include <X11/extensions/XInput.h>
-#include <X11/extensions/extutil.h>
-#include "XIint.h"
-
-Status
-XChangeAccessRule(Display* dpy, Window win, int rule)
-{
- xChangeWindowAccessReq* req;
- XExtDisplayInfo *info = XInput_find_display(dpy);
-
- LockDisplay(dpy);
- if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1)
- return (NoSuchExtension);
-
- GetReq(ChangeWindowAccess, req);
- req->reqType = info->codes->major_opcode;
- req->ReqType = X_ChangeWindowAccess;
- req->win = win;
- req->clear = WindowAccessClearNone;
- req->defaultRule = rule;
- req->ndeny = 0;
- req->npermit = 0;
-
- UnlockDisplay(dpy);
- SyncHandle();
- return Success;
-}
diff --git a/src/XClrAcc.c b/src/XClrAcc.c
deleted file mode 100644
index a0f028f..0000000
--- a/src/XClrAcc.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/************************************************************
-
-Copyright 2007 Peter Hutterer <peter@cs.unisa.edu.au>
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-
-/***********************************************************************
- *
- * XWindowClearAccess - Clear the access restrictions of a window.
- *
- */
-
-#include <X11/extensions/XI.h>
-#include <X11/extensions/XIproto.h>
-#include <X11/Xlibint.h>
-#include <X11/extensions/XInput.h>
-#include <X11/extensions/extutil.h>
-#include "XIint.h"
-
-Status
-XWindowClearAccess(Display* dpy, Window win, int what)
-{
- xChangeWindowAccessReq* req;
-
- XExtDisplayInfo *info = XInput_find_display(dpy);
-
- LockDisplay(dpy);
- if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1)
- return (NoSuchExtension);
-
- GetReq(ChangeWindowAccess, req);
- req->reqType = info->codes->major_opcode;
- req->ReqType = X_ChangeWindowAccess;
- req->win = win;
- req->clear = what;
- req->defaultRule = WindowAccessKeepRule;
- req->ndeny = 0;
- req->npermit = 0;
-
- UnlockDisplay(dpy);
- SyncHandle();
- return Success;
-}
diff --git a/src/XDenyDev.c b/src/XDenyDev.c
deleted file mode 100644
index 686ef12..0000000
--- a/src/XDenyDev.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/************************************************************
-
-Copyright 2007 Peter Hutterer <peter@cs.unisa.edu.au>
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-
-/***********************************************************************
- *
- * XDenyDevices - Change list of devices denied to access a window.
- *
- */
-
-#include <X11/extensions/XI.h>
-#include <X11/extensions/XIproto.h>
-#include <X11/Xlibint.h>
-#include <X11/extensions/XInput.h>
-#include <X11/extensions/extutil.h>
-#include "XIint.h"
-
-Status
-XDenyDevices(Display* dpy, Window win, XID* devices, int count)
-{
- xChangeWindowAccessReq* req;
-
- XExtDisplayInfo *info = XInput_find_display(dpy);
-
- LockDisplay(dpy);
- if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1)
- return (NoSuchExtension);
-
- GetReq(ChangeWindowAccess, req);
- req->reqType = info->codes->major_opcode;
- req->ReqType = X_ChangeWindowAccess;
- req->win = win;
- /* If list is empty, clear all devices */
- if (!count)
- req->clear = WindowAccessClearDeny;
- else
- req->clear = WindowAccessClearNone;
- req->defaultRule = WindowAccessKeepRule;
- req->ndeny = count;
- req->length += (count * sizeof(XID) + 3) >> 2;
- req->npermit = 0;
- Data(dpy, (char*)devices, count * sizeof(XID));
-
- UnlockDisplay(dpy);
- SyncHandle();
- return Success;
-}
diff --git a/src/XPermDev.c b/src/XPermDev.c
deleted file mode 100644
index 1e5cd1e..0000000
--- a/src/XPermDev.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/************************************************************
-
-Copyright 2007 Peter Hutterer <peter@cs.unisa.edu.au>
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-
-/***********************************************************************
- *
- * XPermitDevices - Change list of devices allowed to access a window.
- *
- */
-
-#include <X11/extensions/XI.h>
-#include <X11/extensions/XIproto.h>
-#include <X11/Xlibint.h>
-#include <X11/extensions/XInput.h>
-#include <X11/extensions/extutil.h>
-#include "XIint.h"
-
-Status
-XPermitDevices(Display* dpy, Window win, XID* devices, int count)
-{
- xChangeWindowAccessReq* req;
-
- XExtDisplayInfo *info = XInput_find_display(dpy);
-
- LockDisplay(dpy);
- if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1)
- return (NoSuchExtension);
-
- GetReq(ChangeWindowAccess, req);
- req->reqType = info->codes->major_opcode;
- req->ReqType = X_ChangeWindowAccess;
- req->win = win;
- /* If list is empty, clear all devices */
- if (! count)
- req->clear = WindowAccessClearPerm;
- else
- req->clear = WindowAccessClearNone;
- req->defaultRule = WindowAccessKeepRule;
- req->npermit = count;
- req->length += (count * sizeof(XID) + 3) >> 2;
- req->ndeny = 0;
- Data(dpy, (char*)devices, count * sizeof(XID));
-
- UnlockDisplay(dpy);
- SyncHandle();
- return Success;
-}
diff --git a/src/XQryAccRl.c b/src/XQryAccRl.c
deleted file mode 100644
index 20dddc7..0000000
--- a/src/XQryAccRl.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/************************************************************
-
-Copyright 2007 Peter Hutterer <peter@cs.unisa.edu.au>
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-
-/***********************************************************************
- *
- * XQueryAccess - Query access restrictions on given window.
- *
- */
-
-#include <X11/extensions/XI.h>
-#include <X11/extensions/XIproto.h>
-#include <X11/Xlibint.h>
-#include <X11/extensions/XInput.h>
-#include <X11/extensions/extutil.h>
-#include "XIint.h"
-
-Status
-XQueryWindowAccess(Display* dpy,
- Window win,
- int* rule,
- XID** permdevs,
- int* nperm,
- XID** denydevs,
- int* ndeny)
-{
- xQueryWindowAccessReq* req;
- xQueryWindowAccessReply rep;
-
- XExtDisplayInfo *info = XInput_find_display(dpy);
-
- LockDisplay(dpy);
- if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1)
- return (NoSuchExtension);
-
- GetReq(QueryWindowAccess, req);
- req->reqType = info->codes->major_opcode;
- req->ReqType = X_QueryWindowAccess;
- req->win = win;
-
- if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) {
- UnlockDisplay(dpy);
- SyncHandle();
- return BadImplementation;
- }
-
- *rule = rep.defaultRule;
- *nperm = rep.npermit;
- *ndeny = rep.ndeny;
- *permdevs = (XID *)Xmalloc(*nperm * sizeof(XID));
- if (!*permdevs)
- {
- _XEatData(dpy, (unsigned long)rep.length << 2);
- UnlockDisplay(dpy);
- SyncHandle();
- return BadImplementation;
- }
-
- *denydevs = (XID*)Xmalloc(*ndeny * sizeof(XID));
- if (!*denydevs)
- {
- _XEatData(dpy, (unsigned long)rep.length << 2);
- UnlockDisplay(dpy);
- SyncHandle();
- return BadImplementation;
- }
- _XRead(dpy, (char*)*permdevs, *nperm * sizeof(XID));
- _XRead(dpy, (char*)*denydevs, *ndeny * sizeof(XID));
-
- /* discard padding */
- _XEatData(dpy, (rep.length << 2) - (*ndeny * sizeof(XID)) - (*nperm * sizeof(XID)));
-
- UnlockDisplay(dpy);
- SyncHandle();
- return Success;
-
-}