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

@ -1,46 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2017 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
* 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, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <glib-object.h>
#include "core/util-private.h"
typedef enum
{
META_ORIENTATION_UNDEFINED,
META_ORIENTATION_NORMAL,
META_ORIENTATION_BOTTOM_UP,
META_ORIENTATION_LEFT_UP,
META_ORIENTATION_RIGHT_UP
} MetaOrientation;
#define META_N_ORIENTATIONS (META_ORIENTATION_RIGHT_UP + 1)
#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_TEST
MetaOrientation meta_orientation_manager_get_orientation (MetaOrientationManager *self);
META_EXPORT_TEST
gboolean meta_orientation_manager_has_accelerometer (MetaOrientationManager *self);