PageRenderTime 21ms CodeModel.GetById 10ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/gecko_api/include/nsIWebBrowserFocus.h

http://firefox-mac-pdf.googlecode.com/
C++ Header | 222 lines | 106 code | 38 blank | 78 comment | 0 complexity | 8b25453b92da7dbdd8537e6f4eea53e5 MD5 | raw file
  1/*
  2 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/embedding/browser/webBrowser/nsIWebBrowserFocus.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
 17class nsIDOMWindow; /* forward declaration */
 18
 19class 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 */
 40class NS_NO_VTABLE NS_SCRIPTABLE nsIWebBrowserFocus : public nsISupports {
 41 public: 
 42
 43  NS_DECLARE_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_SCRIPTABLE 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_SCRIPTABLE 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_SCRIPTABLE 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_SCRIPTABLE 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_SCRIPTABLE NS_IMETHOD GetFocusedWindow(nsIDOMWindow * *aFocusedWindow) = 0;
 95  NS_SCRIPTABLE 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_SCRIPTABLE NS_IMETHOD GetFocusedElement(nsIDOMElement * *aFocusedElement) = 0;
103  NS_SCRIPTABLE NS_IMETHOD SetFocusedElement(nsIDOMElement * aFocusedElement) = 0;
104
105};
106
107  NS_DEFINE_STATIC_IID_ACCESSOR(nsIWebBrowserFocus, NS_IWEBBROWSERFOCUS_IID)
108
109/* Use this macro when declaring classes that implement this interface. */
110#define NS_DECL_NSIWEBBROWSERFOCUS \
111  NS_SCRIPTABLE NS_IMETHOD Activate(void); \
112  NS_SCRIPTABLE NS_IMETHOD Deactivate(void); \
113  NS_SCRIPTABLE NS_IMETHOD SetFocusAtFirstElement(void); \
114  NS_SCRIPTABLE NS_IMETHOD SetFocusAtLastElement(void); \
115  NS_SCRIPTABLE NS_IMETHOD GetFocusedWindow(nsIDOMWindow * *aFocusedWindow); \
116  NS_SCRIPTABLE NS_IMETHOD SetFocusedWindow(nsIDOMWindow * aFocusedWindow); \
117  NS_SCRIPTABLE NS_IMETHOD GetFocusedElement(nsIDOMElement * *aFocusedElement); \
118  NS_SCRIPTABLE NS_IMETHOD SetFocusedElement(nsIDOMElement * aFocusedElement); 
119
120/* Use this macro to declare functions that forward the behavior of this interface to another object. */
121#define NS_FORWARD_NSIWEBBROWSERFOCUS(_to) \
122  NS_SCRIPTABLE NS_IMETHOD Activate(void) { return _to Activate(); } \
123  NS_SCRIPTABLE NS_IMETHOD Deactivate(void) { return _to Deactivate(); } \
124  NS_SCRIPTABLE NS_IMETHOD SetFocusAtFirstElement(void) { return _to SetFocusAtFirstElement(); } \
125  NS_SCRIPTABLE NS_IMETHOD SetFocusAtLastElement(void) { return _to SetFocusAtLastElement(); } \
126  NS_SCRIPTABLE NS_IMETHOD GetFocusedWindow(nsIDOMWindow * *aFocusedWindow) { return _to GetFocusedWindow(aFocusedWindow); } \
127  NS_SCRIPTABLE NS_IMETHOD SetFocusedWindow(nsIDOMWindow * aFocusedWindow) { return _to SetFocusedWindow(aFocusedWindow); } \
128  NS_SCRIPTABLE NS_IMETHOD GetFocusedElement(nsIDOMElement * *aFocusedElement) { return _to GetFocusedElement(aFocusedElement); } \
129  NS_SCRIPTABLE NS_IMETHOD SetFocusedElement(nsIDOMElement * aFocusedElement) { return _to SetFocusedElement(aFocusedElement); } 
130
131/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
132#define NS_FORWARD_SAFE_NSIWEBBROWSERFOCUS(_to) \
133  NS_SCRIPTABLE NS_IMETHOD Activate(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Activate(); } \
134  NS_SCRIPTABLE NS_IMETHOD Deactivate(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Deactivate(); } \
135  NS_SCRIPTABLE NS_IMETHOD SetFocusAtFirstElement(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFocusAtFirstElement(); } \
136  NS_SCRIPTABLE NS_IMETHOD SetFocusAtLastElement(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFocusAtLastElement(); } \
137  NS_SCRIPTABLE NS_IMETHOD GetFocusedWindow(nsIDOMWindow * *aFocusedWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFocusedWindow(aFocusedWindow); } \
138  NS_SCRIPTABLE NS_IMETHOD SetFocusedWindow(nsIDOMWindow * aFocusedWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFocusedWindow(aFocusedWindow); } \
139  NS_SCRIPTABLE NS_IMETHOD GetFocusedElement(nsIDOMElement * *aFocusedElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFocusedElement(aFocusedElement); } \
140  NS_SCRIPTABLE NS_IMETHOD SetFocusedElement(nsIDOMElement * aFocusedElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFocusedElement(aFocusedElement); } 
141
142#if 0
143/* Use the code below as a template for the implementation class for this interface. */
144
145/* Header file */
146class nsWebBrowserFocus : public nsIWebBrowserFocus
147{
148public:
149  NS_DECL_ISUPPORTS
150  NS_DECL_NSIWEBBROWSERFOCUS
151
152  nsWebBrowserFocus();
153
154private:
155  ~nsWebBrowserFocus();
156
157protected:
158  /* additional members */
159};
160
161/* Implementation file */
162NS_IMPL_ISUPPORTS1(nsWebBrowserFocus, nsIWebBrowserFocus)
163
164nsWebBrowserFocus::nsWebBrowserFocus()
165{
166  /* member initializers and constructor code */
167}
168
169nsWebBrowserFocus::~nsWebBrowserFocus()
170{
171  /* destructor code */
172}
173
174/* void activate (); */
175NS_IMETHODIMP nsWebBrowserFocus::Activate()
176{
177    return NS_ERROR_NOT_IMPLEMENTED;
178}
179
180/* void deactivate (); */
181NS_IMETHODIMP nsWebBrowserFocus::Deactivate()
182{
183    return NS_ERROR_NOT_IMPLEMENTED;
184}
185
186/* void setFocusAtFirstElement (); */
187NS_IMETHODIMP nsWebBrowserFocus::SetFocusAtFirstElement()
188{
189    return NS_ERROR_NOT_IMPLEMENTED;
190}
191
192/* void setFocusAtLastElement (); */
193NS_IMETHODIMP nsWebBrowserFocus::SetFocusAtLastElement()
194{
195    return NS_ERROR_NOT_IMPLEMENTED;
196}
197
198/* attribute nsIDOMWindow focusedWindow; */
199NS_IMETHODIMP nsWebBrowserFocus::GetFocusedWindow(nsIDOMWindow * *aFocusedWindow)
200{
201    return NS_ERROR_NOT_IMPLEMENTED;
202}
203NS_IMETHODIMP nsWebBrowserFocus::SetFocusedWindow(nsIDOMWindow * aFocusedWindow)
204{
205    return NS_ERROR_NOT_IMPLEMENTED;
206}
207
208/* attribute nsIDOMElement focusedElement; */
209NS_IMETHODIMP nsWebBrowserFocus::GetFocusedElement(nsIDOMElement * *aFocusedElement)
210{
211    return NS_ERROR_NOT_IMPLEMENTED;
212}
213NS_IMETHODIMP nsWebBrowserFocus::SetFocusedElement(nsIDOMElement * aFocusedElement)
214{
215    return NS_ERROR_NOT_IMPLEMENTED;
216}
217
218/* End of implementation class template. */
219#endif
220
221
222#endif /* __gen_nsIWebBrowserFocus_h__ */