diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-02-14 09:21:26 +1030 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-02-14 09:22:11 +1030 |
commit | aa6c7a07d7f3f73980ad3b6c537b5f83bc3ddd30 (patch) | |
tree | 928392e154308aa8baf84c09b1b4b34306a1a6b9 | |
parent | d97dcf6896a1c16b46068d16d3d689a3720cce46 (diff) |
Remove XFakeDeviceData call.
This call needs to be better refined and tested before we put it in.
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/XFakeDevData.c | 81 |
2 files changed, 0 insertions, 82 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 607bb46..ef7609d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -20,7 +20,6 @@ libXi_la_SOURCES = \ XExtGrabDev.c \ XExtToWire.c \ XExtUngrDev.c \ - XFakeDevData.c \ XGetBMap.c \ XGetCPtr.c \ XGetDCtl.c \ diff --git a/src/XFakeDevData.c b/src/XFakeDevData.c deleted file mode 100644 index 41a6c6a..0000000 --- a/src/XFakeDevData.c +++ /dev/null @@ -1,81 +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 -AUTHOR 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 author 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 author. - -*/ - -/*********************************************************************** - * - * XFakeDeviceData - fake device data for a given device. The data will appear - * as if would come from the device driver. - * - */ - -#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 XFakeDeviceData(Display* dpy, - XDevice* dev, - int type, - int buttons, - int num_valuators, - int first_valuator, - ValuatorData* valuators) -{ - xFakeDeviceDataReq *req; - - XExtDisplayInfo *info = XInput_find_display(dpy); - LockDisplay(dpy); - - if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1) - return (NoSuchExtension); - - GetReq(FakeDeviceData, req); - - req->reqType = info->codes->major_opcode; - req->ReqType = X_FakeDeviceData; - req->type = type; - req->deviceid = dev->device_id; - req->buttons = buttons; - req->num_valuators = num_valuators; - req->first_valuator = first_valuator; - req->length += num_valuators; - - if (num_valuators) - { - /* note: Data is a macro that uses its arguments multiple - * times, so "nvalues" is changed in a separate assignment - * statement */ - num_valuators <<= 2; - Data32(dpy, (long*)valuators, num_valuators); - } - - UnlockDisplay(dpy); - SyncHandle(); - return Success; -} - |