/gecko_api/include/nsIEmbeddingSiteWindow.h

http://firefox-mac-pdf.googlecode.com/ · C Header · 264 lines · 107 code · 39 blank · 118 comment · 0 complexity · 5d9cb1b92ee160f219d27216add83f1b 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/nsIEmbeddingSiteWindow.idl
  3. */
  4. #ifndef __gen_nsIEmbeddingSiteWindow_h__
  5. #define __gen_nsIEmbeddingSiteWindow_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. /* starting interface: nsIEmbeddingSiteWindow */
  14. #define NS_IEMBEDDINGSITEWINDOW_IID_STR "3e5432cd-9568-4bd1-8cbe-d50aba110743"
  15. #define NS_IEMBEDDINGSITEWINDOW_IID \
  16. {0x3e5432cd, 0x9568, 0x4bd1, \
  17. { 0x8c, 0xbe, 0xd5, 0x0a, 0xba, 0x11, 0x07, 0x43 }}
  18. /**
  19. * The nsIEmbeddingSiteWindow is implemented by the embedder to provide
  20. * Gecko with the means to call up to the host to resize the window,
  21. * hide or show it and set/get its title.
  22. *
  23. * @status FROZEN
  24. */
  25. class NS_NO_VTABLE NS_SCRIPTABLE nsIEmbeddingSiteWindow : public nsISupports {
  26. public:
  27. NS_DECLARE_STATIC_IID_ACCESSOR(NS_IEMBEDDINGSITEWINDOW_IID)
  28. /**
  29. * Flag indicates that position of the top left corner of the outer area
  30. * is required/specified.
  31. *
  32. * @see setDimensions
  33. * @see getDimensions
  34. */
  35. enum { DIM_FLAGS_POSITION = 1U };
  36. /**
  37. * Flag indicates that the size of the inner area is required/specified.
  38. *
  39. * @note The inner and outer flags are mutually exclusive and it is
  40. * invalid to combine them.
  41. *
  42. * @see setDimensions
  43. * @see getDimensions
  44. * @see DIM_FLAGS_SIZE_OUTER
  45. */
  46. enum { DIM_FLAGS_SIZE_INNER = 2U };
  47. /**
  48. * Flag indicates that the size of the outer area is required/specified.
  49. *
  50. * @see setDimensions
  51. * @see getDimensions
  52. * @see DIM_FLAGS_SIZE_INNER
  53. */
  54. enum { DIM_FLAGS_SIZE_OUTER = 4U };
  55. /**
  56. * Sets the dimensions for the window; the position & size. The
  57. * flags to indicate what the caller wants to set and whether the size
  58. * refers to the inner or outer area. The inner area refers to just
  59. * the embedded area, wheras the outer area can also include any
  60. * surrounding chrome, window frame, title bar, and so on.
  61. *
  62. * @param flags Combination of position, inner and outer size flags.
  63. * @param x Left hand corner of the outer area.
  64. * @param y Top corner of the outer area.
  65. * @param cx Width of the inner or outer area.
  66. * @param cy Height of the inner or outer area.
  67. *
  68. * @return <code>NS_OK</code> if operation was performed correctly;
  69. * <code>NS_ERROR_UNEXPECTED</code> if window could not be
  70. * destroyed;
  71. * <code>NS_ERROR_INVALID_ARG</code> for bad flag combination
  72. * or illegal dimensions.
  73. *
  74. * @see getDimensions
  75. * @see DIM_FLAGS_POSITION
  76. * @see DIM_FLAGS_SIZE_OUTER
  77. * @see DIM_FLAGS_SIZE_INNER
  78. */
  79. /* void setDimensions (in unsigned long flags, in long x, in long y, in long cx, in long cy); */
  80. NS_SCRIPTABLE NS_IMETHOD SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy) = 0;
  81. /**
  82. * Gets the dimensions of the window. The caller may pass
  83. * <CODE>nsnull</CODE> for any value it is uninterested in receiving.
  84. *
  85. * @param flags Combination of position, inner and outer size flag .
  86. * @param x Left hand corner of the outer area; or <CODE>nsnull</CODE>.
  87. * @param y Top corner of the outer area; or <CODE>nsnull</CODE>.
  88. * @param cx Width of the inner or outer area; or <CODE>nsnull</CODE>.
  89. * @param cy Height of the inner or outer area; or <CODE>nsnull</CODE>.
  90. *
  91. * @see setDimensions
  92. * @see DIM_FLAGS_POSITION
  93. * @see DIM_FLAGS_SIZE_OUTER
  94. * @see DIM_FLAGS_SIZE_INNER
  95. */
  96. /* void getDimensions (in unsigned long flags, out long x, out long y, out long cx, out long cy); */
  97. NS_SCRIPTABLE NS_IMETHOD GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy) = 0;
  98. /**
  99. * Give the window focus.
  100. */
  101. /* void setFocus (); */
  102. NS_SCRIPTABLE NS_IMETHOD SetFocus(void) = 0;
  103. /**
  104. * Visibility of the window.
  105. */
  106. /* attribute boolean visibility; */
  107. NS_SCRIPTABLE NS_IMETHOD GetVisibility(PRBool *aVisibility) = 0;
  108. NS_SCRIPTABLE NS_IMETHOD SetVisibility(PRBool aVisibility) = 0;
  109. /**
  110. * Title of the window.
  111. */
  112. /* attribute wstring title; */
  113. NS_SCRIPTABLE NS_IMETHOD GetTitle(PRUnichar * *aTitle) = 0;
  114. NS_SCRIPTABLE NS_IMETHOD SetTitle(const PRUnichar * aTitle) = 0;
  115. /**
  116. * Native window for the site's window. The implementor should copy the
  117. * native window object into the address supplied by the caller. The
  118. * type of the native window that the address refers to is platform
  119. * and OS specific as follows:
  120. *
  121. * <ul>
  122. * <li>On Win32 it is an <CODE>HWND</CODE>.</li>
  123. * <li>On MacOS this is a <CODE>WindowPtr</CODE>.</li>
  124. * <li>On GTK this is a <CODE>GtkWidget*</CODE>.</li>
  125. * </ul>
  126. */
  127. /* [noscript] readonly attribute voidPtr siteWindow; */
  128. NS_IMETHOD GetSiteWindow(void * *aSiteWindow) = 0;
  129. };
  130. NS_DEFINE_STATIC_IID_ACCESSOR(nsIEmbeddingSiteWindow, NS_IEMBEDDINGSITEWINDOW_IID)
  131. /* Use this macro when declaring classes that implement this interface. */
  132. #define NS_DECL_NSIEMBEDDINGSITEWINDOW \
  133. NS_SCRIPTABLE NS_IMETHOD SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy); \
  134. NS_SCRIPTABLE NS_IMETHOD GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy); \
  135. NS_SCRIPTABLE NS_IMETHOD SetFocus(void); \
  136. NS_SCRIPTABLE NS_IMETHOD GetVisibility(PRBool *aVisibility); \
  137. NS_SCRIPTABLE NS_IMETHOD SetVisibility(PRBool aVisibility); \
  138. NS_SCRIPTABLE NS_IMETHOD GetTitle(PRUnichar * *aTitle); \
  139. NS_SCRIPTABLE NS_IMETHOD SetTitle(const PRUnichar * aTitle); \
  140. NS_IMETHOD GetSiteWindow(void * *aSiteWindow);
  141. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  142. #define NS_FORWARD_NSIEMBEDDINGSITEWINDOW(_to) \
  143. NS_SCRIPTABLE NS_IMETHOD SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy) { return _to SetDimensions(flags, x, y, cx, cy); } \
  144. NS_SCRIPTABLE NS_IMETHOD GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy) { return _to GetDimensions(flags, x, y, cx, cy); } \
  145. NS_SCRIPTABLE NS_IMETHOD SetFocus(void) { return _to SetFocus(); } \
  146. NS_SCRIPTABLE NS_IMETHOD GetVisibility(PRBool *aVisibility) { return _to GetVisibility(aVisibility); } \
  147. NS_SCRIPTABLE NS_IMETHOD SetVisibility(PRBool aVisibility) { return _to SetVisibility(aVisibility); } \
  148. NS_SCRIPTABLE NS_IMETHOD GetTitle(PRUnichar * *aTitle) { return _to GetTitle(aTitle); } \
  149. NS_SCRIPTABLE NS_IMETHOD SetTitle(const PRUnichar * aTitle) { return _to SetTitle(aTitle); } \
  150. NS_IMETHOD GetSiteWindow(void * *aSiteWindow) { return _to GetSiteWindow(aSiteWindow); }
  151. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  152. #define NS_FORWARD_SAFE_NSIEMBEDDINGSITEWINDOW(_to) \
  153. NS_SCRIPTABLE NS_IMETHOD SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDimensions(flags, x, y, cx, cy); } \
  154. NS_SCRIPTABLE NS_IMETHOD GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDimensions(flags, x, y, cx, cy); } \
  155. NS_SCRIPTABLE NS_IMETHOD SetFocus(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFocus(); } \
  156. NS_SCRIPTABLE NS_IMETHOD GetVisibility(PRBool *aVisibility) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVisibility(aVisibility); } \
  157. NS_SCRIPTABLE NS_IMETHOD SetVisibility(PRBool aVisibility) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetVisibility(aVisibility); } \
  158. NS_SCRIPTABLE NS_IMETHOD GetTitle(PRUnichar * *aTitle) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTitle(aTitle); } \
  159. NS_SCRIPTABLE NS_IMETHOD SetTitle(const PRUnichar * aTitle) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTitle(aTitle); } \
  160. NS_IMETHOD GetSiteWindow(void * *aSiteWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSiteWindow(aSiteWindow); }
  161. #if 0
  162. /* Use the code below as a template for the implementation class for this interface. */
  163. /* Header file */
  164. class nsEmbeddingSiteWindow : public nsIEmbeddingSiteWindow
  165. {
  166. public:
  167. NS_DECL_ISUPPORTS
  168. NS_DECL_NSIEMBEDDINGSITEWINDOW
  169. nsEmbeddingSiteWindow();
  170. private:
  171. ~nsEmbeddingSiteWindow();
  172. protected:
  173. /* additional members */
  174. };
  175. /* Implementation file */
  176. NS_IMPL_ISUPPORTS1(nsEmbeddingSiteWindow, nsIEmbeddingSiteWindow)
  177. nsEmbeddingSiteWindow::nsEmbeddingSiteWindow()
  178. {
  179. /* member initializers and constructor code */
  180. }
  181. nsEmbeddingSiteWindow::~nsEmbeddingSiteWindow()
  182. {
  183. /* destructor code */
  184. }
  185. /* void setDimensions (in unsigned long flags, in long x, in long y, in long cx, in long cy); */
  186. NS_IMETHODIMP nsEmbeddingSiteWindow::SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy)
  187. {
  188. return NS_ERROR_NOT_IMPLEMENTED;
  189. }
  190. /* void getDimensions (in unsigned long flags, out long x, out long y, out long cx, out long cy); */
  191. NS_IMETHODIMP nsEmbeddingSiteWindow::GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy)
  192. {
  193. return NS_ERROR_NOT_IMPLEMENTED;
  194. }
  195. /* void setFocus (); */
  196. NS_IMETHODIMP nsEmbeddingSiteWindow::SetFocus()
  197. {
  198. return NS_ERROR_NOT_IMPLEMENTED;
  199. }
  200. /* attribute boolean visibility; */
  201. NS_IMETHODIMP nsEmbeddingSiteWindow::GetVisibility(PRBool *aVisibility)
  202. {
  203. return NS_ERROR_NOT_IMPLEMENTED;
  204. }
  205. NS_IMETHODIMP nsEmbeddingSiteWindow::SetVisibility(PRBool aVisibility)
  206. {
  207. return NS_ERROR_NOT_IMPLEMENTED;
  208. }
  209. /* attribute wstring title; */
  210. NS_IMETHODIMP nsEmbeddingSiteWindow::GetTitle(PRUnichar * *aTitle)
  211. {
  212. return NS_ERROR_NOT_IMPLEMENTED;
  213. }
  214. NS_IMETHODIMP nsEmbeddingSiteWindow::SetTitle(const PRUnichar * aTitle)
  215. {
  216. return NS_ERROR_NOT_IMPLEMENTED;
  217. }
  218. /* [noscript] readonly attribute voidPtr siteWindow; */
  219. NS_IMETHODIMP nsEmbeddingSiteWindow::GetSiteWindow(void * *aSiteWindow)
  220. {
  221. return NS_ERROR_NOT_IMPLEMENTED;
  222. }
  223. /* End of implementation class template. */
  224. #endif
  225. #endif /* __gen_nsIEmbeddingSiteWindow_h__ */