The m17n Library 1.8.4
Loading...
Searching...
No Matches
Data Structures | Typedefs | Enumerations | Functions | Variables
m17n.h File Reference

Data Structures

struct  MConverter
 Structure to be used in code conversion. More...
 
struct  MCodingInfoISO2022
 Structure for a coding system of type MCODING_TYPE_ISO_2022. More...
 
struct  MCodingInfoUTF
 Structure for extra information about a coding system of type MCODING_TYPE_UTF. More...
 
struct  MInputDriver
 Structure of input method driver. More...
 
struct  MInputMethod
 Structure of input method. More...
 
struct  MInputContext
 Structure of input context. More...
 

Typedefs

typedef struct MLocale MLocale
 struct MLocale.
 
typedef void(* MInputCallbackFunc) (MInputContext *ic, MSymbol command)
 Type of input method callback functions.
 

Enumerations

enum  MConversionResult {
  MCONVERSION_RESULT_SUCCESS ,
  MCONVERSION_RESULT_INVALID_BYTE ,
  MCONVERSION_RESULT_INVALID_CHAR ,
  MCONVERSION_RESULT_INSUFFICIENT_SRC ,
  MCONVERSION_RESULT_INSUFFICIENT_DST ,
  MCONVERSION_RESULT_IO_ERROR
}
 Codes that represent the result of code conversion. More...
 
enum  MCodingType {
  MCODING_TYPE_CHARSET ,
  MCODING_TYPE_UTF ,
  MCODING_TYPE_ISO_2022 ,
  MCODING_TYPE_MISC
}
 Types of coding system.
More...
 
enum  MCodingFlagISO2022 {
  MCODING_ISO_RESET_AT_EOL = 0x1 ,
  MCODING_ISO_RESET_AT_CNTL = 0x2 ,
  MCODING_ISO_EIGHT_BIT = 0x4 ,
  MCODING_ISO_LONG_FORM = 0x8 ,
  MCODING_ISO_DESIGNATION_G0 = 0x10 ,
  MCODING_ISO_DESIGNATION_G1 = 0x20 ,
  MCODING_ISO_DESIGNATION_CTEXT = 0x40 ,
  MCODING_ISO_DESIGNATION_CTEXT_EXT = 0x80 ,
  MCODING_ISO_LOCKING_SHIFT = 0x100 ,
  MCODING_ISO_SINGLE_SHIFT = 0x200 ,
  MCODING_ISO_SINGLE_SHIFT_7 = 0x400 ,
  MCODING_ISO_EUC_TW_SHIFT = 0x800 ,
  MCODING_ISO_ISO6429 = 0x1000 ,
  MCODING_ISO_REVISION_NUMBER = 0x2000 ,
  MCODING_ISO_FULL_SUPPORT = 0x3000 ,
  MCODING_ISO_FLAG_MAX
}
 Bit-masks to specify the detail of coding system whose type is MCODING_TYPE_ISO_2022.
More...
 
enum  MInputCandidatesChanged {
  MINPUT_CANDIDATES_LIST_CHANGED = 1 ,
  MINPUT_CANDIDATES_INDEX_CHANGED = 2 ,
  MINPUT_CANDIDATES_SHOW_CHANGED = 4 ,
  MINPUT_CANDIDATES_CHANGED_MAX
}
 Bit-masks to specify how candidates of input method is changed.
More...
 

Functions

MSymbol mchar_define_charset (const char *name, MPlist *plist)
 
MSymbol mchar_resolve_charset (MSymbol symbol)
 Resolve charset name.
 
int mchar_list_charset (MSymbol **symbols)
 List symbols representing charsets.
 
int mchar_decode (MSymbol charset_name, unsigned code)
 Decode a code-point.
 
unsigned mchar_encode (MSymbol charset_name, int c)
 Encode a character code.
 
int mchar_map_charset (MSymbol charset_name, void(*func)(int from, int to, void *arg), void *func_arg)
 Call a function for all the characters in a specified charset.
 
MSymbol mconv_define_coding (const char *name, MPlist *plist, int(*resetter)(MConverter *), int(*decoder)(const unsigned char *, int, MText *, MConverter *), int(*encoder)(MText *, int, int, unsigned char *, int, MConverter *), void *extra_info)
 
MSymbol mconv_resolve_coding (MSymbol symbol)
 Resolve coding system name.
 
int mconv_list_codings (MSymbol **symbols)
 List symbols representing coding systems.
 
MConvertermconv_buffer_converter (MSymbol coding, const unsigned char *buf, int n)
 Create a code converter bound to a buffer.
 
MConvertermconv_stream_converter (MSymbol coding, FILE *fp)
 Create a code converter bound to a stream.
 
int mconv_reset_converter (MConverter *converter)
 Reset a code converter.
 
void mconv_free_converter (MConverter *converter)
 Free a code converter.
 
