PageRenderTime 84ms CodeModel.GetById 40ms app.highlight 11ms RepoModel.GetById 29ms app.codeStats 1ms

/gecko_api/include/nsIWebBrowserChrome.h

http://firefox-mac-pdf.googlecode.com/
C++ Header | 301 lines | 149 code | 69 blank | 83 comment | 0 complexity | 7229936adece42f2d5fa779d2380ea4a 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/nsIWebBrowserChrome.idl
  3 */
  4
  5#ifndef __gen_nsIWebBrowserChrome_h__
  6#define __gen_nsIWebBrowserChrome_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
 17class nsIWebBrowser; /* forward declaration */
 18
 19class nsIDocShellTreeItem; /* forward declaration */
 20
 21
 22/* starting interface:    nsIWebBrowserChrome */
 23#define NS_IWEBBROWSERCHROME_IID_STR "ba434c60-9d52-11d3-afb0-00a024ffc08c"
 24
 25#define NS_IWEBBROWSERCHROME_IID \
 26  {0xba434c60, 0x9d52, 0x11d3, \
 27    { 0xaf, 0xb0, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c }}
 28
 29/**
 30 * nsIWebBrowserChrome corresponds to the top-level, outermost window
 31 * containing an embedded Gecko web browser.
 32 *
 33 * @status FROZEN
 34 */
 35class NS_NO_VTABLE NS_SCRIPTABLE nsIWebBrowserChrome : public nsISupports {
 36 public: 
 37
 38  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IWEBBROWSERCHROME_IID)
 39
 40  enum { STATUS_SCRIPT = 1U };
 41
 42  enum { STATUS_SCRIPT_DEFAULT = 2U };
 43
 44  enum { STATUS_LINK = 3U };
 45
 46  /**
 47     * Called when the status text in the chrome needs to be updated.
 48     * @param statusType indicates what is setting the text
 49     * @param status status string. null is an acceptable value meaning
 50     *               no status.
 51     */
 52  /* void setStatus (in unsigned long statusType, in wstring status); */
 53  NS_SCRIPTABLE NS_IMETHOD SetStatus(PRUint32 statusType, const PRUnichar *status) = 0;
 54
 55  /**
 56     * The currently loaded WebBrowser.  The browser chrome may be
 57     * told to set the WebBrowser object to a new object by setting this
 58     * attribute.  In this case the implementer is responsible for taking the 
 59     * new WebBrowser object and doing any necessary initialization or setup 
 60     * as if it had created the WebBrowser itself.  This includes positioning
 61     * setting up listeners etc.
 62     */
 63  /* attribute nsIWebBrowser webBrowser; */
 64  NS_SCRIPTABLE NS_IMETHOD GetWebBrowser(nsIWebBrowser * *aWebBrowser) = 0;
 65  NS_SCRIPTABLE NS_IMETHOD SetWebBrowser(nsIWebBrowser * aWebBrowser) = 0;
 66
 67  /**
 68     * Definitions for the chrome flags
 69     */
 70  enum { CHROME_DEFAULT = 1U };
 71
 72  enum { CHROME_WINDOW_BORDERS = 2U };
 73
 74  enum { CHROME_WINDOW_CLOSE = 4U };
 75
 76  enum { CHROME_WINDOW_RESIZE = 8U };
 77
 78  enum { CHROME_MENUBAR = 16U };
 79
 80  enum { CHROME_TOOLBAR = 32U };
 81
 82  enum { CHROME_LOCATIONBAR = 64U };
 83
 84  enum { CHROME_STATUSBAR = 128U };
 85
 86  enum { CHROME_PERSONAL_TOOLBAR = 256U };
 87
 88  enum { CHROME_SCROLLBARS = 512U };
 89
 90  enum { CHROME_TITLEBAR = 1024U };
 91
 92  enum { CHROME_EXTRA = 2048U };
 93
 94  enum { CHROME_WITH_SIZE = 4096U };
 95
 96  enum { CHROME_WITH_POSITION = 8192U };
 97
 98  enum { CHROME_WINDOW_MIN = 16384U };
 99
