1
0
Fork 0

orientation-manager: Expose MetaOrientationManager to introspection

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3880>
This commit is contained in:
Ivan Kuzmenko 2024-07-11 18:54:09 +03:00 committed by Ivan Kuzmenko
parent 6d78ff9373
commit 2c5f874eaa
12 changed files with 35 additions and 18 deletions

View file

@ -27,13 +27,13 @@
#include "meta/meta-backend.h"
#include "meta/meta-idle-monitor.h"
#include "meta/meta-orientation-manager.h"
#include "backends/meta-backend-types.h"
#include "backends/meta-cursor-renderer.h"
#include "backends/meta-egl.h"
#include "backends/meta-input-mapper-private.h"
#include "backends/meta-input-settings-private.h"
#include "backends/meta-monitor-manager-private.h"
#include "backends/meta-orientation-manager.h"
#include "backends/meta-pointer-constraint.h"
#include "backends/meta-renderer.h"
#include "backends/meta-settings-private.h"
@ -138,8 +138,6 @@ MetaIdleManager * meta_backend_get_idle_manager (MetaBackend *backend);
META_EXPORT_TEST
MetaColorManager * meta_backend_get_color_manager (MetaBackend *backend);
META_EXPORT_TEST
MetaOrientationManager * meta_backend_get_orientation_manager (MetaBackend *backend);
META_EXPORT_TEST
MetaCursorTracker * meta_backend_get_cursor_tracker (MetaBackend *backend);
MetaCursorRenderer * meta_backend_get_cursor_renderer_for_device (MetaBackend *backend,

View file

@ -1372,7 +1372,9 @@ meta_backend_get_color_manager (MetaBackend *backend)
}
/**
* meta_backend_get_orientation_manager: (skip)
* meta_backend_get_orientation_manager:
*
* Returns: (transfer none): A #MetaOrientationManager
*/
MetaOrientationManager *
meta_backend_get_orientation_manager (MetaBackend *backend)

View file

@ -52,13 +52,13 @@
#include "backends/meta-monitor.h"
#include "backends/meta-monitor-config-manager.h"
#include "backends/meta-monitor-config-store.h"
#include "backends/meta-orientation-manager.h"
#include "backends/meta-output.h"
#include "backends/meta-virtual-monitor.h"
#include "clutter/clutter.h"
#include "core/util-private.h"
#include "meta/main.h"
#include "meta/meta-enum-types.h"
#include "meta/meta-orientation-manager.h"
#include "meta-dbus-display-config.h"

View file

@ -21,7 +21,7 @@
#include <glib-object.h>
#include "backends/meta-backend-types.h"
#include "backends/meta-orientation-manager.h"
#include "meta/meta-orientation-manager.h"
#include "core/util-private.h"
enum _MetaMonitorTransform

View file

@ -17,9 +17,19 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
/**
* MetaOrientationManager:
*
* A screen orientation manager
*
* #MetaOrientationManager is a final class which contains methods to
* read the current screen orientation, as well as a signal that is
* triggered whenever a screen changes its orientation.
*/
#include "config.h"
#include "backends/meta-orientation-manager.h"
#include "meta/meta-orientation-manager.h"
#include <gio/gio.h>

View file

@ -262,7 +262,6 @@ mutter_sources = [
'backends/meta-monitor-transform.c',
'backends/meta-monitor-transform.h',
'backends/meta-orientation-manager.c',
'backends/meta-orientation-manager.h',
'backends/meta-output.c',
'backends/meta-output.h',
'backends/meta-pointer-constraint.c',

View file

@ -27,6 +27,7 @@ mutter_public_headers = [
'meta-monitor-manager.h',
'meta-multi-texture.h',
'meta-multi-texture-format.h',
'meta-orientation-manager.h',
'meta-plugin.h',
'meta-remote-access-controller.h',
'meta-selection.h',

View file

@ -28,6 +28,7 @@
#include "meta/meta-dnd.h"
#include "meta/meta-idle-monitor.h"
#include "meta/meta-monitor-manager.h"
#include "meta/meta-orientation-manager.h"
#include "meta/meta-remote-access-controller.h"
typedef enum _MetaBackendCapabilities
@ -69,6 +70,9 @@ MetaIdleMonitor * meta_backend_get_core_idle_monitor (MetaBackend *backend);
META_EXPORT
MetaMonitorManager * meta_backend_get_monitor_manager (MetaBackend *backend);
META_EXPORT
MetaOrientationManager * meta_backend_get_orientation_manager (MetaBackend *backend);
META_EXPORT
MetaRemoteAccessController * meta_backend_get_remote_access_controller (MetaBackend *backend);

View file

@ -1,7 +1,7 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2017 Red Hat
* Copyright (C) 2024 Red Hat
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@ -21,7 +21,7 @@
#include <glib-object.h>
#include "core/util-private.h"
#include "meta/common.h"
typedef enum
{
@ -35,12 +35,15 @@ typedef enum
#define META_TYPE_ORIENTATION_MANAGER (meta_orientation_manager_get_type ())
META_EXPORT_TEST
G_DECLARE_FINAL_TYPE (MetaOrientationManager, meta_orientation_manager,
META, ORIENTATION_MANAGER, GObject)
META_EXPORT
G_DECLARE_FINAL_TYPE (MetaOrientationManager,
meta_orientation_manager,
META,
ORIENTATION_MANAGER,
GObject)
META_EXPORT_TEST
META_EXPORT
MetaOrientation meta_orientation_manager_get_orientation (MetaOrientationManager *self);
META_EXPORT_TEST
META_EXPORT
gboolean meta_orientation_manager_has_accelerometer (MetaOrientationManager *self);

View file

@ -20,7 +20,7 @@
#pragma once
#include "backends/meta-orientation-manager.h"
#include "meta/meta-orientation-manager.h"
typedef GDBusProxy MetaSensorsProxyMock;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MetaSensorsProxyMock, g_object_unref)

View file

@ -25,10 +25,10 @@
#include "backends/meta-monitor.h"
#include "backends/meta-monitor-config-migration.h"
#include "backends/meta-monitor-config-store.h"
#include "backends/meta-orientation-manager.h"
#include "backends/meta-output.h"
#include "core/window-private.h"
#include "meta-backend-test.h"
#include "meta/meta-orientation-manager.h"
#include "meta-test/meta-context-test.h"
#include "tests/meta-monitor-manager-test.h"
#include "tests/meta-monitor-test-utils.h"

View file

@ -20,6 +20,6 @@
#pragma once
#include "backends/meta-orientation-manager.h"
#include "meta/meta-orientation-manager.h"
void init_orientation_manager_tests (void);