darwinXinput.c revision 706f2543
1/* 2 * X server support of the XINPUT extension for xquartz 3 * 4 * This is currently a copy of Xi/stubs.c, but eventually this 5 * should include more complete XINPUT support. 6 */ 7 8/************************************************************ 9 10Copyright 1989, 1998 The Open Group 11 12Permission to use, copy, modify, distribute, and sell this software and its 13documentation for any purpose is hereby granted without fee, provided that 14the above copyright notice appear in all copies and that both that 15copyright notice and this permission notice appear in supporting 16documentation. 17 18The above copyright notice and this permission notice shall be included in 19all copies or substantial portions of the Software. 20 21THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 25AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 26CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 28Except as contained in this notice, the name of The Open Group shall not be 29used in advertising or otherwise to promote the sale, use or other dealings 30in this Software without prior written authorization from The Open Group. 31 32Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. 33 34 All Rights Reserved 35 36Permission to use, copy, modify, and distribute this software and its 37documentation for any purpose and without fee is hereby granted, 38provided that the above copyright notice appear in all copies and that 39both that copyright notice and this permission notice appear in 40supporting documentation, and that the name of Hewlett-Packard not be 41used in advertising or publicity pertaining to distribution of the 42software without specific, written prior permission. 43 44HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 45ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 46HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 47ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 48WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 49ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 50SOFTWARE. 51 52********************************************************/ 53 54#ifdef HAVE_DIX_CONFIG_H 55#include <dix-config.h> 56#endif 57 58#include <X11/X.h> 59#include <X11/Xproto.h> 60#include "inputstr.h" 61#include <X11/extensions/XI.h> 62#include <X11/extensions/XIproto.h> 63#include "XIstubs.h" 64#include "darwin.h" 65 66/**************************************************************************** 67 * 68 * Caller: ProcXSetDeviceMode 69 * 70 * Change the mode of an extension device. 71 * This function is used to change the mode of a device from reporting 72 * relative motion to reporting absolute positional information, and 73 * vice versa. 74 * The default implementation below is that no such devices are supported. 75 * 76 */ 77 78int 79SetDeviceMode(ClientPtr client, DeviceIntPtr dev, int mode) 80{ 81 DEBUG_LOG("SetDeviceMode(%p, %p, %d)\n", client, dev, mode); 82 return BadMatch; 83} 84 85/**************************************************************************** 86 * 87 * Caller: ProcXSetDeviceValuators 88 * 89 * Set the value of valuators on an extension input device. 90 * This function is used to set the initial value of valuators on 91 * those input devices that are capable of reporting either relative 92 * motion or an absolute position, and allow an initial position to be set. 93 * The default implementation below is that no such devices are supported. 94 * 95 */ 96 97int 98SetDeviceValuators(ClientPtr client, DeviceIntPtr dev, 99 int *valuators, int first_valuator, int num_valuators) 100{ 101 DEBUG_LOG("SetDeviceValuators(%p, %p, %p, %d, %d)\n", client, 102 dev, valuators, first_valuator, num_valuators); 103 return BadMatch; 104} 105 106/**************************************************************************** 107 * 108 * Caller: ProcXChangeDeviceControl 109 * 110 * Change the specified device controls on an extension input device. 111 * 112 */ 113 114int 115ChangeDeviceControl(ClientPtr client, DeviceIntPtr dev, 116 xDeviceCtl * control) 117{ 118 119 DEBUG_LOG("ChangeDeviceControl(%p, %p, %p)\n", client, dev, control); 120 switch (control->control) { 121 case DEVICE_RESOLUTION: 122 return BadMatch; 123 case DEVICE_ABS_CALIB: 124 case DEVICE_ABS_AREA: 125 return BadMatch; 126 case DEVICE_CORE: 127 return BadMatch; 128 default: 129 return BadMatch; 130 } 131} 132 133 134/**************************************************************************** 135 * 136 * Caller: configAddDevice (and others) 137 * 138 * Add a new device with the specified options. 139 * 140 */ 141int 142NewInputDeviceRequest(InputOption *options, InputAttributes *attrs, 143 DeviceIntPtr *pdev) 144{ 145 DEBUG_LOG("NewInputDeviceRequest(%p, %p)\n", options, pdev); 146 return BadValue; 147} 148 149/**************************************************************************** 150 * 151 * Caller: configRemoveDevice (and others) 152 * 153 * Remove the specified device previously added. 154 * 155 */ 156void 157DeleteInputDeviceRequest(DeviceIntPtr dev) 158{ 159 DEBUG_LOG("DeleteInputDeviceRequest(%p)\n", dev); 160} 161 162void 163CloseInput (void) 164{ 165} 166 167