1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/dom/interfaces/base/nsIFocusManager.idl
3 : */
4 :
5 : #ifndef __gen_nsIFocusManager_h__
6 : #define __gen_nsIFocusManager_h__
7 :
8 :
9 : #ifndef __gen_domstubs_h__
10 : #include "domstubs.h"
11 : #endif
12 :
13 : /* For IDL files that don't want to include root IDL files. */
14 : #ifndef NS_NO_VTABLE
15 : #define NS_NO_VTABLE
16 : #endif
17 : class nsIDocument; /* forward declaration */
18 :
19 : class nsIContent; /* forward declaration */
20 :
21 :
22 : /* starting interface: nsIFocusManager */
23 : #define NS_IFOCUSMANAGER_IID_STR "51db277b-7ee7-4bce-9b84-fd2efcd2c8bd"
24 :
25 : #define NS_IFOCUSMANAGER_IID \
26 : {0x51db277b, 0x7ee7, 0x4bce, \
27 : { 0x9b, 0x84, 0xfd, 0x2e, 0xfc, 0xd2, 0xc8, 0xbd }}
28 :
29 1404 : class NS_NO_VTABLE NS_SCRIPTABLE nsIFocusManager : public nsISupports {
30 : public:
31 :
32 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IFOCUSMANAGER_IID)
33 :
34 : /* attribute nsIDOMWindow activeWindow; */
35 : NS_SCRIPTABLE NS_IMETHOD GetActiveWindow(nsIDOMWindow * *aActiveWindow) = 0;
36 : NS_SCRIPTABLE NS_IMETHOD SetActiveWindow(nsIDOMWindow *aActiveWindow) = 0;
37 :
38 : /* attribute nsIDOMWindow focusedWindow; */
39 : NS_SCRIPTABLE NS_IMETHOD GetFocusedWindow(nsIDOMWindow * *aFocusedWindow) = 0;
40 : NS_SCRIPTABLE NS_IMETHOD SetFocusedWindow(nsIDOMWindow *aFocusedWindow) = 0;
41 :
42 : /* readonly attribute nsIDOMElement focusedElement; */
43 : NS_SCRIPTABLE NS_IMETHOD GetFocusedElement(nsIDOMElement * *aFocusedElement) = 0;
44 :
45 : /* PRUint32 getLastFocusMethod (in nsIDOMWindow window); */
46 : NS_SCRIPTABLE NS_IMETHOD GetLastFocusMethod(nsIDOMWindow *window, PRUint32 *_retval NS_OUTPARAM) = 0;
47 :
48 : /* void setFocus (in nsIDOMElement aElement, in unsigned long aFlags); */
49 : NS_SCRIPTABLE NS_IMETHOD SetFocus(nsIDOMElement *aElement, PRUint32 aFlags) = 0;
50 :
51 : /* nsIDOMElement moveFocus (in nsIDOMWindow aWindow, in nsIDOMElement aStartElement, in unsigned long aType, in unsigned long aFlags); */
52 : NS_SCRIPTABLE NS_IMETHOD MoveFocus(nsIDOMWindow *aWindow, nsIDOMElement *aStartElement, PRUint32 aType, PRUint32 aFlags, nsIDOMElement * *_retval NS_OUTPARAM) = 0;
53 :
54 : /* void clearFocus (in nsIDOMWindow aWindow); */
55 : NS_SCRIPTABLE NS_IMETHOD ClearFocus(nsIDOMWindow *aWindow) = 0;
56 :
57 : /* nsIDOMElement getFocusedElementForWindow (in nsIDOMWindow aWindow, in boolean aDeep, out nsIDOMWindow aFocusedWindow); */
58 : NS_SCRIPTABLE NS_IMETHOD GetFocusedElementForWindow(nsIDOMWindow *aWindow, bool aDeep, nsIDOMWindow * *aFocusedWindow NS_OUTPARAM, nsIDOMElement * *_retval NS_OUTPARAM) = 0;
59 :
60 : /* void moveCaretToFocus (in nsIDOMWindow aWindow); */
61 : NS_SCRIPTABLE NS_IMETHOD MoveCaretToFocus(nsIDOMWindow *aWindow) = 0;
62 :
63 : /* boolean elementIsFocusable (in nsIDOMElement aElement, in unsigned long aFlags); */
64 : NS_SCRIPTABLE NS_IMETHOD ElementIsFocusable(nsIDOMElement *aElement, PRUint32 aFlags, bool *_retval NS_OUTPARAM) = 0;
65 :
66 : enum {
67 : FLAG_RAISE = 1U,
68 : FLAG_NOSCROLL = 2U,
69 : FLAG_NOSWITCHFRAME = 4U,
70 : FLAG_NOPARENTFRAME = 8U,
71 : FLAG_BYMOUSE = 4096U,
72 : FLAG_BYKEY = 8192U,
73 : FLAG_BYMOVEFOCUS = 16384U,
74 : FLAG_SHOWRING = 1048576U,
75 : MOVEFOCUS_FORWARD = 1U,
76 : MOVEFOCUS_BACKWARD = 2U,
77 : MOVEFOCUS_FORWARDDOC = 3U,
78 : MOVEFOCUS_BACKWARDDOC = 4U,
79 : MOVEFOCUS_FIRST = 5U,
80 : MOVEFOCUS_LAST = 6U,
81 : MOVEFOCUS_ROOT = 7U,
82 : MOVEFOCUS_CARET = 8U
83 : };
84 :
85 : /* [noscript] void windowRaised (in nsIDOMWindow aWindow); */
86 : NS_IMETHOD WindowRaised(nsIDOMWindow *aWindow) = 0;
87 :
88 : /* [noscript] void windowLowered (in nsIDOMWindow aWindow); */
89 : NS_IMETHOD WindowLowered(nsIDOMWindow *aWindow) = 0;
90 :
91 : /* [noscript] void windowShown (in nsIDOMWindow aWindow, in boolean aNeedsFocus); */
92 : NS_IMETHOD WindowShown(nsIDOMWindow *aWindow, bool aNeedsFocus) = 0;
93 :
94 : /* [noscript] void windowHidden (in nsIDOMWindow aWindow); */
95 : NS_IMETHOD WindowHidden(nsIDOMWindow *aWindow) = 0;
96 :
97 : /* [noscript] void fireDelayedEvents (in nsIDocument aDocument); */
98 : NS_IMETHOD FireDelayedEvents(nsIDocument *aDocument) = 0;
99 :
100 : /* [noscript] void focusPlugin (in nsIContent aPlugin); */
101 : NS_IMETHOD FocusPlugin(nsIContent *aPlugin) = 0;
102 :
103 : };
104 :
105 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIFocusManager, NS_IFOCUSMANAGER_IID)
106 :
107 : /* Use this macro when declaring classes that implement this interface. */
108 : #define NS_DECL_NSIFOCUSMANAGER \
109 : NS_SCRIPTABLE NS_IMETHOD GetActiveWindow(nsIDOMWindow * *aActiveWindow); \
110 : NS_SCRIPTABLE NS_IMETHOD SetActiveWindow(nsIDOMWindow *aActiveWindow); \
111 : NS_SCRIPTABLE NS_IMETHOD GetFocusedWindow(nsIDOMWindow * *aFocusedWindow); \
112 : NS_SCRIPTABLE NS_IMETHOD SetFocusedWindow(nsIDOMWindow *aFocusedWindow); \
113 : NS_SCRIPTABLE NS_IMETHOD GetFocusedElement(nsIDOMElement * *aFocusedElement); \
114 : NS_SCRIPTABLE NS_IMETHOD GetLastFocusMethod(nsIDOMWindow *window, PRUint32 *_retval NS_OUTPARAM); \
115 : NS_SCRIPTABLE NS_IMETHOD SetFocus(nsIDOMElement *aElement, PRUint32 aFlags); \
116 : NS_SCRIPTABLE NS_IMETHOD MoveFocus(nsIDOMWindow *aWindow, nsIDOMElement *aStartElement, PRUint32 aType, PRUint32 aFlags, nsIDOMElement * *_retval NS_OUTPARAM); \
117 : NS_SCRIPTABLE NS_IMETHOD ClearFocus(nsIDOMWindow *aWindow); \
118 : NS_SCRIPTABLE NS_IMETHOD GetFocusedElementForWindow(nsIDOMWindow *aWindow, bool aDeep, nsIDOMWindow * *aFocusedWindow NS_OUTPARAM, nsIDOMElement * *_retval NS_OUTPARAM); \
119 : NS_SCRIPTABLE NS_IMETHOD MoveCaretToFocus(nsIDOMWindow *aWindow); \
120 : NS_SCRIPTABLE NS_IMETHOD ElementIsFocusable(nsIDOMElement *aElement, PRUint32 aFlags, bool *_retval NS_OUTPARAM); \
121 : NS_IMETHOD WindowRaised(nsIDOMWindow *aWindow); \
122 : NS_IMETHOD WindowLowered(nsIDOMWindow *aWindow); \
123 : NS_IMETHOD WindowShown(nsIDOMWindow *aWindow, bool aNeedsFocus); \
124 : NS_IMETHOD WindowHidden(nsIDOMWindow *aWindow); \
125 : NS_IMETHOD FireDelayedEvents(nsIDocument *aDocument); \
126 : NS_IMETHOD FocusPlugin(nsIContent *aPlugin);
127 :
128 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
129 : #define NS_FORWARD_NSIFOCUSMANAGER(_to) \
130 : NS_SCRIPTABLE NS_IMETHOD GetActiveWindow(nsIDOMWindow * *aActiveWindow) { return _to GetActiveWindow(aActiveWindow); } \
131 : NS_SCRIPTABLE NS_IMETHOD SetActiveWindow(nsIDOMWindow *aActiveWindow) { return _to SetActiveWindow(aActiveWindow); } \
132 : NS_SCRIPTABLE NS_IMETHOD GetFocusedWindow(nsIDOMWindow * *aFocusedWindow) { return _to GetFocusedWindow(aFocusedWindow); } \
133 : NS_SCRIPTABLE NS_IMETHOD SetFocusedWindow(nsIDOMWindow *aFocusedWindow) { return _to SetFocusedWindow(aFocusedWindow); } \
134 : NS_SCRIPTABLE NS_IMETHOD GetFocusedElement(nsIDOMElement * *aFocusedElement) { return _to GetFocusedElement(aFocusedElement); } \
135 : NS_SCRIPTABLE NS_IMETHOD GetLastFocusMethod(nsIDOMWindow *window, PRUint32 *_retval NS_OUTPARAM) { return _to GetLastFocusMethod(window, _retval); } \
136 : NS_SCRIPTABLE NS_IMETHOD SetFocus(nsIDOMElement *aElement, PRUint32 aFlags) { return _to SetFocus(aElement, aFlags); } \
137 : NS_SCRIPTABLE NS_IMETHOD MoveFocus(nsIDOMWindow *aWindow, nsIDOMElement *aStartElement, PRUint32 aType, PRUint32 aFlags, nsIDOMElement * *_retval NS_OUTPARAM) { return _to MoveFocus(aWindow, aStartElement, aType, aFlags, _retval); } \
138 : NS_SCRIPTABLE NS_IMETHOD ClearFocus(nsIDOMWindow *aWindow) { return _to ClearFocus(aWindow); } \
139 : NS_SCRIPTABLE NS_IMETHOD GetFocusedElementForWindow(nsIDOMWindow *aWindow, bool aDeep, nsIDOMWindow * *aFocusedWindow NS_OUTPARAM, nsIDOMElement * *_retval NS_OUTPARAM) { return _to GetFocusedElementForWindow(aWindow, aDeep, aFocusedWindow, _retval); } \
140 : NS_SCRIPTABLE NS_IMETHOD MoveCaretToFocus(nsIDOMWindow *aWindow) { return _to MoveCaretToFocus(aWindow); } \
141 : NS_SCRIPTABLE NS_IMETHOD ElementIsFocusable(nsIDOMElement *aElement, PRUint32 aFlags, bool *_retval NS_OUTPARAM) { return _to ElementIsFocusable(aElement, aFlags, _retval); } \
142 : NS_IMETHOD WindowRaised(nsIDOMWindow *aWindow) { return _to WindowRaised(aWindow); } \
143 : NS_IMETHOD WindowLowered(nsIDOMWindow *aWindow) { return _to WindowLowered(aWindow); } \
144 : NS_IMETHOD WindowShown(nsIDOMWindow *aWindow, bool aNeedsFocus) { return _to WindowShown(aWindow, aNeedsFocus); } \
145 : NS_IMETHOD WindowHidden(nsIDOMWindow *aWindow) { return _to WindowHidden(aWindow); } \
146 : NS_IMETHOD FireDelayedEvents(nsIDocument *aDocument) { return _to FireDelayedEvents(aDocument); } \
147 : NS_IMETHOD FocusPlugin(nsIContent *aPlugin) { return _to FocusPlugin(aPlugin); }
148 :
149 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
150 : #define NS_FORWARD_SAFE_NSIFOCUSMANAGER(_to) \
151 : NS_SCRIPTABLE NS_IMETHOD GetActiveWindow(nsIDOMWindow * *aActiveWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetActiveWindow(aActiveWindow); } \
152 : NS_SCRIPTABLE NS_IMETHOD SetActiveWindow(nsIDOMWindow *aActiveWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetActiveWindow(aActiveWindow); } \
153 : NS_SCRIPTABLE NS_IMETHOD GetFocusedWindow(nsIDOMWindow * *aFocusedWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFocusedWindow(aFocusedWindow); } \
154 : NS_SCRIPTABLE NS_IMETHOD SetFocusedWindow(nsIDOMWindow *aFocusedWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFocusedWindow(aFocusedWindow); } \
155 : NS_SCRIPTABLE NS_IMETHOD GetFocusedElement(nsIDOMElement * *aFocusedElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFocusedElement(aFocusedElement); } \
156 : NS_SCRIPTABLE NS_IMETHOD GetLastFocusMethod(nsIDOMWindow *window, PRUint32 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastFocusMethod(window, _retval); } \
157 : NS_SCRIPTABLE NS_IMETHOD SetFocus(nsIDOMElement *aElement, PRUint32 aFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFocus(aElement, aFlags); } \
158 : NS_SCRIPTABLE NS_IMETHOD MoveFocus(nsIDOMWindow *aWindow, nsIDOMElement *aStartElement, PRUint32 aType, PRUint32 aFlags, nsIDOMElement * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->MoveFocus(aWindow, aStartElement, aType, aFlags, _retval); } \
159 : NS_SCRIPTABLE NS_IMETHOD ClearFocus(nsIDOMWindow *aWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearFocus(aWindow); } \
160 : NS_SCRIPTABLE NS_IMETHOD GetFocusedElementForWindow(nsIDOMWindow *aWindow, bool aDeep, nsIDOMWindow * *aFocusedWindow NS_OUTPARAM, nsIDOMElement * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFocusedElementForWindow(aWindow, aDeep, aFocusedWindow, _retval); } \
161 : NS_SCRIPTABLE NS_IMETHOD MoveCaretToFocus(nsIDOMWindow *aWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->MoveCaretToFocus(aWindow); } \
162 : NS_SCRIPTABLE NS_IMETHOD ElementIsFocusable(nsIDOMElement *aElement, PRUint32 aFlags, bool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->ElementIsFocusable(aElement, aFlags, _retval); } \
163 : NS_IMETHOD WindowRaised(nsIDOMWindow *aWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->WindowRaised(aWindow); } \
164 : NS_IMETHOD WindowLowered(nsIDOMWindow *aWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->WindowLowered(aWindow); } \
165 : NS_IMETHOD WindowShown(nsIDOMWindow *aWindow, bool aNeedsFocus) { return !_to ? NS_ERROR_NULL_POINTER : _to->WindowShown(aWindow, aNeedsFocus); } \
166 : NS_IMETHOD WindowHidden(nsIDOMWindow *aWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->WindowHidden(aWindow); } \
167 : NS_IMETHOD FireDelayedEvents(nsIDocument *aDocument) { return !_to ? NS_ERROR_NULL_POINTER : _to->FireDelayedEvents(aDocument); } \
168 : NS_IMETHOD FocusPlugin(nsIContent *aPlugin) { return !_to ? NS_ERROR_NULL_POINTER : _to->FocusPlugin(aPlugin); }
169 :
170 : #if 0
171 : /* Use the code below as a template for the implementation class for this interface. */
172 :
173 : /* Header file */
174 : class nsFocusManager : public nsIFocusManager
175 : {
176 : public:
177 : NS_DECL_ISUPPORTS
178 : NS_DECL_NSIFOCUSMANAGER
179 :
180 : nsFocusManager();
181 :
182 : private:
183 : ~nsFocusManager();
184 :
185 : protected:
186 : /* additional members */
187 : };
188 :
189 : /* Implementation file */
190 : NS_IMPL_ISUPPORTS1(nsFocusManager, nsIFocusManager)
191 :
192 : nsFocusManager::nsFocusManager()
193 : {
194 : /* member initializers and constructor code */
195 : }
196 :
197 : nsFocusManager::~nsFocusManager()
198 : {
199 : /* destructor code */
200 : }
201 :
202 : /* attribute nsIDOMWindow activeWindow; */
203 : NS_IMETHODIMP nsFocusManager::GetActiveWindow(nsIDOMWindow * *aActiveWindow)
204 : {
205 : return NS_ERROR_NOT_IMPLEMENTED;
206 : }
207 : NS_IMETHODIMP nsFocusManager::SetActiveWindow(nsIDOMWindow *aActiveWindow)
208 : {
209 : return NS_ERROR_NOT_IMPLEMENTED;
210 : }
211 :
212 : /* attribute nsIDOMWindow focusedWindow; */
213 : NS_IMETHODIMP nsFocusManager::GetFocusedWindow(nsIDOMWindow * *aFocusedWindow)
214 : {
215 : return NS_ERROR_NOT_IMPLEMENTED;
216 : }
217 : NS_IMETHODIMP nsFocusManager::SetFocusedWindow(nsIDOMWindow *aFocusedWindow)
218 : {
219 : return NS_ERROR_NOT_IMPLEMENTED;
220 : }
221 :
222 : /* readonly attribute nsIDOMElement focusedElement; */
223 : NS_IMETHODIMP nsFocusManager::GetFocusedElement(nsIDOMElement * *aFocusedElement)
224 : {
225 : return NS_ERROR_NOT_IMPLEMENTED;
226 : }
227 :
228 : /* PRUint32 getLastFocusMethod (in nsIDOMWindow window); */
229 : NS_IMETHODIMP nsFocusManager::GetLastFocusMethod(nsIDOMWindow *window, PRUint32 *_retval NS_OUTPARAM)
230 : {
231 : return NS_ERROR_NOT_IMPLEMENTED;
232 : }
233 :
234 : /* void setFocus (in nsIDOMElement aElement, in unsigned long aFlags); */
235 : NS_IMETHODIMP nsFocusManager::SetFocus(nsIDOMElement *aElement, PRUint32 aFlags)
236 : {
237 : return NS_ERROR_NOT_IMPLEMENTED;
238 : }
239 :
240 : /* nsIDOMElement moveFocus (in nsIDOMWindow aWindow, in nsIDOMElement aStartElement, in unsigned long aType, in unsigned long aFlags); */
241 : NS_IMETHODIMP nsFocusManager::MoveFocus(nsIDOMWindow *aWindow, nsIDOMElement *aStartElement, PRUint32 aType, PRUint32 aFlags, nsIDOMElement * *_retval NS_OUTPARAM)
242 : {
243 : return NS_ERROR_NOT_IMPLEMENTED;
244 : }
245 :
246 : /* void clearFocus (in nsIDOMWindow aWindow); */
247 : NS_IMETHODIMP nsFocusManager::ClearFocus(nsIDOMWindow *aWindow)
248 : {
249 : return NS_ERROR_NOT_IMPLEMENTED;
250 : }
251 :
252 : /* nsIDOMElement getFocusedElementForWindow (in nsIDOMWindow aWindow, in boolean aDeep, out nsIDOMWindow aFocusedWindow); */
253 : NS_IMETHODIMP nsFocusManager::GetFocusedElementForWindow(nsIDOMWindow *aWindow, bool aDeep, nsIDOMWindow * *aFocusedWindow NS_OUTPARAM, nsIDOMElement * *_retval NS_OUTPARAM)
254 : {
255 : return NS_ERROR_NOT_IMPLEMENTED;
256 : }
257 :
258 : /* void moveCaretToFocus (in nsIDOMWindow aWindow); */
259 : NS_IMETHODIMP nsFocusManager::MoveCaretToFocus(nsIDOMWindow *aWindow)
260 : {
261 : return NS_ERROR_NOT_IMPLEMENTED;
262 : }
263 :
264 : /* boolean elementIsFocusable (in nsIDOMElement aElement, in unsigned long aFlags); */
265 : NS_IMETHODIMP nsFocusManager::ElementIsFocusable(nsIDOMElement *aElement, PRUint32 aFlags, bool *_retval NS_OUTPARAM)
266 : {
267 : return NS_ERROR_NOT_IMPLEMENTED;
268 : }
269 :
270 : /* [noscript] void windowRaised (in nsIDOMWindow aWindow); */
271 : NS_IMETHODIMP nsFocusManager::WindowRaised(nsIDOMWindow *aWindow)
272 : {
273 : return NS_ERROR_NOT_IMPLEMENTED;
274 : }
275 :
276 : /* [noscript] void windowLowered (in nsIDOMWindow aWindow); */
277 : NS_IMETHODIMP nsFocusManager::WindowLowered(nsIDOMWindow *aWindow)
278 : {
279 : return NS_ERROR_NOT_IMPLEMENTED;
280 : }
281 :
282 : /* [noscript] void windowShown (in nsIDOMWindow aWindow, in boolean aNeedsFocus); */
283 : NS_IMETHODIMP nsFocusManager::WindowShown(nsIDOMWindow *aWindow, bool aNeedsFocus)
284 : {
285 : return NS_ERROR_NOT_IMPLEMENTED;
286 : }
287 :
288 : /* [noscript] void windowHidden (in nsIDOMWindow aWindow); */
289 : NS_IMETHODIMP nsFocusManager::WindowHidden(nsIDOMWindow *aWindow)
290 : {
291 : return NS_ERROR_NOT_IMPLEMENTED;
292 : }
293 :
294 : /* [noscript] void fireDelayedEvents (in nsIDocument aDocument); */
295 : NS_IMETHODIMP nsFocusManager::FireDelayedEvents(nsIDocument *aDocument)
296 : {
297 : return NS_ERROR_NOT_IMPLEMENTED;
298 : }
299 :
300 : /* [noscript] void focusPlugin (in nsIContent aPlugin); */
301 : NS_IMETHODIMP nsFocusManager::FocusPlugin(nsIContent *aPlugin)
302 : {
303 : return NS_ERROR_NOT_IMPLEMENTED;
304 : }
305 :
306 : /* End of implementation class template. */
307 : #endif
308 :
309 :
310 : #endif /* __gen_nsIFocusManager_h__ */
|