/embedding/browser/webBrowser/nsIEmbeddingSiteWindow.idl

http://github.com/zpao/v8monkey · IDL · 153 lines · 14 code · 11 blank · 128 comment · 0 complexity · 684a42670341817a387e4305b6ddf558 MD5 · raw file

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  2. *
  3. * ***** BEGIN LICENSE BLOCK *****
  4. * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5. *
  6. * The contents of this file are subject to the Mozilla Public License Version
  7. * 1.1 (the "License"); you may not use this file except in compliance with
  8. * the License. You may obtain a copy of the License at
  9. * http://www.mozilla.org/MPL/
  10. *
  11. * Software distributed under the License is distributed on an "AS IS" basis,
  12. * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13. * for the specific language governing rights and limitations under the
  14. * License.
  15. *
  16. * The Original Code is the Mozilla browser.
  17. *
  18. * The Initial Developer of the Original Code is
  19. * Netscape Communications, Inc.
  20. * Portions created by the Initial Developer are Copyright (C) 1999
  21. * the Initial Developer. All Rights Reserved.
  22. *
  23. * Contributor(s):
  24. * Adam Lock <adamlock@netscape.com>
  25. *
  26. * Alternatively, the contents of this file may be used under the terms of
  27. * either the GNU General Public License Version 2 or later (the "GPL"), or
  28. * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  29. * in which case the provisions of the GPL or the LGPL are applicable instead
  30. * of those above. If you wish to allow use of your version of this file only
  31. * under the terms of either the GPL or the LGPL, and not to allow others to
  32. * use your version of this file under the terms of the MPL, indicate your
  33. * decision by deleting the provisions above and replace them with the notice
  34. * and other provisions required by the GPL or the LGPL. If you do not delete
  35. * the provisions above, a recipient may use your version of this file under
  36. * the terms of any one of the MPL, the GPL or the LGPL.
  37. *
  38. * ***** END LICENSE BLOCK ***** */
  39. #include "nsISupports.idl"
  40. /* THIS IS A PUBLIC EMBEDDING API */
  41. /**
  42. * The nsIEmbeddingSiteWindow is implemented by the embedder to provide
  43. * Gecko with the means to call up to the host to resize the window,
  44. * hide or show it and set/get its title.
  45. */
  46. [scriptable, uuid(3E5432CD-9568-4bd1-8CBE-D50ABA110743)]
  47. interface nsIEmbeddingSiteWindow : nsISupports
  48. {
  49. /**
  50. * Flag indicates that position of the top left corner of the outer area
  51. * is required/specified.
  52. *
  53. * @see setDimensions
  54. * @see getDimensions
  55. */
  56. const unsigned long DIM_FLAGS_POSITION = 1;
  57. /**
  58. * Flag indicates that the size of the inner area is required/specified.
  59. *
  60. * @note The inner and outer flags are mutually exclusive and it is
  61. * invalid to combine them.
  62. *
  63. * @see setDimensions
  64. * @see getDimensions
  65. * @see DIM_FLAGS_SIZE_OUTER
  66. */
  67. const unsigned long DIM_FLAGS_SIZE_INNER = 2;
  68. /**
  69. * Flag indicates that the size of the outer area is required/specified.
  70. *
  71. * @see setDimensions
  72. * @see getDimensions
  73. * @see DIM_FLAGS_SIZE_INNER
  74. */
  75. const unsigned long DIM_FLAGS_SIZE_OUTER = 4;
  76. /**
  77. * Sets the dimensions for the window; the position & size. The
  78. * flags to indicate what the caller wants to set and whether the size
  79. * refers to the inner or outer area. The inner area refers to just
  80. * the embedded area, wheras the outer area can also include any
  81. * surrounding chrome, window frame, title bar, and so on.
  82. *
  83. * @param flags Combination of position, inner and outer size flags.
  84. * @param x Left hand corner of the outer area.
  85. * @param y Top corner of the outer area.
  86. * @param cx Width of the inner or outer area.
  87. * @param cy Height of the inner or outer area.
  88. *
  89. * @return <code>NS_OK</code> if operation was performed correctly;
  90. * <code>NS_ERROR_UNEXPECTED</code> if window could not be
  91. * destroyed;
  92. * <code>NS_ERROR_INVALID_ARG</code> for bad flag combination
  93. * or illegal dimensions.
  94. *
  95. * @see getDimensions
  96. * @see DIM_FLAGS_POSITION
  97. * @see DIM_FLAGS_SIZE_OUTER
  98. * @see DIM_FLAGS_SIZE_INNER
  99. */
  100. void setDimensions(in unsigned long flags, in long x, in long y, in long cx, in long cy);
  101. /**
  102. * Gets the dimensions of the window. The caller may pass
  103. * <CODE>nsnull</CODE> for any value it is uninterested in receiving.
  104. *
  105. * @param flags Combination of position, inner and outer size flag .
  106. * @param x Left hand corner of the outer area; or <CODE>nsnull</CODE>.
  107. * @param y Top corner of the outer area; or <CODE>nsnull</CODE>.
  108. * @param cx Width of the inner or outer area; or <CODE>nsnull</CODE>.
  109. * @param cy Height of the inner or outer area; or <CODE>nsnull</CODE>.
  110. *
  111. * @see setDimensions
  112. * @see DIM_FLAGS_POSITION
  113. * @see DIM_FLAGS_SIZE_OUTER
  114. * @see DIM_FLAGS_SIZE_INNER
  115. */
  116. void getDimensions(in unsigned long flags, out long x, out long y, out long cx, out long cy);
  117. /**
  118. * Give the window focus.
  119. */
  120. void setFocus();
  121. /**
  122. * Visibility of the window.
  123. */
  124. attribute boolean visibility;
  125. /**
  126. * Title of the window.
  127. */
  128. attribute wstring title;
  129. /**
  130. * Native window for the site's window. The implementor should copy the
  131. * native window object into the address supplied by the caller. The
  132. * type of the native window that the address refers to is platform
  133. * and OS specific as follows:
  134. *
  135. * <ul>
  136. * <li>On Win32 it is an <CODE>HWND</CODE>.</li>
  137. * <li>On MacOS this is a <CODE>WindowPtr</CODE>.</li>
  138. * <li>On GTK this is a <CODE>GtkWidget*</CODE>.</li>
  139. * </ul>
  140. */
  141. [noscript] readonly attribute voidPtr siteWindow;
  142. };