PageRenderTime 79ms CodeModel.GetById 30ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/libX11/src/ChPntCon.c

https://bitbucket.org/braindamaged/openbsd-xenocara
C | 55 lines | 25 code | 5 blank | 25 comment | 0 complexity | 078691f8539aee09cca5fe0a769d8934 MD5 | raw file
Possible License(s): LGPL-2.0, BSD-2-Clause, CC-BY-SA-3.0, 0BSD, AGPL-1.0, MIT, BSD-3-Clause
  1. /*
  2. Copyright 1986, 1998 The Open Group
  3. Permission to use, copy, modify, distribute, and sell this software and its
  4. documentation for any purpose is hereby granted without fee, provided that
  5. the above copyright notice appear in all copies and that both that
  6. copyright notice and this permission notice appear in supporting
  7. documentation.
  8. The above copyright notice and this permission notice shall be included in
  9. all copies or substantial portions of the Software.
  10. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  11. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  12. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  13. OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  14. AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  15. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  16. Except as contained in this notice, the name of The Open Group shall not be
  17. used in advertising or otherwise to promote the sale, use or other dealings
  18. in this Software without prior written authorization from The Open Group.
  19. */
  20. #ifdef HAVE_CONFIG_H
  21. #include <config.h>
  22. #endif
  23. #include "Xlibint.h"
  24. int
  25. XChangePointerControl(
  26. register Display *dpy,
  27. Bool do_acc,
  28. Bool do_thresh,
  29. int acc_numerator,
  30. int acc_denominator,
  31. int threshold)
  32. {
  33. register xChangePointerControlReq *req;
  34. LockDisplay(dpy);
  35. GetReq(ChangePointerControl, req);
  36. req->doAccel = do_acc;
  37. req->doThresh = do_thresh;
  38. req->accelNum = acc_numerator;
  39. req->accelDenum = acc_denominator;
  40. req->threshold = threshold;
  41. UnlockDisplay(dpy);
  42. SyncHandle();
  43. return 1;
  44. }