intl/unicharutil/public/nsUnicodeNormalizer.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #ifndef nsUnicodeNormalizer_h__
     7 #define nsUnicodeNormalizer_h__
     9 #include "nscore.h"
    10 #include "nsISupports.h"
    12 #include "nsIUnicodeNormalizer.h"
    14 nsresult NS_NewUnicodeNormalizer(nsISupports** oResult);
    17 class nsUnicodeNormalizer : public nsIUnicodeNormalizer {
    18 public:
    19    nsUnicodeNormalizer();
    20    virtual ~nsUnicodeNormalizer();
    22    NS_DECL_ISUPPORTS 
    24    NS_IMETHOD NormalizeUnicodeNFD( const nsAString& aSrc, nsAString& aDest);
    25    NS_IMETHOD NormalizeUnicodeNFC( const nsAString& aSrc, nsAString& aDest);
    26    NS_IMETHOD NormalizeUnicodeNFKD( const nsAString& aSrc, nsAString& aDest);
    27    NS_IMETHOD NormalizeUnicodeNFKC( const nsAString& aSrc, nsAString& aDest);
    29    // low-level access to the composition data needed for HarfBuzz callbacks
    30    static bool Compose(uint32_t a, uint32_t b, uint32_t *ab);
    31    static bool DecomposeNonRecursively(uint32_t comp, uint32_t *c1, uint32_t *c2);
    32 };
    34 #endif //nsUnicodeNormalizer_h__

mercurial