nsIEmbeddingSiteWindow.h 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/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 nsIEmbeddingSiteWindow : public nsISupports {
  26. public:
  27. NS_DEFINE_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_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_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_IMETHOD SetFocus(void) = 0;
  103. /**
  104. * Visibility of the window.
  105. */
  106. /* attribute boolean visibility; */
  107. NS_IMETHOD GetVisibility(PRBool *aVisibility) = 0;
  108. NS_IMETHOD SetVisibility(PRBool aVisibility) = 0;
  109. /**
  110. * Title of the window.
  111. */
  112. /* attribute wstring title; */
  113. NS_IMETHOD GetTitle(PRUnichar * *aTitle) = 0;
  114. 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. /* Use this macro when declaring classes that implement this interface. */
  131. #define NS_DECL_NSIEMBEDDINGSITEWINDOW \
  132. NS_IMETHOD SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy); \
  133. NS_IMETHOD GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy); \
  134. NS_IMETHOD SetFocus(void); \
  135. NS_IMETHOD GetVisibility(PRBool *aVisibility); \
  136. NS_IMETHOD SetVisibility(PRBool aVisibility); \
  137. NS_IMETHOD GetTitle(PRUnichar * *aTitle); \
  138. NS_IMETHOD SetTitle(const PRUnichar * aTitle); \
  139. NS_IMETHOD GetSiteWindow(void * *aSiteWindow);
  140. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  141. #define NS_FORWARD_NSIEMBEDDINGSITEWINDOW(_to) \
  142. NS_IMETHOD SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy) { return _to SetDimensions(flags, x, y, cx, cy); } \
  143. NS_IMETHOD GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy) { return _to GetDimensions(flags, x, y, cx, cy); } \
  144. NS_IMETHOD SetFocus(void) { return _to SetFocus(); } \
  145. NS_IMETHOD GetVisibility(PRBool *aVisibility) { return _to GetVisibility(aVisibility); } \
  146. NS_IMETHOD SetVisibility(PRBool aVisibility) { return _to SetVisibility(aVisibility); } \
  147. NS_IMETHOD GetTitle(PRUnichar * *aTitle) { return _to GetTitle(aTitle); } \
  148. NS_IMETHOD SetTitle(const PRUnichar * aTitle) { return _to SetTitle(aTitle); } \
  149. NS_IMETHOD GetSiteWindow(void * *aSiteWindow) { return _to GetSiteWindow(aSiteWindow); }
  150. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  151. #define NS_FORWARD_SAFE_NSIEMBEDDINGSITEWINDOW(_to) \
  152. 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); } \
  153. 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); } \
  154. NS_IMETHOD SetFocus(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFocus(); } \
  155. NS_IMETHOD GetVisibility(PRBool *aVisibility) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVisibility(aVisibility); } \
  156. NS_IMETHOD SetVisibility(PRBool aVisibility) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetVisibility(aVisibility); } \
  157. NS_IMETHOD GetTitle(PRUnichar * *aTitle) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTitle(aTitle); } \
  158. NS_IMETHOD SetTitle(const PRUnichar * aTitle) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTitle(aTitle); } \
  159. NS_IMETHOD GetSiteWindow(void * *aSiteWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSiteWindow(aSiteWindow); }
  160. #if 0
  161. /* Use the code below as a template for the implementation class for this interface. */
  162. /* Header file */
  163. class nsEmbeddingSiteWindow : public nsIEmbeddingSiteWindow
  164. {
  165. public:
  166. NS_DECL_ISUPPORTS
  167. NS_DECL_NSIEMBEDDINGSITEWINDOW
  168. nsEmbeddingSiteWindow();
  169. private:
  170. ~nsEmbeddingSiteWindow();
  171. protected:
  172. /* additional members */
  173. };
  174. /* Implementation file */
  175. NS_IMPL_ISUPPORTS1(nsEmbeddingSiteWindow, nsIEmbeddingSiteWindow)
  176. nsEmbeddingSiteWindow::nsEmbeddingSiteWindow()
  177. {
  178. /* member initializers and constructor code */
  179. }
  180. nsEmbeddingSiteWindow::~nsEmbeddingSiteWindow()
  181. {
  182. /* destructor code */
  183. }
  184. /* void setDimensions (in unsigned long flags, in long x, in long y, in long cx, in long cy); */
  185. NS_IMETHODIMP nsEmbeddingSiteWindow::SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy)
  186. {
  187. return NS_ERROR_NOT_IMPLEMENTED;
  188. }
  189. /* void getDimensions (in unsigned long flags, out long x, out long y, out long cx, out long cy); */
  190. NS_IMETHODIMP nsEmbeddingSiteWindow::GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy)
  191. {
  192. return NS_ERROR_NOT_IMPLEMENTED;
  193. }
  194. /* void setFocus (); */
  195. NS_IMETHODIMP nsEmbeddingSiteWindow::SetFocus()
  196. {
  197. return NS_ERROR_NOT_IMPLEMENTED;
  198. }
  199. /* attribute boolean visibility; */
  200. NS_IMETHODIMP nsEmbeddingSiteWindow::GetVisibility(PRBool *aVisibility)
  201. {
  202. return NS_ERROR_NOT_IMPLEMENTED;
  203. }
  204. NS_IMETHODIMP nsEmbeddingSiteWindow::SetVisibility(PRBool aVisibility)
  205. {
  206. return NS_ERROR_NOT_IMPLEMENTED;
  207. }
  208. /* attribute wstring title; */
  209. NS_IMETHODIMP nsEmbeddingSiteWindow::GetTitle(PRUnichar * *aTitle)
  210. {
  211. return NS_ERROR_NOT_IMPLEMENTED;
  212. }
  213. NS_IMETHODIMP nsEmbeddingSiteWindow::SetTitle(const PRUnichar * aTitle)
  214. {
  215. return NS_ERROR_NOT_IMPLEMENTED;
  216. }
  217. /* [noscript] readonly attribute voidPtr siteWindow; */
  218. NS_IMETHODIMP nsEmbeddingSiteWindow::GetSiteWindow(void * *aSiteWindow)
  219. {
  220. return NS_ERROR_NOT_IMPLEMENTED;
  221. }
  222. /* End of implementation class template. */
  223. #endif
  224. #endif /* __gen_nsIEmbeddingSiteWindow_h__ */