~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/extensions/xmlterm/base/mozLineTerm.h

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * The contents of this file are subject to the Mozilla Public
 
3
 * License Version 1.1 (the "MPL"); you may not use this file
 
4
 * except in compliance with the MPL. You may obtain a copy of
 
5
 * the MPL at http://www.mozilla.org/MPL/
 
6
 * 
 
7
 * Software distributed under the MPL is distributed on an "AS
 
8
 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
 
9
 * implied. See the MPL for the specific language governing
 
10
 * rights and limitations under the MPL.
 
11
 * 
 
12
 * The Original Code is XMLterm.
 
13
 * 
 
14
 * The Initial Developer of the Original Code is Ramalingam Saravanan.
 
15
 * Portions created by Ramalingam Saravanan <svn@xmlterm.org> are
 
16
 * Copyright (C) 1999 Ramalingam Saravanan. All Rights Reserved.
 
17
 * 
 
18
 * Contributor(s):
 
19
 */
 
20
 
 
21
// mozLineTerm.h: Declaration of mozLineTerm class
 
22
// which implements the LineTerm and LineTermAux interfaces.
 
23
// and provides an XPCOM/XPCONNECT wrapper to the LINETERM module
 
24
 
 
25
#include "nspr.h"
 
26
#include "nscore.h"
 
27
#include "nsString.h"
 
28
#include "nsIGenericFactory.h"
 
29
 
 
30
#include "nsIServiceManager.h"
 
31
 
 
32
#include "nsIDocument.h"
 
33
#include "nsIDOMHTMLDocument.h"
 
34
 
 
35
#include "mozILineTerm.h"
 
36
#include "lineterm.h"
 
37
 
 
38
#include <glibconfig.h>
 
39
#include <gdk/gdk.h>
 
40
 
 
41
#define MAXCOL 4096            // Maximum columns in line buffer
 
42
 
 
43
class mozLineTerm : public mozILineTermAux
 
44
{
 
45
public:
 
46
  mozLineTerm();
 
47
  virtual ~mozLineTerm();
 
48
 
 
49
  // nsISupports interface
 
50
  NS_DECL_ISUPPORTS
 
51
  NS_DECL_MOZILINETERM
 
52
  NS_DECL_MOZILINETERMAUX
 
53
 
 
54
  // Define a Create method to be used with a factory:
 
55
  static NS_METHOD
 
56
    Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
 
57
 
 
58
  // others
 
59
 
 
60
  /** GTK event callback function
 
61
   */
 
62
  static void Callback(gpointer data,
 
63
                       gint source,
 
64
                       GdkInputCondition condition);
 
65
 
 
66
protected:
 
67
  /** Checks if Mozilla preference settings are secure
 
68
   * @param _retval (output) PR_TRUE if settings are secure
 
69
   */
 
70
  NS_IMETHOD ArePrefsSecure(PRBool *_retval);
 
71
 
 
72
  /** Checks if document principal is secure and returns principal string
 
73
   * @param domDOC DOM document object
 
74
   * @param aPrincipalStr (output) document principal string
 
75
   */
 
76
  NS_IMETHOD GetSecurePrincipal(nsIDOMDocument *domDoc,
 
77
                                char** aPrincipalStr);
 
78
 
 
79
  /** lineterm descriptor index returned by lterm_new (>= 0) */
 
80
  int mLTerm;
 
81
 
 
82
  /** current cursor row position */
 
83
  int mCursorRow;
 
84
 
 
85
  /** current cursor column position */
 
86
  int mCursorColumn;
 
87
 
 
88
  /** flag controlling whether is LineTerm is suspended */
 
89
  PRBool mSuspended;
 
90
 
 
91
  /** flag controlling input echo in LineTerm */
 
92
  PRBool mEchoFlag;
 
93
 
 
94
  /** non-owning reference to Observer to be notified when data is available
 
95
   * for reading from LineTerm
 
96
   */
 
97
  nsIObserver* mObserver;
 
98
 
 
99
  /** cookie string used for authentication (stored in document.cookie) */
 
100
  nsString mCookie;
 
101
 
 
102
  /** record of last time when timestamp was displayed in user input log */
 
103
  PRTime mLastTime;
 
104
 
 
105
  /** Flag controlling logging of user input to STDERR */
 
106
  static PRBool mLoggingEnabled;
 
107
 
 
108
  static PRBool mLoggingInitialized;
 
109
 
 
110
};