wl_data_device_manager.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_EXO_WAYLAND_WL_DATA_DEVICE_MANAGER_H_
  5. #define COMPONENTS_EXO_WAYLAND_WL_DATA_DEVICE_MANAGER_H_
  6. #include <stdint.h>
  7. struct wl_client;
  8. namespace exo {
  9. class Display;
  10. namespace wayland {
  11. class SerialTracker;
  12. constexpr uint32_t kWlDataDeviceManagerVersion = 3;
  13. struct WaylandDataDeviceManager {
  14. WaylandDataDeviceManager(Display* display, SerialTracker* serial_tracker)
  15. : display(display), serial_tracker(serial_tracker) {}
  16. WaylandDataDeviceManager(const WaylandDataDeviceManager&) = delete;
  17. WaylandDataDeviceManager& operator=(const WaylandDataDeviceManager&) = delete;
  18. // Owned by WaylandServerController, which always outlives
  19. // wl_data_device_manager.
  20. Display* const display;
  21. // Owned by Server, which always outlives wl_data_device_manager.
  22. SerialTracker* const serial_tracker;
  23. };
  24. void bind_data_device_manager(wl_client* client,
  25. void* data,
  26. uint32_t version,
  27. uint32_t id);
  28. } // namespace wayland
  29. } // namespace exo
  30. #endif // COMPONENTS_EXO_WAYLAND_WL_DATA_DEVICE_MANAGER_H_