gecko-dev/intl/hyphenation/nsHyphenationManager.h
Birunthan Mohanathas 8cbc0c7099 Bug 1038537 - Part 2: Flatten intl/hyphenation/{public,src}/ directories. r=smontagu
--HG--
rename : intl/hyphenation/src/COPYING => intl/hyphenation/COPYING
rename : intl/hyphenation/src/COPYING.LGPL => intl/hyphenation/COPYING.LGPL
rename : intl/hyphenation/src/COPYING.MPL => intl/hyphenation/COPYING.MPL
rename : intl/hyphenation/src/README => intl/hyphenation/README
rename : intl/hyphenation/src/README.compound => intl/hyphenation/README.compound
rename : intl/hyphenation/src/README.hyphen => intl/hyphenation/README.hyphen
rename : intl/hyphenation/src/README.mozilla => intl/hyphenation/README.mozilla
rename : intl/hyphenation/src/README.nonstandard => intl/hyphenation/README.nonstandard
rename : intl/hyphenation/src/hnjalloc.h => intl/hyphenation/hnjalloc.h
rename : intl/hyphenation/src/hnjstdio.cpp => intl/hyphenation/hnjstdio.cpp
rename : intl/hyphenation/src/hyphen.c => intl/hyphenation/hyphen.c
rename : intl/hyphenation/src/hyphen.h => intl/hyphenation/hyphen.h
rename : intl/hyphenation/src/nsHyphenationManager.cpp => intl/hyphenation/nsHyphenationManager.cpp
rename : intl/hyphenation/public/nsHyphenationManager.h => intl/hyphenation/nsHyphenationManager.h
rename : intl/hyphenation/src/nsHyphenator.cpp => intl/hyphenation/nsHyphenator.cpp
rename : intl/hyphenation/public/nsHyphenator.h => intl/hyphenation/nsHyphenator.h
2014-07-24 10:56:38 -07:00

56 lines
1.4 KiB
C++

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef nsHyphenationManager_h__
#define nsHyphenationManager_h__
#include "nsInterfaceHashtable.h"
#include "nsRefPtrHashtable.h"
#include "nsHashKeys.h"
#include "nsIObserver.h"
#include "mozilla/Omnijar.h"
class nsHyphenator;
class nsIAtom;
class nsIURI;
class nsHyphenationManager
{
public:
nsHyphenationManager();
already_AddRefed<nsHyphenator> GetHyphenator(nsIAtom *aLocale);
static nsHyphenationManager *Instance();
static void Shutdown();
private:
~nsHyphenationManager();
protected:
class MemoryPressureObserver MOZ_FINAL : public nsIObserver
{
~MemoryPressureObserver() {}
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIOBSERVER
};
void LoadPatternList();
void LoadPatternListFromOmnijar(mozilla::Omnijar::Type aType);
void LoadPatternListFromDir(nsIFile *aDir);
void LoadAliases();
nsInterfaceHashtable<nsISupportsHashKey,nsIAtom> mHyphAliases;
nsInterfaceHashtable<nsISupportsHashKey,nsIURI> mPatternFiles;
nsRefPtrHashtable<nsISupportsHashKey,nsHyphenator> mHyphenators;
static nsHyphenationManager *sInstance;
};
#endif // nsHyphenationManager_h__