[metacity] compositor: add MetaSurface



commit ccb359d64b969f3942ba352f8410e00b970d569c
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Fri Sep 13 18:46:10 2019 +0300

    compositor: add MetaSurface

 src/Makefile.am                          |   7 ++
 src/compositor/meta-compositor-none.c    |   5 +-
 src/compositor/meta-compositor-private.h |   5 +-
 src/compositor/meta-compositor-vulkan.c  |  10 ++-
 src/compositor/meta-compositor-xrender.c |  47 +++++++-----
 src/compositor/meta-compositor.c         |  47 +++++++++++-
 src/compositor/meta-surface-private.h    |  32 ++++++++
 src/compositor/meta-surface-vulkan.c     |  36 +++++++++
 src/compositor/meta-surface-vulkan.h     |  31 ++++++++
 src/compositor/meta-surface-xrender.c    |  36 +++++++++
 src/compositor/meta-surface-xrender.h    |  31 ++++++++
 src/compositor/meta-surface.c            | 127 +++++++++++++++++++++++++++++++
 src/compositor/meta-surface.h            |  32 ++++++++
 13 files changed, 416 insertions(+), 30 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index b0d8ac53..76d7c02c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -32,6 +32,11 @@ metacity_SOURCES=                            \
        compositor/meta-compositor-private.h    \
        compositor/meta-compositor-xrender.c    \
        compositor/meta-compositor-xrender.h    \
+       compositor/meta-surface.c               \
+       compositor/meta-surface.h               \
+       compositor/meta-surface-private.h       \
+       compositor/meta-surface-xrender.c       \
+       compositor/meta-surface-xrender.h       \
        include/meta-compositor.h               \
        core/above-tab-keycode.c                \
        core/constraints.c                      \
@@ -117,6 +122,8 @@ if HAVE_VULKAN
 metacity_SOURCES += \
        compositor/meta-compositor-vulkan.c \
        compositor/meta-compositor-vulkan.h \
+       compositor/meta-surface-vulkan.c \
+       compositor/meta-surface-vulkan.h \
        $(NULL)
 endif
 
diff --git a/src/compositor/meta-compositor-none.c b/src/compositor/meta-compositor-none.c
index fbfbc297..542b5909 100644
--- a/src/compositor/meta-compositor-none.c
+++ b/src/compositor/meta-compositor-none.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Alberts Muktupāvels
+ * Copyright (C) 2017-2019 Alberts Muktupāvels
  *
  * 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
@@ -33,10 +33,11 @@ meta_compositor_none_manage (MetaCompositor  *compositor,
   return TRUE;
 }
 
-static void
+static MetaSurface *
 meta_compositor_none_add_window (MetaCompositor *compositor,
                                  MetaWindow     *window)
 {
+  return NULL;
 }
 
 static void
diff --git a/src/compositor/meta-compositor-private.h b/src/compositor/meta-compositor-private.h
index 87247b81..f444829c 100644
--- a/src/compositor/meta-compositor-private.h
+++ b/src/compositor/meta-compositor-private.h
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2008 Iain Holmes
- * Copyright (C) 2017 Alberts Muktupāvels
+ * Copyright (C) 2017-2019 Alberts Muktupāvels
  *
  * 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
@@ -20,6 +20,7 @@
 #define META_COMPOSITOR_PRIVATE_H
 
 #include "meta-compositor.h"
+#include "meta-surface.h"
 
 G_BEGIN_DECLS
 
@@ -30,7 +31,7 @@ struct _MetaCompositorClass
   gboolean          (* manage)                       (MetaCompositor     *compositor,
                                                       GError            **error);
 
