2001-09-26 00:40:45 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* 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/. */
|
2011-05-02 08:49:11 +00:00
|
|
|
#ifndef nsWin32Locale_h__
|
|
|
|
#define nsWin32Locale_h__
|
1999-02-04 00:33:44 +00:00
|
|
|
|
|
|
|
#include "nscore.h"
|
|
|
|
#include "nsString.h"
|
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
|
2011-05-02 08:49:11 +00:00
|
|
|
class nsWin32Locale {
|
|
|
|
public:
|
|
|
|
static nsresult GetPlatformLocale(const nsAString& locale, LCID* winLCID);
|
|
|
|
static void GetXPLocale(LCID winLCID, nsAString& locale);
|
1999-02-04 00:33:44 +00:00
|
|
|
|
2011-05-02 08:49:11 +00:00
|
|
|
private:
|
|
|
|
// Static class - Don't allow instantiation.
|
|
|
|
nsWin32Locale(void) {}
|
2005-11-11 14:36:26 +00:00
|
|
|
|
2011-05-02 08:49:11 +00:00
|
|
|
typedef LCID (WINAPI*LocaleNameToLCIDPtr)(LPCWSTR lpName, DWORD dwFlags);
|
|
|
|
typedef int (WINAPI*LCIDToLocaleNamePtr)(LCID Locale, LPWSTR lpName,
|
|
|
|
int cchName, DWORD dwFlags);
|
1999-02-04 00:33:44 +00:00
|
|
|
|
2011-05-02 08:49:11 +00:00
|
|
|
static LocaleNameToLCIDPtr localeNameToLCID;
|
|
|
|
static LCIDToLocaleNamePtr lcidToLocaleName;
|
|
|
|
|
|
|
|
static void initFunctionPointers ();
|
|
|
|
};
|
2005-11-11 14:36:26 +00:00
|
|
|
|
1999-02-04 00:33:44 +00:00
|
|
|
#endif
|