extensions/spellcheck/src/mozPersonalDictionary.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/extensions/spellcheck/src/mozPersonalDictionary.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,48 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef mozPersonalDictionary_h__
    1.10 +#define mozPersonalDictionary_h__
    1.11 +
    1.12 +#include "nsCOMPtr.h"
    1.13 +#include "nsString.h"
    1.14 +#include "mozIPersonalDictionary.h"
    1.15 +#include "nsIUnicodeEncoder.h"
    1.16 +#include "nsIObserver.h"
    1.17 +#include "nsWeakReference.h"
    1.18 +#include "nsTHashtable.h"
    1.19 +#include "nsCRT.h"
    1.20 +#include "nsCycleCollectionParticipant.h"
    1.21 +#include "nsHashKeys.h"
    1.22 +
    1.23 +#define MOZ_PERSONALDICTIONARY_CONTRACTID "@mozilla.org/spellchecker/personaldictionary;1"
    1.24 +#define MOZ_PERSONALDICTIONARY_CID         \
    1.25 +{ /* 7EF52EAF-B7E1-462B-87E2-5D1DBACA9048 */  \
    1.26 +0X7EF52EAF, 0XB7E1, 0X462B, \
    1.27 +  { 0X87, 0XE2, 0X5D, 0X1D, 0XBA, 0XCA, 0X90, 0X48 } }
    1.28 +
    1.29 +class mozPersonalDictionary : public mozIPersonalDictionary,
    1.30 +                              public nsIObserver,
    1.31 +                              public nsSupportsWeakReference
    1.32 +{
    1.33 +public:
    1.34 +  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
    1.35 +  NS_DECL_MOZIPERSONALDICTIONARY
    1.36 +  NS_DECL_NSIOBSERVER
    1.37 +  NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(mozPersonalDictionary, mozIPersonalDictionary)
    1.38 +
    1.39 +  mozPersonalDictionary();
    1.40 +  virtual ~mozPersonalDictionary();
    1.41 +
    1.42 +  nsresult Init();
    1.43 +
    1.44 +protected:
    1.45 +  bool           mDirty;       /* has the dictionary been modified */
    1.46 +  nsTHashtable<nsUnicharPtrHashKey> mDictionaryTable;
    1.47 +  nsTHashtable<nsUnicharPtrHashKey> mIgnoreTable;
    1.48 +  nsCOMPtr<nsIUnicodeEncoder>  mEncoder; /*Encoder to use to compare with spellchecker word */
    1.49 +};
    1.50 +
    1.51 +#endif

mercurial