Debian Codegraph @

xbmc/windowing/wayland/SeatSelection.h

raw
1 /*
2 * Copyright (C) 2017-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9 #pragma once
10
11 #include "threads/CriticalSection.h"
12
13 #include <string>
14 #include <vector>
15
16 #include <wayland-client-protocol.hpp>
17
18 namespace KODI
19 {
20 namespace WINDOWING
21 {
22 namespace WAYLAND
23 {
24
25 class CConnection;
26
27 /**
28 * Retrieve and accept selection (clipboard) offers on the data device of a seat
29 */
30 class CSeatSelection
31 {
32 public:
33 CSeatSelection(CConnection& connection, wayland::seat_t const& seat);
34 std::string GetSelectionText() const;
35
36 private:
37 wayland::data_device_t m_dataDevice;
38 wayland::data_offer_t m_currentOffer;
39 mutable wayland::data_offer_t m_currentSelection;
40
41 std::vector<std::string> m_mimeTypeOffers;
42 std::string m_matchedMimeType;
43
44 mutable CCriticalSection m_currentSelectionMutex;
45 };
46
47 }
48 }
49 }