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.
This commit is contained in:
Carlos Garnacho 2016-05-12 15:56:12 +02:00
parent b0a3c472ea
commit 2ff629a984
3 changed files with 77 additions and 0 deletions

View File

@ -323,6 +323,8 @@ libmutter_la_SOURCES += \
wayland/meta-wayland-surface.h \ wayland/meta-wayland-surface.h \
wayland/meta-wayland-surface-role-cursor.c \ wayland/meta-wayland-surface-role-cursor.c \
wayland/meta-wayland-surface-role-cursor.h \ 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-types.h \
wayland/meta-wayland-versions.h \ wayland/meta-wayland-versions.h \
wayland/meta-wayland-outputs.c \ wayland/meta-wayland-outputs.c \

View File

@ -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)
{
}

View File

@ -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 */