Introduce a central MediaClipboardPayload API and Core::SetMediaClipboard to unify image/file clipboard operations. Implement a Windows backend using an IDataObject/OleSetClipboard (no OleFlushClipboard) that exports DIB/DIBV5, PNG/JPEG, and CF_HDROP; fall back to QMimeData on other platforms. Update mime_type to prefer encoded image formats and expose SetMediaClipboard, and replace direct QClipboard usage in photo, media view and QR code copy paths. Add unit tests for media clipboard. Also add pinned-list delta reordering: PinnedList::move, Session::movePinnedChat, adjust IndexedList/InnerWidget to batch moves and call with a delta. Update CMake to include new platform files.
18 lines
446 B
C++
18 lines
446 B
C++
/*
|
|
This file is part of Telegram Desktop,
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
For license and copyright information please follow this link:
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
*/
|
|
#pragma once
|
|
|
|
namespace Core {
|
|
struct MediaClipboardPayload;
|
|
} // namespace Core
|
|
|
|
namespace Platform {
|
|
|
|
[[nodiscard]] bool SetMediaClipboard(Core::MediaClipboardPayload &&payload);
|
|
|
|
} // namespace Platform
|