MConvertermconv_rebind_buffer (MConverter *converter, const unsigned char *buf, int n)
 Bind a buffer to a code converter.
 
MConvertermconv_rebind_stream (MConverter *converter, FILE *fp)
 Bind a stream to a code converter.
 
MTextmconv_decode (MConverter *converter, MText *mt)
 Decode a byte sequence into an M-text.
 
MTextmconv_decode_buffer (MSymbol name, const unsigned char *buf, int n)
 Decode a buffer area based on a coding system.
 
MTextmconv_decode_stream (MSymbol name, FILE *fp)
 Decode a stream input based on a coding system.
 
int mconv_encode (MConverter *converter, MText *mt)
 Encode an M-text into a byte sequence.
 
int mconv_encode_range (MConverter *converter, MText *mt, int from, int to)
 Encode a part of an M-text.
 
int mconv_encode_buffer (MSymbol name, MText *mt, unsigned char *buf, int n)
 Encode an M-text into a buffer area.
 
int mconv_encode_stream (MSymbol name, MText *mt, FILE *fp)
 Encode an M-text to write to a stream.
 
int mconv_getc (MConverter *converter)
 Read a character via a code converter.
 
int mconv_ungetc (MConverter *converter, int c)
 Push a character back to a code converter.
 
int mconv_putc (MConverter *converter, int c)
 Write a character via a code converter.
 
MTextmconv_gets (MConverter *converter, MText *mt)
 Read a line using a code converter.
 
MPlistmlanguage_list (void)
 List 3-letter language codes.
 
MSymbol mlanguage_code (MSymbol language, int len)
 Get a language code.
 
MPlistmlanguage_name_list (MSymbol language, MSymbol target, MSymbol script, MSymbol territory)
 Return the language names written in the specified language.
 
MTextmlanguage_text (MSymbol language)
 Return the language name written in that language.
 
MPlistmscript_list (void)
 List script names.
 
MPlistmscript_language_list (MSymbol script)
 List languages that use a specified script.
 
MSymbol mlanguage_name (MSymbol language)
 
MLocalemlocale_set (int category, const char *locale)
 Set the current locale.
 
MSymbol mlocale_get_prop (MLocale *locale, MSymbol key)
 Get the value of a locale property.
 
int mtext_ftime (MText *mt, const char *format, const struct tm *tm, MLocale *locale)
 Format date and time.
 
MTextmtext_getenv (const char *name)
 Get an environment variable.
 
int mtext_putenv (MText *mt)
 Change or add an environment variable.
 
int mtext_coll (MText *mt1, MText *mt2)
 Compare two M-texts using the current locale.
 
MInputMethodminput_open_im (MSymbol language, MSymbol name, void *arg)
 Open an input method.
 
void minput_close_im (MInputMethod *im)
 Close an input method.
 
MInputContextminput_create_ic (MInputMethod *im, void *arg)
 Create an input context.
 
void minput_destroy_ic (MInputContext *ic)
 Destroy an input context.
 
int minput_filter (MInputContext *ic, MSymbol key, void *arg)
 Filter an input key.
 
int minput_lookup (MInputContext *ic, MSymbol key, void *arg, MText *mt)
 Look up a text produced in the input context.
 
void minput_set_spot (MInputContext *ic, int x, int y, int ascent, int descent, int fontsize, MText *mt, int pos)
 Set the spot of the input context.
 
void minput_toggle (MInputContext *ic)
 Toggle input method.
 
void minput_reset_ic (MInputContext *ic)
 Reset an input context.
 
MTextminput_get_description (MSymbol language, MSymbol name)
 Get description text of an input method.
 
MPlistminput_get_title_icon (MSymbol language, MSymbol name)
 Get title and icon filename of an input method.
 
MPlistminput_get_command (MSymbol language, MSymbol name, MSymbol command)
 
int minput_config_command (MSymbol language, MSymbol name, MSymbol command, MPlist *keyseq)
 
MPlistminput_get_variable (MSymbol language, MSymbol name, MSymbol variable)
 
int minput_config_variable (MSymbol language, MSymbol name, MSymbol variable, MPlist *value)
 Configure the value of an input method variable.
 
char * minput_config_file (void)
 Get the name of per-user customization file.
 
int minput_save_config (void)
 Save configurations in per-user customization file.
 
int minput_callback (MInputContext *ic, MSymbol command)
 Call a callback function.
 
MPlistminput_get_commands (MSymbol language, MSymbol name)
 Get information about input method commands.
 
int minput_assign_command_keys (MSymbol language, MSymbol name, MSymbol command, MPlist *keys)
 Assign a key sequence to an input method command (obsolete).
 
MPlistminput_get_variables (MSymbol language, MSymbol name)
 
int minput_set_variable (MSymbol language, MSymbol name, MSymbol variable, void *value)
 Set the initial value of an input method variable.
 
MPlistminput_parse_im_names (MText *mt)
 Parse input method names.
 
MPlistminput_list (MSymbol lang)
 
