Bug 460926 A11y hierachy is broken on Ubuntu 8.10 (GNOME 2.24), r=Evan.Yan sr=roc
[wine-gecko.git] / dom / public / nsIScriptTimeoutHandler.h
blob1ac0363b8f4815a4ac8e9a933decdbb8c6f4966f
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 sw=2 et tw=80: */
3 /* ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
16 * The Original Code is mozilla.org code.
18 * The Initial Developer of the Original Code is
19 * Netscape Communications Corporation.
20 * Portions created by the Initial Developer are Copyright (C) 1998
21 * the Initial Developer. All Rights Reserved.
23 * Contributor(s):
24 * Mark Hammond <mhammond@skippinet.com.au>
26 * Alternatively, the contents of this file may be used under the terms of
27 * either of the GNU General Public License Version 2 or later (the "GPL"),
28 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 * in which case the provisions of the GPL or the LGPL are applicable instead
30 * of those above. If you wish to allow use of your version of this file only
31 * under the terms of either the GPL or the LGPL, and not to allow others to
32 * use your version of this file under the terms of the MPL, indicate your
33 * decision by deleting the provisions above and replace them with the notice
34 * and other provisions required by the GPL or the LGPL. If you do not delete
35 * the provisions above, a recipient may use your version of this file under
36 * the terms of any one of the MPL, the GPL or the LGPL.
38 * ***** END LICENSE BLOCK ***** */
39 #ifndef nsIScriptTimeoutHandler_h___
40 #define nsIScriptTimeoutHandler_h___
42 class nsIArray;
44 #define NS_ISCRIPTTIMEOUTHANDLER_IID \
45 { /* {260C0DAB-0DCF-4c75-B820-46C31005718D} */ \
46 0x260c0dab, 0xdcf, 0x4c75, \
47 { 0xb8, 0x20, 0x46, 0xc3, 0x10, 0x5, 0x71, 0x8d } }
49 /**
50 * Abstraction of the script objects etc required to do timeouts in a
51 * language agnostic way.
54 class nsIScriptTimeoutHandler : public nsISupports
56 public:
57 NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISCRIPTTIMEOUTHANDLER_IID)
59 // Get the script-type (language) implementing this timeout.
60 virtual PRUint32 GetScriptTypeID() = 0;
62 // Get a script object for the language suitable for passing back to
63 // the language's context as an event handler. If this returns nsnull,
64 // GetHandlerText() will be called to get the string.
65 virtual void *GetScriptObject() = 0;
67 // Get the handler text of not a compiled object.
68 virtual const PRUnichar *GetHandlerText() = 0;
70 // Get the location of the script.
71 // Note: The memory pointed to by aFileName is owned by the
72 // nsIScriptTimeoutHandler and should not be freed by the caller.
73 virtual void GetLocation(const char **aFileName, PRUint32 *aLineNo) = 0;
75 // If a script object, get the argv suitable for passing back to the
76 // script context.
77 virtual nsIArray *GetArgv() = 0;
79 // Get the language version for this timeout.
80 virtual PRUint32 GetScriptVersion() = 0;
82 // Set the "secret" final lateness arg. This will be called before
83 // GetArgv(), which should reflect this lateness value.
84 virtual void SetLateness(PRIntervalTime aHowLate) = 0;
87 NS_DEFINE_STATIC_IID_ACCESSOR(nsIScriptTimeoutHandler,
88 NS_ISCRIPTTIMEOUTHANDLER_IID)
90 #endif // nsIScriptTimeoutHandler_h___