[mutter] Rename MetaWaylandStage to MetaStage and put in compositor/
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] Rename MetaWaylandStage to MetaStage and put in compositor/
- Date: Tue, 22 Apr 2014 20:56:56 +0000 (UTC)
commit 27696835217fe94061a628e271337e4bbe199d34
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Apr 22 14:46:57 2014 -0400
Rename MetaWaylandStage to MetaStage and put in compositor/
src/Makefile.am | 4 +-
src/compositor/compositor.c | 4 +-
.../meta-stage.c} | 25 +++++-----
src/compositor/meta-stage.h | 53 ++++++++++++++++++++
src/wayland/meta-wayland-stage.h | 53 --------------------
5 files changed, 70 insertions(+), 69 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 9d9c5c0..04a9c04 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -120,6 +120,8 @@ libmutter_la_SOURCES = \
compositor/meta-surface-actor-x11.h \
compositor/meta-surface-actor-wayland.c \
compositor/meta-surface-actor-wayland.h \
+ compositor/meta-stage.h \
+ compositor/meta-stage.c \
compositor/meta-texture-rectangle.c \
compositor/meta-texture-rectangle.h \
compositor/meta-texture-tower.c \
@@ -229,8 +231,6 @@ libmutter_la_SOURCES = \
wayland/meta-wayland-pointer.h \
wayland/meta-wayland-seat.c \
wayland/meta-wayland-seat.h \
- wayland/meta-wayland-stage.h \
- wayland/meta-wayland-stage.c \
wayland/meta-wayland-surface.c \
wayland/meta-wayland-surface.h \
wayland/meta-wayland-types.h \
diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
index b4529b1..f9c28d9 100644
--- a/src/compositor/compositor.c
+++ b/src/compositor/compositor.c
@@ -72,6 +72,7 @@
#include <meta/meta-shadow-factory.h>
#include "meta-window-actor-private.h"
#include "meta-window-group.h"
+#include "meta-stage.h"
#include "window-private.h" /* to check window->hidden */
#include "display-private.h" /* for meta_display_lookup_x_window() */
#include "util-private.h"
@@ -79,7 +80,6 @@
#include <X11/extensions/shape.h>
#include <X11/extensions/Xcomposite.h>
-#include "wayland/meta-wayland-stage.h"
#include "wayland/meta-wayland-private.h"
static gboolean
@@ -527,7 +527,7 @@ meta_compositor_manage (MetaCompositor *compositor)
{
MetaWaylandCompositor *wayland_compositor = meta_wayland_compositor_get_default ();
- compositor->stage = meta_wayland_stage_new ();
+ compositor->stage = meta_stage_new ();
clutter_actor_show (compositor->stage);
wayland_compositor->stage = compositor->stage;
diff --git a/src/wayland/meta-wayland-stage.c b/src/compositor/meta-stage.c
similarity index 71%
rename from src/wayland/meta-wayland-stage.c
rename to src/compositor/meta-stage.c
index 6c83329..b7bfab6 100644
--- a/src/wayland/meta-wayland-stage.c
+++ b/src/compositor/meta-stage.c
@@ -1,7 +1,5 @@
/*
- * Wayland Support
- *
- * Copyright (C) 2012 Intel Corporation
+ * 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
@@ -17,21 +15,24 @@
* 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>
*/
#include <config.h>
-#include "meta-wayland-stage.h"
+#include "meta-stage.h"
#include "meta-backend.h"
#include <meta/util.h>
-G_DEFINE_TYPE (MetaWaylandStage, meta_wayland_stage, CLUTTER_TYPE_STAGE);
+G_DEFINE_TYPE (MetaStage, meta_stage, CLUTTER_TYPE_STAGE);
static void
-meta_wayland_stage_paint (ClutterActor *actor)
+meta_stage_paint (ClutterActor *actor)
{
- CLUTTER_ACTOR_CLASS (meta_wayland_stage_parent_class)->paint (actor);
+ CLUTTER_ACTOR_CLASS (meta_stage_parent_class)->paint (actor);
if (meta_is_wayland_compositor ())
{
@@ -42,23 +43,23 @@ meta_wayland_stage_paint (ClutterActor *actor)
}
static void
-meta_wayland_stage_class_init (MetaWaylandStageClass *klass)
+meta_stage_class_init (MetaStageClass *klass)
{
ClutterActorClass *actor_class = (ClutterActorClass *) klass;
- actor_class->paint = meta_wayland_stage_paint;
+ actor_class->paint = meta_stage_paint;
}
static void
-meta_wayland_stage_init (MetaWaylandStage *self)
+meta_stage_init (MetaStage *self)
{
clutter_stage_set_user_resizable (CLUTTER_STAGE (self), FALSE);
}
ClutterActor *
-meta_wayland_stage_new (void)
+meta_stage_new (void)
{
- return g_object_new (META_TYPE_WAYLAND_STAGE,
+ return g_object_new (META_TYPE_STAGE,
"cursor-visible", FALSE,
NULL);
}
diff --git a/src/compositor/meta-stage.h b/src/compositor/meta-stage.h
new file mode 100644
index 0000000..20bdd0a
--- /dev/null
+++ b/src/compositor/meta-stage.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2012 Intel Corporation
+ *
+ * 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_STAGE_H
+#define META_STAGE_H
+
+#include <clutter/clutter.h>
+
+G_BEGIN_DECLS
+
+#define META_TYPE_STAGE (meta_stage_get_type ())
+#define META_STAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_STAGE, MetaStage))
+#define META_STAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_STAGE, MetaStageClass))
+#define META_IS_STAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_STAGE))
+#define META_IS_STAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_STAGE))
+#define META_STAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_STAGE, MetaStageClass))
+
+typedef struct _MetaStage MetaStage;
+typedef struct _MetaStageClass MetaStageClass;
+
+struct _MetaStageClass
+{
+ ClutterStageClass parent_class;
+};
+
+struct _MetaStage
+{
+ ClutterStage parent;
+};
+
+GType meta_stage_get_type (void) G_GNUC_CONST;
+
+ClutterActor *meta_stage_new (void);
+
+G_END_DECLS
+
+#endif /* META_STAGE_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]