intl/unicharutil/idl/nsIUnicodeNormalizer.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/intl/unicharutil/idl/nsIUnicodeNormalizer.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,33 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     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 +#include "nsISupports.idl"
    1.10 +
    1.11 +%{C++
    1.12 +#define NS_UNICODE_NORMALIZER_CID { 0xa665e49a, 0xf3e6, 0x4fed, { 0x9f, 0x31, 0xf7, 0xc5, 0x68, 0xa2, 0x98, 0x99 } }
    1.13 +#define NS_UNICODE_NORMALIZER_CONTRACTID "@mozilla.org/intl/unicodenormalizer;1"
    1.14 +%}
    1.15 +
    1.16 +[scriptable, uuid(B43A461F-1BCF-4329-820B-66E48C979E14)]
    1.17 +interface nsIUnicodeNormalizer : nsISupports
    1.18 +{
    1.19 + /**
    1.20 + * Normalize Unicode (NFD, NFC, NFKD, NFKC).
    1.21 + *
    1.22 + * NFD: Canonical Decomposition
    1.23 + * NFC: Canonical Decomposition, followed by Canonical Composition
    1.24 + * NFKD: Compatibility Decomposition
    1.25 + * NFKC: Compatibility Decomposition, followed by Canonical Composition
    1.26 + * Reference: Unicode Standard, TR15, Unicode Normalization Forms
    1.27 + *
    1.28 + * @param aSrc         [IN]  nsAString which contains an input UTF-16 string.
    1.29 + * @param aDest        [OUT] A pointer to an output buffer provided by a callee.
    1.30 + * @return             NS_OK for success, 
    1.31 + */
    1.32 +  void NormalizeUnicodeNFD(in AString aSrc, out AString aDest);
    1.33 +  void NormalizeUnicodeNFC(in AString aSrc, out AString aDest);
    1.34 +  void NormalizeUnicodeNFKD(in AString aSrc, out AString aDest);
    1.35 +  void NormalizeUnicodeNFKC(in AString aSrc, out AString aDest);
    1.36 +};

mercurial