1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* vim:expandtab:shiftwidth=4:tabstop=4:
4 /* This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 #ifndef nsIdleServiceQt_h__
9 #define nsIdleServiceQt_h__
11 #include "nsIdleService.h"
15 #include <X11/Xutil.h>
18 Window window
; // Screen saver window
19 int state
; // ScreenSaver(Off,On,Disabled)
20 int kind
; // ScreenSaver(Blanked,Internal,External)
21 unsigned long til_or_since
; // milliseconds since/til screensaver kicks in
22 unsigned long idle
; // milliseconds idle
23 unsigned long event_mask
; // event stuff
27 class nsIdleServiceQt
: public nsIdleService
30 NS_DECL_ISUPPORTS_INHERITED
32 bool PollIdleTime(uint32_t* aIdleTime
);
34 static already_AddRefed
<nsIdleServiceQt
> GetInstance()
36 nsRefPtr
<nsIdleServiceQt
> idleService
=
37 nsIdleService::GetInstance().downcast
<nsIdleServiceQt
>();
39 idleService
= new nsIdleServiceQt();
42 return idleService
.forget();
47 XScreenSaverInfo
* mXssInfo
;
52 virtual ~nsIdleServiceQt();
56 #endif // nsIdleServiceQt_h__