From 8d3ac8c3e9f051d3cc62389299dea462fb335482 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Thu, 12 May 2016 15:56:12 +0200 Subject: [PATCH] wayland: Add MetaWaylandSurfaceRoleTabletCursor This is a simple subclass of MetaWaylandSurfaceRoleCursor, mostly so we can distinguish by GType, the methods in the parent class still apply and are useful. --- src/Makefile.am | 2 + .../meta-wayland-surface-role-tablet-cursor.c | 42 +++++++++++++++++++ .../meta-wayland-surface-role-tablet-cursor.h | 33 +++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 src/wayland/meta-wayland-surface-role-tablet-cursor.c create mode 100644 src/wayland/meta-wayland-surface-role-tablet-cursor.h diff --git a/src/Makefile.am b/src/Makefile.am index 1ed94fb92..1787df606 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -323,6 +323,8 @@ libmutter_la_SOURCES += \ wayland/meta-wayland-surface.h \ wayland/meta-wayland-surface-role-cursor.c \ wayland/meta-wayland-surface-role-cursor.h \ + wayland/meta-wayland-surface-role-tablet-cursor.c \ + wayland/meta-wayland-surface-role-tablet-cursor.h \ wayland/meta-wayland-types.h \ wayland/meta-wayland-versions.h \ wayland/meta-wayland-outputs.c \ diff --git a/src/wayland/meta-wayland-surface-role-tablet-cursor.c b/src/wayland/meta-wayland-surface-role-tablet-cursor.c new file mode 100644 index 000000000..075a5e4f6 --- /dev/null +++ b/src/wayland/meta-wayland-surface-role-tablet-cursor.c @@ -0,0 +1,42 @@ +/* + * Wayland Support + * + * Copyright (C) 2016 Red Hat, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program 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 + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + */ + +#include "config.h" +#include "meta-wayland-surface-role-tablet-cursor.h" + +struct _MetaWaylandSurfaceRoleTabletCursor +{ + MetaWaylandSurfaceRoleCursor parent; +}; + +G_DEFINE_TYPE (MetaWaylandSurfaceRoleTabletCursor, + meta_wayland_surface_role_tablet_cursor, + META_TYPE_WAYLAND_SURFACE_ROLE_CURSOR) + +static void +meta_wayland_surface_role_tablet_cursor_init (MetaWaylandSurfaceRoleTabletCursor *role) +{ +} + +static void +meta_wayland_surface_role_tablet_cursor_class_init (MetaWaylandSurfaceRoleTabletCursorClass *klass) +{ +} diff --git a/src/wayland/meta-wayland-surface-role-tablet-cursor.h b/src/wayland/meta-wayland-surface-role-tablet-cursor.h new file mode 100644 index 000000000..69fc6cf0f --- /dev/null +++ b/src/wayland/meta-wayland-surface-role-tablet-cursor.h @@ -0,0 +1,33 @@ +/* + * Wayland Support + * + * Copyright (C) 2016 Red Hat, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program 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 + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + */ + +#ifndef META_WAYLAND_SURFACE_ROLE_TABLET_CURSOR_H +#define META_WAYLAND_SURFACE_ROLE_TABLET_CURSOR_H + +#include "meta-wayland-surface-role-cursor.h" + +#define META_TYPE_WAYLAND_SURFACE_ROLE_TABLET_CURSOR (meta_wayland_surface_role_tablet_cursor_get_type ()) +G_DECLARE_FINAL_TYPE (MetaWaylandSurfaceRoleTabletCursor, + meta_wayland_surface_role_tablet_cursor, + META, WAYLAND_SURFACE_ROLE_TABLET_CURSOR, + MetaWaylandSurfaceRoleCursor); + +#endif /* META_WAYLAND_SURFACE_ROLE_TABLET_CURSOR_H */