Struct xpcom::interfaces::mozIOSPreferences
[−]
[src]
#[repr(C)]pub struct mozIOSPreferences { /* fields omitted */ }
interface mozIOSPreferences : nsISupports
Methods
impl mozIOSPreferences
[src]
pub fn coerce<T: mozIOSPreferencesCoerce>(&self) -> &T
[src]
Cast this mozIOSPreferences
to one of its base interfaces.
impl mozIOSPreferences
[src]
pub const dateTimeFormatStyleNone: i64
dateTimeFormatStyleNone: i64 = 0
pub const dateTimeFormatStyleShort: i64
dateTimeFormatStyleShort: i64 = 1
pub const dateTimeFormatStyleMedium: i64
dateTimeFormatStyleMedium: i64 = 2
pub const dateTimeFormatStyleLong: i64
dateTimeFormatStyleLong: i64 = 3
pub const dateTimeFormatStyleFull: i64
dateTimeFormatStyleFull: i64 = 4
pub unsafe fn GetSystemLocales(
&self,
aCount: *mut uint32_t,
aOutArray: *mut *mut *const c_char
) -> nsresult
[src]
&self,
aCount: *mut uint32_t,
aOutArray: *mut *mut *const c_char
) -> nsresult
/**
* Returns a list of locales used by the host environment for UI
* localization.
*
* The result is a sorted list and we expect that the OS attempts to
* use the top locale from the list for which it has data.
*
* Each element of the list is a valid locale ID that can be passed to ICU
* and ECMA402 Intl APIs,
* At the same time each element is a valid BCP47 language tag that can be
* used for language negotiation.
*
* Example: ["en-US", "de", "pl", "sr-Cyrl", "zh-Hans-HK"]
*
* (See OSPreferences.h for a more C++-friendly version of this.)
*/
void getSystemLocales ([optional] out unsigned long aCount, [array, size_is (aCount), retval] out string aOutArray);
pub unsafe fn GetRegionalPrefsLocales(
&self,
aCount: *mut uint32_t,
aOutArray: *mut *mut *const c_char
) -> nsresult
[src]
&self,
aCount: *mut uint32_t,
aOutArray: *mut *mut *const c_char
) -> nsresult
/**
* Returns a list of locales used by host environment for regional
* preferences internationalization.
*
* The result is a sorted list and we expect that the OS attempts to
* use the top locale from the list for which it has data.
*
* Each element of the list is a valid locale ID that can be passed to ICU
* and ECMA402 Intl APIs,
*
* Example: ["en-US", "de", "pl", "sr-Cyrl", "zh-Hans-HK"]
*
* (See OSPreferences.h for a more C++-friendly version of this.)
*/
void getRegionalPrefsLocales ([optional] out unsigned long aCount, [array, size_is (aCount), retval] out string aOutArray);
pub unsafe fn GetSystemLocale(&self, aSystemLocale: &mut nsACString) -> nsresult
[src]
/**
* Returns the best locale that the host environment is localized to.
*
* The result is a valid locale ID and it should be
* used for all APIs that do not handle language negotiation.
*
* In any scenario involving language negotiation, GetSystemLocales should
* be preferred over the single value.
*
* Example: "zh-Hans-HK"
*/
readonly attribute ACString systemLocale;
pub unsafe fn GetDateTimePattern(
&self,
timeFormatStyle: int32_t,
dateFormatStyle: int32_t,
locale: &nsACString,
_retval: &mut nsAString
) -> nsresult
[src]
&self,
timeFormatStyle: int32_t,
dateFormatStyle: int32_t,
locale: &nsACString,
_retval: &mut nsAString
) -> nsresult
/**
* Returns the best possible date/time pattern for the host environment
* taking into account date/time regional settings user defined in the OS
* preferences.
*
* Notice, that depending on the OS it may take into account those settings
* for all locales, or only if the locale matches the OS locale.
*
* It takes two integer arguments that must be valid `dateTimeFormatStyle*`
* values (see constants defined above), and a string representing a
* BCP47 locale.
*
* It returns a string with a LDML date/time pattern.
*
* If no pattern can be retrieved from the host environment, it will
* lookup the best available pattern from ICU.
*
* Notice, this is a pretty unique method in this API in that it does
* more than look up into host environment.
* The reason for that is that constructing the right date/time pattern
* requires a lot of OS-specific logic and it ends up being easier to just
* handle all scenarios, including with cases where we fail to retrieve
* anything from the OS, here.
*/
AString getDateTimePattern (in long timeFormatStyle, in long dateFormatStyle, [optional] in ACString locale);
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for mozIOSPreferences
[src]
const IID: nsIID
IID: nsIID = nsID(1704216597, 59822, 18621, [162, 191, 241, 16, 135, 32, 149, 12])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for mozIOSPreferences
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for mozIOSPreferences
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.