[haiku] Re: Blueprint: User idle time component/interface for Haiku OS

  • From: Truls Becken <truls.becken@xxxxxxxxx>
  • To: haiku@xxxxxxxxxxxxx
  • Date: Tue, 15 Dec 2009 21:58:28 +0100

On Tue, Dec 15, 2009 at 19:02, Ryan Leavengood <leavengood@xxxxxxxxx> wrote:

> On Tue, Dec 15, 2009 at 3:28 AM, Truls Becken <truls.becken@xxxxxxxxx> wrote:
>
>> As shown in his pseudocode, it would be nice if applications could
>> register callbacks to be fired on specific idle times.
>
> I think the BeOS/Haiku way to do this would be to have some sort of
> "idle watcher" API which applications can subscribe to. This can send
> messages when the user is idle (with an idle time in the message) as
> well as messages when certain power management features are going to
> be turned on, with the ability to cancel them. There could probably
> also be a simple C function call which can return the exact idle time.
> I think that should cover all the needs of the original poster, just
> in a slightly different way.

Yes, using messages rather than callbacks would be appropriate. I
still hope applications would register individual idle message
intervals. Otherwise, most applications would receive many more
messages than necessary.

-Truls

Other related posts: