You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Input.h 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /* Copyright (C) 2009 TightVNC Team
  2. * Copyright (C) 2009, 2010 Red Hat, Inc.
  3. * Copyright (C) 2009, 2010 TigerVNC Team
  4. * Copyright 2013-2015 Pierre Ossman for Cendio AB
  5. *
  6. * This is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This software is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this software; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  19. * USA.
  20. */
  21. /* Make sure macro doesn't conflict with macro in include/input.h. */
  22. #ifndef INPUT_H_
  23. #define INPUT_H_
  24. #include <stdlib.h>
  25. #include <X11/X.h>
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29. void vncInitInputDevice(void);
  30. void vncPointerButtonAction(int buttonMask);
  31. void vncPointerMove(int x, int y);
  32. void vncGetPointerPos(int *x, int *y);
  33. void vncKeyboardEvent(KeySym keysym, unsigned xtcode, int down);
  34. /* Backend dependent functions below here */
  35. void vncPrepareInputDevices(void);
  36. unsigned vncGetKeyboardState(void);
  37. unsigned vncGetLevelThreeMask(void);
  38. KeyCode vncPressShift(void);
  39. size_t vncReleaseShift(KeyCode *keys, size_t maxKeys);
  40. KeyCode vncPressLevelThree(void);
  41. size_t vncReleaseLevelThree(KeyCode *keys, size_t maxKeys);
  42. KeyCode vncKeysymToKeycode(KeySym keysym, unsigned state, unsigned *new_state);
  43. int vncIsAffectedByNumLock(KeyCode keycode);
  44. KeyCode vncAddKeysym(KeySym keysym, unsigned state);
  45. #ifdef __cplusplus
  46. }
  47. #endif
  48. #endif