100  enum { CHROME_WINDOW_POPUP = 32768U };
101
102  enum { CHROME_WINDOW_RAISED = 33554432U };
103
104  enum { CHROME_WINDOW_LOWERED = 67108864U };
105
106  enum { CHROME_CENTER_SCREEN = 134217728U };
107
108  enum { CHROME_DEPENDENT = 268435456U };
109
110  enum { CHROME_MODAL = 536870912U };
111
112  enum { CHROME_OPENAS_DIALOG = 1073741824U };
113
114  enum { CHROME_OPENAS_CHROME = 2147483648U };
115
116  enum { CHROME_ALL = 4094U };
117
118  /**
119     * The chrome flags for this browser chrome. The implementation should
120     * reflect the value of this attribute by hiding or showing its chrome
121     * appropriately.
122     */
123  /* attribute unsigned long chromeFlags; */
124  NS_SCRIPTABLE NS_IMETHOD GetChromeFlags(PRUint32 *aChromeFlags) = 0;
125  NS_SCRIPTABLE NS_IMETHOD SetChromeFlags(PRUint32 aChromeFlags) = 0;
126
127  /**
128     * Asks the implementer to destroy the window associated with this
129     * WebBrowser object.
130     */
131  /* void destroyBrowserWindow (); */
132  NS_SCRIPTABLE NS_IMETHOD DestroyBrowserWindow(void) = 0;
133
134  /**
135     * Tells the chrome to size itself such that the browser will be the 
136     * specified size.
137     * @param aCX new width of the browser
138     * @param aCY new height of the browser
139     */
140  /* void sizeBrowserTo (in long aCX, in long aCY); */
141  NS_SCRIPTABLE NS_IMETHOD SizeBrowserTo(PRInt32 aCX, PRInt32 aCY) = 0;
142
143  /**
144     * Shows the window as a modal window.
145     * @return (the function error code) the status value specified by
146     *         in exitModalEventLoop.
147     */
148  /* void showAsModal (); */
149  NS_SCRIPTABLE NS_IMETHOD ShowAsModal(void) = 0;
150
151  /**
152     * Is the window modal (that is, currently executing a modal loop)?
153     * @return true if it's a modal window
154     */
155  /* boolean isWindowModal (); */
156  NS_SCRIPTABLE NS_IMETHOD IsWindowModal(PRBool *_retval) = 0;
157
158  /**
159     * Exit a modal event loop if we're in one. The implementation
160     * should also exit out of the loop if the window is destroyed.
161     * @param aStatus - the result code to return from showAsModal
162     */
163  /* void exitModalEventLoop (in nsresult aStatus); */
164  NS_SCRIPTABLE NS_IMETHOD ExitModalEventLoop(nsresult aStatus) = 0;
165
166};
167
168  NS_DEFINE_STATIC_IID_ACCESSOR(nsIWebBrowserChrome, NS_IWEBBROWSERCHROME_IID)
169
170/* Use this macro when declaring classes that implement this interface. */
171#define NS_DECL_NSIWEBBROWSERCHROME \
172  NS_SCRIPTABLE NS_IMETHOD SetStatus(PRUint32 statusType, const PRUnichar *status); \
173  NS_SCRIPTABLE NS_IMETHOD GetWebBrowser(nsIWebBrowser * *aWebBrowser); \
174  NS_SCRIPTABLE NS_IMETHOD SetWebBrowser(nsIWebBrowser * aWebBrowser); \
175  NS_SCRIPTABLE NS_IMETHOD GetChromeFlags(PRUint32 *aChromeFlags); \
176  NS_SCRIPTABLE NS_IMETHOD SetChromeFlags(PRUint32 aChromeFlags); \
177  NS_SCRIPTABLE NS_IMETHOD DestroyBrowserWindow(void); \
178  NS_SCRIPTABLE NS_IMETHOD SizeBrowserTo(PRInt32 aCX, PRInt32 aCY); \
179  NS_SCRIPTABLE NS_IMETHOD ShowAsModal(void); \
180  NS_SCRIPTABLE NS_IMETHOD IsWindowModal(PRBool *_retval); \
181  NS_SCRIPTABLE NS_IMETHOD ExitModalEventLoop(nsresult aStatus); 
182
183/* Use this macro to declare functions that forward the behavior of this interface to another object. */
184#define NS_FORWARD_NSIWEBBROWSERCHROME(_to) \
185  NS_SCRIPTABLE NS_IMETHOD SetStatus(PRUint32 statusType, const PRUnichar *status) { return _to SetStatus(statusType, status); } \
186  NS_SCRIPTABLE NS_IMETHOD GetWebBrowser(nsIWebBrowser * *aWebBrowser) { return _to GetWebBrowser(aWebBrowser); } \
187  NS_SCRIPTABLE NS_IMETHOD SetWebBrowser(nsIWebBrowser * aWebBrowser) { return _to SetWebBrowser(aWebBrowser); } \
188  NS_SCRIPTABLE NS_IMETHOD GetChromeFlags(PRUint32 *aChromeFlags) { return _to GetChromeFlags(aChromeFlags); } \
189  NS_SCRIPTABLE NS_IMETHOD SetChromeFlags(PRUint32 aChromeFlags) { return _to SetChromeFlags(aChromeFlags); } \
190  NS_SCRIPTABLE NS_IMETHOD DestroyBrowserWindow(void) { return _to DestroyBrowserWindow(); } \
191  NS_SCRIPTABLE NS_IMETHOD SizeBrowserTo(PRInt32 aCX, PRInt32 aCY) { return _to SizeBrowserTo(aCX, aCY); } \
192  NS_SCRIPTABLE NS_IMETHOD ShowAsModal(void) { return _to ShowAsModal(); } \
193  NS_SCRIPTABLE NS_IMETHOD IsWindowModal(PRBool *_retval) { return _to IsWindowModal(_retval); } \
194  NS_SCRIPTABLE NS_IMETHOD ExitModalEventLoop(nsresult aStatus) { return _to ExitModalEventLoop(aStatus); } 
195
196/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
197#define NS_FORWARD_SAFE_NSIWEBBROWSERCHROME(_to) \
198  NS_SCRIPTABLE NS_IMETHOD SetStatus(PRUint32 statusType, const PRUnichar *status) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStatus(statusType, status); } \
199  NS_SCRIPTABLE NS_IMETHOD GetWebBrowser(nsIWebBrowser * *aWebBrowser) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWebBrowser(aWebBrowser); } \
200  NS_SCRIPTABLE NS_IMETHOD SetWebBrowser(nsIWebBrowser * aWebBrowser) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWebBrowser(aWebBrowser); } \
201  NS_SCRIPTABLE NS_IMETHOD GetChromeFlags(PRUint32 *aChromeFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChromeFlags(aChromeFlags); } \
202  NS_SCRIPTABLE NS_IMETHOD SetChromeFlags(PRUint32 aChromeFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetChromeFlags(aChromeFlags); } \
203  NS_SCRIPTABLE NS_IMETHOD DestroyBrowserWindow(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->DestroyBrowserWindow(); } \
204  NS_SCRIPTABLE NS_IMETHOD SizeBrowserTo(PRInt32 aCX, PRInt32 aCY) { return !_to ? NS_ERROR_NULL_POINTER : _to->SizeBrowserTo(aCX, aCY); } \
205  NS_SCRIPTABLE NS_IMETHOD ShowAsModal(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ShowAsModal(); } \
206  NS_SCRIPTABLE NS_IMETHOD IsWindowModal(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsWindowModal(_retval); } \
207  NS_SCRIPTABLE NS_IMETHOD ExitModalEventLoop(nsresult aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->ExitModalEventLoop(aStatus); } 
208
209#if 0
210/* Use the code below as a template for the implementation class for this interface. */
211
212/* Header file */
213class nsWebBrowserChrome : public nsIWebBrowserChrome
214{
215public:
216  NS_DECL_ISUPPORTS
217  NS_DECL_NSIWEBBROWSERCHROME
218
219  nsWebBrowserChrome();
220
221private:
222  ~nsWebBrowserChrome();
223
224protected:
225  /* additional members */
226};
227
228/* Implementation file */
229NS_IMPL_ISUPPORTS1(nsWebBrowserChrome, nsIWebBrowserChrome)
230
231nsWebBrowserChrome::nsWebBrowserChrome()
232{
233  /* member initializers and constructor code */
234}
235
236nsWebBrowserChrome::~nsWebBrowserChrome()
237{
238  /* destructor code */
239}
240
241/* void setStatus (in unsigned long statusType, in wstring status); */
242NS_IMETHODIMP nsWebBrowserChrome::SetStatus(PRUint32 statusType, const PRUnichar *status)
243{
244    return NS_ERROR_NOT_IMPLEMENTED;
245}
246
247/* attribute nsIWebBrowser webBrowser; */
248NS_IMETHODIMP nsWebBrowserChrome::GetWebBrowser(nsIWebBrowser * *aWebBrowser)
249{
250    return NS_ERROR_NOT_IMPLEMENTED;
251}
252NS_IMETHODIMP nsWebBrowserChrome::SetWebBrowser(nsIWebBrowser * aWebBrowser)
253{
254    return NS_ERROR_NOT_IMPLEMENTED;
255}
256
257/* attribute unsigned long chromeFlags; */
258NS_IMETHODIMP nsWebBrowserChrome::GetChromeFlags(PRUint32 *aChromeFlags)
259{
260    return NS_ERROR_NOT_IMPLEMENTED;
261}
262NS_IMETHODIMP nsWebBrowserChrome::SetChromeFlags(PRUint32 aChromeFlags)
263{
264    return NS_ERROR_NOT_IMPLEMENTED;
265}
266
267/* void destroyBrowserWindow (); */
268NS_IMETHODIMP nsWebBrowserChrome::DestroyBrowserWindow()
269{
270    return NS_ERROR_NOT_IMPLEMENTED;
271}
272
273/* void sizeBrowserTo (in long aCX, in long aCY); */
274NS_IMETHODIMP nsWebBrowserChrome::SizeBrowserTo(PRInt32 aCX, PRInt32 aCY)
275{
276    return NS_ERROR_NOT_IMPLEMENTED;
277}
278
279/* void showAsModal (); */
280NS_IMETHODIMP nsWebBrowserChrome::ShowAsModal()
281{
282    return NS_ERROR_NOT_IMPLEMENTED;
283}
284
285/* boolean isWindowModal (); */
286NS_IMETHODIMP nsWebBrowserChrome::IsWindowModal(PRBool *_retval)
287{
288    return NS_ERROR_NOT_IMPLEMENTED;
289}
290
291/* void exitModalEventLoop (in nsresult aStatus); */
292NS_IMETHODIMP nsWebBrowserChrome::ExitModalEventLoop(nsresult aStatus)
293{
294    return NS_ERROR_NOT_IMPLEMENTED;
295}
296
297/* End of implementation class template. */
298#endif
299
300
301#endif /* __gen_nsIWebBrowserChrome_h__ */