[mutter/tintou/wip/vapi] Enable vala .vapi generation, create the meta/meta.h umbrella file
- From: Corentin Noël <corentinnoel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/tintou/wip/vapi] Enable vala .vapi generation, create the meta/meta.h umbrella file
- Date: Fri, 30 Jun 2017 15:03:28 +0000 (UTC)
commit 6864d733aca2a1fa53235608db89d1c586f97b6d
Author: Corentin Noël <corentin elementary io>
Date: Fri Jun 30 16:02:19 2017 +0100
Enable vala .vapi generation, create the meta/meta.h umbrella file
.gitignore | 5 ++
clutter/clutter/Makefile.am | 25 +++++++++++
clutter/clutter/mutter-clutter-0.deps | 5 ++
clutter/clutter/mutter-clutter-x11-0.deps | 5 ++
clutter/configure.ac | 4 ++
clutter/tests/interactive/.gitignore | 56 -------------------------
cogl/cogl-pango/Makefile.am | 18 ++++++++
cogl/cogl-pango/mutter-cogl-pango-0.deps | 1 +
cogl/cogl/Makefile.am | 17 ++++++++
cogl/cogl/mutter-cogl-0.deps | 1 +
cogl/configure.ac | 5 ++
configure.ac | 3 +
src/Makefile.am | 24 ++++++++++-
src/compositor/plugins/default.c | 6 +--
src/libmutter-0.deps | 6 +++
src/meta/barrier.h | 4 ++
src/meta/boxes.h | 4 ++
src/meta/common.h | 4 ++
src/meta/compositor-mutter.h | 4 ++
src/meta/compositor.h | 4 ++
src/meta/display.h | 4 ++
src/meta/errors.h | 4 ++
src/meta/group.h | 4 ++
src/meta/keybindings.h | 4 ++
src/meta/main.h | 4 ++
src/meta/meta-backend.h | 4 ++
src/meta/meta-background-actor.h | 4 ++
src/meta/meta-background-group.h | 4 ++
src/meta/meta-background-image.h | 4 ++
src/meta/meta-background.h | 4 ++
src/meta/meta-close-dialog.h | 4 ++
src/meta/meta-cursor-tracker.h | 4 ++
src/meta/meta-dnd.h | 4 ++
src/meta/meta-idle-monitor.h | 4 ++
src/meta/meta-monitor-manager.h | 4 ++
src/meta/meta-plugin.h | 4 ++
src/meta/meta-settings.h | 4 ++
src/meta/meta-shadow-factory.h | 4 ++
src/meta/meta-shaped-texture.h | 4 ++
src/meta/meta-version.h.in | 4 ++
src/meta/meta-window-actor.h | 4 ++
src/meta/meta-window-shape.h | 4 ++
src/meta/meta.h | 65 +++++++++++++++++++++++++++++
src/meta/prefs.h | 4 ++
src/meta/screen.h | 4 ++
src/meta/theme.h | 4 ++
src/meta/types.h | 4 ++
src/meta/util.h | 4 ++
src/meta/window.h | 4 ++
src/meta/workspace.h | 4 ++
50 files changed, 320 insertions(+), 62 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 56fb267..22f8738 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,8 @@ Makefile.in.in
aclocal.m4
autom4te.cache
build-aux
+clutter/clutter/mutter-clutter-0.vapi
+clutter/clutter/mutter-clutter-x11-0.vapi
compile
config.guess
config.h
@@ -12,6 +14,8 @@ config.log
config.status
config.sub
configure
+cogl/cogl-pango/mutter-cogl-pango-0.vapi
+cogl/cogl/mutter-cogl-0.vapi
depcomp
install-sh
intltool-extract.in
@@ -85,6 +89,7 @@ src/pointer-constraints-unstable-v*-protocol.c
src/pointer-constraints-unstable-v*-server-protocol.h
src/xdg-foreign-unstable-v*-protocol.c
src/xdg-foreign-unstable-v*-server-protocol.h
+src/libmutter-0.vapi
src/meta/meta-version.h
src/libmutter-*.pc
doc/reference/*.args
diff --git a/clutter/clutter/Makefile.am b/clutter/clutter/Makefile.am
index 1ffb56c..70be77d 100644
--- a/clutter/clutter/Makefile.am
+++ b/clutter/clutter/Makefile.am
@@ -716,4 +716,29 @@ EXTRA_DIST += \
Makefile.am.marshal \
Makefile.am.enums
+
+if ENABLE_VAPIGEN
+-include $(VAPIGEN_MAKEFILE)
+
+mutter-clutter-@LIBMUTTER_API_VERSION@.vapi: Clutter-@LIBMUTTER_API_VERSION@.gir
mutter-clutter-@LIBMUTTER_API_VERSION@.deps
+mutter-clutter-x11-@LIBMUTTER_API_VERSION@.vapi: ClutterX11-@LIBMUTTER_API_VERSION@.gir
mutter-clutter-x11-@LIBMUTTER_API_VERSION@.deps
+
+VAPIGEN_VAPIS = mutter-clutter-@LIBMUTTER_API_VERSION@.vapi mutter-clutter-x11-@LIBMUTTER_API_VERSION@.vapi
+
+mutter_clutter_@LIBMUTTER_API_VERSION@_vapi_DEPS = atk cairo pango json-glib-1.0
+mutter_clutter_@LIBMUTTER_API_VERSION@_vapi_METADATADIRS = $(srcdir)
+mutter_clutter_@LIBMUTTER_API_VERSION@_vapi_GIRDIRS = $(top_builddir)/../cogl/cogl
$(top_builddir)/../cogl/cogl-pango
+mutter_clutter_@LIBMUTTER_API_VERSION@_vapi_FILES = Clutter-@LIBMUTTER_API_VERSION@.gir
+
+mutter_clutter_x11_@LIBMUTTER_API_VERSION@_vapi_DEPS = atk cairo pango json-glib-1.0
+mutter_clutter_x11_@LIBMUTTER_API_VERSION@_vapi_METADATADIRS = $(srcdir)
+mutter_clutter_x11_@LIBMUTTER_API_VERSION@_vapi_GIRDIRS = $(srcdir) $(top_builddir)/../cogl/cogl
$(top_builddir)/../cogl/cogl-pango
+mutter_clutter_x11_@LIBMUTTER_API_VERSION@_vapi_FILES = ClutterX11-@LIBMUTTER_API_VERSION@.gir
+
+vapidir = $(datadir)/vala/vapi
+vapi_DATA = $(VAPIGEN_VAPIS) $(VAPIGEN_VAPIS:.vapi=.deps)
+
+EXTRA_DIST += mutter-clutter-@LIBMUTTER_API_VERSION@.deps mutter-clutter-x11-@LIBMUTTER_API_VERSION@.deps
+endif
+
CLEANFILES += $(gir_DATA) $(typelib_DATA)
diff --git a/clutter/clutter/mutter-clutter-0.deps b/clutter/clutter/mutter-clutter-0.deps
new file mode 100644
index 0000000..96a1244
--- /dev/null
+++ b/clutter/clutter/mutter-clutter-0.deps
@@ -0,0 +1,5 @@
+cairo
+gio-2.0
+atk
+pangocairo
+json-glib-1.0
diff --git a/clutter/clutter/mutter-clutter-x11-0.deps b/clutter/clutter/mutter-clutter-x11-0.deps
new file mode 100644
index 0000000..96a1244
--- /dev/null
+++ b/clutter/clutter/mutter-clutter-x11-0.deps
@@ -0,0 +1,5 @@
+cairo
+gio-2.0
+atk
+pangocairo
+json-glib-1.0
diff --git a/clutter/configure.ac b/clutter/configure.ac
index 3c3d0c5..be0a6b2 100644
--- a/clutter/configure.ac
+++ b/clutter/configure.ac
@@ -763,6 +763,10 @@ dnl === GObject-Introspection check ===========================================
GOBJECT_INTROSPECTION_CHECK([gi_req_version])
+dnl === Vala vapigen check ===========================================
+
+VAPIGEN_CHECK()
+
dnl === Conformance test suite ================================================
GLIB_TESTS
diff --git a/cogl/cogl-pango/Makefile.am b/cogl/cogl-pango/Makefile.am
index b89877d..0ba3d87 100644
--- a/cogl/cogl-pango/Makefile.am
+++ b/cogl/cogl-pango/Makefile.am
@@ -91,3 +91,21 @@ typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(gir_DATA) $(typelib_DATA)
endif
+
+if ENABLE_VAPIGEN
+-include $(VAPIGEN_MAKEFILE)
+
+mutter-cogl-@LIBMUTTER_API_VERSION@.vapi: CoglPango-@LIBMUTTER_API_VERSION@.gir
mutter-cogl-pango-@LIBMUTTER_API_VERSION@.deps
+
+VAPIGEN_VAPIS = mutter-cogl-pango-@LIBMUTTER_API_VERSION@.vapi
+
+mutter_cogl_pango_@LIBMUTTER_API_VERSION@_vapi_DEPS = pango
+mutter_cogl_pango_@LIBMUTTER_API_VERSION@_vapi_METADATADIRS = $(srcdir)
+mutter_cogl_pango_@LIBMUTTER_API_VERSION@_vapi_FILES = CoglPango-@LIBMUTTER_API_VERSION@.gir
+mutter_cogl_pango_@LIBMUTTER_API_VERSION@_vapi_GIRDIRS = $(top_builddir)/cogl
+
+vapidir = $(datadir)/vala/vapi
+vapi_DATA = $(VAPIGEN_VAPIS) $(VAPIGEN_VAPIS:.vapi=.deps)
+
+EXTRA_DIST += mutter-cogl-pango-@LIBMUTTER_API_VERSION@.deps
+endif
diff --git a/cogl/cogl-pango/mutter-cogl-pango-0.deps b/cogl/cogl-pango/mutter-cogl-pango-0.deps
new file mode 100644
index 0000000..98ccac5
--- /dev/null
+++ b/cogl/cogl-pango/mutter-cogl-pango-0.deps
@@ -0,0 +1 @@
+pango
diff --git a/cogl/cogl/Makefile.am b/cogl/cogl/Makefile.am
index ad3dce8..9fc3411 100644
--- a/cogl/cogl/Makefile.am
+++ b/cogl/cogl/Makefile.am
@@ -506,5 +506,22 @@ gir_DATA = $(INTROSPECTION_GIRS)
typelibdir = $(mutterlibdir)
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+if ENABLE_VAPIGEN
+-include $(VAPIGEN_MAKEFILE)
+
+mutter-cogl-@LIBMUTTER_API_VERSION@.vapi: Cogl-@LIBMUTTER_API_VERSION@.gir
mutter-cogl-@LIBMUTTER_API_VERSION@.deps
+
+VAPIGEN_VAPIS = mutter-cogl-@LIBMUTTER_API_VERSION@.vapi
+
+mutter_cogl_@LIBMUTTER_API_VERSION@_vapi_DEPS = pango
+mutter_cogl_@LIBMUTTER_API_VERSION@_vapi_METADATADIRS = $(srcdir)
+mutter_cogl_@LIBMUTTER_API_VERSION@_vapi_FILES = Cogl-@LIBMUTTER_API_VERSION@.gir
+
+vapidir = $(datadir)/vala/vapi
+vapi_DATA = $(VAPIGEN_VAPIS) $(VAPIGEN_VAPIS:.vapi=.deps)
+
+EXTRA_DIST += mutter-cogl-@LIBMUTTER_API_VERSION@.deps
+endif
+
CLEANFILES += $(gir_DATA) $(typelib_DATA)
endif
diff --git a/cogl/cogl/mutter-cogl-0.deps b/cogl/cogl/mutter-cogl-0.deps
new file mode 100644
index 0000000..98ccac5
--- /dev/null
+++ b/cogl/cogl/mutter-cogl-0.deps
@@ -0,0 +1 @@
+pango
diff --git a/cogl/configure.ac b/cogl/configure.ac
index 3be282f..8b500e8 100644
--- a/cogl/configure.ac
+++ b/cogl/configure.ac
@@ -843,6 +843,11 @@ dnl ================================================================
GOBJECT_INTROSPECTION_CHECK([gi_req_version])
dnl ================================================================
+dnl Vala vapigen check
+dnl ================================================================
+VAPIGEN_CHECK()
+
+dnl ================================================================
dnl Checks for header files.
dnl ================================================================
AC_PATH_X
diff --git a/configure.ac b/configure.ac
index d152870..43d8012 100644
--- a/configure.ac
+++ b/configure.ac
@@ -246,6 +246,8 @@ if test x$found_introspection != xno; then
MUTTER_PC_MODULES="$MUTTER_PC_MODULES gobject-introspection-1.0"
fi
+VAPIGEN_CHECK()
+
AC_SUBST(XWAYLAND_PATH)
PKG_CHECK_MODULES(MUTTER, $MUTTER_PC_MODULES)
@@ -509,6 +511,7 @@ mutter-$VERSION
libwacom: ${have_libwacom}
gudev ${have_gudev}
Introspection: ${found_introspection}
+ Vala: ${enable_vala}
Session management: ${found_sm}
Wayland: ${have_wayland}
Native (KMS) backend: ${have_native_backend}
diff --git a/src/Makefile.am b/src/Makefile.am
index 34dd545..e0466f5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -43,6 +43,7 @@ AM_CPPFLAGS = \
-DMUTTER_PLUGIN_DIR=\"$(MUTTER_PLUGIN_DIR)\" \
-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \
-DXWAYLAND_PATH=\"$(XWAYLAND_PATH)\" \
+ -DMUTTER_COMPILATION=1 \
$(NULL)
mutter_built_sources = \
@@ -536,10 +537,31 @@ Meta_@LIBMUTTER_API_VERSION@_gir_LIBS = libmutter-$(LIBMUTTER_API_VERSION).la
Meta_@LIBMUTTER_API_VERSION@_gir_FILES = \
$(libmutterinclude_base_headers) \
$(filter %.c,$(libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES)
$(nodist_libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES))
-Meta_@LIBMUTTER_API_VERSION@_SCANNERFLAGS = --warn-all --warn-error
+Meta_@LIBMUTTER_API_VERSION@_gir_SCANNERFLAGS = \
+ --warn-all \
+ --warn-error \
+ --c-include='meta/meta.h'
endif
+if ENABLE_VAPIGEN
+-include $(VAPIGEN_MAKEFILE)
+
+libmutter-@LIBMUTTER_API_VERSION@.vapi: Meta-@LIBMUTTER_API_VERSION@.gir
libmutter-@LIBMUTTER_API_VERSION@.deps
+
+VAPIGEN_VAPIS = libmutter-@LIBMUTTER_API_VERSION@.vapi
+
+libmutter_@LIBMUTTER_API_VERSION@_vapi_DEPS = cairo gdk-3.0 gdk-pixbuf-2.0 gtk+-3.0 x11 json-glib-1.0
+libmutter_@LIBMUTTER_API_VERSION@_vapi_METADATADIRS = $(srcdir)
+libmutter_@LIBMUTTER_API_VERSION@_vapi_FILES = Meta-@LIBMUTTER_API_VERSION@.gir
+libmutter_@LIBMUTTER_API_VERSION@_vapi_GIRDIRS = $(top_builddir)/cogl/cogl $(top_builddir)/cogl/cogl-pango
$(top_builddir)/clutter/clutter
+
+vapidir = $(datadir)/vala/vapi
+vapi_DATA = $(VAPIGEN_VAPIS) $(VAPIGEN_VAPIS:.vapi=.deps)
+
+EXTRA_DIST += libmutter-@LIBMUTTER_API_VERSION@.deps
+endif
+
dbus_idle_built_sources = meta-dbus-idle-monitor.c meta-dbus-idle-monitor.h
CLEANFILES = \
diff --git a/src/compositor/plugins/default.c b/src/compositor/plugins/default.c
index 7670b63..16006ea 100644
--- a/src/compositor/plugins/default.c
+++ b/src/compositor/plugins/default.c
@@ -21,11 +21,7 @@
#include <config.h>
-#include <meta/meta-plugin.h>
-#include <meta/window.h>
-#include <meta/meta-background-group.h>
-#include <meta/meta-background-actor.h>
-#include <meta/util.h>
+#include <meta/meta.h>
#include <glib/gi18n-lib.h>
#include <clutter/clutter.h>
diff --git a/src/libmutter-0.deps b/src/libmutter-0.deps
new file mode 100644
index 0000000..4eda848
--- /dev/null
+++ b/src/libmutter-0.deps
@@ -0,0 +1,6 @@
+cairo
+gdk-3.0
+gdk-pixbuf-2.0
+gtk+-3.0
+x11
+json-glib-1.0
diff --git a/src/meta/barrier.h b/src/meta/barrier.h
index d7b1666..1c49afa 100644
--- a/src/meta/barrier.h
+++ b/src/meta/barrier.h
@@ -3,6 +3,10 @@
#ifndef __META_BARRIER_H__
#define __META_BARRIER_H__
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <glib-object.h>
#include <meta/display.h>
diff --git a/src/meta/boxes.h b/src/meta/boxes.h
index 847f35c..5e08fcf 100644
--- a/src/meta/boxes.h
+++ b/src/meta/boxes.h
@@ -22,6 +22,10 @@
#ifndef META_BOXES_H
#define META_BOXES_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <glib-object.h>
#include <meta/common.h>
diff --git a/src/meta/common.h b/src/meta/common.h
index ba98756..3f1aa9a 100644
--- a/src/meta/common.h
+++ b/src/meta/common.h
@@ -25,6 +25,10 @@
#ifndef META_COMMON_H
#define META_COMMON_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
/* Don't include core headers here */
#include <X11/Xlib.h>
#include <X11/extensions/XInput.h>
diff --git a/src/meta/compositor-mutter.h b/src/meta/compositor-mutter.h
index 66c6138..d31a20e 100644
--- a/src/meta/compositor-mutter.h
+++ b/src/meta/compositor-mutter.h
@@ -23,6 +23,10 @@
#ifndef MUTTER_H_
#define MUTTER_H_
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <clutter/clutter.h>
#include <X11/Xlib.h>
#include <X11/extensions/Xfixes.h>
diff --git a/src/meta/compositor.h b/src/meta/compositor.h
index f4de9b1..5a4a24e 100644
--- a/src/meta/compositor.h
+++ b/src/meta/compositor.h
@@ -20,6 +20,10 @@
#ifndef META_COMPOSITOR_H
#define META_COMPOSITOR_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <glib.h>
#include <X11/Xlib.h>
diff --git a/src/meta/display.h b/src/meta/display.h
index 3d70d8d..eb3ab5d 100644
--- a/src/meta/display.h
+++ b/src/meta/display.h
@@ -20,6 +20,10 @@
#ifndef META_DISPLAY_H
#define META_DISPLAY_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <glib-object.h>
#include <X11/Xlib.h>
diff --git a/src/meta/errors.h b/src/meta/errors.h
index b9ee9b3..ac18c66 100644
--- a/src/meta/errors.h
+++ b/src/meta/errors.h
@@ -22,6 +22,10 @@
#ifndef META_ERRORS_H
#define META_ERRORS_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <X11/Xlib.h>
#include <meta/util.h>
diff --git a/src/meta/group.h b/src/meta/group.h
index 09d6e29..8064067 100644
--- a/src/meta/group.h
+++ b/src/meta/group.h
@@ -22,6 +22,10 @@
#ifndef META_GROUP_H
#define META_GROUP_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <X11/Xlib.h>
#include <glib.h>
#include <meta/types.h>
diff --git a/src/meta/keybindings.h b/src/meta/keybindings.h
index 79ee407..09df626 100644
--- a/src/meta/keybindings.h
+++ b/src/meta/keybindings.h
@@ -18,6 +18,10 @@
#ifndef META_KEYBINDINGS_H
#define META_KEYBINDINGS_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <meta/display.h>
#include <meta/common.h>
diff --git a/src/meta/main.h b/src/meta/main.h
index 1cc8ff0..5236c29 100644
--- a/src/meta/main.h
+++ b/src/meta/main.h
@@ -22,6 +22,10 @@
#ifndef META_MAIN_H
#define META_MAIN_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <glib.h>
GOptionContext *meta_get_option_context (void);
diff --git a/src/meta/meta-backend.h b/src/meta/meta-backend.h
index 50afa72..fb04469 100644
--- a/src/meta/meta-backend.h
+++ b/src/meta/meta-backend.h
@@ -25,6 +25,10 @@
#ifndef META_BACKEND_H
#define META_BACKEND_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <glib-object.h>
#include <clutter/clutter.h>
diff --git a/src/meta/meta-background-actor.h b/src/meta/meta-background-actor.h
index e2c4d6a..d4f1d68 100644
--- a/src/meta/meta-background-actor.h
+++ b/src/meta/meta-background-actor.h
@@ -21,6 +21,10 @@
#ifndef META_BACKGROUND_ACTOR_H
#define META_BACKGROUND_ACTOR_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <clutter/clutter.h>
#include <meta/screen.h>
#include <meta/meta-background.h>
diff --git a/src/meta/meta-background-group.h b/src/meta/meta-background-group.h
index 9997b73..e18d6f9 100644
--- a/src/meta/meta-background-group.h
+++ b/src/meta/meta-background-group.h
@@ -3,6 +3,10 @@
#ifndef META_BACKGROUND_GROUP_H
#define META_BACKGROUND_GROUP_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <clutter/clutter.h>
#define META_TYPE_BACKGROUND_GROUP (meta_background_group_get_type ())
diff --git a/src/meta/meta-background-image.h b/src/meta/meta-background-image.h
index fa67b42..5f95899 100644
--- a/src/meta/meta-background-image.h
+++ b/src/meta/meta-background-image.h
@@ -23,6 +23,10 @@
#ifndef __META_BACKGROUND_IMAGE_H__
#define __META_BACKGROUND_IMAGE_H__
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <glib-object.h>
#include <cogl/cogl.h>
diff --git a/src/meta/meta-background.h b/src/meta/meta-background.h
index d48d966..157974a 100644
--- a/src/meta/meta-background.h
+++ b/src/meta/meta-background.h
@@ -21,6 +21,10 @@
#ifndef META_BACKGROUND_H
#define META_BACKGROUND_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <clutter/clutter.h>
#include <gsettings-desktop-schemas/gdesktop-enums.h>
#include <meta/screen.h>
diff --git a/src/meta/meta-close-dialog.h b/src/meta/meta-close-dialog.h
index d9a5fa5..505f0f0 100644
--- a/src/meta/meta-close-dialog.h
+++ b/src/meta/meta-close-dialog.h
@@ -22,6 +22,10 @@
#ifndef META_CLOSE_DIALOG_H
#define META_CLOSE_DIALOG_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <glib-object.h>
#include <meta/window.h>
diff --git a/src/meta/meta-cursor-tracker.h b/src/meta/meta-cursor-tracker.h
index e045fa5..70006ba 100644
--- a/src/meta/meta-cursor-tracker.h
+++ b/src/meta/meta-cursor-tracker.h
@@ -22,6 +22,10 @@
#ifndef META_CURSOR_TRACKER_H
#define META_CURSOR_TRACKER_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <glib-object.h>
#include <meta/types.h>
#include <meta/workspace.h>
diff --git a/src/meta/meta-dnd.h b/src/meta/meta-dnd.h
index bc77c24..918d971 100644
--- a/src/meta/meta-dnd.h
+++ b/src/meta/meta-dnd.h
@@ -20,6 +20,10 @@
#ifndef META_DND_H
#define META_DND_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <glib-object.h>
#include <string.h>
diff --git a/src/meta/meta-idle-monitor.h b/src/meta/meta-idle-monitor.h
index b77d8e2..9d1a526 100644
--- a/src/meta/meta-idle-monitor.h
+++ b/src/meta/meta-idle-monitor.h
@@ -20,6 +20,10 @@
#ifndef META_IDLE_MONITOR_H
#define META_IDLE_MONITOR_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <glib-object.h>
#include <meta/types.h>
diff --git a/src/meta/meta-monitor-manager.h b/src/meta/meta-monitor-manager.h
index da1e329..b1a3cd1 100644
--- a/src/meta/meta-monitor-manager.h
+++ b/src/meta/meta-monitor-manager.h
@@ -22,6 +22,10 @@
#ifndef META_MONITOR_MANAGER_H
#define META_MONITOR_MANAGER_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <glib-object.h>
typedef struct _MetaMonitorManagerClass MetaMonitorManagerClass;
diff --git a/src/meta/meta-plugin.h b/src/meta/meta-plugin.h
index 85a738f..d5c7f09 100644
--- a/src/meta/meta-plugin.h
+++ b/src/meta/meta-plugin.h
@@ -22,6 +22,10 @@
#ifndef META_PLUGIN_H_
#define META_PLUGIN_H_
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <meta/types.h>
#include <meta/compositor.h>
#include <meta/compositor-mutter.h>
diff --git a/src/meta/meta-settings.h b/src/meta/meta-settings.h
index 1edc860..9fffd94 100644
--- a/src/meta/meta-settings.h
+++ b/src/meta/meta-settings.h
@@ -22,6 +22,10 @@
#ifndef META_SETTINGS_H
#define META_SETTINGS_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include "meta/types.h"
int meta_settings_get_ui_scaling_factor (MetaSettings *settings);
diff --git a/src/meta/meta-shadow-factory.h b/src/meta/meta-shadow-factory.h
index 730faf4..893f5a3 100644
--- a/src/meta/meta-shadow-factory.h
+++ b/src/meta/meta-shadow-factory.h
@@ -23,6 +23,10 @@
#ifndef __META_SHADOW_FACTORY_H__
#define __META_SHADOW_FACTORY_H__
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <cairo.h>
#include <clutter/clutter.h>
#include <meta/meta-window-shape.h>
diff --git a/src/meta/meta-shaped-texture.h b/src/meta/meta-shaped-texture.h
index 80b23f2..41f36c5 100644
--- a/src/meta/meta-shaped-texture.h
+++ b/src/meta/meta-shaped-texture.h
@@ -24,6 +24,10 @@
#ifndef __META_SHAPED_TEXTURE_H__
#define __META_SHAPED_TEXTURE_H__
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <clutter/clutter.h>
#include <X11/Xlib.h>
diff --git a/src/meta/meta-version.h.in b/src/meta/meta-version.h.in
index bf977cf..2b53b89 100644
--- a/src/meta/meta-version.h.in
+++ b/src/meta/meta-version.h.in
@@ -20,6 +20,10 @@
#ifndef META_VERSION_H
#define META_VERSION_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#define META_MAJOR_VERSION @MUTTER_MAJOR_VERSION@
#define META_MINOR_VERSION @MUTTER_MINOR_VERSION@
#define META_MICRO_VERSION @MUTTER_MICRO_VERSION@
diff --git a/src/meta/meta-window-actor.h b/src/meta/meta-window-actor.h
index 9b55628..bb6c52d 100644
--- a/src/meta/meta-window-actor.h
+++ b/src/meta/meta-window-actor.h
@@ -23,6 +23,10 @@
#ifndef META_WINDOW_ACTOR_H_
#define META_WINDOW_ACTOR_H_
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <clutter/clutter.h>
#include <X11/Xlib.h>
diff --git a/src/meta/meta-window-shape.h b/src/meta/meta-window-shape.h
index b10adf0..a4c5df6 100644
--- a/src/meta/meta-window-shape.h
+++ b/src/meta/meta-window-shape.h
@@ -23,6 +23,10 @@
#ifndef __META_WINDOW_SHAPE_H__
#define __META_WINDOW_SHAPE_H__
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <cairo.h>
#include <glib-object.h>
diff --git a/src/meta/meta.h b/src/meta/meta.h
new file mode 100644
index 0000000..0bcc315
--- /dev/null
+++ b/src/meta/meta.h
@@ -0,0 +1,65 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+
+/* Mutter main */
+
+/*
+ * Copyright (C) 2001 Havoc Pennington
+ *
+ * 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_H__
+#define __META_H__
+
+#define __META_H_INSIDE__
+
+#include "barrier.h"
+#include "boxes.h"
+#include "common.h"
+#include "compositor.h"
+#include "compositor-mutter.h"
+#include "display.h"
+#include "errors.h"
+#include "group.h"
+#include "keybindings.h"
+#include "main.h"
+#include "meta-backend.h"
+#include "meta-background-actor.h"
+#include "meta-background-group.h"
+#include "meta-background.h"
+#include "meta-background-image.h"
+#include "meta-close-dialog.h"
+#include "meta-cursor-tracker.h"
+#include "meta-dnd.h"
+#include "meta-enum-types.h"
+#include "meta-idle-monitor.h"
+#include "meta-monitor-manager.h"
+#include "meta-plugin.h"
+#include "meta-settings.h"
+#include "meta-shadow-factory.h"
+#include "meta-shaped-texture.h"
+#include "meta-version.h"
+#include "meta-window-actor.h"
+#include "meta-window-shape.h"
+#include "prefs.h"
+#include "screen.h"
+#include "theme.h"
+#include "types.h"
+#include "util.h"
+#include "window.h"
+#include "workspace.h"
+
+#undef __META_H_INSIDE__
+
+#endif /* __META_H__ */
diff --git a/src/meta/prefs.h b/src/meta/prefs.h
index 9887634..3e5ab75 100644
--- a/src/meta/prefs.h
+++ b/src/meta/prefs.h
@@ -23,6 +23,10 @@
#ifndef META_PREFS_H
#define META_PREFS_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
/* This header is a "common" one between the UI and core side */
#include <meta/common.h>
#include <meta/types.h>
diff --git a/src/meta/screen.h b/src/meta/screen.h
index 13c9251..1ae4eee 100644
--- a/src/meta/screen.h
+++ b/src/meta/screen.h
@@ -20,6 +20,10 @@
#ifndef META_SCREEN_H
#define META_SCREEN_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <X11/Xlib.h>
#include <glib-object.h>
#include <meta/types.h>
diff --git a/src/meta/theme.h b/src/meta/theme.h
index 6632553..bb70597 100644
--- a/src/meta/theme.h
+++ b/src/meta/theme.h
@@ -22,6 +22,10 @@
#ifndef META_THEME_H
#define META_THEME_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <glib.h>
/**
diff --git a/src/meta/types.h b/src/meta/types.h
index d3a5ca3..2a1329b 100644
--- a/src/meta/types.h
+++ b/src/meta/types.h
@@ -20,6 +20,10 @@
#ifndef META_TYPES_H
#define META_TYPES_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
/**
* MetaCompositor: (skip)
*
diff --git a/src/meta/util.h b/src/meta/util.h
index 3619e8a..eb2eba4 100644
--- a/src/meta/util.h
+++ b/src/meta/util.h
@@ -23,6 +23,10 @@
#ifndef META_UTIL_H
#define META_UTIL_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <glib.h>
#include <glib-object.h>
diff --git a/src/meta/window.h b/src/meta/window.h
index b482bed..7e01d19 100644
--- a/src/meta/window.h
+++ b/src/meta/window.h
@@ -20,6 +20,10 @@
#ifndef META_WINDOW_H
#define META_WINDOW_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <glib-object.h>
#include <cairo.h>
#include <X11/Xlib.h>
diff --git a/src/meta/workspace.h b/src/meta/workspace.h
index 005e9c9..d571cf9 100644
--- a/src/meta/workspace.h
+++ b/src/meta/workspace.h
@@ -21,6 +21,10 @@
#ifndef META_WORKSPACE_H
#define META_WORKSPACE_H
+#if !defined(__META_H_INSIDE__) && !defined(MUTTER_COMPILATION)
+#error "Only <meta/meta.h> can be included directly."
+#endif
+
#include <meta/types.h>
#include <meta/boxes.h>
#include <meta/screen.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]