gucharmap-unicode-info.h 3.98 KB
Newer Older
1
/*
Christian Persch's avatar
Christian Persch committed
2
 * Copyright © 2004 Noah Levitt
3 4 5
 *
 * 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
6
 * Free Software Foundation; either version 3 of the License, or (at your
7 8 9 10 11 12 13 14 15
 * 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.,
16
 * 59 Temple Place, Suite 330, Boston, MA 02110-1301  USA
17 18
 */

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

23 24 25
#ifndef GUCHARMAP_UNICODE_INFO_H
#define GUCHARMAP_UNICODE_INFO_H

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

G_BEGIN_DECLS

30 31 32 33 34 35 36 37 38 39 40
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,
41
  GUCHARMAP_UNICODE_VERSION_5_1,
42 43
  GUCHARMAP_UNICODE_VERSION_5_2,
  GUCHARMAP_UNICODE_VERSION_LATEST = GUCHARMAP_UNICODE_VERSION_5_2 /* private, will move forward with each revision */
44 45
} GucharmapUnicodeVersion;

46
/* return values are read-only */
Noah Levitt's avatar
Noah Levitt committed
47 48
G_CONST_RETURN gchar *  gucharmap_get_unicode_name                (gunichar uc);
G_CONST_RETURN gchar *  gucharmap_get_unicode_data_name           (gunichar uc);
49
gint                    gucharmap_get_unicode_data_name_count     (void);
50
GucharmapUnicodeVersion gucharmap_get_unicode_version             (gunichar wc);
Noah Levitt's avatar
Noah Levitt committed
51
G_CONST_RETURN gchar *  gucharmap_get_unicode_category_name       (gunichar uc);
52
gint                    gucharmap_get_unihan_count                (void);
Noah Levitt's avatar
Noah Levitt committed
53 54 55 56 57 58 59
G_CONST_RETURN gchar *  gucharmap_get_unicode_kDefinition         (gunichar uc);
G_CONST_RETURN gchar *  gucharmap_get_unicode_kCantonese          (gunichar uc);
G_CONST_RETURN gchar *  gucharmap_get_unicode_kMandarin           (gunichar uc);
G_CONST_RETURN gchar *  gucharmap_get_unicode_kTang               (gunichar uc);
G_CONST_RETURN gchar *  gucharmap_get_unicode_kKorean             (gunichar uc);
G_CONST_RETURN gchar *  gucharmap_get_unicode_kJapaneseKun        (gunichar uc);
G_CONST_RETURN gchar *  gucharmap_get_unicode_kJapaneseOn         (gunichar uc);
60 61

/* nameslist stuff */
Noah Levitt's avatar
Noah Levitt committed
62 63 64 65 66 67 68 69 70 71 72
G_CONST_RETURN gchar ** gucharmap_get_nameslist_stars             (gunichar  wc);
G_CONST_RETURN gchar ** gucharmap_get_nameslist_equals            (gunichar  wc);
gunichar *              gucharmap_get_nameslist_exes              (gunichar  wc);
G_CONST_RETURN gchar ** gucharmap_get_nameslist_pounds            (gunichar  wc);
G_CONST_RETURN gchar ** gucharmap_get_nameslist_colons            (gunichar  wc);
gboolean                gucharmap_unichar_validate                (gunichar  wc);
gint                    gucharmap_unichar_to_printable_utf8       (gunichar  wc, 
                                                                   gchar    *outbuf);
GUnicodeType            gucharmap_unichar_type                    (gunichar  wc);
gboolean                gucharmap_unichar_isdefined               (gunichar  wc);
gboolean                gucharmap_unichar_isgraph                 (gunichar  wc);
Noah Levitt's avatar
Noah Levitt committed
73

Noah Levitt's avatar
Noah Levitt committed
74
/* defined in gucharmap-script-codepoint-list.c */
75
G_CONST_RETURN gchar ** gucharmap_unicode_list_scripts            (void);
Noah Levitt's avatar
Noah Levitt committed
76
G_CONST_RETURN gchar *  gucharmap_unicode_get_script_for_char     (gunichar wc);
77

78 79
G_CONST_RETURN gchar *  gucharmap_unicode_version_to_string       (GucharmapUnicodeVersion version);

80 81 82
/* doesn't really belong here, but no better place was available */
gunichar     gucharmap_unicode_get_locale_character (void);

83 84 85 86
G_END_DECLS

#endif  /* #ifndef GUCHARMAP_UNICODE_INFO_H */