-  void              (* add_window)                   (MetaCompositor     *compositor,
+  MetaSurface     * (* add_window)                   (MetaCompositor     *compositor,
                                                       MetaWindow         *window);
 
   void              (* remove_window)                (MetaCompositor     *compositor,
diff --git a/src/compositor/meta-compositor-vulkan.c b/src/compositor/meta-compositor-vulkan.c
index 66850f55..fcfea1d5 100644
--- a/src/compositor/meta-compositor-vulkan.c
+++ b/src/compositor/meta-compositor-vulkan.c
@@ -22,6 +22,7 @@
 
 #include "display-private.h"
 #include "meta-compositor-vulkan.h"
+#include "meta-surface-vulkan.h"
 #include "prefs.h"
 #include "screen.h"
 #include "util.h"
@@ -1260,10 +1261,17 @@ meta_compositor_vulkan_manage (MetaCompositor  *compositor,
   return TRUE;
 }
 
-static void
+static MetaSurface *
 meta_compositor_vulkan_add_window (MetaCompositor *compositor,
                                    MetaWindow     *window)
 {
+  MetaSurface *surface;
+
+  surface = g_object_new (META_TYPE_SURFACE_VULKAN,
+                          "window", window,
+                          NULL);
+
+  return surface;
 }
 
 static void
diff --git a/src/compositor/meta-compositor-xrender.c b/src/compositor/meta-compositor-xrender.c
index b994acd2..6cb06441 100644
--- a/src/compositor/meta-compositor-xrender.c
+++ b/src/compositor/meta-compositor-xrender.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2007 Iain Holmes
- * Copyright (C) 2017 Alberts Muktupāvels
+ * Copyright (C) 2017-2019 Alberts Muktupāvels
  *
  * Based on xcompmgr - (C) 2003 Keith Packard
  *          xfwm4    - (C) 2005-2007 Olivier Fourdan
@@ -41,6 +41,7 @@
 #include "prefs.h"
 #include "window-private.h"
 #include "meta-compositor-xrender.h"
+#include "meta-surface-xrender.h"
 #include "xprops.h"
 #include "util.h"
 #include <X11/Xatom.h>
@@ -1773,11 +1774,10 @@ repair_win (MetaCompositorXRender *xrender,
 }
 
 static void
-free_win (MetaCompositorXRender *xrender,
-          MetaCompWindow        *cw,
-          gboolean               destroy)
+free_win (MetaCompWindow *cw,
+          gboolean        destroy)
 {
-  MetaDisplay *display = meta_screen_get_display (xrender->screen);
+  MetaDisplay *display = meta_window_get_display (cw->window);
   Display *xdisplay = meta_display_get_xdisplay (display);
 
   meta_error_trap_push (display);
@@ -1887,6 +1887,16 @@ free_win (MetaCompositorXRender *xrender,
   meta_error_trap_pop (display);
 }
 
+static void
+cw_destroy_cb (gpointer data)
+{
+  MetaCompWindow *cw;
+
+  cw = (MetaCompWindow *) data;
+
+  free_win (cw, TRUE);
+}
+
 static void
 map_win (MetaCompositorXRender *xrender,
          MetaCompWindow        *cw)
@@ -2310,7 +2320,6 @@ meta_compositor_xrender_finalize (GObject *object)
   MetaCompositorXRender *xrender;
   MetaDisplay *display;
   Display *xdisplay;
-  GList *index;
 
   xrender = META_COMPOSITOR_XRENDER (object);
   display = meta_compositor_get_display (META_COMPOSITOR (xrender));
@@ -2323,11 +2332,6 @@ meta_compositor_xrender_finalize (GObject *object)
     }
 
   /* Destroy the windows */
-  for (index = xrender->windows; index; index = index->next)
-    {
-      MetaCompWindow *cw = (MetaCompWindow *) index->data;
-      free_win (xrender, cw, TRUE);
-    }
   g_list_free (xrender->windows);
   g_clear_pointer (&xrender->windows_by_xid, g_hash_table_destroy);
 
@@ -2445,29 +2449,30 @@ meta_compositor_xrender_manage (MetaCompositor  *compositor,
   return TRUE;
 }
 
-static void
+static MetaSurface *
 meta_compositor_xrender_add_window (MetaCompositor *compositor,
                                     MetaWindow     *window)
 {
   MetaCompositorXRender *xrender;
   MetaDisplay *display;
+  MetaSurface *surface;
   MetaCompWindow *cw;
   Window xwindow;
 
-  g_assert (window != NULL);
-
   xrender = META_COMPOSITOR_XRENDER (compositor);
   display = meta_compositor_get_display (compositor);
 
-  /* If already added, ignore */
-  if (find_comp_window_by_window (xrender, window) != NULL)
-    return;
-
   meta_error_trap_push (display);
 
+  surface = g_object_new (META_TYPE_SURFACE_XRENDER,
+                          "window", window,
+                          NULL);
+
   cw = g_new0 (MetaCompWindow, 1);
   cw->window = window;
 
+  g_object_set_data_full (G_OBJECT (surface), "cw", cw, cw_destroy_cb);
+
   meta_window_get_input_rect (window, &cw->rect);
 
   g_signal_connect_object (window, "notify::appears-focused",
@@ -2534,6 +2539,8 @@ meta_compositor_xrender_add_window (MetaCompositor *compositor,
     map_win (xrender, cw);
 
   meta_error_trap_pop (display);
+
+  return surface;
 }
 
 static void
@@ -2560,8 +2567,6 @@ meta_compositor_xrender_remove_window (MetaCompositor *compositor,
   xwindow = meta_window_get_xwindow (window);
   xrender->windows = g_list_remove (xrender->windows, (gconstpointer) cw);
   g_hash_table_remove (xrender->windows_by_xid, (gpointer) xwindow);
-
-  free_win (xrender, cw, TRUE);
 }
 
 static void
@@ -2606,7 +2611,7 @@ meta_compositor_xrender_hide_window (MetaCompositor *compositor,
       cw->extents = None;
     }
 
-  free_win (xrender, cw, FALSE);
+  free_win (cw, FALSE);
   xrender->clip_changed = TRUE;
 }
 
diff --git a/src/compositor/meta-compositor.c b/src/compositor/meta-compositor.c
index 3916dc6c..be8f79b9 100644
--- a/src/compositor/meta-compositor.c
+++ b/src/compositor/meta-compositor.c
@@ -44,6 +44,8 @@ typedef struct
   /* XCompositeRedirectSubwindows */
   gboolean     windows_redirected;
 
+  GHashTable  *surfaces;
+
   /* meta_compositor_queue_redraw */
   guint        redraw_id;
 } MetaCompositorPrivate;
@@ -104,6 +106,20 @@ initable_iface_init (GInitableIface *iface)
   iface->init = meta_compositor_initable_init;
 }
 
+static void
+meta_compositor_dispose (GObject *object)
+{
+  MetaCompositor *compositor;
+  MetaCompositorPrivate *priv;
+
+  compositor = META_COMPOSITOR (object);
+  priv = meta_compositor_get_instance_private (compositor);
+
+  g_clear_pointer (&priv->surfaces, g_hash_table_destroy);
+
+  G_OBJECT_CLASS (meta_compositor_parent_class)->dispose (object);
+}
+
 static void
 meta_compositor_finalize (GObject *object)
 {
@@ -234,6 +250,7 @@ meta_compositor_class_init (MetaCompositorClass *compositor_class)
 
   object_class = G_OBJECT_CLASS (compositor_class);
 
+  object_class->dispose = meta_compositor_dispose;
   object_class->finalize = meta_compositor_finalize;
   object_class->get_property = meta_compositor_get_property;
   object_class->set_property = meta_compositor_set_property;
@@ -244,28 +261,50 @@ meta_compositor_class_init (MetaCompositorClass *compositor_class)
 static void
 meta_compositor_init (MetaCompositor *compositor)
 {
+  MetaCompositorPrivate *priv;
+
+  priv = meta_compositor_get_instance_private (compositor);
+
+  priv->surfaces = g_hash_table_new_full (g_direct_hash, g_direct_equal,
+                                          NULL, g_object_unref);
 }
 
 void
 meta_compositor_add_window (MetaCompositor *compositor,
                             MetaWindow     *window)
 {
+  MetaCompositorPrivate *priv;
   MetaCompositorClass *compositor_class;
+  MetaSurface *surface;
+
+  g_assert (window != NULL);
+
+  priv = meta_compositor_get_instance_private (compositor);
+
+  /* If already added, ignore */
+  if (g_hash_table_lookup (priv->surfaces, window) != NULL)
+    return;
 
   compositor_class = META_COMPOSITOR_GET_CLASS (compositor);
+  surface = compositor_class->add_window (compositor, window);
 
-  compositor_class->add_window (compositor, window);
+  if (surface == NULL)
+    return;
+
+  g_hash_table_insert (priv->surfaces, window, surface);
 }
 
 void
 meta_compositor_remove_window (MetaCompositor *compositor,
                                MetaWindow     *window)
 {
-  MetaCompositorClass *compositor_class;
+  MetaCompositorPrivate *priv;
 
-  compositor_class = META_COMPOSITOR_GET_CLASS (compositor);
+  priv = meta_compositor_get_instance_private (compositor);
+
+  META_COMPOSITOR_GET_CLASS (compositor)->remove_window (compositor, window);
 
-  compositor_class->remove_window (compositor, window);
+  g_hash_table_remove (priv->surfaces, window);
 }
 
 void
diff --git a/src/compositor/meta-surface-private.h b/src/compositor/meta-surface-private.h
new file mode 100644
index 00000000..10f2b530
--- /dev/null
+++ b/src/compositor/meta-surface-private.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2019 Alberts Muktupāvels
+ *
+ * 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/>.
+ */
+
+#ifndef META_SURFACE_PRIVATE_H
+#define META_SURFACE_PRIVATE_H
+
+#include "meta-surface.h"
+
+G_BEGIN_DECLS
+
+struct _MetaSurfaceClass
+{
+  GObjectClass parent_class;
+};
+
+G_END_DECLS
+
+#endif
diff --git a/src/compositor/meta-surface-vulkan.c b/src/compositor/meta-surface-vulkan.c
new file mode 100644
index 00000000..9ad3c659
--- /dev/null
+++ b/src/compositor/meta-surface-vulkan.c
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2019 Alberts Muktupāvels
+ *
+ * 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/>.
+ */
+
+#include "config.h"
+#include "meta-surface-vulkan.h"
+
+struct _MetaSurfaceVulkan
+{
+  MetaSurface parent;
+};
+
+G_DEFINE_TYPE (MetaSurfaceVulkan, meta_surface_vulkan, META_TYPE_SURFACE)
+
+static void
+meta_surface_vulkan_class_init (MetaSurfaceVulkanClass *self_class)
+{
+}
+
+static void
+meta_surface_vulkan_init (MetaSurfaceVulkan *self)
+{
+}
diff --git a/src/compositor/meta-surface-vulkan.h b/src/compositor/meta-surface-vulkan.h
new file mode 100644
index 00000000..9c9269fc
--- /dev/null
+++ b/src/compositor/meta-surface-vulkan.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2019 Alberts Muktupāvels
+ *
+ * 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/>.
+ */
+
+#ifndef META_SURFACE_VULKAN_H
+#define META_SURFACE_VULKAN_H
+
+#include "meta-surface-private.h"
+
+G_BEGIN_DECLS
+
+#define META_TYPE_SURFACE_VULKAN (meta_surface_vulkan_get_type ())
+G_DECLARE_FINAL_TYPE (MetaSurfaceVulkan, meta_surface_vulkan,
+                      META, SURFACE_VULKAN, MetaSurface)
+
+G_END_DECLS
+
+#endif
diff --git a/src/compositor/meta-surface-xrender.c b/src/compositor/meta-surface-xrender.c
new file mode 100644
index 00000000..025b4492
--- /dev/null
+++ b/src/compositor/meta-surface-xrender.c
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2019 Alberts Muktupāvels
+ *
+ * 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/>.
+ */
+
+#include "config.h"
+#include "meta-surface-xrender.h"
+
+struct _MetaSurfaceXRender
+{
+  MetaSurface parent;
+};
+
+G_DEFINE_TYPE (MetaSurfaceXRender, meta_surface_xrender, META_TYPE_SURFACE)
+
+static void
+meta_surface_xrender_class_init (MetaSurfaceXRenderClass *self_class)
+{
+}
+
+static void
+meta_surface_xrender_init (MetaSurfaceXRender *self)
+{
+}
diff --git a/src/compositor/meta-surface-xrender.h b/src/compositor/meta-surface-xrender.h
new file mode 100644
index 00000000..d6f13ef1
--- /dev/null
+++ b/src/compositor/meta-surface-xrender.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2019 Alberts Muktupāvels
+ *
+ * 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/>.
+ */
+
+#ifndef META_SURFACE_XRENDER_H
+#define META_SURFACE_XRENDER_H
+
+#include "meta-surface-private.h"
+
+G_BEGIN_DECLS
+
+#define META_TYPE_SURFACE_XRENDER (meta_surface_xrender_get_type ())
+G_DECLARE_FINAL_TYPE (MetaSurfaceXRender, meta_surface_xrender,
+                      META, SURFACE_XRENDER, MetaSurface)
+
+G_END_DECLS
+
+#endif
diff --git a/src/compositor/meta-surface.c b/src/compositor/meta-surface.c
new file mode 100644
index 00000000..1bb170b1
--- /dev/null
+++ b/src/compositor/meta-surface.c
@@ -0,0 +1,127 @@
+/*
+ * Copyright (C) 2019 Alberts Muktupāvels
+ *
+ * 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/>.
+ */
+
+#include "config.h"
+#include "meta-surface-private.h"
+
+typedef struct
+{
+  MetaWindow *window;
+} MetaSurfacePrivate;
+
+enum
+{
+  PROP_0,
+
+  PROP_WINDOW,
+
+  LAST_PROP
+};
+
+static GParamSpec *surface_properties[LAST_PROP] = { NULL };
+
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (MetaSurface, meta_surface, G_TYPE_OBJECT)
+
+static void
+meta_surface_get_property (GObject    *object,
+                           guint       property_id,
+                           GValue     *value,
+                           GParamSpec *pspec)
+{
+  MetaSurface *self;
+  MetaSurfacePrivate *priv;
+
+  self = META_SURFACE (object);
+  priv = meta_surface_get_instance_private (self);
+
+  switch (property_id)
+    {
+      case PROP_WINDOW:
+        g_value_set_object (value, priv->window);
+        break;
+
+      default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+        break;
+    }
+}
+
+static void
+meta_surface_set_property (GObject      *object,
+                           guint         property_id,
+                           const GValue *value,
+                           GParamSpec   *pspec)
+{
+  MetaSurface *self;
+  MetaSurfacePrivate *priv;
+
+  self = META_SURFACE (object);
+  priv = meta_surface_get_instance_private (self);
+
+  switch (property_id)
+    {
+      case PROP_WINDOW:
+        g_assert (priv->window == NULL);
+        priv->window = g_value_get_object (value);
+        break;
+
+      default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+        break;
+    }
+}
+
+static void
+meta_surface_install_properties (GObjectClass *object_class)
+{
+  surface_properties[PROP_WINDOW] =
+    g_param_spec_object ("window", "window", "window",
+                         META_TYPE_WINDOW,
+                         G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
+                         G_PARAM_STATIC_STRINGS);
+
+  g_object_class_install_properties (object_class, LAST_PROP,
+                                     surface_properties);
+}
+
+static void
+meta_surface_class_init (MetaSurfaceClass *self_class)
+{
+  GObjectClass *object_class;
+
+  object_class = G_OBJECT_CLASS (self_class);
+
+  object_class->get_property = meta_surface_get_property;
+  object_class->set_property = meta_surface_set_property;
+
+  meta_surface_install_properties (object_class);
+}
+
+static void
+meta_surface_init (MetaSurface *self)
+{
+}
+
+MetaWindow *
+meta_surface_get_window (MetaSurface *self)
+{
+  MetaSurfacePrivate *priv;
+
+  priv = meta_surface_get_instance_private (self);
+
+  return priv->window;
+}
diff --git a/src/compositor/meta-surface.h b/src/compositor/meta-surface.h
new file mode 100644
index 00000000..a772c049
--- /dev/null
+++ b/src/compositor/meta-surface.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2019 Alberts Muktupāvels
+ *
+ * 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/>.
+ */
+
+#ifndef META_SURFACE_H
+#define META_SURFACE_H
+
+#include "window.h"
+
+G_BEGIN_DECLS
+
+#define META_TYPE_SURFACE (meta_surface_get_type ())
+G_DECLARE_DERIVABLE_TYPE (MetaSurface, meta_surface, META, SURFACE, GObject)
+
+MetaWindow *meta_surface_get_window (MetaSurface *self);
+
+G_END_DECLS
+
+#endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]