MousePacket.h 465 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/Types.h>
  8. struct MousePacket {
  9. int x { 0 };
  10. int y { 0 };
  11. int z { 0 };
  12. enum Button {
  13. LeftButton = 0x01,
  14. RightButton = 0x02,
  15. MiddleButton = 0x04,
  16. BackwardButton = 0x08,
  17. ForwardButton = 0x10,
  18. };
  19. unsigned char buttons { 0 };
  20. bool is_relative { true };
  21. };