Back to index

lightning-sunbird  0.9+nobinonly
mozXMLTerminal.h
Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK *****
00002  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00003  *
00004  * The contents of this file are subject to the Mozilla Public License Version
00005  * 1.1 (the "License"); you may not use this file except in compliance with
00006  * the License. You may obtain a copy of the License at
00007  * http://www.mozilla.org/MPL/
00008  *
00009  * Software distributed under the License is distributed on an "AS IS" basis,
00010  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011  * for the specific language governing rights and limitations under the
00012  * License.
00013  *
00014  * The Original Code is XMLterm.
00015  *
00016  * The Initial Developer of the Original Code is
00017  * Ramalingam Saravanan.
00018  * Portions created by the Initial Developer are Copyright (C) 1999
00019  * the Initial Developer. All Rights Reserved.
00020  *
00021  * Contributor(s):
00022  *
00023  * Alternatively, the contents of this file may be used under the terms of
00024  * either the GNU General Public License Version 2 or later (the "GPL"), or
00025  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00026  * in which case the provisions of the GPL or the LGPL are applicable instead
00027  * of those above. If you wish to allow use of your version of this file only
00028  * under the terms of either the GPL or the LGPL, and not to allow others to
00029  * use your version of this file under the terms of the MPL, indicate your
00030  * decision by deleting the provisions above and replace them with the notice
00031  * and other provisions required by the GPL or the LGPL. If you do not delete
00032  * the provisions above, a recipient may use your version of this file under
00033  * the terms of any one of the MPL, the GPL or the LGPL.
00034  *
00035  * ***** END LICENSE BLOCK ***** */
00036 
00037 // mozXMLTerminal.h: declaration of mozXMLTerminal
00038 // which implements the mozIXMLTerminal interface
00039 // to manage all XMLterm operations.
00040 
00041 #include "nscore.h"
00042 #include "nspr.h"
00043 #include "nsCOMPtr.h"
00044 #include "nsWeakReference.h"
00045 #include "nsWeakPtr.h"
00046 #include "nsString.h"
00047 #include "nsIGenericFactory.h"
00048 #include "nsIWebProgressListener.h"
00049 #include "nsIObserver.h"
00050 #include "mozXMLT.h"
00051 
00052 #include "mozILineTerm.h"
00053 #include "mozIXMLTerminal.h"
00054 #include "mozXMLTermSession.h"
00055 #include "mozXMLTermListeners.h"
00056 #include "mozIXMLTermStream.h"
00057 
00058 
00059 class mozXMLTerminal : public mozIXMLTerminal,
00060                        public nsIWebProgressListener,
00061                        public nsIObserver,
00062                        public nsSupportsWeakReference
00063 {
00064   public:
00065 
00066   mozXMLTerminal();
00067   virtual ~mozXMLTerminal();
00068 
00069   // nsISupports interface
00070   NS_DECL_ISUPPORTS
00071 
00072   // nsIWebProgressListener interface
00073   NS_DECL_NSIWEBPROGRESSLISTENER
00074 
00075   // mozIXMLTerminal interface
00076   NS_DECL_MOZIXMLTERMINAL
00077 
00078   // nsIObserver interface
00079   NS_IMETHOD Observe(nsISupports *aSubject, const char *aTopic,
00080                      const PRUnichar *someData);
00081 
00082   // Others
00083 
00087   NS_IMETHOD Activate(void);
00088 
00089   protected:
00090 
00092   PRBool             mInitialized;
00093 
00095   nsString           mCookie;
00096 
00097   nsString           mCommand;
00098   nsString           mPromptExpr;
00099 
00101   nsString           mInitInput;
00102 
00104   mozIXMLTermShell*  mXMLTermShell;
00105 
00107   nsWeakPtr          mDocShell;
00108 
00110   nsWeakPtr          mPresShell;
00111 
00113   nsWeakPtr          mDOMDocument;
00114 
00116   mozXMLTermSession* mXMLTermSession;
00117 
00119   nsCOMPtr<mozILineTermAux> mLineTermAux;
00120 
00122   PRBool                    mNeedsResizing;
00123 
00125   nsCOMPtr<nsIDOMEventListener> mKeyListener;
00126 
00128   nsCOMPtr<nsIDOMEventListener> mTextListener;
00129 
00131   nsCOMPtr<nsIDOMEventListener> mMouseListener;
00132 
00134   nsCOMPtr<nsIDOMEventListener> mDragListener;
00135 
00136 };