gucharmap-unicode-info.h 4.23 KB
Newer Older
1
/*
Christian Persch's avatar
Christian Persch committed
2
 * Copyright © 2004 Noah Levitt
3
 * Copyright (c) 2016 DaeHyun Sung
4 5 6
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
Christian Persch's avatar
Christian Persch committed
7
 * Free Software Foundation; either version 3 of the License, or (at your
8 9 10 11 12 13 14 15 16
 * option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
17
 * 59 Temple Place, Suite 330, Boston, MA 02110-1301  USA
18 19
 */

20 21 22 23
#if !defined (__GUCHARMAP_GUCHARMAP_H_INSIDE__) && !defined (GUCHARMAP_COMPILATION)
#error "Only <gucharmap/gucharmap.h> can be included directly."
#endif

24 25 26
#ifndef GUCHARMAP_UNICODE_INFO_H
#define GUCHARMAP_UNICODE_INFO_H

Noah Levitt's avatar
Noah Levitt committed
27
#include <glib.h>
28 29 30

G_BEGIN_DECLS

31 32 33 34 35 36 37 38 39 40 41
typedef enum {
  GUCHARMAP_UNICODE_VERSION_UNASSIGNED,
  GUCHARMAP_UNICODE_VERSION_1_1,
  GUCHARMAP_UNICODE_VERSION_2_0,
  GUCHARMAP_UNICODE_VERSION_2_1,
  GUCHARMAP_UNICODE_VERSION_3_0,
  GUCHARMAP_UNICODE_VERSION_3_1,
  GUCHARMAP_UNICODE_VERSION_3_2,
  GUCHARMAP_UNICODE_VERSION_4_0,
  GUCHARMAP_UNICODE_VERSION_4_1,
  GUCHARMAP_UNICODE_VERSION_5_0,
42
  GUCHARMAP_UNICODE_VERSION_5_1,
43
  GUCHARMAP_UNICODE_VERSION_5_2,
Christian Persch's avatar
Christian Persch committed
44
  GUCHARMAP_UNICODE_VERSION_6_0,
45
  GUCHARMAP_UNICODE_VERSION_6_1,
46
  GUCHARMAP_UNICODE_VERSION_6_2,
47
  GUCHARMAP_UNICODE_VERSION_6_3,
48
  GUCHARMAP_UNICODE_VERSION_7_0,
49
  GUCHARMAP_UNICODE_VERSION_8_0,
50 51
  GUCHARMAP_UNICODE_VERSION_9_0,
  GUCHARMAP_UNICODE_VERSION_LATEST = GUCHARMAP_UNICODE_VERSION_9_0 /* private, will move forward with each revision */
52 53
} GucharmapUnicodeVersion;

54
/* return values are read-only */
55 56
const gchar *  gucharmap_get_unicode_name                (gunichar uc);
const gchar *  gucharmap_get_unicode_data_name           (gunichar uc);
57
gint                    gucharmap_get_unicode_data_name_count     (void);
58
GucharmapUnicodeVersion gucharmap_get_unicode_version             (gunichar uc);
59
const gchar *  gucharmap_get_unicode_category_name       (gunichar uc);
60
gint                    gucharmap_get_unihan_count                (void);
61 62 63 64 65 66 67
const gchar *  gucharmap_get_unicode_kDefinition         (gunichar uc);
const gchar *  gucharmap_get_unicode_kCantonese          (gunichar uc);
const gchar *  gucharmap_get_unicode_kMandarin           (gunichar uc);
const gchar *  gucharmap_get_unicode_kTang               (gunichar uc);
const gchar *  gucharmap_get_unicode_kKorean             (gunichar uc);
const gchar *  gucharmap_get_unicode_kJapaneseKun        (gunichar uc);
const gchar *  gucharmap_get_unicode_kJapaneseOn         (gunichar uc);
68 69
const gchar *  gucharmap_get_unicode_kHangul             (gunichar uc);
const gchar *  gucharmap_get_unicode_kVietnamese         (gunichar uc);
70 71

/* nameslist stuff */
72 73
const gchar ** gucharmap_get_nameslist_stars             (gunichar  uc);
const gchar ** gucharmap_get_nameslist_equals            (gunichar  uc);
74
gunichar *              gucharmap_get_nameslist_exes              (gunichar  uc);
75 76
const gchar ** gucharmap_get_nameslist_pounds            (gunichar  uc);
const gchar ** gucharmap_get_nameslist_colons            (gunichar  uc);
77 78
gboolean                gucharmap_unichar_validate                (gunichar  uc);
gint                    gucharmap_unichar_to_printable_utf8       (gunichar  uc,
Noah Levitt's avatar
Noah Levitt committed
79
                                                                   gchar    *outbuf);
80 81 82
GUnicodeType            gucharmap_unichar_type                    (gunichar  uc);
gboolean                gucharmap_unichar_isdefined               (gunichar  uc);
gboolean                gucharmap_unichar_isgraph                 (gunichar  uc);
Noah Levitt's avatar
Noah Levitt committed
83

Noah Levitt's avatar
Noah Levitt committed
84
/* defined in gucharmap-script-codepoint-list.c */
85 86
const gchar ** gucharmap_unicode_list_scripts            (void);
const gchar *  gucharmap_unicode_get_script_for_char     (gunichar wc);
87

88
const gchar *  gucharmap_unicode_version_to_string       (GucharmapUnicodeVersion version);
89

90 91 92
/* doesn't really belong here, but no better place was available */
gunichar     gucharmap_unicode_get_locale_character (void);

93 94 95 96
G_END_DECLS

#endif  /* #ifndef GUCHARMAP_UNICODE_INFO_H */