OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2014 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
| 8 #include "SkTemplates.h" |
| 9 |
| 10 #include <dwrite.h> |
| 11 |
| 12 class SkString; |
| 13 |
| 14 //////////////////////////////////////////////////////////////////////////////// |
| 15 // Factory |
| 16 |
| 17 IDWriteFactory* sk_get_dwrite_factory(); |
| 18 |
| 19 //////////////////////////////////////////////////////////////////////////////// |
| 20 // String conversion |
| 21 |
| 22 /** Prefer to use this type to prevent template proliferation. */ |
| 23 typedef SkAutoSTMalloc<16, WCHAR> SkSMallocWCHAR; |
| 24 |
| 25 /** Converts a utf8 string to a WCHAR string. */ |
| 26 HRESULT sk_cstring_to_wchar(const char* skname, SkSMallocWCHAR* name); |
| 27 |
| 28 /** Converts a WCHAR string to a utf8 string. */ |
| 29 HRESULT sk_wchar_to_skstring(WCHAR* name, SkString* skname); |
| 30 |
| 31 //////////////////////////////////////////////////////////////////////////////// |
| 32 // Locale |
| 33 |
| 34 void sk_get_locale_string(IDWriteLocalizedStrings* names, const WCHAR* preferedL
ocale, |
| 35 SkString* skname); |
| 36 |
| 37 typedef decltype(GetUserDefaultLocaleName)* SkGetUserDefaultLocaleNameProc; |
| 38 HRESULT SkGetGetUserDefaultLocaleNameProc(SkGetUserDefaultLocaleNameProc* proc); |
OLD | NEW |