mirror of
https://github.com/brl/mutter.git
synced 2024-12-27 05:12:15 +00:00
wayland/surface: Make MetaWaylandSurface public
Only expose the method to get the associated MetaWindow. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3340>
This commit is contained in:
parent
5dbb6c31e9
commit
a772c709aa
@ -143,7 +143,7 @@ Source files should use the header include order of the following example:
|
||||
#include "mtk/mtk.h"
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
#endif
|
||||
|
||||
#include "meta-dbus-file-generated-by-gdbus-codegen.h"
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
#include "compositor/meta-surface-actor-wayland.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
#endif /* HAVE_WAYLAND */
|
||||
|
||||
struct _MetaCompositorViewNative
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "compositor/meta-window-actor-wayland.h"
|
||||
#include "compositor/region-utils.h"
|
||||
#include "meta/meta-window-actor.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
#include "wayland/meta-window-wayland.h"
|
||||
|
||||
struct _MetaSurfaceContainerActorWayland
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
#include "compositor/meta-surface-actor-wayland.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
|
@ -92,7 +92,7 @@
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
#include "wayland/meta-wayland-private.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
#include "wayland/meta-window-wayland.h"
|
||||
#endif
|
||||
|
||||
|
@ -669,7 +669,7 @@ if have_wayland
|
||||
'wayland/meta-wayland-subsurface.c',
|
||||
'wayland/meta-wayland-subsurface.h',
|
||||
'wayland/meta-wayland-surface.c',
|
||||
'wayland/meta-wayland-surface.h',
|
||||
'wayland/meta-wayland-surface-private.h',
|
||||
'wayland/meta-wayland-tablet.c',
|
||||
'wayland/meta-wayland-tablet-cursor-surface.c',
|
||||
'wayland/meta-wayland-tablet-cursor-surface.h',
|
||||
|
@ -52,6 +52,7 @@ if have_wayland
|
||||
mutter_public_headers += [
|
||||
'meta-wayland-client.h',
|
||||
'meta-wayland-compositor.h',
|
||||
'meta-wayland-surface.h',
|
||||
]
|
||||
endif
|
||||
|
||||
|
35
src/meta/meta-wayland-surface.h
Normal file
35
src/meta/meta-wayland-surface.h
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright 2023 Collabora Ltd.
|
||||
*
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gio/gio.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define META_TYPE_WAYLAND_SURFACE (meta_wayland_surface_get_type ())
|
||||
META_EXPORT
|
||||
G_DECLARE_FINAL_TYPE (MetaWaylandSurface,
|
||||
meta_wayland_surface,
|
||||
META, WAYLAND_SURFACE,
|
||||
GObject);
|
||||
|
||||
META_EXPORT
|
||||
MetaWindow *meta_wayland_surface_get_window (MetaWaylandSurface *surface);
|
||||
|
||||
G_END_DECLS
|
@ -25,7 +25,7 @@
|
||||
#include "tests/meta-ref-test.h"
|
||||
#include "wayland/meta-wayland-actor-surface.h"
|
||||
#include "wayland/meta-wayland-private.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
|
||||
#include "test-driver-server-protocol.h"
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "tests/meta-wayland-test-utils.h"
|
||||
#include "wayland/meta-wayland.h"
|
||||
#include "wayland/meta-wayland-client-private.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
|
||||
static MetaContext *test_context;
|
||||
static MetaWaylandTestDriver *test_driver;
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "tests/meta-test-utils.h"
|
||||
#include "tests/meta-wayland-test-driver.h"
|
||||
#include "tests/meta-wayland-test-utils.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
|
||||
static MetaContext *test_context;
|
||||
static MetaVirtualMonitor *virtual_monitor;
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "backends/native/meta-renderer-native.h"
|
||||
#include "tests/meta-ref-test.h"
|
||||
#include "wayland/meta-window-wayland.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
|
||||
static MetaContext *test_context;
|
||||
static MetaWaylandTestDriver *test_driver;
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "tests/meta-wayland-test-utils.h"
|
||||
#include "wayland/meta-wayland-client-private.h"
|
||||
#include "wayland/meta-wayland-filter-manager.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
|
||||
#include "dummy-client-protocol.h"
|
||||
#include "dummy-server-protocol.h"
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "backends/meta-cursor.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
|
||||
#define META_TYPE_CURSOR_SPRITE_WAYLAND meta_cursor_sprite_wayland_get_type ()
|
||||
META_EXPORT_TEST
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include "wayland/meta-wayland-pointer-constraints.h"
|
||||
#include "wayland/meta-wayland-pointer.h"
|
||||
#include "wayland/meta-wayland-seat.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
#include "wayland/meta-wayland.h"
|
||||
|
||||
typedef struct _MetaPointerConfinementWaylandPrivate MetaPointerConfinementWaylandPrivate;
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "compositor/meta-window-actor-wayland.h"
|
||||
#include "compositor/region-utils.h"
|
||||
#include "wayland/meta-wayland-buffer.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
#include "wayland/meta-window-wayland.h"
|
||||
|
||||
#ifdef HAVE_XWAYLAND
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
|
||||
#define META_TYPE_WAYLAND_ACTOR_SURFACE (meta_wayland_actor_surface_get_type ())
|
||||
G_DECLARE_DERIVABLE_TYPE (MetaWaylandActorSurface,
|
||||
|
@ -20,7 +20,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "backends/meta-cursor-renderer.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
|
||||
struct _MetaWaylandCursorSurfaceClass
|
||||
{
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#include "wayland/meta-wayland-outputs.h"
|
||||
#include "wayland/meta-wayland-private.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
#include "wayland/meta-wayland-versions.h"
|
||||
|
||||
#include "fractional-scale-v1-server-protocol.h"
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "core/bell.h"
|
||||
#include "core/window-private.h"
|
||||
#include "wayland/meta-wayland-private.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
#include "wayland/meta-wayland-versions.h"
|
||||
#include "wayland/meta-window-wayland.h"
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include "wayland/meta-wayland-region.h"
|
||||
#include "wayland/meta-wayland-seat.h"
|
||||
#include "wayland/meta-wayland-subsurface.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
|
||||
#ifdef HAVE_XWAYLAND
|
||||
#include "wayland/meta-xwayland.h"
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#include "wayland/meta-wayland-pointer.h"
|
||||
#include "wayland/meta-wayland-seat.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
|
||||
#include "pointer-gestures-unstable-v1-server-protocol.h"
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
#include "wayland/meta-wayland-pointer.h"
|
||||
#include "wayland/meta-wayland-seat.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
|
||||
#include "pointer-gestures-unstable-v1-server-protocol.h"
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
#include "wayland/meta-wayland-pointer.h"
|
||||
#include "wayland/meta-wayland-seat.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
|
||||
#include "pointer-gestures-unstable-v1-server-protocol.h"
|
||||
|
||||
|
@ -61,7 +61,7 @@
|
||||
#include "wayland/meta-wayland-popup.h"
|
||||
#include "wayland/meta-wayland-private.h"
|
||||
#include "wayland/meta-wayland-seat.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
|
||||
#ifdef HAVE_XWAYLAND
|
||||
#include "wayland/meta-xwayland.h"
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "wayland/meta-wayland-pointer-gesture-pinch.h"
|
||||
#include "wayland/meta-wayland-pointer-gesture-swipe.h"
|
||||
#include "wayland/meta-wayland-seat.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
#include "wayland/meta-wayland-types.h"
|
||||
|
||||
#define META_TYPE_WAYLAND_POINTER (meta_wayland_pointer_get_type ())
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
#include "wayland/meta-wayland-pointer.h"
|
||||
#include "wayland/meta-wayland-private.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
|
||||
G_DEFINE_INTERFACE (MetaWaylandPopupSurface, meta_wayland_popup_surface,
|
||||
G_TYPE_OBJECT);
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "wayland/meta-wayland-cursor-surface.h"
|
||||
#include "wayland/meta-wayland-presentation-time-private.h"
|
||||
#include "wayland/meta-wayland-private.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
#include "wayland/meta-wayland-outputs.h"
|
||||
#include "wayland/meta-wayland-versions.h"
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "wayland/meta-wayland-pointer-gestures.h"
|
||||
#include "wayland/meta-wayland-presentation-time-private.h"
|
||||
#include "wayland/meta-wayland-seat.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
#include "wayland/meta-wayland-tablet-manager.h"
|
||||
#include "wayland/meta-wayland-versions.h"
|
||||
#include "wayland/meta-wayland.h"
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "wayland/meta-wayland-actor-surface.h"
|
||||
#include "wayland/meta-wayland-buffer.h"
|
||||
#include "wayland/meta-wayland-subsurface.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
#include "wayland/meta-window-wayland.h"
|
||||
|
||||
typedef struct _MetaWaylandShellSurfacePrivate
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "wayland/meta-wayland.h"
|
||||
#include "wayland/meta-wayland-actor-surface.h"
|
||||
#include "wayland/meta-wayland-buffer.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
#include "wayland/meta-wayland-transaction.h"
|
||||
#include "wayland/meta-window-wayland.h"
|
||||
|
||||
|
@ -26,15 +26,10 @@
|
||||
#include "compositor/meta-shaped-texture-private.h"
|
||||
#include "compositor/meta-surface-actor.h"
|
||||
#include "meta/meta-cursor-tracker.h"
|
||||
#include "meta/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-pointer-constraints.h"
|
||||
#include "wayland/meta-wayland-types.h"
|
||||
|
||||
#define META_TYPE_WAYLAND_SURFACE (meta_wayland_surface_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (MetaWaylandSurface,
|
||||
meta_wayland_surface,
|
||||
META, WAYLAND_SURFACE,
|
||||
GObject);
|
||||
|
||||
#define META_TYPE_WAYLAND_SURFACE_ROLE (meta_wayland_surface_role_get_type ())
|
||||
G_DECLARE_DERIVABLE_TYPE (MetaWaylandSurfaceRole, meta_wayland_surface_role,
|
||||
META, WAYLAND_SURFACE_ROLE, GObject);
|
||||
@ -324,9 +319,6 @@ void meta_wayland_surface_update_outputs (MetaWaylandSurface *sur
|
||||
|
||||
MetaWaylandSurface *meta_wayland_surface_get_toplevel (MetaWaylandSurface *surface);
|
||||
|
||||
META_EXPORT_TEST
|
||||
MetaWindow * meta_wayland_surface_get_window (MetaWaylandSurface *surface);
|
||||
|
||||
gboolean meta_wayland_surface_is_synchronized (MetaWaylandSurface *surface);
|
||||
|
||||
MetaWindow * meta_wayland_surface_get_toplevel_window (MetaWaylandSurface *surface);
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
|
||||
#include <gobject/gvaluecollector.h>
|
||||
#include <wayland-server.h>
|
||||
@ -2007,6 +2007,14 @@ meta_wayland_surface_role_get_window (MetaWaylandSurfaceRole *surface_role)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_wayland_surface_get_window:
|
||||
* @surface: a #MetaWaylandSurface
|
||||
*
|
||||
* Get the #MetaWindow associated with this wayland surface.
|
||||
*
|
||||
* Returns: (nullable) (transfer none): a #MetaWindow
|
||||
*/
|
||||
MetaWindow *
|
||||
meta_wayland_surface_get_window (MetaWaylandSurface *surface)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include "wayland/meta-wayland-private.h"
|
||||
#include "wayland/meta-wayland-subsurface.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
#include "wayland/meta-wayland-versions.h"
|
||||
#include "wayland/meta-wayland-viewporter.h"
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "core/window-private.h"
|
||||
#include "wayland/meta-wayland-client-private.h"
|
||||
#include "wayland/meta-wayland-filter-manager.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
#include "wayland/meta-wayland-versions.h"
|
||||
#include "wayland/meta-wayland.h"
|
||||
#include "x11/meta-x11-display-private.h"
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "wayland/meta-wayland-private.h"
|
||||
#include "wayland/meta-wayland-seat.h"
|
||||
#include "wayland/meta-wayland-shell-surface.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
#include "wayland/meta-wayland-transaction.h"
|
||||
#include "wayland/meta-wayland-versions.h"
|
||||
#include "wayland/meta-wayland-window-configuration.h"
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include "meta/meta-x11-errors.h"
|
||||
#include "wayland/meta-wayland-actor-surface.h"
|
||||
#include "wayland/meta-wayland-private.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
#include "wayland/meta-wayland-window-configuration.h"
|
||||
#include "wayland/meta-wayland-xdg-shell.h"
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "x11/xprops.h"
|
||||
#include "wayland/meta-window-xwayland.h"
|
||||
#include "wayland/meta-wayland.h"
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
|
||||
enum
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user