From a9d6cad9ea99397179894f6a5fa4d45e2cf857e2 Mon Sep 17 00:00:00 2001 From: Rui Guo Date: Wed, 5 Aug 2009 00:27:33 +0800 Subject: [PATCH] Document the onsilent/onactivity event. --- src/drafts/scripting | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/drafts/scripting b/src/drafts/scripting index 2368c8f..bc9625a 100644 --- a/src/drafts/scripting +++ b/src/drafts/scripting @@ -138,7 +138,9 @@ Methods: ---------- get_canvases: Get a list of canvases on this display. + top_canvas: Get the top (or top-left) canvas on the display. + bottom_canvas: Get the bottom canvas on the display. ---------- @@ -148,9 +150,9 @@ Events: on_idle: (Display) Triggerred whenever the idle timeout is reached. The handler will be called with a reference to the idling display. If the handler returns - non-zero, the internal idle processing will be overriden. Please note that the - The idle timeout is not reseted on such a situation, remember to setup - idle timout in the handler if multiple activation is needed.. + non-zero, the internal idle processing will be overriden. Please note + that the The idle timeout is not reseted on such a situation, remember to + setup idle timout in the handler if multiple activation is needed.. B. Window @@ -229,9 +231,15 @@ hook([obj], event, handler, [priv]) Events ---------- -on_activity -on_silence (window) - triggered when the silence monitor got fired. +on_activity (display, window) + triggered when the activity monitor got fired. This will be triggered for + each display on which the window is hidden. Return non-zero in the handler + will override the default activity message. + +onsilent (display, window) + triggered when the silence monitor got fired. This will be triggered for + each display on which the window is hidden. Return non-zero in the handler + will override the default silent message. on_focus (display, window) Triggered when the window gets input focus on a display. @@ -251,6 +259,10 @@ on_hide (display, window) Triggered after the last view of this window disappeared from a display. Differs from on_leave when there are many regions on a display. +on_close (window) + Triggered before the window close. Can be used to free any references to + the window. + can_resize on_resize -- 2.11.4.GIT