Back to index

lightning-sunbird  0.9+nobinonly
DotNETWebBrowser.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 2003
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *   Roy Yokoyama <yokoyama@netscape.com> (original author)
00024  *
00025  * Alternatively, the contents of this file may be used under the terms of
00026  * either the GNU General Public License Version 2 or later (the "GPL"), or
00027  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00028  * in which case the provisions of the GPL or the LGPL are applicable instead
00029  * of those above. If you wish to allow use of your version of this file only
00030  * under the terms of either the GPL or the LGPL, and not to allow others to
00031  * use your version of this file under the terms of the MPL, indicate your
00032  * decision by deleting the provisions above and replace them with the notice
00033  * and other provisions required by the GPL or the LGPL. If you do not delete
00034  * the provisions above, a recipient may use your version of this file under
00035  * the terms of any one of the MPL, the GPL or the LGPL.
00036  *
00037  * ***** END LICENSE BLOCK ***** */
00038 
00039 #pragma once
00040 
00041 #include "nsISupports.h"
00042 #include "nsCOMPtr.h"
00043 #include "nsIWebBrowser.h"
00044 #include "nsIWebBrowserChrome.h"
00045 #include "nsIEmbeddingSiteWindow.h"
00046 #include "nsIBaseWindow.h"
00047 #include "nsIWebNavigation.h"
00048 #include "nsIWindowWatcher.h"
00049 #include "nsIInputStream.h"
00050 #include "nsIURI.h"
00051 #include "nsEmbedAPI.h"
00052 #include "DotNetNetworking.h"
00053 #include "DotNetXPCOM_IO.h"
00054 
00055 using namespace System;
00056 using namespace Mozilla::Embedding::Networking;
00057 using namespace Mozilla::Embedding::XPCOM_IO;
00058 
00059 namespace Mozilla
00060 {
00061   namespace Embedding
00062   {
00063     namespace WebBrowser
00064     {
00065       public __gc class EmbeddingSiteWindow
00066       {
00067         private:
00068           Boolean mVisibility;
00069           String* mTitle;
00070 
00071         public:
00072           static const UInt32 DIM_FLAGS_POSITION = 1;
00073           static const UInt32 DIM_FLAGS_SIZE_INNER = 2;
00074           static const UInt32 DIM_FLAGS_SIZE_OUTER = 4;
00075 
00076           __property Boolean get_Visibility() { return visibility; };
00077           __property void set_Visibility(Boolean v) { visibility = v; };
00078           __property String* get_Title() { return title; };
00079           __property void set_Title(String * t) { title = t; };
00080 
00081           void setDimensions(UInt32 aFlags, Int32 x, Int32 y, Int32 cx, Int32 cy) {};
00082           void getDimensions(UInt32 aFlags, Int32 *x, Int32 *y, Int32 *cx, Int32 *cy) {};
00083           void setFocus() {};
00084       }; // class EmbeddingSiteWindow
00085 
00086       public __gc class WebBrowserChrome
00087       {
00088         public:
00089           bool setStatus() { return true; };
00090           bool destroyBrowserWindow() { return true; };
00091           bool sizeBrowserTo() { return true; };
00092           bool showAsModal() { return true; };
00093           bool isWindowModal() { return true; };
00094           bool exitModalEventLoop() { return true; };
00095       }; // class WebBrowserChrome
00096 
00097       public __gc class WebNavigation
00098       {
00099         public:
00100           static const UInt32 LOAD_FLAGS_MASK = 65535;
00101           static const UInt32 LOAD_FLAGS_NONE = 0;
00102           static const UInt32 LOAD_FLAGS_IS_REFRESH = 16;
00103           static const UInt32 LOAD_FLAGS_IS_LINK = 32;
00104           static const UInt32 LOAD_FLAGS_BYPASS_HISTORY = 64;
00105           static const UInt32 LOAD_FLAGS_REPLACE_HISTORY = 128;
00106           static const UInt32 LOAD_FLAGS_BYPASS_CACHE = 256;
00107           static const UInt32 LOAD_FLAGS_BYPASS_PROXY = 512;
00108           static const UInt32 LOAD_FLAGS_CHARSET_CHANGE = 1024;
00109           static const UInt32 STOP_NETWORK = 1;
00110           static const UInt32 STOP_CONTENT = 2;
00111           static const UInt32 STOP_ALL = 3;
00112 
00113           void goBack() {};
00114           void goForward() {};
00115           void gotoIndex(Int32 arg0) {};
00116           void loadURI(String *arg0, UInt32 arg1, URI *arg2, InputStream *arg3, InputStream *arg4) {}; 
00117           void reload(UInt32 arg0) {};
00118           void stop(UInt32 arg0) {};
00119       }; // class WebNavigation
00120 
00121       public __gc class WebBrowser
00122       {
00123         public:
00124           bool addWebBrowserListener() { return true; };
00125           bool removeWebBrowserListener() { return true; };
00126           bool SetContainerWindow(WebBrowserChrome *aChrome) { return true; };
00127       }; // class WebBrowser
00128 
00129       public __gc class WindowWatcher
00130       {
00131         public:
00132           bool openWindow() { return true; };
00133           bool registerNotification() { return true; };
00134           bool unregisterNotification() { return true; };
00135           bool getWindowEnumerator() { return true; };
00136           bool getNewPrompter() { return true; };
00137           bool getNewAuthPrompter() { return true; };
00138           bool setWindowCreator() { return true; };
00139       }; //class WindowWatcher
00140 
00141       public __gc class WindowCreator
00142       {
00143         public:
00144           bool createChromeWindow() { return true; };
00145       }; //class WindowCreator
00146 
00147     } // namespace WebBrowser
00148 
00149   } // namespace Embedding
00150 }