Main Page   Modules   Data Structures   Globals   Appendix  

Introduction

Introduction to the m17n library. More...

Defines

#define M17NLIB_MAJOR_VERSION
#define M17NLIB_MINOR_VERSION
#define M17NLIB_VERSION_NAME
#define M17N_INIT()
 Initialize the m17n library.

#define M17N_FINI()
 Finalize the m17n library.


Detailed Description

API LEVELS

The API of the m17n library is divided into these four.

  1. CORE API

    It provides basic modules to handle M-texts. They don't require the m17n database. To use this API, an application program must include <m17n-core.h> and be linked by -lm17n-core.

  2. SHELL API

    It provides modules that utilize the m17n database. They load various kinds of data from the database on demand. To use this API, an application program must include <m17n.h> and be linked by -lm17n-core -lm17n. With that, CORE API is also available.

  3. GUI API

    It provides GUI modules such as drawing and inputting M-texts on a window system. The API itself is independent on a window system, but the m17n library must be configured to use a specific window system. Currently, we support only the X Window System. To use this API, an application program must include <m17n-gui.h> and <m17n-X.h>, and be linked by -lm17n-core -lm17n -lm17n-X. With that, CORE and SHELL APIs are also available.

  4. MISC API

    It provides miscellaneous functions to support error handling and debugging. This API can't be used by itself, but with one or more APIs listed above. To use the API, an application program must include <m17n-misc.h> in addition to one of <m17n-core.h>, <m17n.h>, and <m17n-gui.h>.

See also the section m17n-config(1).

ENVIRONMENT VARIABLE

The m17n library pays attention to these environment variables.

API NAMING CONVENTION

The library exports functions, variables, macros, and types. All of them start by the letter 'm' or 'M' followed by an object name (e.g. "symbol" and "plist", but "mtext" object is given the name "text" to avoid double 'm' at the head) or a module name (e.g. draw, input).


Define Documentation

#define M17NLIB_MAJOR_VERSION
 

The M17NLIB_MAJOR_VERSION macro gives the major version number of the m17n library.

#define M17NLIB_MINOR_VERSION
 

The M17NLIB_MINOR_VERSION macro gives the minor version number of the m17n library.

#define M17NLIB_VERSION_NAME
 

The M17NLIB_VERSION_NAME macro gives the version name of the m17n library as a string.

 
#define M17N_INIT  ) 
 

The macro M17N_INIT() initializes the m17n library. This function must be called before any m17n functions are used.

If the initialization was successful, the external variable merror_code is set to 0. Otherwise it is set to -1.

 
#define M17N_FINI  ) 
 

The macro M17N_FINI() finalizes the m17n library. It frees all the memory area used by the m17n library. Once this function is called, no m17n functions should be used until the macro M17N_INIT() is called again.


Top of this page

Main Page   Modules   Data Structures   Globals   Appendix  

mulemark mule-aist@m17n.org