MousePacket.h 482 B

123456789101112131415161718192021222324252627
  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. int w { 0 };
  13. enum Button {
  14. LeftButton = 0x01,
  15. RightButton = 0x02,
  16. MiddleButton = 0x04,
  17. BackwardButton = 0x08,
  18. ForwardButton = 0x10,
  19. };
  20. unsigned char buttons { 0 };
  21. bool is_relative { true };
  22. };