2 * Copyright (C) 2005-2013 Team XBMC
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with XBMC; see the file COPYING. If not, see
17 * <http://www.gnu.org/licenses/>.
22 #if defined(HAVE_WAYLAND_XBMC_PROTO)
24 #include <wayland-client.h>
25 #include <wayland-client-protocol.h>
26 #include "xbmc_wayland_test_client_protocol.h"
28 #include "XBMCWayland.h"
30 namespace xtw = xbmc::test::wayland;
32 xtw::XBMCWayland::XBMCWayland(struct xbmc_wayland *xbmcWayland) :
33 m_xbmcWayland(xbmcWayland)
37 xtw::XBMCWayland::~XBMCWayland()
39 xbmc_wayland_destroy(m_xbmcWayland);
43 xtw::XBMCWayland::AddMode(int width,
46 enum wl_output_mode flags)
48 xbmc_wayland_add_mode(m_xbmcWayland,
52 static_cast<uint32_t>(flags));
56 xtw::XBMCWayland::MovePointerTo(struct wl_surface *surface,
60 xbmc_wayland_move_pointer_to_on_surface(m_xbmcWayland,
67 xtw::XBMCWayland::SendButtonTo(struct wl_surface *surface,
71 xbmc_wayland_send_button_to_surface(m_xbmcWayland,
78 xtw::XBMCWayland::SendAxisTo(struct wl_surface *surface,
82 xbmc_wayland_send_axis_to_surface(m_xbmcWayland,
89 xtw::XBMCWayland::SendKeyToKeyboard(struct wl_surface *surface,
91 enum wl_keyboard_key_state state)
93 xbmc_wayland_send_key_to_keyboard(m_xbmcWayland,
100 xtw::XBMCWayland::SendModifiersToKeyboard(struct wl_surface *surface,
106 xbmc_wayland_send_modifiers_to_keyboard(m_xbmcWayland,
115 xtw::XBMCWayland::GiveSurfaceKeyboardFocus(struct wl_surface *surface)
117 xbmc_wayland_give_surface_keyboard_focus(m_xbmcWayland,
122 xtw::XBMCWayland::PingSurface(struct wl_surface *surface,
125 xbmc_wayland_ping_surface(m_xbmcWayland, surface, serial);