MInputMethodmdebug_dump_im (MInputMethod *im, int indent)
 Dump an input method.
 

Variables

MSymbol Mcharset_ascii
 Symbol representing the charset ASCII.
 
MSymbol Mcharset_iso_8859_1
 Symbol representing the charset ISO/IEC 8859/1.
 
MSymbol Mcharset_unicode
 Symbol representing the charset Unicode.
 
MSymbol Mcharset_m17n
 Symbol representing the largest charset.
 
MSymbol Mcharset_binary
 Symbol representing the charset for ill-decoded characters.
 
MSymbol Mmethod
 
MSymbol Mdimension
 
MSymbol Mmin_range
 
MSymbol Mmax_range
 
MSymbol Mmin_code
 
MSymbol Mmax_code
 
MSymbol Mascii_compatible
 
MSymbol Mfinal_byte
 
MSymbol Mrevision
 
MSymbol Mmin_char
 
MSymbol Mmapfile
 
MSymbol Mparents
 
MSymbol Msubset_offset
 
MSymbol Mdefine_coding
 
MSymbol Maliases
 
MSymbol Moffset
 
MSymbol Mmap
 Symbol for the map type method of charset.
 
MSymbol Munify
 Symbol for the unify type method of charset.
 
MSymbol Msubset
 
MSymbol Msuperset
 Symbol for the superset type method of charset.
 
MSymbol Mcoding_us_ascii
 Symbol for the coding system US-ASCII.
 
MSymbol Mcoding_iso_8859_1
 Symbol for the coding system ISO-8859-1.
 
MSymbol Mcoding_utf_8
 Symbol for the coding system UTF-8.
 
MSymbol Mcoding_utf_8_full
 Symbol for the coding system UTF-8-FULL.
 
MSymbol Mcoding_utf_16
 Symbol for the coding system UTF-16.
 
MSymbol Mcoding_utf_16be
 Symbol for the coding system UTF-16BE.
 
MSymbol Mcoding_utf_16le
 Symbol for the coding system UTF-16LE.
 
MSymbol Mcoding_utf_32
 Symbol for the coding system UTF-32.
 
MSymbol Mcoding_utf_32be
 Symbol for the coding system UTF-32BE.
 
MSymbol Mcoding_utf_32le
 Symbol for the coding system UTF-32LE.
 
MSymbol Mcoding_sjis
 Symbol for the coding system SJIS.
 
MSymbol Mtype
 
MSymbol Mcharsets
 
MSymbol Mflags
 
MSymbol Mdesignation
 
MSymbol Minvocation
 
MSymbol Mcode_unit
 
MSymbol Mbom
 
MSymbol Mlittle_endian
 
MSymbol Mutf
 
MSymbol Miso_2022
 
MSymbol Mreset_at_eol
 
MSymbol Mreset_at_cntl
 
MSymbol Meight_bit
 
MSymbol Mlong_form
 
MSymbol Mdesignation_g0
 
MSymbol Mdesignation_g1
 
MSymbol Mdesignation_ctext
 
MSymbol Mdesignation_ctext_ext
 
MSymbol Mlocking_shift
 
MSymbol Msingle_shift
 
MSymbol Msingle_shift_7
 
MSymbol Meuc_tw_shift
 
MSymbol Miso_6429
 
MSymbol Mrevision_number
 
MSymbol Mfull_support
 
MSymbol Mcoding
 The symbol Mcoding.
 
MSymbol Mmaybe
 Symbol whose name is "maybe".
 
MSymbol Miso639_1
 
MSymbol Miso639_2
 
MSymbol Mterritory
 
MSymbol Mmodifier
 
MSymbol Mcodeset
 
MInputDriver minput_default_driver
 The default driver for internal input methods.
 
MSymbol Minput_method
 Symbol whose name is "input-method".
 
MSymbol Minput_driver
 
MInputDriverminput_driver
 The driver for internal input methods.
 
MSymbol Minput_preedit_start
 
MSymbol Minput_preedit_draw
 
MSymbol Minput_preedit_done
 
MSymbol Minput_status_start
 
MSymbol Minput_status_draw
 
MSymbol Minput_status_done
 
MSymbol Minput_candidates_start
 
MSymbol Minput_candidates_draw
 
MSymbol Minput_candidates_done
 
MSymbol Minput_set_spot
 
MSymbol Minput_toggle
 
MSymbol Minput_reset
 
MSymbol Minput_get_surrounding_text
 
MSymbol Minput_delete_surrounding_text
 
MSymbol Minput_focus_move
 
MSymbol Minput_focus_in
 
MSymbol Minput_focus_out
 
MSymbol Minherited
 
MSymbol Mcustomized
 
MSymbol Mconfigured
 

Function Documentation

◆ mlanguage_name()

MSymbol mlanguage_name ( MSymbol  language)

Variable Documentation

◆ Miso639_2

MSymbol Miso639_2

m17n-lib Home