From 5273422aefb2685a41e88228b4ebabb0981ab79e Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Fri, 5 Jan 2024 10:15:20 +0100 Subject: [PATCH] cleanup: Make meta includes consistent Part-of: --- src/compositor/meta-later-private.h | 2 +- src/meta/barrier.h | 2 +- src/meta/boxes.h | 3 ++- src/meta/compositor.h | 8 ++++---- src/meta/display.h | 12 ++++++------ src/meta/group.h | 4 ++-- src/meta/keybindings.h | 4 ++-- src/meta/main.h | 4 ++-- src/meta/meta-background-group.h | 2 +- src/meta/meta-close-dialog.h | 3 ++- src/meta/meta-dnd.h | 4 ++-- src/meta/meta-enum-types.c.in | 2 +- src/meta/meta-enum-types.h.in | 3 ++- src/meta/meta-idle-monitor.h | 3 ++- src/meta/meta-inhibit-shortcuts-dialog.h | 3 ++- src/meta/meta-later.h | 2 +- src/meta/meta-launch-context.h | 2 +- src/meta/meta-remote-access-controller.h | 2 +- src/meta/meta-selection-source.h | 2 +- src/meta/meta-selection.h | 6 +++--- src/meta/meta-settings.h | 4 ++-- src/meta/meta-shaped-texture.h | 4 ++-- src/meta/meta-sound-player.h | 2 +- src/meta/meta-startup-notification.h | 2 +- src/meta/meta-window-shape.h | 2 +- src/meta/meta-workspace-manager.h | 8 ++++---- src/meta/meta-x11-display.h | 6 +++--- src/meta/meta-x11-errors.h | 4 ++-- src/meta/prefs.h | 7 ++++--- src/meta/util.h | 4 ++-- src/meta/window.h | 4 ++-- src/meta/workspace.h | 4 ++-- 32 files changed, 65 insertions(+), 59 deletions(-) diff --git a/src/compositor/meta-later-private.h b/src/compositor/meta-later-private.h index 5e241022b..4456acb32 100644 --- a/src/compositor/meta-later-private.h +++ b/src/compositor/meta-later-private.h @@ -17,7 +17,7 @@ #pragma once -#include +#include "meta/types.h" MetaLaters * meta_laters_new (MetaCompositor *compositor); diff --git a/src/meta/barrier.h b/src/meta/barrier.h index 27e4e08e0..e26fcf050 100644 --- a/src/meta/barrier.h +++ b/src/meta/barrier.h @@ -4,7 +4,7 @@ #include -#include +#include "meta/display.h" G_BEGIN_DECLS diff --git a/src/meta/boxes.h b/src/meta/boxes.h index 8446f5c25..38b0ecd4d 100644 --- a/src/meta/boxes.h +++ b/src/meta/boxes.h @@ -22,7 +22,8 @@ #pragma once #include -#include + +#include "meta/common.h" /** * MetaStrut: diff --git a/src/meta/compositor.h b/src/meta/compositor.h index 6debcccdb..d53e8c486 100644 --- a/src/meta/compositor.h +++ b/src/meta/compositor.h @@ -21,10 +21,10 @@ #include -#include -#include -#include -#include +#include "meta/types.h" +#include "meta/boxes.h" +#include "meta/window.h" +#include "meta/workspace.h" #define META_TYPE_COMPOSITOR (meta_compositor_get_type ()) META_EXPORT diff --git a/src/meta/display.h b/src/meta/display.h index 9e2f2f0f5..50a60ced8 100644 --- a/src/meta/display.h +++ b/src/meta/display.h @@ -22,12 +22,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include "meta/types.h" +#include "meta/prefs.h" +#include "meta/common.h" +#include "meta/workspace.h" +#include "meta/meta-sound-player.h" +#include "meta/meta-startup-notification.h" /** * MetaTabList: diff --git a/src/meta/group.h b/src/meta/group.h index 3ecf619f1..0d779459e 100644 --- a/src/meta/group.h +++ b/src/meta/group.h @@ -24,8 +24,8 @@ #include #include -#include -#include +#include "meta/common.h" +#include "meta/types.h" /* note, can return NULL */ META_EXPORT diff --git a/src/meta/keybindings.h b/src/meta/keybindings.h index adfff59ad..35192c024 100644 --- a/src/meta/keybindings.h +++ b/src/meta/keybindings.h @@ -17,8 +17,8 @@ #pragma once -#include -#include +#include "meta/display.h" +#include "meta/common.h" #define META_TYPE_KEY_BINDING (meta_key_binding_get_type ()) diff --git a/src/meta/main.h b/src/meta/main.h index f60e15d12..bea75c661 100644 --- a/src/meta/main.h +++ b/src/meta/main.h @@ -23,8 +23,8 @@ #include -#include -#include +#include "meta/common.h" +#include "meta/meta-context.h" META_EXPORT void meta_restart (const char *message, diff --git a/src/meta/meta-background-group.h b/src/meta/meta-background-group.h index af44cc61a..d0deeabd8 100644 --- a/src/meta/meta-background-group.h +++ b/src/meta/meta-background-group.h @@ -4,7 +4,7 @@ #include "clutter/clutter.h" -#include +#include "meta/common.h" #define META_TYPE_BACKGROUND_GROUP (meta_background_group_get_type ()) diff --git a/src/meta/meta-close-dialog.h b/src/meta/meta-close-dialog.h index a7c269991..a61d10c16 100644 --- a/src/meta/meta-close-dialog.h +++ b/src/meta/meta-close-dialog.h @@ -22,7 +22,8 @@ #pragma once #include -#include + +#include "meta/window.h" #define META_TYPE_CLOSE_DIALOG (meta_close_dialog_get_type ()) diff --git a/src/meta/meta-dnd.h b/src/meta/meta-dnd.h index f68b4849b..1ad02003d 100644 --- a/src/meta/meta-dnd.h +++ b/src/meta/meta-dnd.h @@ -22,8 +22,8 @@ #include #include -#include -#include +#include "meta/common.h" +#include "meta/types.h" #define META_TYPE_DND (meta_dnd_get_type ()) diff --git a/src/meta/meta-enum-types.c.in b/src/meta/meta-enum-types.c.in index a5d839141..2c8edceb2 100644 --- a/src/meta/meta-enum-types.c.in +++ b/src/meta/meta-enum-types.c.in @@ -1,5 +1,5 @@ /*** BEGIN file-header ***/ -#include +#include "meta/meta-enum-types.h" /*** END file-header ***/ /*** BEGIN file-production ***/ diff --git a/src/meta/meta-enum-types.h.in b/src/meta/meta-enum-types.h.in index ac640f0e6..a1eb497a9 100644 --- a/src/meta/meta-enum-types.h.in +++ b/src/meta/meta-enum-types.h.in @@ -2,7 +2,8 @@ #pragma once #include -#include + +#include "meta/common.h" G_BEGIN_DECLS diff --git a/src/meta/meta-idle-monitor.h b/src/meta/meta-idle-monitor.h index e43fdaa81..ab6f8463f 100644 --- a/src/meta/meta-idle-monitor.h +++ b/src/meta/meta-idle-monitor.h @@ -20,7 +20,8 @@ #pragma once #include -#include + +#include "meta/types.h" #define META_TYPE_IDLE_MONITOR (meta_idle_monitor_get_type ()) META_EXPORT diff --git a/src/meta/meta-inhibit-shortcuts-dialog.h b/src/meta/meta-inhibit-shortcuts-dialog.h index 9c4248f13..8dac6d5b1 100644 --- a/src/meta/meta-inhibit-shortcuts-dialog.h +++ b/src/meta/meta-inhibit-shortcuts-dialog.h @@ -19,7 +19,8 @@ #pragma once #include -#include + +#include "meta/window.h" #define META_TYPE_INHIBIT_SHORTCUTS_DIALOG (meta_inhibit_shortcuts_dialog_get_type ()) diff --git a/src/meta/meta-later.h b/src/meta/meta-later.h index 8d793f5c9..67c336a5e 100644 --- a/src/meta/meta-later.h +++ b/src/meta/meta-later.h @@ -19,7 +19,7 @@ #pragma once -#include +#include "meta/types.h" /** * MetaLaterType: diff --git a/src/meta/meta-launch-context.h b/src/meta/meta-launch-context.h index 99cbe912f..6cef3d5c9 100644 --- a/src/meta/meta-launch-context.h +++ b/src/meta/meta-launch-context.h @@ -19,7 +19,7 @@ #pragma once -#include +#include "meta/workspace.h" META_EXPORT G_DECLARE_FINAL_TYPE (MetaLaunchContext, meta_launch_context, META, LAUNCH_CONTEXT, GAppLaunchContext) diff --git a/src/meta/meta-remote-access-controller.h b/src/meta/meta-remote-access-controller.h index 569617d62..b881bccb4 100644 --- a/src/meta/meta-remote-access-controller.h +++ b/src/meta/meta-remote-access-controller.h @@ -20,7 +20,7 @@ #include -#include +#include "meta/common.h" #define META_TYPE_REMOTE_ACCESS_HANDLE meta_remote_access_handle_get_type () diff --git a/src/meta/meta-selection-source.h b/src/meta/meta-selection-source.h index 91a9dc50d..c7f853865 100644 --- a/src/meta/meta-selection-source.h +++ b/src/meta/meta-selection-source.h @@ -21,7 +21,7 @@ #include -#include +#include "meta/common.h" typedef enum { diff --git a/src/meta/meta-selection.h b/src/meta/meta-selection.h index 11955442c..82e980654 100644 --- a/src/meta/meta-selection.h +++ b/src/meta/meta-selection.h @@ -21,9 +21,9 @@ #include -#include -#include -#include +#include "meta/common.h" +#include "meta/display.h" +#include "meta/meta-selection-source.h" #define META_TYPE_SELECTION (meta_selection_get_type ()) diff --git a/src/meta/meta-settings.h b/src/meta/meta-settings.h index 0740571c6..e5c7ea94f 100644 --- a/src/meta/meta-settings.h +++ b/src/meta/meta-settings.h @@ -19,8 +19,8 @@ #pragma once -#include -#include +#include "meta/common.h" +#include "meta/types.h" META_EXPORT int meta_settings_get_ui_scaling_factor (MetaSettings *settings); diff --git a/src/meta/meta-shaped-texture.h b/src/meta/meta-shaped-texture.h index 9957394b0..a7c41d600 100644 --- a/src/meta/meta-shaped-texture.h +++ b/src/meta/meta-shaped-texture.h @@ -26,8 +26,8 @@ #include #include "clutter/clutter.h" -#include -#include +#include "meta/common.h" +#include "meta/meta-multi-texture.h" G_BEGIN_DECLS diff --git a/src/meta/meta-sound-player.h b/src/meta/meta-sound-player.h index ff3423555..4fad9696b 100644 --- a/src/meta/meta-sound-player.h +++ b/src/meta/meta-sound-player.h @@ -21,7 +21,7 @@ #include -#include +#include "meta/common.h" #define META_TYPE_SOUND_PLAYER (meta_sound_player_get_type ()) diff --git a/src/meta/meta-startup-notification.h b/src/meta/meta-startup-notification.h index 372b4cf2e..deafb3433 100644 --- a/src/meta/meta-startup-notification.h +++ b/src/meta/meta-startup-notification.h @@ -18,7 +18,7 @@ #pragma once -#include +#include "meta/meta-launch-context.h" #define META_TYPE_STARTUP_SEQUENCE (meta_startup_sequence_get_type ()) #define META_TYPE_STARTUP_NOTIFICATION (meta_startup_notification_get_type ()) diff --git a/src/meta/meta-window-shape.h b/src/meta/meta-window-shape.h index 2d70a341e..2768cd2e6 100644 --- a/src/meta/meta-window-shape.h +++ b/src/meta/meta-window-shape.h @@ -24,7 +24,7 @@ #include -#include +#include "meta/common.h" META_EXPORT GType meta_window_shape_get_type (void) G_GNUC_CONST; diff --git a/src/meta/meta-workspace-manager.h b/src/meta/meta-workspace-manager.h index 6257448cd..d068fa1ac 100644 --- a/src/meta/meta-workspace-manager.h +++ b/src/meta/meta-workspace-manager.h @@ -24,10 +24,10 @@ #include -#include -#include -#include -#include +#include "meta/common.h" +#include "meta/display.h" +#include "meta/prefs.h" +#include "meta/types.h" #define META_TYPE_WORKSPACE_MANAGER (meta_workspace_manager_get_type ()) diff --git a/src/meta/meta-x11-display.h b/src/meta/meta-x11-display.h index 64d1ca4ad..58fc1b620 100644 --- a/src/meta/meta-x11-display.h +++ b/src/meta/meta-x11-display.h @@ -22,9 +22,9 @@ #include #include -#include -#include -#include +#include "meta/common.h" +#include "meta/prefs.h" +#include "meta/types.h" typedef void (* MetaX11DisplayEventFunc) (MetaX11Display *x11_display, XEvent *xev, diff --git a/src/meta/meta-x11-errors.h b/src/meta/meta-x11-errors.h index 5488b7588..098468fe1 100644 --- a/src/meta/meta-x11-errors.h +++ b/src/meta/meta-x11-errors.h @@ -23,8 +23,8 @@ #include -#include -#include +#include "meta/util.h" +#include "meta/meta-x11-display.h" META_EXPORT void meta_x11_error_trap_push (MetaX11Display *x11_display); diff --git a/src/meta/prefs.h b/src/meta/prefs.h index 3011c5121..b692d5a0b 100644 --- a/src/meta/prefs.h +++ b/src/meta/prefs.h @@ -22,13 +22,14 @@ #pragma once -/* This header is a "common" one between the UI and core side */ -#include -#include #include #include #include +/* This header is a "common" one between the UI and core side */ +#include "meta/common.h" +#include "meta/types.h" + /** * MetaPreference: * @META_PREF_MOUSE_BUTTON_MODS: mouse button modifiers diff --git a/src/meta/util.h b/src/meta/util.h index 2d3122a73..0019c8078 100644 --- a/src/meta/util.h +++ b/src/meta/util.h @@ -25,8 +25,8 @@ #include #include -#include -#include +#include "meta/common.h" +#include "meta/meta-later.h" META_EXPORT gboolean meta_is_verbose (void); diff --git a/src/meta/window.h b/src/meta/window.h index 5ccd765aa..855f78640 100644 --- a/src/meta/window.h +++ b/src/meta/window.h @@ -22,8 +22,8 @@ #include #include -#include -#include +#include "meta/boxes.h" +#include "meta/types.h" /** * MetaWindowType: diff --git a/src/meta/workspace.h b/src/meta/workspace.h index d9b7365a7..9fc61fc76 100644 --- a/src/meta/workspace.h +++ b/src/meta/workspace.h @@ -20,8 +20,8 @@ #pragma once -#include -#include +#include "meta/types.h" +#include "meta/boxes.h" #define META_TYPE_WORKSPACE (meta_workspace_get_type ()) #define META_WORKSPACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_WORKSPACE, MetaWorkspace))