зеркало из https://github.com/mozilla/pjs.git
Added idl directory
This commit is contained in:
Родитель
652b1ee343
Коммит
1e8968f433
|
@ -0,0 +1,32 @@
|
|||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
|
||||
|
||||
MODULE=locale
|
||||
|
||||
DEPTH=..\..\..
|
||||
|
||||
XPIDLSRCS = \
|
||||
.\nsILocale.idl \
|
||||
.\nsILocaleService.idl \
|
||||
.\nsIScriptableDateFormat.idl \
|
||||
$(NULL)
|
||||
|
||||
|
||||
include <$(DEPTH)/config/rules.mak>
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
%{C++
|
||||
#define NSILOCALE_COLLATE "NSILOCALE_COLLATE"
|
||||
#define NSILOCALE_CTYPE "NSILOCALE_CTYPE"
|
||||
#define NSILOCALE_MONETARY "NSILOCALE_MONETARY"
|
||||
#define NSILOCALE_NUMERIC "NSILOCALE_NUMERIC"
|
||||
#define NSILOCALE_TIME "NSILOCALE_TIME"
|
||||
#define NSILOCALE_MESSAGE "NSILOCALE_MESSAGES"
|
||||
|
||||
#define NS_LOCALE_PROGID "component://netscape/intl/nslocale"
|
||||
%}
|
||||
|
||||
[scriptable, uuid(21035ee0-4556-11d3-91cd-00105aa3f7dc)]
|
||||
interface nsILocale : nsISupports {
|
||||
|
||||
wstring GetCategory (in wstring category);
|
||||
};
|
|
@ -0,0 +1,52 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsILocale.idl"
|
||||
|
||||
[scriptable, uuid(7c094410-4558-11d3-91cd-00105aa3f7dc)]
|
||||
interface nsILocaleDefinition : nsISupports {
|
||||
void SetLocaleCategory(in wstring category, in wstring value);
|
||||
};
|
||||
|
||||
// The Locale service interface. This is a singleton object, and should be
|
||||
// obtained from the <tt>nsServiceManager</tt>.
|
||||
[scriptable, uuid(48ab1fa0-4550-11d3-91cd-00105aa3f7dc)]
|
||||
interface nsILocaleService : nsISupports {
|
||||
|
||||
nsILocale NewLocale(in wstring aLocale);
|
||||
nsILocale NewLocaleObject(in nsILocaleDefinition localeDefinition);
|
||||
nsILocale GetSystemLocale();
|
||||
nsILocale GetApplicationLocale();
|
||||
nsILocale GetLocaleFromAcceptLanguage(in string acceptLanguage);
|
||||
};
|
||||
|
||||
%{C++
|
||||
|
||||
// {C8E518C1-47AE-11d3-91CD-00105AA3F7DC}
|
||||
#define NS_LOCALESERVICE_CID {0xc8e518c1,0x47ae,0x11d3,{0x91,0xcd,0x0,0x10,0x5a,0xa3,0xf7,0xdc}}
|
||||
#define NS_LOCALESERVICE_PROGID "component://netscape/intl/nslocaleservice"
|
||||
|
||||
extern nsresult
|
||||
NS_NewLocaleService(nsILocaleService** result);
|
||||
|
||||
extern nsresult
|
||||
NS_NewLocaleDefinition(nsILocaleDefinition** result);
|
||||
%}
|
||||
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
typedef long nsDateFormatSelector;
|
||||
%{ C++
|
||||
enum
|
||||
{
|
||||
kDateFormatNone = 0, // do not include the date in the format string
|
||||
kDateFormatLong, // provides the long date format for the given locale
|
||||
kDateFormatShort, // provides the short date format for the given locale
|
||||
kDateFormatYearMonth, // formats using only the year and month
|
||||
kDateFormatWeekday // week day (e.g. Mon, Tue)
|
||||
};
|
||||
%}
|
||||
|
||||
typedef long nsTimeFormatSelector;
|
||||
%{ C++
|
||||
enum
|
||||
{
|
||||
kTimeFormatNone = 0, // don't include the time in the format string
|
||||
kTimeFormatSeconds, // provides the time format with seconds in the given locale
|
||||
kTimeFormatNoSeconds, // provides the time format without seconds in the given locale
|
||||
kTimeFormatSecondsForce24Hour, // forces the time format to use the 24 clock, regardless of the locale conventions
|
||||
kTimeFormatNoSecondsForce24Hour // forces the time format to use the 24 clock, regardless of the locale conventions
|
||||
};
|
||||
%}
|
||||
|
||||
|
||||
[scriptable, uuid(0c89efb0-1aae-11d3-9141-006008a6edf6)]
|
||||
interface nsIScriptableDateFormat : nsISupports {
|
||||
// format date and time, locale is language country pair (e.g. en-US) or empty string for application default
|
||||
void FormatDateTime(in wstring locale,
|
||||
in nsDateFormatSelector dateFormatSelector,
|
||||
in nsTimeFormatSelector timeFormatSelector,
|
||||
in long year,
|
||||
in long month,
|
||||
in long day,
|
||||
in long hour,
|
||||
in long minute,
|
||||
in long second,
|
||||
[shared, retval] out wstring dateTimeString);
|
||||
// format date, locale is language country pair (e.g. en-US) or empty string for application default
|
||||
void FormatDate(in wstring locale,
|
||||
in nsDateFormatSelector dateFormatSelector,
|
||||
in long year,
|
||||
in long month,
|
||||
in long day,
|
||||
[shared, retval] out wstring dateString);
|
||||
// format time, locale is language country pair (e.g. en-US) or empty string for application default
|
||||
void FormatTime(in wstring locale,
|
||||
in nsTimeFormatSelector timeFormatSelector,
|
||||
in long hour,
|
||||
in long minute,
|
||||
in long second,
|
||||
[shared, retval] out wstring timeString);
|
||||
};
|
Загрузка…
Ссылка в новой задаче