OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/builds/tinderbox/XR-Mozilla1.8.0
-Release/WINNT_5.2_Depend/mozilla/embedding/browser/webBrowser/nsIWebBrowserFocu
s.idl |
| 3 */ |
| 4 |
| 5 #ifndef __gen_nsIWebBrowserFocus_h__ |
| 6 #define __gen_nsIWebBrowserFocus_h__ |
| 7 |
| 8 |
| 9 #ifndef __gen_nsISupports_h__ |
| 10 #include "nsISupports.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 nsIDOMWindow; /* forward declaration */ |
| 18 |
| 19 class nsIDOMElement; /* forward declaration */ |
| 20 |
| 21 |
| 22 /* starting interface: nsIWebBrowserFocus */ |
| 23 #define NS_IWEBBROWSERFOCUS_IID_STR "9c5d3c58-1dd1-11b2-a1c9-f3699284657a" |
| 24 |
| 25 #define NS_IWEBBROWSERFOCUS_IID \ |
| 26 {0x9c5d3c58, 0x1dd1, 0x11b2, \ |
| 27 { 0xa1, 0xc9, 0xf3, 0x69, 0x92, 0x84, 0x65, 0x7a }} |
| 28 |
| 29 /** |
| 30 * nsIWebBrowserFocus |
| 31 * Interface that embedders use for controlling and interacting |
| 32 * with the browser focus management. The embedded browser can be focused by |
| 33 * clicking in it or tabbing into it. If the browser is currently focused and |
| 34 * the embedding application's top level window is disabled, deactivate() must |
| 35 * be called, and activate() called again when the top level window is |
| 36 * reactivated for the browser's focus memory to work correctly. |
| 37 * |
| 38 * @status FROZEN |
| 39 */ |
| 40 class NS_NO_VTABLE nsIWebBrowserFocus : public nsISupports { |
| 41 public: |
| 42 |
| 43 NS_DEFINE_STATIC_IID_ACCESSOR(NS_IWEBBROWSERFOCUS_IID) |
| 44 |
| 45 /** |
| 46 * MANDATORY |
| 47 * activate() is a mandatory call that must be made to the browser |
| 48 * when the embedding application's window is activated *and* the |
| 49 * browser area was the last thing in focus. This method can also be called |
| 50 * if the embedding application wishes to give the browser area focus, |
| 51 * without affecting the currently focused element within the browser. |
| 52 * |
| 53 * @note |
| 54 * If you fail to make this call, mozilla focus memory will not work |
| 55 * correctly. |
| 56 */ |
| 57 /* void activate (); */ |
| 58 NS_IMETHOD Activate(void) = 0; |
| 59 |
| 60 /** |
| 61 * MANDATORY |
| 62 * deactivate() is a mandatory call that must be made to the browser |
| 63 * when the embedding application's window is deactivated *and* the |
| 64 * browser area was the last thing in focus. On non-windows platforms, |
| 65 * deactivate() should also be called when focus moves from the browser |
| 66 * to the embedding chrome. |
| 67 * |
| 68 * @note |
| 69 * If you fail to make this call, mozilla focus memory will not work |
| 70 * correctly. |
| 71 */ |
| 72 /* void deactivate (); */ |
| 73 NS_IMETHOD Deactivate(void) = 0; |
| 74 |
| 75 /** |
| 76 * Give the first element focus within mozilla |
| 77 * (i.e. TAB was pressed and focus should enter mozilla) |
| 78 */ |
| 79 /* void setFocusAtFirstElement (); */ |
| 80 NS_IMETHOD SetFocusAtFirstElement(void) = 0; |
| 81 |
| 82 /** |
| 83 * Give the last element focus within mozilla |
| 84 * (i.e. SHIFT-TAB was pressed and focus should enter mozilla) |
| 85 */ |
| 86 /* void setFocusAtLastElement (); */ |
| 87 NS_IMETHOD SetFocusAtLastElement(void) = 0; |
| 88 |
| 89 /** |
| 90 * The currently focused nsDOMWindow when the browser is active, |
| 91 * or the last focused nsDOMWindow when the browser is inactive. |
| 92 */ |
| 93 /* attribute nsIDOMWindow focusedWindow; */ |
| 94 NS_IMETHOD GetFocusedWindow(nsIDOMWindow * *aFocusedWindow) = 0; |
| 95 NS_IMETHOD SetFocusedWindow(nsIDOMWindow * aFocusedWindow) = 0; |
| 96 |
| 97 /** |
| 98 * The currently focused nsDOMElement when the browser is active, |
| 99 * or the last focused nsDOMElement when the browser is inactive. |
| 100 */ |
| 101 /* attribute nsIDOMElement focusedElement; */ |
| 102 NS_IMETHOD GetFocusedElement(nsIDOMElement * *aFocusedElement) = 0; |
| 103 NS_IMETHOD SetFocusedElement(nsIDOMElement * aFocusedElement) = 0; |
| 104 |
| 105 }; |
| 106 |
| 107 /* Use this macro when declaring classes that implement this interface. */ |
| 108 #define NS_DECL_NSIWEBBROWSERFOCUS \ |
| 109 NS_IMETHOD Activate(void); \ |
| 110 NS_IMETHOD Deactivate(void); \ |
| 111 NS_IMETHOD SetFocusAtFirstElement(void); \ |
| 112 NS_IMETHOD SetFocusAtLastElement(void); \ |
| 113 NS_IMETHOD GetFocusedWindow(nsIDOMWindow * *aFocusedWindow); \ |
| 114 NS_IMETHOD SetFocusedWindow(nsIDOMWindow * aFocusedWindow); \ |
| 115 NS_IMETHOD GetFocusedElement(nsIDOMElement * *aFocusedElement); \ |
| 116 NS_IMETHOD SetFocusedElement(nsIDOMElement * aFocusedElement); |
| 117 |
| 118 /* Use this macro to declare functions that forward the behavior of this interfa
ce to another object. */ |
| 119 #define NS_FORWARD_NSIWEBBROWSERFOCUS(_to) \ |
| 120 NS_IMETHOD Activate(void) { return _to Activate(); } \ |
| 121 NS_IMETHOD Deactivate(void) { return _to Deactivate(); } \ |
| 122 NS_IMETHOD SetFocusAtFirstElement(void) { return _to SetFocusAtFirstElement();
} \ |
| 123 NS_IMETHOD SetFocusAtLastElement(void) { return _to SetFocusAtLastElement(); }
\ |
| 124 NS_IMETHOD GetFocusedWindow(nsIDOMWindow * *aFocusedWindow) { return _to GetFo
cusedWindow(aFocusedWindow); } \ |
| 125 NS_IMETHOD SetFocusedWindow(nsIDOMWindow * aFocusedWindow) { return _to SetFoc
usedWindow(aFocusedWindow); } \ |
| 126 NS_IMETHOD GetFocusedElement(nsIDOMElement * *aFocusedElement) { return _to Ge
tFocusedElement(aFocusedElement); } \ |
| 127 NS_IMETHOD SetFocusedElement(nsIDOMElement * aFocusedElement) { return _to Set
FocusedElement(aFocusedElement); } |
| 128 |
| 129 /* Use this macro to declare functions that forward the behavior of this interfa
ce to another object in a safe way. */ |
| 130 #define NS_FORWARD_SAFE_NSIWEBBROWSERFOCUS(_to) \ |
| 131 NS_IMETHOD Activate(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Activat
e(); } \ |
| 132 NS_IMETHOD Deactivate(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Deact
ivate(); } \ |
| 133 NS_IMETHOD SetFocusAtFirstElement(void) { return !_to ? NS_ERROR_NULL_POINTER
: _to->SetFocusAtFirstElement(); } \ |
| 134 NS_IMETHOD SetFocusAtLastElement(void) { return !_to ? NS_ERROR_NULL_POINTER :
_to->SetFocusAtLastElement(); } \ |
| 135 NS_IMETHOD GetFocusedWindow(nsIDOMWindow * *aFocusedWindow) { return !_to ? NS
_ERROR_NULL_POINTER : _to->GetFocusedWindow(aFocusedWindow); } \ |
| 136 NS_IMETHOD SetFocusedWindow(nsIDOMWindow * aFocusedWindow) { return !_to ? NS_
ERROR_NULL_POINTER : _to->SetFocusedWindow(aFocusedWindow); } \ |
| 137 NS_IMETHOD GetFocusedElement(nsIDOMElement * *aFocusedElement) { return !_to ?
NS_ERROR_NULL_POINTER : _to->GetFocusedElement(aFocusedElement); } \ |
| 138 NS_IMETHOD SetFocusedElement(nsIDOMElement * aFocusedElement) { return !_to ?
NS_ERROR_NULL_POINTER : _to->SetFocusedElement(aFocusedElement); } |
| 139 |
| 140 #if 0 |
| 141 /* Use the code below as a template for the implementation class for this interf
ace. */ |
| 142 |
| 143 /* Header file */ |
| 144 class nsWebBrowserFocus : public nsIWebBrowserFocus |
| 145 { |
| 146 public: |
| 147 NS_DECL_ISUPPORTS |
| 148 NS_DECL_NSIWEBBROWSERFOCUS |
| 149 |
| 150 nsWebBrowserFocus(); |
| 151 |
| 152 private: |
| 153 ~nsWebBrowserFocus(); |
| 154 |
| 155 protected: |
| 156 /* additional members */ |
| 157 }; |
| 158 |
| 159 /* Implementation file */ |
| 160 NS_IMPL_ISUPPORTS1(nsWebBrowserFocus, nsIWebBrowserFocus) |
| 161 |
| 162 nsWebBrowserFocus::nsWebBrowserFocus() |
| 163 { |
| 164 /* member initializers and constructor code */ |
| 165 } |
| 166 |
| 167 nsWebBrowserFocus::~nsWebBrowserFocus() |
| 168 { |
| 169 /* destructor code */ |
| 170 } |
| 171 |
| 172 /* void activate (); */ |
| 173 NS_IMETHODIMP nsWebBrowserFocus::Activate() |
| 174 { |
| 175 return NS_ERROR_NOT_IMPLEMENTED; |
| 176 } |
| 177 |
| 178 /* void deactivate (); */ |
| 179 NS_IMETHODIMP nsWebBrowserFocus::Deactivate() |
| 180 { |
| 181 return NS_ERROR_NOT_IMPLEMENTED; |
| 182 } |
| 183 |
| 184 /* void setFocusAtFirstElement (); */ |
| 185 NS_IMETHODIMP nsWebBrowserFocus::SetFocusAtFirstElement() |
| 186 { |
| 187 return NS_ERROR_NOT_IMPLEMENTED; |
| 188 } |
| 189 |
| 190 /* void setFocusAtLastElement (); */ |
| 191 NS_IMETHODIMP nsWebBrowserFocus::SetFocusAtLastElement() |
| 192 { |
| 193 return NS_ERROR_NOT_IMPLEMENTED; |
| 194 } |
| 195 |
| 196 /* attribute nsIDOMWindow focusedWindow; */ |
| 197 NS_IMETHODIMP nsWebBrowserFocus::GetFocusedWindow(nsIDOMWindow * *aFocusedWindow
) |
| 198 { |
| 199 return NS_ERROR_NOT_IMPLEMENTED; |
| 200 } |
| 201 NS_IMETHODIMP nsWebBrowserFocus::SetFocusedWindow(nsIDOMWindow * aFocusedWindow) |
| 202 { |
| 203 return NS_ERROR_NOT_IMPLEMENTED; |
| 204 } |
| 205 |
| 206 /* attribute nsIDOMElement focusedElement; */ |
| 207 NS_IMETHODIMP nsWebBrowserFocus::GetFocusedElement(nsIDOMElement * *aFocusedElem
ent) |
| 208 { |
| 209 return NS_ERROR_NOT_IMPLEMENTED; |
| 210 } |
| 211 NS_IMETHODIMP nsWebBrowserFocus::SetFocusedElement(nsIDOMElement * aFocusedEleme
nt) |
| 212 { |
| 213 return NS_ERROR_NOT_IMPLEMENTED; |
| 214 } |
| 215 |
| 216 /* End of implementation class template. */ |
| 217 #endif |
| 218 |
| 219 |
| 220 #endif /* __gen_nsIWebBrowserFocus_h__ */ |
OLD | NEW |