| // Copyright 2024 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| library fuchsia.session.window; |
| |
| /// The possible errors from the Screensaver protocol. |
| type ScreensaverError = flexible enum { |
| /// Current product doesn't support screensaver. |
| NOT_SUPPORTED = 1; |
| /// A general error occurred during the method call. |
| BAD_OPERATION = 2; |
| }; |
| |
| /// The Screensaver protocol is used to control the screensaver. |
| /// |
| /// The client can use this protocol to check if the screensaver is |
| /// supported and to turn the screensaver on or off. |
| @available(added=HEAD) |
| @discoverable |
| closed protocol Screensaver { |
| /// Changes Screensaver state. |
| strict Set(struct { |
| /// Whether the screensaver should be turned on (true) or off (false). |
| screensaver_on bool; |
| }) -> () error ScreensaverError; |
| }; |