PageRenderTime 35ms CodeModel.GetById 12ms RepoModel.GetById 0ms 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. #ifndef __gen_nsIWebBrowserFocus_h__
  5. #define __gen_nsIWebBrowserFocus_h__
  6. #ifndef __gen_nsISupports_h__
  7. #include "nsISupports.h"
  8. #endif
  9. /* For IDL files that don't want to include root IDL files. */
  10. #ifndef NS_NO_VTABLE
  11. #define NS_NO_VTABLE
  12. #endif
  13. class nsIDOMWindow; /* forward declaration */
  14. class nsIDOMElement; /* forward declaration */
  15. /* starting interface: nsIWebBrowserFocus */
  16. #define NS_IWEBBROWSERFOCUS_IID_STR "9c5d3c58-1dd1-11b2-a1c9-f3699284657a"
  17. #define NS_IWEBBROWSERFOCUS_IID \
  18. {0x9c5d3c58, 0x1dd1, 0x11b2, \
  19. { 0xa1, 0xc9, 0xf3, 0x69, 0x92, 0x84, 0x65, 0x7a }}
  20. /**
  21. * nsIWebBrowserFocus
  22. * Interface that embedders use for controlling and interacting
  23. * with the browser focus management. The embedded browser can be focused by
  24. * clicking in it or tabbing into it. If the browser is currently focused and
  25. * the embedding application's top level window is disabled, deactivate() must
  26. * be called, and activate() called again when the top level window is
  27. * reactivated for the browser's focus memory to work correctly.
  28. *
  29. * @status FROZEN
  30. */
  31. class NS_NO_VTABLE NS_SCRIPTABLE nsIWebBrowserFocus : public nsISupports {
  32. public:
  33. NS_DECLARE_STATIC_IID_ACCESSOR(NS_IWEBBROWSERFOCUS_IID)
  34. /**
  35. * MANDATORY
  36. * activate() is a mandatory call that must be made to the browser
  37. * when the embedding application's window is activated *and* the
  38. * browser area was the last thing in focus. This method can also be called
  39. * if the embedding application wishes to give the browser area focus,
  40. * without affecting the currently focused element within the browser.
  41. *
  42. * @note
  43. * If you fail to make this call, mozilla focus memory will not work
  44. * correctly.
  45. */
  46. /* void activate (); */
  47. NS_SCRIPTABLE NS_IMETHOD Activate(void) = 0;
  48. /**
  49. * MANDATORY
  50. * deactivate() is a mandatory call that must be made to the browser
  51. * when the embedding application's window is deactivated *and* the
  52. * browser area was the last thing in focus. On non-windows platforms,
  53. * deactivate() should also be called when focus moves from the browser
  54. * to the embedding chrome.
  55. *
  56. * @note
  57. * If you fail to make this call, mozilla focus memory will not work
  58. * correctly.
  59. */
  60. /* void deactivate (); */
  61. NS_SCRIPTABLE NS_IMETHOD Deactivate(void) = 0;
  62. /**
  63. * Give the first element focus within mozilla
  64. * (i.e. TAB was pressed and focus should enter mozilla)
  65. */
  66. /* void setFocusAtFirstElement (); */
  67. NS_SCRIPTABLE NS_IMETHOD SetFocusAtFirstElement(void) = 0;
  68. /**
  69. * Give the last element focus within mozilla
  70. * (i.e. SHIFT-TAB was pressed and focus should enter mozilla)
  71. */
  72. /* void setFocusAtLastElement (); */
  73. NS_SCRIPTABLE NS_IMETHOD SetFocusAtLastElement(void) = 0;
  74. /**
  75. * The currently focused nsDOMWindow when the browser is active,
  76. * or the last focused nsDOMWindow when the browser is inactive.
  77. */
  78. /* attribute nsIDOMWindow focusedWindow; */
  79. NS_SCRIPTABLE NS_IMETHOD GetFocusedWindow(nsIDOMWindow * *aFocusedWindow) = 0;
  80. NS_SCRIPTABLE NS_IMETHOD SetFocusedWindow(nsIDOMWindow * aFocusedWindow) = 0;
  81. /**
  82. * The currently focused nsDOMElement when the browser is active,
  83. * or the last focused nsDOMElement when the browser is inactive.
  84. */
  85. /* attribute nsIDOMElement focusedElement; */
  86. NS_SCRIPTABLE NS_IMETHOD GetFocusedElement(nsIDOMElement * *aFocusedElement) = 0;
  87. NS_SCRIPTABLE NS_IMETHOD SetFocusedElement(nsIDOMElement * aFocusedElement) = 0;
  88. };
  89. NS_DEFINE_STATIC_IID_ACCESSOR(nsIWebBrowserFocus, NS_IWEBBROWSERFOCUS_IID)
  90. /* Use this macro when declaring classes that implement this interface. */
  91. #define NS_DECL_NSIWEBBROWSERFOCUS \
  92. NS_SCRIPTABLE NS_IMETHOD Activate(void); \
  93. NS_SCRIPTABLE NS_IMETHOD Deactivate(void); \
  94. NS_SCRIPTABLE NS_IMETHOD SetFocusAtFirstElement(void); \
  95. NS_SCRIPTABLE NS_IMETHOD SetFocusAtLastElement(void); \
  96. NS_SCRIPTABLE NS_IMETHOD GetFocusedWindow(nsIDOMWindow * *aFocusedWindow); \
  97. NS_SCRIPTABLE NS_IMETHOD SetFocusedWindow(nsIDOMWindow * aFocusedWindow); \
  98. NS_SCRIPTABLE NS_IMETHOD GetFocusedElement(nsIDOMElement * *aFocusedElement); \
  99. NS_SCRIPTABLE NS_IMETHOD SetFocusedElement(nsIDOMElement * aFocusedElement);
  100. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  101. #define NS_FORWARD_NSIWEBBROWSERFOCUS(_to) \
  102. NS_SCRIPTABLE NS_IMETHOD Activate(void) { return _to Activate(); } \
  103. NS_SCRIPTABLE NS_IMETHOD Deactivate(void) { return _to Deactivate(); } \
  104. NS_SCRIPTABLE NS_IMETHOD SetFocusAtFirstElement(void) { return _to SetFocusAtFirstElement(); } \
  105. NS_SCRIPTABLE NS_IMETHOD SetFocusAtLastElement(void) { return _to SetFocusAtLastElement(); } \
  106. NS_SCRIPTABLE NS_IMETHOD GetFocusedWindow(nsIDOMWindow * *aFocusedWindow) { return _to GetFocusedWindow(aFocusedWindow); } \
  107. NS_SCRIPTABLE NS_IMETHOD SetFocusedWindow(nsIDOMWindow * aFocusedWindow) { return _to SetFocusedWindow(aFocusedWindow); } \
  108. NS_SCRIPTABLE NS_IMETHOD GetFocusedElement(nsIDOMElement * *aFocusedElement) { return _to GetFocusedElement(aFocusedElement); } \
  109. NS_SCRIPTABLE NS_IMETHOD SetFocusedElement(nsIDOMElement * aFocusedElement) { return _to SetFocusedElement(aFocusedElement); }
  110. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  111. #define NS_FORWARD_SAFE_NSIWEBBROWSERFOCUS(_to) \
  112. NS_SCRIPTABLE NS_IMETHOD Activate(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Activate(); } \
  113. NS_SCRIPTABLE NS_IMETHOD Deactivate(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Deactivate(); } \
  114. NS_SCRIPTABLE NS_IMETHOD SetFocusAtFirstElement(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFocusAtFirstElement(); } \
  115. NS_SCRIPTABLE NS_IMETHOD SetFocusAtLastElement(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFocusAtLastElement(); } \
  116. NS_SCRIPTABLE NS_IMETHOD GetFocusedWindow(nsIDOMWindow * *aFocusedWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFocusedWindow(aFocusedWindow); } \
  117. NS_SCRIPTABLE NS_IMETHOD SetFocusedWindow(nsIDOMWindow * aFocusedWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFocusedWindow(aFocusedWindow); } \
  118. NS_SCRIPTABLE NS_IMETHOD GetFocusedElement(nsIDOMElement * *aFocusedElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFocusedElement(aFocusedElement); } \
  119. NS_SCRIPTABLE NS_IMETHOD SetFocusedElement(nsIDOMElement * aFocusedElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFocusedElement(aFocusedElement); }
  120. #if 0
  121. /* Use the code below as a template for the implementation class for this interface. */
  122. /* Header file */
  123. class nsWebBrowserFocus : public nsIWebBrowserFocus
  124. {
  125. public:
  126. NS_DECL_ISUPPORTS
  127. NS_DECL_NSIWEBBROWSERFOCUS
  128. nsWebBrowserFocus();
  129. private:
  130. ~nsWebBrowserFocus();
  131. protected:
  132. /* additional members */
  133. };
  134. /* Implementation file */
  135. NS_IMPL_ISUPPORTS1(nsWebBrowserFocus, nsIWebBrowserFocus)
  136. nsWebBrowserFocus::nsWebBrowserFocus()
  137. {
  138. /* member initializers and constructor code */
  139. }
  140. nsWebBrowserFocus::~nsWebBrowserFocus()
  141. {
  142. /* destructor code */
  143. }
  144. /* void activate (); */
  145. NS_IMETHODIMP nsWebBrowserFocus::Activate()
  146. {
  147. return NS_ERROR_NOT_IMPLEMENTED;
  148. }
  149. /* void deactivate (); */
  150. NS_IMETHODIMP nsWebBrowserFocus::Deactivate()
  151. {
  152. return NS_ERROR_NOT_IMPLEMENTED;
  153. }
  154. /* void setFocusAtFirstElement (); */
  155. NS_IMETHODIMP nsWebBrowserFocus::SetFocusAtFirstElement()
  156. {
  157. return NS_ERROR_NOT_IMPLEMENTED;
  158. }
  159. /* void setFocusAtLastElement (); */
  160. NS_IMETHODIMP nsWebBrowserFocus::SetFocusAtLastElement()
  161. {
  162. return NS_ERROR_NOT_IMPLEMENTED;
  163. }
  164. /* attribute nsIDOMWindow focusedWindow; */
  165. NS_IMETHODIMP nsWebBrowserFocus::GetFocusedWindow(nsIDOMWindow * *aFocusedWindow)
  166. {
  167. return NS_ERROR_NOT_IMPLEMENTED;
  168. }
  169. NS_IMETHODIMP nsWebBrowserFocus::SetFocusedWindow(nsIDOMWindow * aFocusedWindow)
  170. {
  171. return NS_ERROR_NOT_IMPLEMENTED;
  172. }
  173. /* attribute nsIDOMElement focusedElement; */
  174. NS_IMETHODIMP nsWebBrowserFocus::GetFocusedElement(nsIDOMElement * *aFocusedElement)
  175. {
  176. return NS_ERROR_NOT_IMPLEMENTED;
  177. }
  178. NS_IMETHODIMP nsWebBrowserFocus::SetFocusedElement(nsIDOMElement * aFocusedElement)
  179. {
  180. return NS_ERROR_NOT_IMPLEMENTED;
  181. }
  182. /* End of implementation class template. */
  183. #endif
  184. #endif /* __gen_nsIWebBrowserFocus_h__ */