Commit c84da3ce authored by Dan Winship's avatar Dan Winship
Browse files

Move the installed includes to a subdir

If mutter is going to be a "real" library, then it should install its
includes so that users can do

    #include <meta/display.h>

rather than

    #include <display.h>

So rename the includedir accordingly, move src/include to src/meta,
and fix up all internal references.

There were a handful of header files in src/include that were not
installed; this appears to have been part of a plan to keep core/,
ui/, and compositor/ from looking at each others' private includes,
but that wasn't really working anyway. So move all non-installed
headers back into core/ or ui/.

https://bugzilla.gnome.org/show_bug.cgi?id=643959
parent bb50f655
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
src/core/all-keybindings.h
src/core/bell.c
src/core/core.c
src/core/delete.c
......@@ -15,7 +16,6 @@ src/core/util.c
src/core/window.c
src/core/window-props.c
src/core/xprops.c
src/include/all-keybindings.h
src/mutter.desktop.in
src/mutter-wm.desktop.in
src/mutter.schemas.in
......
......@@ -7,7 +7,9 @@ SUBDIRS=wm-tester tools compositor/plugins
INCLUDES= \
$(MUTTER_CFLAGS) \
-I$(srcdir)/include \
-I$(srcdir) \
-I$(srcdir)/core \
-I$(srcdir)/ui \
-I$(srcdir)/compositor \
-DMUTTER_LIBEXECDIR=\"$(libexecdir)\" \
-DHOST_ALIAS=\"@HOST_ALIAS@\" \
......@@ -37,7 +39,7 @@ libmutter_wm_la_SOURCES = \
core/bell.h \
core/boxes.c \
core/boxes-private.h \
include/boxes.h \
meta/boxes.h \
compositor/cogl-utils.c \
compositor/cogl-utils.h \
compositor/compositor.c \
......@@ -63,11 +65,11 @@ libmutter_wm_la_SOURCES = \
compositor/meta-window-shape.h \
compositor/region-utils.c \
compositor/region-utils.h \
include/compositor.h \
include/meta-plugin.h \
include/meta-shadow-factory.h \
include/meta-window-actor.h \
include/compositor-mutter.h \
meta/compositor.h \
meta/meta-plugin.h \
meta/meta-shadow-factory.h \
meta/meta-window-actor.h \
meta/compositor-mutter.h \
core/above-tab-keycode.c \
core/constraints.c \
core/constraints.h \
......@@ -75,25 +77,24 @@ libmutter_wm_la_SOURCES = \
core/delete.c \
core/display.c \
core/display-private.h \
include/display.h \
meta/display.h \
ui/draw-workspace.c \
ui/draw-workspace.h \
core/edge-resistance.c \
core/edge-resistance.h \
core/errors.c \
include/errors.h \
meta/errors.h \
core/eventqueue.c \
core/eventqueue.h \
core/frame.c \
core/frame-private.h \
include/frame.h \
core/frame.h \
ui/gradient.c \
ui/gradient.h \
meta/gradient.h \
core/group-private.h \
core/group-props.c \
core/group-props.h \
core/group.c \
include/group.h \
meta/group.h \
core/iconcache.c \
core/iconcache.h \
core/keybindings.c \
......@@ -103,11 +104,11 @@ libmutter_wm_la_SOURCES = \
core/place.c \
core/place.h \
core/prefs.c \
include/prefs.h \
meta/prefs.h \
core/screen.c \
core/screen-private.h \
include/screen.h \
include/types.h \
meta/screen.h \
meta/types.h \
core/session.c \
core/session.h \
core/stack.c \
......@@ -115,19 +116,19 @@ libmutter_wm_la_SOURCES = \
core/stack-tracker.c \
core/stack-tracker.h \
core/util.c \
include/util.h \
meta/util.h \
core/window-props.c \
core/window-props.h \
core/window.c \
core/window-private.h \
include/window.h \
meta/window.h \
core/workspace.c \
core/workspace-private.h \
core/xprops.c \
include/xprops.h \
include/common.h \
include/core.h \
include/ui.h \
core/xprops.h \
meta/common.h \
core/core.h \
ui/ui.h \
inlinepixbufs.h \
ui/fixedtip.c \
ui/fixedtip.h \
......@@ -138,17 +139,17 @@ libmutter_wm_la_SOURCES = \
ui/metaaccellabel.c \
ui/metaaccellabel.h \
ui/resizepopup.c \
include/resizepopup.h \
ui/resizepopup.h \
ui/tabpopup.c \
include/tabpopup.h \
ui/tabpopup.h \
ui/tile-preview.c \
include/tile-preview.h \
ui/tile-preview.h \
ui/theme-parser.c \
ui/theme.c \
ui/theme.h \
meta/theme.h \
ui/theme-private.h \
ui/ui.c \
include/all-keybindings.h \
core/all-keybindings.h \
$(mutter_built_sources)
libmutter_wm_la_LDFLAGS = -no-undefined
......@@ -159,17 +160,17 @@ libmutter_wm_la_LIBADD = $(MUTTER_LIBS)
libmutter_private_la_CFLAGS =
libmutter_private_la_SOURCES= \
core/boxes.c \
include/boxes.h \
meta/boxes.h \
ui/gradient.c \
ui/gradient.h \
meta/gradient.h \
core/util.c \
include/util.h \
include/common.h \
meta/util.h \
meta/common.h \
ui/preview-widget.c \
ui/preview-widget.h \
meta/preview-widget.h \
ui/theme-parser.c \
ui/theme.c \
ui/theme.h
meta/theme.h
libmutter_private_la_LDFLAGS = -no-undefined
libmutter_private_la_LIBADD = $(MUTTER_LIBS)
......@@ -177,35 +178,35 @@ libmutter_private_la_LIBADD = $(MUTTER_LIBS)
# Headers installed for plugins; introspected information will
# be extracted into Mutter-<version>.gir
libmutterinclude_base_headers = \
include/boxes.h \
ui/gradient.h \
include/main.h \
include/util.h \
include/common.h \
ui/theme.h \
include/prefs.h \
include/window.h \
include/workspace.h \
include/compositor.h \
include/compositor-mutter.h \
include/types.h \
include/errors.h \
include/screen.h \
include/display.h \
include/group.h \
include/keybindings.h \
include/meta-plugin.h \
include/meta-shadow-factory.h \
include/meta-window-actor.h
meta/boxes.h \
meta/common.h \
meta/compositor-mutter.h \
meta/compositor.h \
meta/display.h \
meta/errors.h \
meta/gradient.h \
meta/group.h \
meta/keybindings.h \
meta/main.h \
meta/meta-plugin.h \
meta/meta-shadow-factory.h \
meta/meta-window-actor.h \
meta/prefs.h \
meta/screen.h \
meta/theme.h \
meta/types.h \
meta/util.h \
meta/window.h \
meta/workspace.h
# Excluded from scanning for introspection but installed
# preview-widget.h: only part of libmutter-private
# atomnames.h: macros cause problems for scanning process
libmutterinclude_extra_headers = \
ui/preview-widget.h \
include/atomnames.h
meta/preview-widget.h \
meta/atomnames.h
libmutterincludedir = $(includedir)/mutter/mutter-private
libmutterincludedir = $(includedir)/mutter/meta
libmutterinclude_HEADERS = \
$(libmutterinclude_base_headers) \
......
......@@ -5,8 +5,8 @@
#include <X11/extensions/Xfixes.h>
#include "compositor.h"
#include "display.h"
#include <meta/compositor.h>
#include <meta/display.h>
#include "meta-plugin-manager.h"
#include <clutter/clutter.h>
......
......@@ -4,19 +4,19 @@
#include <clutter/x11/clutter-x11.h>
#include "screen.h"
#include "errors.h"
#include "window.h"
#include <meta/screen.h>
#include <meta/errors.h>
#include <meta/window.h>
#include "compositor-private.h"
#include "compositor-mutter.h"
#include <meta/compositor-mutter.h>
#include "xprops.h"
#include "prefs.h"
#include "meta-shadow-factory.h"
#include <meta/prefs.h>
#include <meta/meta-shadow-factory.h>
#include "meta-window-actor-private.h"
#include "meta-window-group.h"
#include "meta-background-actor.h"
#include "../core/window-private.h" /* to check window->hidden */
#include "../core/display-private.h" /* for meta_display_lookup_x_window() */
#include "window-private.h" /* to check window->hidden */
#include "display-private.h" /* for meta_display_lookup_x_window() */
#include <X11/extensions/shape.h>
#include <X11/extensions/Xcomposite.h>
......
......@@ -32,7 +32,7 @@
#include "cogl-utils.h"
#include "compositor-private.h"
#include "errors.h"
#include <meta/errors.h>
#include "meta-background-actor.h"
struct _MetaBackgroundActorClass
......
......@@ -25,7 +25,7 @@
#include <clutter/clutter.h>
#include "screen.h"
#include <meta/screen.h>
/**
* MetaBackgroundActor:
......
......@@ -21,7 +21,7 @@
* 02111-1307, USA.
*/
#include "meta-plugin.h"
#include <meta/meta-plugin.h>
#include "meta-module.h"
#include <gmodule.h>
......
......@@ -24,11 +24,11 @@
#include "config.h"
#include "compositor-private.h"
#include "meta-plugin-manager.h"
#include "prefs.h"
#include "errors.h"
#include "workspace.h"
#include <meta/prefs.h>
#include <meta/errors.h>
#include <meta/workspace.h>
#include "meta-module.h"
#include "../core/window-private.h"
#include "window-private.h"
#include <string.h>
#include <stdlib.h>
......
......@@ -24,11 +24,11 @@
#ifndef META_PLUGIN_MANAGER_H_
#define META_PLUGIN_MANAGER_H_
#include "types.h"
#include "screen.h"
#include <meta/types.h>
#include <meta/screen.h>
#define META_PLUGIN_FROM_MANAGER_
#include "meta-plugin.h"
#include <meta/meta-plugin.h>
#undef META_PLUGIN_FROM_MANAGER_
#define META_PLUGIN_MINIMIZE (1<<0)
......
......@@ -21,10 +21,10 @@
* 02111-1307, USA.
*/
#include "meta-plugin.h"
#include <meta/meta-plugin.h>
#include "meta-plugin-manager.h"
#include "screen.h"
#include "display.h"
#include <meta/screen.h>
#include <meta/display.h>
#include <string.h>
#include <X11/Xlib.h>
......
......@@ -28,7 +28,7 @@
#include <cairo.h>
#include <clutter/clutter.h>
#include "meta-window-shape.h"
#include "meta-shadow-factory.h"
#include <meta/meta-shadow-factory.h>
/**
* MetaShadow:
......
......@@ -6,7 +6,7 @@
#include <config.h>
#include <X11/extensions/Xdamage.h>
#include "compositor-mutter.h"
#include <meta/compositor-mutter.h>
MetaWindowActor *meta_window_actor_new (MetaWindow *window);
......
......@@ -13,10 +13,10 @@
#include <clutter/x11/clutter-x11.h>
#include <gdk/gdk.h> /* for gdk_rectangle_union() */
#include "display.h"
#include "errors.h"
#include <meta/display.h>
#include <meta/errors.h>
#include "frame.h"
#include "window.h"
#include <meta/window.h>
#include "xprops.h"
#include "compositor-private.h"
......
......@@ -5,7 +5,7 @@
#include <clutter/clutter.h>
#include "screen.h"
#include <meta/screen.h>
/**
* MetaWindowGroup:
......
pkglibdir=@MUTTER_PLUGIN_DIR@
INCLUDES=@MUTTER_CFLAGS@ -I $(top_srcdir)/src/include -DMUTTER_LIBEXECDIR=\"$(libexecdir)\" -DHOST_ALIAS=\"@HOST_ALIAS@\" -DMUTTER_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DMUTTER_PKGDATADIR=\"$(pkgdatadir)\" -DMUTTER_DATADIR=\"$(datadir)\" -DG_LOG_DOMAIN=\"mutter\" -DSN_API_NOT_YET_FROZEN=1 -DMUTTER_MAJOR_VERSION=$(MUTTER_MAJOR_VERSION) -DMUTTER_MINOR_VERSION=$(MUTTER_MINOR_VERSION) -DMUTTER_MICRO_VERSION=$(MUTTER_MICRO_VERSION) -DMUTTER_PLUGIN_API_VERSION=$(MUTTER_PLUGIN_API_VERSION) -DMUTTER_PLUGIN_DIR=\"@MUTTER_PLUGIN_DIR@\"
INCLUDES=@MUTTER_CFLAGS@ -I $(top_srcdir)/src -DMUTTER_LIBEXECDIR=\"$(libexecdir)\" -DHOST_ALIAS=\"@HOST_ALIAS@\" -DMUTTER_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DMUTTER_PKGDATADIR=\"$(pkgdatadir)\" -DMUTTER_DATADIR=\"$(datadir)\" -DG_LOG_DOMAIN=\"mutter\" -DSN_API_NOT_YET_FROZEN=1 -DMUTTER_MAJOR_VERSION=$(MUTTER_MAJOR_VERSION) -DMUTTER_MINOR_VERSION=$(MUTTER_MINOR_VERSION) -DMUTTER_MICRO_VERSION=$(MUTTER_MICRO_VERSION) -DMUTTER_PLUGIN_API_VERSION=$(MUTTER_PLUGIN_API_VERSION) -DMUTTER_PLUGIN_DIR=\"@MUTTER_PLUGIN_DIR@\"
default_la_CFLAGS = -fPIC
default_la_SOURCES = default.c
......
......@@ -21,8 +21,8 @@
* 02111-1307, USA.
*/
#include "meta-plugin.h"
#include "window.h"
#include <meta/meta-plugin.h>
#include <meta/window.h>
#include <libintl.h>
#define _(x) dgettext (GETTEXT_PACKAGE, x)
......
......@@ -51,7 +51,7 @@
#include <config.h>
#include "bell.h"
#include "screen-private.h"
#include "prefs.h"
#include <meta/prefs.h>
#ifdef HAVE_LIBCANBERRA
#include <canberra-gtk.h>
#endif
......
......@@ -36,7 +36,7 @@
#include <X11/XKBlib.h>
#endif
#include "display-private.h"
#include "frame-private.h"
#include "frame.h"
#ifdef HAVE_XKB
/**
......
......@@ -25,8 +25,8 @@
#define META_BOXES_PRIVATE_H
#include <glib-object.h>
#include "common.h"
#include "boxes.h"
#include <meta/common.h>
#include <meta/boxes.h>
#define BOX_LEFT(box) ((box).x) /* Leftmost pixel of rect */
#define BOX_RIGHT(box) ((box).x + (box).width) /* One pixel past right */
......
......@@ -27,7 +27,7 @@
*/
#include "boxes-private.h"
#include "util.h"
#include <meta/util.h>
#include <X11/Xutil.h> /* Just for the definition of the various gravities */
/* It would make sense to use GSlice here, but until we clean up the
......
......@@ -28,7 +28,7 @@
#include "constraints.h"
#include "workspace-private.h"
#include "place.h"
#include "prefs.h"
#include <meta/prefs.h>
#include <stdlib.h>
#include <math.h>
......
......@@ -25,9 +25,9 @@
#ifndef META_CONSTRAINTS_H
#define META_CONSTRAINTS_H
#include "util.h"
#include <meta/util.h>
#include "window-private.h"
#include "frame-private.h"
#include "frame.h"
typedef enum
{
......
......@@ -25,10 +25,10 @@
#include <config.h>
#include "core.h"
#include "frame-private.h"
#include "frame.h"
#include "workspace-private.h"
#include "prefs.h"
#include "errors.h"
#include <meta/prefs.h>
#include <meta/errors.h>
/* Looks up the MetaWindow representing the frame of the given X window.
* Used as a helper function by a bunch of the functions below.
......
......@@ -27,7 +27,7 @@
/* Don't include core headers here */
#include <gdk/gdkx.h>
#include "common.h"
#include <meta/common.h>
typedef enum
{
......
......@@ -25,10 +25,10 @@
#define _XOPEN_SOURCE /* for kill() */
#include <config.h>
#include "util.h"
#include <meta/util.h>
#include "window-private.h"
#include "errors.h"
#include "workspace.h"
#include <meta/errors.h>
#include <meta/workspace.h>
#include <sys/types.h>
#include <sys/wait.h>
......
......@@ -34,11 +34,11 @@
#include <glib.h>
#include <X11/Xlib.h>
#include "eventqueue.h"
#include "common.h"
#include "boxes.h"
#include "display.h"
#include <meta/common.h>
#include <meta/boxes.h>
#include <meta/display.h>
#include "keybindings-private.h"
#include "prefs.h"
#include <meta/prefs.h>
#ifdef HAVE_STARTUP_NOTIFICATION
#include <libsn/sn.h>
......@@ -99,7 +99,7 @@ struct _MetaDisplay
* class is constructed.
*/
#define item(x) Atom atom_##x;
#include "atomnames.h"
#include <meta/atomnames.h>
#undef item
/* This is the actual window from focus events,
......
......@@ -34,21 +34,21 @@
#include <config.h>
#include "display-private.h"
#include "util.h"
#include "main.h"
#include <meta/util.h>
#include <meta/main.h>
#include "screen-private.h"
#include "window-private.h"
#include "window-props.h"
#include "group-props.h"
#include "frame-private.h"
#include "errors.h"
#include "frame.h"
#include <meta/errors.h>
#include "keybindings-private.h"
#include "prefs.h"
#include <meta/prefs.h>
#include "resizepopup.h"
#include "xprops.h"
#include "workspace-private.h"
#include "bell.h"
#include "compositor.h"
#include <meta/compositor.h>
#include <X11/Xatom.h>
#include <X11/cursorfont.h>
#ifdef HAVE_SOLARIS_XINERAMA
......@@ -417,7 +417,7 @@ meta_display_open (void)
/* A list of all atom names, so that we can intern them in one go. */
char *atom_names[] = {
#define item(x) #x,
#include "atomnames.h"
#include <meta/atomnames.h>
#undef item
};
Atom atoms[G_N_ELEMENTS(atom_names)];
......@@ -490,7 +490,7 @@ meta_display_open (void)
{
int i = 0;
#define item(x) the_display->atom_##x = atoms[i++];
#include "atomnames.h"
#include <meta/atomnames.h>
#undef item
}
......
......@@ -23,7 +23,7 @@
*/
#include <config.h>
#include "errors.h"
#include <meta/errors.h>
#include "display-private.h"
#include <errno.h>
#include <stdlib.h>
......
......@@ -24,9 +24,9 @@
*/
#include <config.h>
#include "frame-private.h"
#include "frame.h"
#include "bell.h"
#include "errors.h"
#include <meta/errors.h>
#include "keybindings-private.h"
#include <X11/extensions/Xrender.h>
......
......@@ -24,7 +24,6 @@
#ifndef META_FRAME_PRIVATE_H
#define META_FRAME_PRIVATE_H
#include "frame.h"
#include "window-private.h"