swipe_handler_data.h 553 B

12345678910111213141516171819202122232425
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #pragma once
  8. namespace Ui::Controls {
  9. struct SwipeContextData final {
  10. float64 ratio = 0.;
  11. float64 reachRatio = 0.;
  12. int64 msgBareId = 0;
  13. int translation = 0;
  14. int cursorTop = 0;
  15. };
  16. struct SwipeBackResult final {
  17. rpl::lifetime lifetime;
  18. Fn<void(SwipeContextData)> callback;
  19. };
  20. } // namespace Ui::Controls