1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 2003
20 * the Initial Developer. All Rights Reserved.
23 * Roy Yokoyama <yokoyama@netscape.com> (original author)
25 * Alternatively, the contents of this file may be used under the terms of
26 * either the GNU General Public License Version 2 or later (the "GPL"), or
27 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
37 * ***** END LICENSE BLOCK ***** */
41 #include "nsISupports.h"
43 #include "nsIWebBrowser.h"
44 #include "nsIWebBrowserChrome.h"
45 #include "nsIEmbeddingSiteWindow.h"
46 #include "nsIBaseWindow.h"
47 #include "nsIWebNavigation.h"
48 #include "nsIWindowWatcher.h"
49 #include "nsIInputStream.h"
51 #include "nsEmbedAPI.h"
52 #include "DotNetNetworking.h"
53 #include "DotNetXPCOM_IO.h"
55 using namespace System
;
56 using namespace Mozilla::Embedding::Networking
;
57 using namespace Mozilla::Embedding::XPCOM_IO
;
65 public __gc
class EmbeddingSiteWindow
72 static const UInt32 DIM_FLAGS_POSITION
= 1;
73 static const UInt32 DIM_FLAGS_SIZE_INNER
= 2;
74 static const UInt32 DIM_FLAGS_SIZE_OUTER
= 4;
76 __property Boolean
get_Visibility() { return visibility
; };
77 __property
void set_Visibility(Boolean v
) { visibility
= v
; };
78 __property String
* get_Title() { return title
; };
79 __property
void set_Title(String
* t
) { title
= t
; };
81 void setDimensions(UInt32 aFlags
, Int32 x
, Int32 y
, Int32 cx
, Int32 cy
) {};
82 void getDimensions(UInt32 aFlags
, Int32
*x
, Int32
*y
, Int32
*cx
, Int32
*cy
) {};
84 }; // class EmbeddingSiteWindow
86 public __gc
class WebBrowserChrome
89 bool setStatus() { return true; };
90 bool destroyBrowserWindow() { return true; };
91 bool sizeBrowserTo() { return true; };
92 bool showAsModal() { return true; };
93 bool isWindowModal() { return true; };
94 bool exitModalEventLoop() { return true; };
95 }; // class WebBrowserChrome
97 public __gc
class WebNavigation
100 static const UInt32 LOAD_FLAGS_MASK
= 65535;
101 static const UInt32 LOAD_FLAGS_NONE
= 0;
102 static const UInt32 LOAD_FLAGS_IS_REFRESH
= 16;
103 static const UInt32 LOAD_FLAGS_IS_LINK
= 32;
104 static const UInt32 LOAD_FLAGS_BYPASS_HISTORY
= 64;
105 static const UInt32 LOAD_FLAGS_REPLACE_HISTORY
= 128;
106 static const UInt32 LOAD_FLAGS_BYPASS_CACHE
= 256;
107 static const UInt32 LOAD_FLAGS_BYPASS_PROXY
= 512;
108 static const UInt32 LOAD_FLAGS_CHARSET_CHANGE
= 1024;
109 static const UInt32 STOP_NETWORK
= 1;
110 static const UInt32 STOP_CONTENT
= 2;
111 static const UInt32 STOP_ALL
= 3;
115 void gotoIndex(Int32 arg0
) {};
116 void loadURI(String
*arg0
, UInt32 arg1
, URI
*arg2
, InputStream
*arg3
, InputStream
*arg4
) {};
117 void reload(UInt32 arg0
) {};
118 void stop(UInt32 arg0
) {};
119 }; // class WebNavigation
121 public __gc
class WebBrowser
124 bool addWebBrowserListener() { return true; };
125 bool removeWebBrowserListener() { return true; };
126 bool SetContainerWindow(WebBrowserChrome
*aChrome
) { return true; };
127 }; // class WebBrowser
129 public __gc
class WindowWatcher
132 bool openWindow() { return true; };
133 bool registerNotification() { return true; };
134 bool unregisterNotification() { return true; };
135 bool getWindowEnumerator() { return true; };
136 bool getNewPrompter() { return true; };
137 bool getNewAuthPrompter() { return true; };
138 bool setWindowCreator() { return true; };
139 }; //class WindowWatcher
141 public __gc
class WindowCreator
144 bool createChromeWindow() { return true; };
145 }; //class WindowCreator
147 } // namespace WebBrowser
149 } // namespace Embedding