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