DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (1aeaa33a64f9)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
/* -*- Mode: IDL; 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/. */

#include "nsISupports.idl"

/**
 * This is an internal helper for mozIMozIntl API. There should be virtually
 * no reason for you to call this API except from mozIMozIntl implementation.
 *
 * This API helps accessing the SpiderMonkey Intl APIs, but it is mozIMozIntl
 * that exposes the thin wrapper around them that binds the functionality
 * to Gecko.
 */
[scriptable, uuid(189eaa7d-b29a-43a9-b1fb-7658990df940)]
interface mozIMozIntlHelper : nsISupports
{
  [implicit_jscontext] void addGetCalendarInfo(in jsval intlObject);
  [implicit_jscontext] void addGetDisplayNames(in jsval intlObject);
  [implicit_jscontext] void addGetLocaleInfo(in jsval intlObject);

  /**
   * Adds a MozDateTimeFormat contructor to the given object. This function may only
   * be called once within a realm/global object: calling it multiple times will
   * throw.
   *
   * The difference between regular Intl.DateTimeFormat and the method created here
   * is that we support two more options:
   *
   *    timeStyle: full | long | medium | short
   *    dateStyle: full | long | medium | short
   *
   * which allow user to create normalized date/time style formats.
   * Additionally, when those options are used instead of the regular atomic
   * options (hour, minute, month, etc.) this code will look into host
   * Operating System regional preferences and adjust for that.
   *
   * That means that if user will manually select time format (hour12/24) or
   * adjust how the date should be displayed, MozDateTimeFormat will use that.
   *
   * This API should be used everywhere in the UI instead of regular Intl  API.
   */
  [implicit_jscontext] void addDateTimeFormatConstructor(in jsval intlObject);
};