wayland: Move "public" Wayland API to another header file

This commit is contained in:
Jasper St. Pierre 2014-02-28 10:24:06 -05:00
parent 77838c2ca3
commit 770b58b367
14 changed files with 61 additions and 34 deletions

View File

@ -189,6 +189,7 @@ libmutter_wayland_la_SOURCES = \
ui/theme-private.h \ ui/theme-private.h \
ui/ui.c \ ui/ui.c \
wayland/meta-wayland.c \ wayland/meta-wayland.c \
wayland/meta-wayland.h \
wayland/meta-wayland-private.h \ wayland/meta-wayland-private.h \
wayland/meta-xwayland-private.h \ wayland/meta-xwayland-private.h \
wayland/meta-xwayland.c \ wayland/meta-xwayland.c \

View File

@ -30,6 +30,7 @@
#include "meta-plugin-manager.h" #include "meta-plugin-manager.h"
#include <meta/screen.h> #include <meta/screen.h>
#include <meta/display.h> #include <meta/display.h>
#include <meta/util.h>
#include <string.h> #include <string.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>

View File

@ -28,6 +28,7 @@
#include <cogl/cogl-wayland-server.h> #include <cogl/cogl-wayland-server.h>
#include "meta-shaped-texture-private.h" #include "meta-shaped-texture-private.h"
#include "meta-wayland-private.h"
struct _MetaSurfaceActorWaylandPrivate struct _MetaSurfaceActorWaylandPrivate
{ {

View File

@ -29,7 +29,7 @@
#include "meta-surface-actor.h" #include "meta-surface-actor.h"
#include "meta-wayland-private.h" #include "meta-wayland.h"
G_BEGIN_DECLS G_BEGIN_DECLS

View File

@ -15,7 +15,6 @@
#include <clutter/clutter.h> #include <clutter/clutter.h>
#include <meta/meta-shaped-texture.h> #include <meta/meta-shaped-texture.h>
#include "meta-wayland-private.h"
#include "meta-cullable.h" #include "meta-cullable.h"
#include "meta-shaped-texture-private.h" #include "meta-shaped-texture-private.h"

View File

@ -5,9 +5,6 @@
#include <config.h> #include <config.h>
#include <wayland-server.h>
#include <meta-wayland-private.h>
#include <X11/extensions/Xdamage.h> #include <X11/extensions/Xdamage.h>
#include <meta/compositor-mutter.h> #include <meta/compositor-mutter.h>
#include "meta-surface-actor.h" #include "meta-surface-actor.h"

View File

@ -28,9 +28,9 @@
#include "meta-window-actor-private.h" #include "meta-window-actor-private.h"
#include "meta-texture-rectangle.h" #include "meta-texture-rectangle.h"
#include "region-utils.h" #include "region-utils.h"
#include "meta-wayland-private.h"
#include "monitor-private.h" #include "monitor-private.h"
#include "meta-cullable.h" #include "meta-cullable.h"
#include "meta-wayland-private.h"
#include "meta-surface-actor.h" #include "meta-surface-actor.h"
#include "meta-surface-actor-x11.h" #include "meta-surface-actor-x11.h"

View File

@ -41,7 +41,7 @@
#include "screen-private.h" #include "screen-private.h"
#include <meta/prefs.h> #include <meta/prefs.h>
#include "util-private.h" #include "util-private.h"
#include "meta-wayland-private.h" #include "meta-wayland.h"
#include <X11/keysym.h> #include <X11/keysym.h>
#include <string.h> #include <string.h>

View File

@ -53,7 +53,7 @@
#include "session.h" #include "session.h"
#include <meta/prefs.h> #include <meta/prefs.h>
#include <meta/compositor.h> #include <meta/compositor.h>
#include "meta-wayland-private.h" #include "meta-wayland.h"
#include <glib-object.h> #include <glib-object.h>
#include <glib-unix.h> #include <glib-unix.h>

View File

@ -34,7 +34,6 @@
#include "util-private.h" #include "util-private.h"
#include <meta/errors.h> #include <meta/errors.h>
#include "monitor-private.h" #include "monitor-private.h"
#include "meta-wayland-private.h"
#include "meta-dbus-xrandr.h" #include "meta-dbus-xrandr.h"

View File

@ -43,7 +43,7 @@
#include <meta/compositor.h> #include <meta/compositor.h>
#include "mutter-enum-types.h" #include "mutter-enum-types.h"
#include "core.h" #include "core.h"
#include "meta-wayland-private.h" #include "meta-wayland.h"
#include "meta-cursor-tracker-private.h" #include "meta-cursor-tracker-private.h"
#include <X11/extensions/Xinerama.h> #include <X11/extensions/Xinerama.h>

View File

@ -47,6 +47,7 @@
#include <clutter/clutter.h> #include <clutter/clutter.h>
#include <wayland-server.h> #include <wayland-server.h>
#include <xkbcommon/xkbcommon.h>
struct _MetaWaylandKeyboardGrabInterface struct _MetaWaylandKeyboardGrabInterface
{ {

View File

@ -21,7 +21,6 @@
#define META_WAYLAND_PRIVATE_H #define META_WAYLAND_PRIVATE_H
#include <wayland-server.h> #include <wayland-server.h>
#include <xkbcommon/xkbcommon.h>
#include <clutter/clutter.h> #include <clutter/clutter.h>
#include <glib.h> #include <glib.h>
@ -31,7 +30,7 @@
#include "meta-weston-launch.h" #include "meta-weston-launch.h"
#include <meta/meta-cursor-tracker.h> #include <meta/meta-cursor-tracker.h>
#include "meta-wayland-types.h" #include "meta-wayland.h"
#include "meta-wayland-versions.h" #include "meta-wayland-versions.h"
#include "meta-wayland-surface.h" #include "meta-wayland-surface.h"
#include "meta-wayland-seat.h" #include "meta-wayland-seat.h"
@ -91,30 +90,8 @@ struct _MetaWaylandCompositor
MetaWaylandSeat *seat; MetaWaylandSeat *seat;
}; };
void meta_wayland_init (void);
void meta_wayland_finalize (void);
/* We maintain a singleton MetaWaylandCompositor which can be got at via this
* API after meta_wayland_init() has been called. */
MetaWaylandCompositor *meta_wayland_compositor_get_default (void);
void meta_wayland_compositor_repick (MetaWaylandCompositor *compositor);
void meta_wayland_compositor_set_input_focus (MetaWaylandCompositor *compositor,
MetaWindow *window);
gboolean meta_wayland_compositor_handle_event (MetaWaylandCompositor *compositor,
const ClutterEvent *event);
MetaWaylandBuffer * meta_wayland_buffer_from_resource (struct wl_resource *resource); MetaWaylandBuffer * meta_wayland_buffer_from_resource (struct wl_resource *resource);
void meta_wayland_buffer_ref (MetaWaylandBuffer *buffer); void meta_wayland_buffer_ref (MetaWaylandBuffer *buffer);
void meta_wayland_buffer_unref (MetaWaylandBuffer *buffer); void meta_wayland_buffer_unref (MetaWaylandBuffer *buffer);
void meta_wayland_compositor_update (MetaWaylandCompositor *compositor,
const ClutterEvent *event);
void meta_wayland_compositor_paint_finished (MetaWaylandCompositor *compositor);
gboolean meta_wayland_compositor_activate_vt (MetaWaylandCompositor *compositor,
int vt,
GError **error);
#endif /* META_WAYLAND_PRIVATE_H */ #endif /* META_WAYLAND_PRIVATE_H */

View File

@ -0,0 +1,51 @@
/*
* Copyright (C) 2014 Red Hat
*
* 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.
*
* Written by:
* Jasper St. Pierre <jstpierre@mecheye.net>
*/
#ifndef META_WAYLAND_H
#define META_WAYLAND_H
#include "meta-wayland-types.h"
void meta_wayland_init (void);
void meta_wayland_finalize (void);
/* We maintain a singleton MetaWaylandCompositor which can be got at via this
* API after meta_wayland_init() has been called. */
MetaWaylandCompositor *meta_wayland_compositor_get_default (void);
void meta_wayland_compositor_repick (MetaWaylandCompositor *compositor);
void meta_wayland_compositor_set_input_focus (MetaWaylandCompositor *compositor,
MetaWindow *window);
gboolean meta_wayland_compositor_handle_event (MetaWaylandCompositor *compositor,
const ClutterEvent *event);
void meta_wayland_compositor_update (MetaWaylandCompositor *compositor,
const ClutterEvent *event);
void meta_wayland_compositor_paint_finished (MetaWaylandCompositor *compositor);
gboolean meta_wayland_compositor_activate_vt (MetaWaylandCompositor *compositor,
int vt,
GError **error);
#endif