Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: ppapi/c/dev/ppb_char_set_dev.h

Issue 5340003: Make a new test to enforce the sizes of all structs and enums in the C API.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/c/dev/ppb_audio_config_dev.h ('k') | ppapi/c/dev/ppb_directory_reader_dev.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_C_DEV_PPB_CHAR_SET_DEV_H_ 5 #ifndef PPAPI_C_DEV_PPB_CHAR_SET_DEV_H_
6 #define PPAPI_C_DEV_PPB_CHAR_SET_DEV_H_ 6 #define PPAPI_C_DEV_PPB_CHAR_SET_DEV_H_
7 7
8 #include "ppapi/c/pp_module.h" 8 #include "ppapi/c/pp_module.h"
9 #include "ppapi/c/pp_stdint.h" 9 #include "ppapi/c/pp_stdint.h"
10 #include "ppapi/c/pp_var.h" 10 #include "ppapi/c/pp_var.h"
(...skipping 13 matching lines...) Expand all
24 // errors will be removed from the output. 24 // errors will be removed from the output.
25 PP_CHARSET_CONVERSIONERROR_SKIP, 25 PP_CHARSET_CONVERSIONERROR_SKIP,
26 26
27 // Replaces the error or unrepresentable character with a substitution 27 // Replaces the error or unrepresentable character with a substitution
28 // character. When converting to a Unicode character set (UTF-8 or UTF-16) 28 // character. When converting to a Unicode character set (UTF-8 or UTF-16)
29 // it will use the unicode "substitution character" U+FFFD. When converting 29 // it will use the unicode "substitution character" U+FFFD. When converting
30 // to another character set, the character will be charset-specific. For 30 // to another character set, the character will be charset-specific. For
31 // many languages this will be the representation of the '?' character. 31 // many languages this will be the representation of the '?' character.
32 PP_CHARSET_CONVERSIONERROR_SUBSTITUTE 32 PP_CHARSET_CONVERSIONERROR_SUBSTITUTE
33 }; 33 };
34 PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(PP_CharSet_ConversionError, 4);
34 35
35 struct PPB_CharSet_Dev { 36 struct PPB_CharSet_Dev {
36 // Converts the UTF-16 string pointed to in |*utf16| to an 8-bit string in the 37 // Converts the UTF-16 string pointed to in |*utf16| to an 8-bit string in the
37 // specified code page. |utf16_len| is measured in UTF-16 units, not bytes. 38 // specified code page. |utf16_len| is measured in UTF-16 units, not bytes.
38 // This value may not be NULL. 39 // This value may not be NULL.
39 // 40 //
40 // The return value is a NULL-terminated 8-bit string corresponding to the 41 // The return value is a NULL-terminated 8-bit string corresponding to the
41 // new character set, or NULL on failure. THIS STRING MUST BE FREED USING 42 // new character set, or NULL on failure. THIS STRING MUST BE FREED USING
42 // PPB_Core::MemFree(). The length of the returned string, not including the 43 // PPB_Core::MemFree(). The length of the returned string, not including the
43 // terminating NULL, will be placed into *output_length. When there is no 44 // terminating NULL, will be placed into *output_length. When there is no
(...skipping 25 matching lines...) Expand all
69 // Returns a string var representing the current multi-byte character set of 70 // Returns a string var representing the current multi-byte character set of
70 // the current system. 71 // the current system.
71 // 72 //
72 // WARNING: You really shouldn't be using this function unless you're dealing 73 // WARNING: You really shouldn't be using this function unless you're dealing
73 // with legacy data. You should be using UTF-8 or UTF-16 and you don't have 74 // with legacy data. You should be using UTF-8 or UTF-16 and you don't have
74 // to worry about the character sets. 75 // to worry about the character sets.
75 struct PP_Var (*GetDefaultCharSet)(PP_Module module); 76 struct PP_Var (*GetDefaultCharSet)(PP_Module module);
76 }; 77 };
77 78
78 #endif // PPAPI_C_DEV_PPB_CHAR_SET_DEV_H_ 79 #endif // PPAPI_C_DEV_PPB_CHAR_SET_DEV_H_
OLDNEW
« no previous file with comments | « ppapi/c/dev/ppb_audio_config_dev.h ('k') | ppapi/c/dev/ppb_directory_reader_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698