Commit e437016a authored by Jan Arne Petersen's avatar Jan Arne Petersen Committed by Matthias Clasen

wayland: Make GdkWaylandDevice public

Rename GdkDeviceCore to GdkWaylandDevice and export it properly in a
header file. Add public accessors for wl_seat, wl_pointer and
wl_keyboard.

https://bugzilla.gnome.org/show_bug.cgi?id=692823
parent 363eea65
......@@ -38,6 +38,7 @@ libgdkinclude_HEADERS = \
gdkwayland.h
libgdkwaylandinclude_HEADERS = \
gdkwaylanddevice.h \
gdkwaylanddisplay.h \
gdkwaylandwindow.h
......
This diff is collapsed.
......@@ -128,10 +128,6 @@ GdkDeviceManager *_gdk_wayland_device_manager_new (GdkDisplay *display);
void _gdk_wayland_device_manager_add_device (GdkDeviceManager *device_manager,
struct wl_seat *seat);
struct wl_seat *_gdk_wayland_device_get_wl_seat (GdkDevice *device);
struct wl_pointer *_gdk_wayland_device_get_wl_pointer (GdkDevice *device);
struct wl_keyboard *_gdk_wayland_device_get_wl_keyboard (GdkDevice *device);
GdkKeymap *_gdk_wayland_device_get_keymap (GdkDevice *device);
void _gdk_wayland_display_deliver_event (GdkDisplay *display, GdkEvent *event);
......
......@@ -29,6 +29,7 @@
#define __GDKWAYLAND_H_INSIDE__
#include <gdk/wayland/gdkwaylanddevice.h>
#include <gdk/wayland/gdkwaylanddisplay.h>
#include <gdk/wayland/gdkwaylandwindow.h>
......
/* GDK - The GIMP Drawing Kit
* Copyright (C) 2013 Jan Arne Petersen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GDK_WAYLAND_DEVICE_H__
#define __GDK_WAYLAND_DEVICE_H__
#if !defined (__GDKWAYLAND_H_INSIDE__) && !defined (GDK_COMPILATION)
#error "Only <gdk/gdkwayland.h> can be included directly."
#endif
#include <gdk/gdk.h>
#include <wayland-client.h>
G_BEGIN_DECLS
#ifdef GDK_COMPILATION
typedef struct _GdkWaylandDevice GdkWaylandDevice;
#else
typedef GdkDevice GdkWaylandDevice;
#endif
typedef struct _GdkWaylandDeviceClass GdkWaylandDeviceClass;
#define GDK_TYPE_WAYLAND_DEVICE (gdk_wayland_device_get_type ())
#define GDK_WAYLAND_DEVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_WAYLAND_DEVICE, GdkWaylandDevice))
#define GDK_WAYLAND_DEVICE_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_WAYLAND_DEVICE, GdkWaylandDeviceClass))
#define GDK_IS_WAYLAND_DEVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_WAYLAND_DEVICE))
#define GDK_IS_WAYLAND_DEVICE_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_WAYLAND_DEVICE))
#define GDK_WAYLAND_DEVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_WAYLAND_DEVICE, GdkWaylandDeviceClass))
GType gdk_wayland_device_get_type (void);
struct wl_seat *gdk_wayland_device_get_wl_seat (GdkDevice *device);
struct wl_pointer *gdk_wayland_device_get_wl_pointer (GdkDevice *device);
struct wl_keyboard *gdk_wayland_device_get_wl_keyboard (GdkDevice *device);
G_END_DECLS
#endif /* __GDK_WAYLAND_DEVICE_H__ */
......@@ -1423,7 +1423,7 @@ gdk_wayland_window_begin_resize_drag (GdkWindow *window,
impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
wl_shell_surface_resize (impl->shell_surface,
_gdk_wayland_device_get_wl_seat (device),
gdk_wayland_device_get_wl_seat (device),
_gdk_wayland_display_get_serial (wayland_display),
grab_type);
......@@ -1452,7 +1452,7 @@ gdk_wayland_window_begin_move_drag (GdkWindow *window,
impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
wl_shell_surface_move (impl->shell_surface,
_gdk_wayland_device_get_wl_seat (device),
gdk_wayland_device_get_wl_seat (device),
_gdk_wayland_display_get_serial (wayland_display));
/* This is needed since Wayland will absorb all the pointer events after the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment