backends/native: Add distinct meta-input-thread.h header
Make it impossible to add individual includes of input thread objects. This must go through meta-input-thread.h now, which should be enough to make anyone think it twice. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403>
This commit is contained in:
parent
c03be03cd3
commit
8b6ea12fac
@ -23,5 +23,7 @@
|
||||
|
||||
typedef struct _MetaBackendNative MetaBackendNative;
|
||||
typedef struct _MetaSeatNative MetaSeatNative;
|
||||
typedef struct _MetaSeatImpl MetaSeatImpl;
|
||||
typedef struct _MetaKeymapNative MetaKeymapNative;
|
||||
|
||||
#endif /* META_BACKEND_NATIVE_TYPES_H */
|
||||
|
@ -36,6 +36,7 @@
|
||||
|
||||
#include "backends/native/meta-backend-native.h"
|
||||
#include "backends/native/meta-backend-native-private.h"
|
||||
#include "backends/native/meta-input-thread.h"
|
||||
|
||||
#include <sched.h>
|
||||
#include <stdlib.h>
|
||||
@ -50,8 +51,6 @@
|
||||
#include "backends/meta-stage-private.h"
|
||||
#include "backends/native/meta-clutter-backend-native.h"
|
||||
#include "backends/native/meta-event-native.h"
|
||||
#include "backends/native/meta-input-device-native.h"
|
||||
#include "backends/native/meta-input-settings-native.h"
|
||||
#include "backends/native/meta-kms.h"
|
||||
#include "backends/native/meta-kms-device.h"
|
||||
#include "backends/native/meta-launcher.h"
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "config.h"
|
||||
|
||||
#include "backends/native/meta-event-native.h"
|
||||
#include "backends/native/meta-input-device-native.h"
|
||||
#include "backends/native/meta-input-thread.h"
|
||||
#include "clutter/clutter-mutter.h"
|
||||
|
||||
typedef struct _MetaEventNative MetaEventNative;
|
||||
|
@ -25,9 +25,7 @@
|
||||
#include <cairo-gobject.h>
|
||||
|
||||
#include "backends/meta-backend-private.h"
|
||||
#include "backends/native/meta-input-device-tool-native.h"
|
||||
#include "backends/native/meta-input-device-native.h"
|
||||
#include "backends/native/meta-seat-impl.h"
|
||||
#include "backends/native/meta-input-thread.h"
|
||||
#include "clutter/clutter-mutter.h"
|
||||
|
||||
G_DEFINE_TYPE (MetaInputDeviceNative,
|
||||
|
@ -26,6 +26,10 @@
|
||||
#ifndef META_INPUT_DEVICE_NATIVE_H
|
||||
#define META_INPUT_DEVICE_NATIVE_H
|
||||
|
||||
#ifndef META_INPUT_THREAD_H_INSIDE
|
||||
#error "This header cannot be included directly. Use "backends/native/meta-input-thread.h""
|
||||
#endif /* META_INPUT_THREAD_H_INSIDE */
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "backends/meta-input-device-private.h"
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "backends/native/meta-input-device-tool-native.h"
|
||||
#include "backends/native/meta-input-thread.h"
|
||||
|
||||
G_DEFINE_TYPE (MetaInputDeviceToolNative, meta_input_device_tool_native,
|
||||
CLUTTER_TYPE_INPUT_DEVICE_TOOL)
|
||||
|
@ -20,6 +20,10 @@
|
||||
#ifndef META_INPUT_DEVICE_NATIVE_TOOL_H
|
||||
#define META_INPUT_DEVICE_NATIVE_TOOL_H
|
||||
|
||||
#ifndef META_INPUT_THREAD_H_INSIDE
|
||||
#error "This header cannot be included directly. Use "backends/native/meta-input-thread.h""
|
||||
#endif /* META_INPUT_THREAD_H_INSIDE */
|
||||
|
||||
#include <libinput.h>
|
||||
|
||||
#include "clutter/clutter.h"
|
||||
|
@ -27,8 +27,7 @@
|
||||
#include <libinput.h>
|
||||
|
||||
#include "backends/native/meta-backend-native.h"
|
||||
#include "backends/native/meta-input-device-native.h"
|
||||
#include "backends/native/meta-input-device-tool-native.h"
|
||||
#include "backends/native/meta-input-thread.h"
|
||||
#include "backends/native/meta-input-settings-native.h"
|
||||
|
||||
G_DEFINE_TYPE (MetaInputSettingsNative, meta_input_settings_native, META_TYPE_INPUT_SETTINGS)
|
||||
|
@ -22,6 +22,10 @@
|
||||
#ifndef META_INPUT_SETTINGS_NATIVE_H
|
||||
#define META_INPUT_SETTINGS_NATIVE_H
|
||||
|
||||
#ifndef META_INPUT_THREAD_H_INSIDE
|
||||
#error "This header cannot be included directly. Use "backends/native/meta-input-thread.h""
|
||||
#endif /* META_INPUT_THREAD_H_INSIDE */
|
||||
|
||||
#include "backends/meta-input-settings-private.h"
|
||||
|
||||
#define META_TYPE_INPUT_SETTINGS_NATIVE (meta_input_settings_native_get_type ())
|
||||
|
33
src/backends/native/meta-input-thread.h
Normal file
33
src/backends/native/meta-input-thread.h
Normal file
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Red Hat Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Carlos Garnacho <carlosg@gnome.org>
|
||||
*/
|
||||
|
||||
#ifndef META_INPUT_THREAD_H
|
||||
#define META_INPUT_THREAD_H
|
||||
|
||||
#define META_INPUT_THREAD_H_INSIDE
|
||||
|
||||
#include "src/backends/native/meta-input-device-native.h"
|
||||
#include "src/backends/native/meta-input-device-tool-native.h"
|
||||
#include "src/backends/native/meta-input-settings-native.h"
|
||||
#include "src/backends/native/meta-keymap-native.h"
|
||||
#include "src/backends/native/meta-seat-impl.h"
|
||||
|
||||
#undef META_INPUT_THREAD_H_INSIDE
|
||||
|
||||
#endif /* META_INPUT_THREAD_H */
|
@ -22,7 +22,7 @@
|
||||
#include "config.h"
|
||||
|
||||
#include "backends/meta-keymap-utils.h"
|
||||
#include "backends/native/meta-keymap-native.h"
|
||||
#include "backends/native/meta-input-thread.h"
|
||||
#include "backends/native/meta-seat-native.h"
|
||||
|
||||
static const char *option_xkb_layout = "us";
|
||||
|
@ -21,6 +21,10 @@
|
||||
#ifndef META_KEYMAP_NATIVE_H
|
||||
#define META_KEYMAP_NATIVE_H
|
||||
|
||||
#ifndef META_INPUT_THREAD_H_INSIDE
|
||||
#error "This header cannot be included directly. Use "backends/native/meta-input-thread.h""
|
||||
#endif /* META_INPUT_THREAD_H_INSIDE */
|
||||
|
||||
#include "backends/native/meta-xkb-utils.h"
|
||||
#include "clutter/clutter.h"
|
||||
|
||||
|
@ -39,8 +39,8 @@
|
||||
#include "backends/native/meta-backend-native.h"
|
||||
#include "backends/native/meta-clutter-backend-native.h"
|
||||
#include "backends/native/meta-cursor-renderer-native.h"
|
||||
#include "backends/native/meta-input-thread.h"
|
||||
#include "backends/native/meta-renderer-native.h"
|
||||
#include "backends/native/meta-seat-native.h"
|
||||
#include "clutter/clutter.h"
|
||||
|
||||
#include "meta-dbus-login1.h"
|
||||
|
@ -27,8 +27,6 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "backends/native/meta-seat-impl.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <libinput.h>
|
||||
@ -38,10 +36,7 @@
|
||||
#include "backends/meta-cursor-tracker-private.h"
|
||||
#include "backends/native/meta-barrier-native.h"
|
||||
#include "backends/native/meta-event-native.h"
|
||||
#include "backends/native/meta-input-device-native.h"
|
||||
#include "backends/native/meta-input-device-tool-native.h"
|
||||
#include "backends/native/meta-input-settings-native.h"
|
||||
#include "backends/native/meta-keymap-native.h"
|
||||
#include "backends/native/meta-input-thread.h"
|
||||
#include "backends/native/meta-virtual-input-device-native.h"
|
||||
#include "clutter/clutter-mutter.h"
|
||||
#include "core/bell.h"
|
||||
|
@ -23,6 +23,10 @@
|
||||
#ifndef META_SEAT_IMPL_H
|
||||
#define META_SEAT_IMPL_H
|
||||
|
||||
#ifndef META_INPUT_THREAD_H_INSIDE
|
||||
#error "This header cannot be included directly. Use "backends/native/meta-input-thread.h""
|
||||
#endif /* META_INPUT_THREAD_H_INSIDE */
|
||||
|
||||
#include <gudev/gudev.h>
|
||||
#include <libinput.h>
|
||||
#include <linux/input-event-codes.h>
|
||||
|
@ -32,8 +32,7 @@
|
||||
#include "backends/meta-keymap-utils.h"
|
||||
#include "backends/native/meta-barrier-native.h"
|
||||
#include "backends/native/meta-event-native.h"
|
||||
#include "backends/native/meta-input-device-native.h"
|
||||
#include "backends/native/meta-input-device-tool-native.h"
|
||||
#include "backends/native/meta-input-thread.h"
|
||||
#include "backends/native/meta-keymap-native.h"
|
||||
#include "backends/native/meta-virtual-input-device-native.h"
|
||||
#include "clutter/clutter-mutter.h"
|
||||
|
@ -27,12 +27,12 @@
|
||||
#include <libinput.h>
|
||||
#include <linux/input-event-codes.h>
|
||||
|
||||
#include "backends/meta-input-settings-private.h"
|
||||
#include "backends/meta-viewport-info.h"
|
||||
#include "backends/native/meta-backend-native-types.h"
|
||||
#include "backends/native/meta-barrier-native.h"
|
||||
#include "backends/native/meta-cursor-renderer-native.h"
|
||||
#include "backends/native/meta-keymap-native.h"
|
||||
#include "backends/native/meta-pointer-constraint-native.h"
|
||||
#include "backends/native/meta-seat-impl.h"
|
||||
#include "backends/native/meta-xkb-utils.h"
|
||||
#include "clutter/clutter.h"
|
||||
|
||||
|
@ -22,8 +22,7 @@
|
||||
#include <glib-object.h>
|
||||
#include <linux/input.h>
|
||||
|
||||
#include "backends/native/meta-input-device-native.h"
|
||||
#include "backends/native/meta-keymap-native.h"
|
||||
#include "backends/native/meta-input-thread.h"
|
||||
#include "backends/native/meta-seat-native.h"
|
||||
#include "backends/native/meta-virtual-input-device-native.h"
|
||||
#include "clutter/clutter-mutter.h"
|
||||
|
Loading…
Reference in New Issue
Block a user