1 #ifndef LIBRARIES_CHARSETS_H
    2 #define LIBRARIES_CHARSETS_H
    3 
    4 /*
    5  * charsets.library include
    6  *
    7  * Copyright ? 2009-2012 The MorphOS Development Team, All Rights Reserved.
    8  */
    9 
   10 #include <utility/tagitem.h>
   11 
   12 /* Typedefs */
   13 
   14 #ifndef UTF16_TYPEDEF
   15 #define UTF16_TYPEDEF
   16 typedef unsigned short UTF16;
   17 #endif
   18 
   19 /* Type flags for GetCharsetNumber() */
   20 
   21 #define CSF_IANA_NAME     (1 << 0)
   22 #define CSF_IANA_MIMENAME (1 << 1)
   23 #define CSF_IANA_ALIAS    (1 << 2)
   24 
   25 /* Some IANA MIBenum numbers */
   26 
   27 #define MIBENUM_INVALID         0
   28 #define MIBENUM_US_ASCII        3
   29 #define MIBENUM_ISO_8859_1      4
   30 #define MIBENUM_ISO_8859_2      5
   31 #define MIBENUM_ISO_8859_3      6
   32 #define MIBENUM_ISO_8859_4      7
   33 #define MIBENUM_ISO_8859_5      8
   34 #define MIBENUM_ISO_8859_6      9
   35 #define MIBENUM_ISO_8859_7      10
   36 #define MIBENUM_ISO_8859_8      11
   37 #define MIBENUM_ISO_8859_9      12
   38 #define MIBENUM_ISO_8859_10     13
   39 #define MIBENUM_UTF_8           106
   40 #define MIBENUM_ISO_8859_13     109
   41 #define MIBENUM_ISO_8859_14     110
   42 #define MIBENUM_ISO_8859_15     111
   43 #define MIBENUM_ISO_8859_16     112
   44 #define MIBENUM_ISO_10646_UCS_2 1000
   45 #define MIBENUM_ISO_10646_UCS_4 1001
   46 #define MIBENUM_UTF_16BE        1013
   47 #define MIBENUM_UTF_16LE        1014
   48 #define MIBENUM_UTF_16          1015
   49 #define MIBENUM_UTF_32          1017
   50 #define MIBENUM_UTF_32BE        1018
   51 #define MIBENUM_UTF_32LE        1019
   52 #define MIBENUM_KOI8_R          2084
   53 #define MIBENUM_AMIGA_1251      2104
   54 #define MIBENUM_WINDOWS_1250    2250
   55 #define MIBENUM_WINDOWS_1251    2251
   56 #define MIBENUM_WINDOWS_1252    2252
   57 #define MIBENUM_TIS_620         2259
   58 
   59 
   60 /* Nonstandard encodings (not emumerated by IANA). */
   61 
   62 #define MIBENUM_AMIGAPL         5000
   63 
   64 
   65 /* For ConvertTagList() use. */
   66 
   67 #define MIBENUM_SYSTEM          0xFFFFFFFF
   68 
   69 
   70 /* Tags for ConvertTagList() */
   71 
   72 #define CST_GetDestBytes         (TAG_USER + 1)
   73 #define CST_GetUnterminatedBytes (TAG_USER + 2)
   74 #define CST_DoNotTerminate       (TAG_USER + 3)
   75 #define CST_GetDestEncoding      (TAG_USER + 4)
   76 
   77 
   78 /* Attributes and methods of "charsets.list" BOOPSI class. */
   79 
   80 #define CLSM_NextCharsetName    (TAG_USER + 256)
   81 #define CLSM_NextCharsetNumber  (TAG_USER + 257)
   82 
   83 #define CLSA_NameTable          (TAG_USER + 272)  /* [..G], (CONST_STRPTR*) */
   84 #define CLSA_NumberTable        (TAG_USER + 273)  /* [..G], (LONG*) */
   85 #define CLSA_NameCount          (TAG_USER + 274)  /* [..G], (LONG) */
   86 #define CLSA_NumberCount        (TAG_USER + 275)  /* [..G], (LONG) */
   87 #define CLSA_Aliases            (TAG_USER + 276)  /* [I..], (BOOL) */
   88 #define CLSA_MimePreferred      (TAG_USER + 277)  /* [I..], (BOOL) */
   89 #define CLSA_NonStandard        (TAG_USER + 278)  /* [I..], (BOOL) */
   90 
   91 #endif /* LIBRARIES_CHARSETS_H */