GetPCnt.c revision b4ee4795
11.2Sapb/* 21.1Sgdamore 31.1SgdamoreCopyright 1986, 1998 The Open Group 41.1Sgdamore 51.1SgdamorePermission to use, copy, modify, distribute, and sell this software and its 61.1Sgdamoredocumentation for any purpose is hereby granted without fee, provided that 71.1Sgdamorethe above copyright notice appear in all copies and that both that 81.1Sgdamorecopyright notice and this permission notice appear in supporting 91.1Sgdamoredocumentation. 101.2Sapb 111.1SgdamoreThe above copyright notice and this permission notice shall be included in 121.1Sgdamoreall copies or substantial portions of the Software. 131.1Sgdamore 141.2SapbTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 151.1SgdamoreIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 161.1SgdamoreFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 171.1SgdamoreOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 18AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 19CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 21Except as contained in this notice, the name of The Open Group shall not be 22used in advertising or otherwise to promote the sale, use or other dealings 23in this Software without prior written authorization from The Open Group. 24 25*/ 26 27#define NEED_REPLIES 28#ifdef HAVE_CONFIG_H 29#include <config.h> 30#endif 31#include "Xlibint.h" 32 33int 34XGetPointerControl( 35 register Display *dpy, 36 /* the following are return only vars */ 37 int *accel_numer, 38 int *accel_denom, 39 int *threshold) 40{ 41 xGetPointerControlReply rep; 42 xReq *req; 43 LockDisplay(dpy); 44 GetEmptyReq(GetPointerControl, req); 45 (void) _XReply (dpy, (xReply *)&rep, 0, xTrue); 46 *accel_numer = rep.accelNumerator; 47 *accel_denom = rep.accelDenominator; 48 *threshold = rep.threshold; 49 UnlockDisplay(dpy); 50 SyncHandle(); 51 return 1; 52} 53 54