gnome-shell/data/dbus-interfaces/org.gnome.Shell.ScreenTime.xml
Philip Withnall df3b4d302d breakManager: Add new state machine for screen time/health breaks
This implements health break reminder support in gnome-shell. It depends
on a
few bits and bobs from other modules:
 - New settings schemas in gsettings-desktop-schemas (released in
   47.beta, which Mutter already depends on)
 - A settings UI in gnome-control-center
 - User documentation in gnome-user-docs

It implements the design from
https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/wellbeing/wellbeing.png.

The core of the implementation is `BreakManager`, which is a state
machine which uses the Mutter `IdleMonitor` to track whether the user
is, or should be, in a screen time break.

The `BreakDispatcher` is based on top of this, and controls showing
notifications, countdown timers, screen fades, the lock shield, etc. to
make the user aware of upcoming or due breaks, as per their notification
preferences.

Unit tests are included to check that `BreakManager` works. These
provide mock implementations of basic GLib clock functions, the
`IdleMonitor` and `Gio.Settings` in order to test the state machine in
faster-than-real-time.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

See: https://gitlab.gnome.org/Teams/Design/initiatives/-/issues/130
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3251>
2024-11-28 10:44:10 +00:00

39 lines
1.1 KiB
XML

<!DOCTYPE node PUBLIC
'-//freedesktop//DTD D-BUS Object Introspection 1.0//EN'
'http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd'>
<!--
SPDX-License-Identifier: GPL-3.0-or-later
SPDX-FileCopyrightText: 2024 GNOME Foundation, Inc.
-->
<node>
<!--
org.gnome.Shell.ScreenTime:
@short_description: Screen Time interface
The interface used to access Screen Time and Break Reminders usage data.
-->
<interface name="org.gnome.Shell.ScreenTime">
<!--
State:
The state of the break manager.
- 0: Break reminders are disabled.
- 1: Break reminders are enabled, user is active, no break is needed yet.
- 2: A break is needed and the user is taking it.
- 3: A break is needed but the user is still active.
-->
<property name="State" type="u" access="read"/>
<!--
LastBreakEndTime:
The time (in wall clock seconds since the Unix epoch) when the most
recent break ended. If there have been no breaks so far, zero is
returned.
-->
<property name="LastBreakEndTime" type="t" access="read"/>
</interface>
</node>