touchscreen.h 909 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (c) 2014 Sebastian Reichel <sre@kernel.org>
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms of the GNU General Public License version 2 as published by
  6. * the Free Software Foundation.
  7. */
  8. #ifndef _TOUCHSCREEN_H
  9. #define _TOUCHSCREEN_H
  10. struct input_dev;
  11. struct input_mt_pos;
  12. struct touchscreen_properties {
  13. unsigned int max_x;
  14. unsigned int max_y;
  15. bool invert_x;
  16. bool invert_y;
  17. bool swap_x_y;
  18. };
  19. void touchscreen_parse_properties(struct input_dev *input, bool multitouch,
  20. struct touchscreen_properties *prop);
  21. void touchscreen_set_mt_pos(struct input_mt_pos *pos,
  22. const struct touchscreen_properties *prop,
  23. unsigned int x, unsigned int y);
  24. void touchscreen_report_pos(struct input_dev *input,
  25. const struct touchscreen_properties *prop,
  26. unsigned int x, unsigned int y,
  27. bool multitouch);
  28. #endif