dynamic_thumbnails.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. class DocumentData;
  9. class PeerData;
  10. class PhotoData;
  11. namespace Data {
  12. class Story;
  13. class Session;
  14. struct FileOrigin;
  15. } // namespace Data
  16. namespace Ui {
  17. class DynamicImage;
  18. [[nodiscard]] std::shared_ptr<DynamicImage> MakeUserpicThumbnail(
  19. not_null<PeerData*> peer,
  20. bool forceRound = false);
  21. [[nodiscard]] std::shared_ptr<DynamicImage> MakeSavedMessagesThumbnail();
  22. [[nodiscard]] std::shared_ptr<DynamicImage> MakeRepliesThumbnail();
  23. [[nodiscard]] std::shared_ptr<DynamicImage> MakeHiddenAuthorThumbnail();
  24. [[nodiscard]] std::shared_ptr<DynamicImage> MakeStoryThumbnail(
  25. not_null<Data::Story*> story);
  26. [[nodiscard]] std::shared_ptr<DynamicImage> MakeIconThumbnail(
  27. const style::icon &icon);
  28. [[nodiscard]] std::shared_ptr<DynamicImage> MakeEmojiThumbnail(
  29. not_null<Data::Session*> owner,
  30. const QString &data);
  31. [[nodiscard]] std::shared_ptr<DynamicImage> MakePhotoThumbnail(
  32. not_null<PhotoData*> photo,
  33. FullMsgId fullId);
  34. [[nodiscard]] std::shared_ptr<DynamicImage> MakeDocumentThumbnail(
  35. not_null<DocumentData*> document,
  36. FullMsgId fullId);
  37. } // namespace Ui