main: Move MetaX11DisplayPolicy to a new meta-private-enums.h

As with the compositor type enum, also have the X11 display policy enum,
as it's also effectively part of the context configuration. But as with
the compositor type, move it to a header file for enums only, and since
this is a private one, create a private variant meta-enums.h.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
This commit is contained in:
Jonas Ådahl 2021-03-02 10:21:20 +01:00
parent 68b376a944
commit 7d116bee0f
8 changed files with 38 additions and 8 deletions

View File

@ -41,6 +41,7 @@
#include "backends/meta-pointer-constraint.h" #include "backends/meta-pointer-constraint.h"
#include "backends/meta-renderer.h" #include "backends/meta-renderer.h"
#include "backends/meta-settings-private.h" #include "backends/meta-settings-private.h"
#include "core/meta-context-private.h"
#include "core/util-private.h" #include "core/util-private.h"
#define DEFAULT_XKB_RULES_FILE "evdev" #define DEFAULT_XKB_RULES_FILE "evdev"

View File

@ -66,6 +66,7 @@
#include "backends/x11/meta-backend-x11.h" #include "backends/x11/meta-backend-x11.h"
#include "clutter/clutter-mutter.h" #include "clutter/clutter-mutter.h"
#include "clutter/clutter-seat-private.h" #include "clutter/clutter-seat-private.h"
#include "core/meta-context-private.h"
#include "meta/main.h" #include "meta/main.h"
#include "meta/meta-backend.h" #include "meta/meta-backend.h"
#include "meta/meta-context.h" #include "meta/meta-context.h"

View File

@ -21,13 +21,7 @@
#define META_MAIN_PRIVATE_H #define META_MAIN_PRIVATE_H
#include "core/util-private.h" #include "core/util-private.h"
#include "core/meta-private-enums.h"
typedef enum _MetaX11DisplayPolicy
{
META_X11_DISPLAY_POLICY_MANDATORY,
META_X11_DISPLAY_POLICY_ON_DEMAND,
META_X11_DISPLAY_POLICY_DISABLED,
} MetaX11DisplayPolicy;
META_EXPORT_TEST META_EXPORT_TEST
MetaX11DisplayPolicy meta_get_x11_display_policy (void); MetaX11DisplayPolicy meta_get_x11_display_policy (void);

View File

@ -0,0 +1,31 @@
/*
* Copyright (C) 2019-2021 Red Hat Inc.
*
* 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_PRIVATE_ENUMS_H
#define META_PRIVATE_ENUMS_H
typedef enum _MetaX11DisplayPolicy
{
META_X11_DISPLAY_POLICY_MANDATORY,
META_X11_DISPLAY_POLICY_ON_DEMAND,
META_X11_DISPLAY_POLICY_DISABLED,
} MetaX11DisplayPolicy;
#endif /* META_PRIVATE_ENUMS_H */

View File

@ -384,6 +384,7 @@ mutter_sources = [
'core/meta-inhibit-shortcuts-dialog-default-private.h', 'core/meta-inhibit-shortcuts-dialog-default-private.h',
'core/meta-launch-context.c', 'core/meta-launch-context.c',
'core/meta-pad-action-mapper.c', 'core/meta-pad-action-mapper.c',
'core/meta-private-enums.h',
'core/meta-selection.c', 'core/meta-selection.c',
'core/meta-selection-source.c', 'core/meta-selection-source.c',
'core/meta-selection-source-memory.c', 'core/meta-selection-source-memory.c',

View File

@ -5,7 +5,7 @@
#include <clutter/clutter.h> #include <clutter/clutter.h>
#include "compositor/meta-plugin-manager.h" #include "compositor/meta-plugin-manager.h"
#include "core/main-private.h" #include "core/meta-context-private.h"
typedef struct { typedef struct {
gpointer dummy_field; gpointer dummy_field;

View File

@ -32,6 +32,7 @@
#include "cogl/cogl-egl.h" #include "cogl/cogl-egl.h"
#include "compositor/meta-surface-actor-wayland.h" #include "compositor/meta-surface-actor-wayland.h"
#include "core/main-private.h" #include "core/main-private.h"
#include "core/meta-context-private.h"
#include "wayland/meta-wayland-activation.h" #include "wayland/meta-wayland-activation.h"
#include "wayland/meta-wayland-buffer.h" #include "wayland/meta-wayland-buffer.h"
#include "wayland/meta-wayland-data-device.h" #include "wayland/meta-wayland-data-device.h"

View File

@ -24,6 +24,7 @@
#define META_WAYLAND_H #define META_WAYLAND_H
#include "clutter/clutter.h" #include "clutter/clutter.h"
#include "core/meta-context-private.h"
#include "core/util-private.h" #include "core/util-private.h"
#include "meta/types.h" #include "meta/types.h"
#include "wayland/meta-wayland-types.h" #include "wayland/meta-wayland-types.h"