zwp_text_input_manager.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // Copyright 2018 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_ZWP_TEXT_INPUT_MANAGER_H_
  5. #define COMPONENTS_EXO_WAYLAND_ZWP_TEXT_INPUT_MANAGER_H_
  6. #include <stdint.h>
  7. struct wl_client;
  8. namespace exo {
  9. class XkbTracker;
  10. namespace wayland {
  11. class SerialTracker;
  12. struct WaylandTextInputManager {
  13. WaylandTextInputManager(const XkbTracker* xkb_tracker,
  14. SerialTracker* serial_tracker)
  15. : xkb_tracker(xkb_tracker), serial_tracker(serial_tracker) {}
  16. WaylandTextInputManager(const WaylandTextInputManager&) = delete;
  17. WaylandTextInputManager& operator=(const WaylandTextInputManager&) = delete;
  18. // Owned by Seat, which also always outlives zwp_text_input_manager.
  19. const XkbTracker* const xkb_tracker;
  20. // Owned by Server, which always outlives zwp_text_input_manager.
  21. SerialTracker* const serial_tracker;
  22. };
  23. struct WaylandTextInputExtension {};
  24. void bind_text_input_manager(wl_client* client,
  25. void* data,
  26. uint32_t version,
  27. uint32_t id);
  28. // Binds zcr_text_input_extention interface.
  29. // Exceptionally, this exists in zwp_text_input_manager, because it is closely
  30. // related to zwp_text_input_manager in its implementation.
  31. void bind_text_input_extension(wl_client* client,
  32. void* data,
  33. uint32_t version,
  34. uint32_t id);
  35. } // namespace wayland
  36. } // namespace exo
  37. #endif // COMPONENTS_EXO_WAYLAND_ZWP_TEXT_INPUT_MANAGER_H_