blob: 836df5b52df03ae1b1bede9817c939b1f5cdcc3a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/* Copyright 2009-2015 Yorba Foundation
*
* This software is licensed under the GNU LGPL (version 2.1 or later).
* See the COPYING file in this distribution.
*/
public class Screensaver {
private uint32 cookie = 0;
public Screensaver() {
}
public void inhibit(string reason) {
if (cookie != 0)
return;
cookie = Application.get_instance().inhibit(
Gtk.ApplicationInhibitFlags.IDLE | Gtk.ApplicationInhibitFlags.SUSPEND, _("Slideshow"));
}
public void uninhibit() {
if (cookie == 0)
return;
Application.get_instance().uninhibit(cookie);
cookie = 0;
}
}
|