summaryrefslogtreecommitdiff
path: root/src/backends/meta-idle-manager.h
diff options
context:
space:
mode:
authorJonas Ã…dahl <jadahl@gmail.com>2021-04-19 15:22:57 +0200
committerMarge Bot <marge-bot@gnome.org>2021-05-18 13:19:36 +0000
commit18d670e69fbb484d7e6b5a243ecbe1483c74bdf5 (patch)
treeb10aaf5271d273bb7c94615845d8da15e253d9a8 /src/backends/meta-idle-manager.h
parent389432de46589cdbc2afb19a02feac69ecccfb15 (diff)
downloadmutter-18d670e69fbb484d7e6b5a243ecbe1483c74bdf5.tar.gz
backends: Introduce MetaIdleManager
This object takes over the functionality of meta-idle-monitor-dbus.c, meta-idle-monitor.c and meta-backend.c, all related to higher level management of idle watches etc. The idle D-Bus API is changed to be initialized by the backend instead of MetaDisplay, as it's more of a backend functionality than what MetaDisplay usually deals with. It also takes over the work of implementing "core" idle monitors. The singleton API is replaced with thin wrapper functions on the backend. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1859>
Diffstat (limited to 'src/backends/meta-idle-manager.h')
-rw-r--r--src/backends/meta-idle-manager.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/backends/meta-idle-manager.h b/src/backends/meta-idle-manager.h
new file mode 100644
index 000000000..c2a998feb
--- /dev/null
+++ b/src/backends/meta-idle-manager.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright 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, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef META_IDLE_MANAGER_H
+#define META_IDLE_MANAGER_H
+
+#include "backends/meta-backend-types.h"
+#include "clutter/clutter.h"
+
+typedef struct _MetaIdleMonitor MetaIdleMonitor;
+typedef struct _MetaIdleManager MetaIdleManager;
+
+MetaIdleMonitor * meta_idle_manager_get_monitor (MetaIdleManager *idle_manager,
+ ClutterInputDevice *device);
+
+MetaIdleMonitor * meta_idle_manager_get_core_monitor (MetaIdleManager *idle_manager);
+
+void meta_idle_manager_reset_idle_time (MetaIdleManager *idle_manager);
+
+MetaIdleManager * meta_idle_manager_new (MetaBackend *backend);
+
+void meta_idle_manager_free (MetaIdleManager *idle_manager);
+
+#endif /* META_IDLE_MANAGER_H */