Canna provides the following three libraries:
- High-level libraries
From application programs, high-level libraries are available without considering Kana-to-Kanji
Conversion. Processes such as selecting candidates (including candidate list display) are executed by
the Kana-to-Kanji Conversion system. Only fixed character strings are passed to the application. If
the Kana-to-Kanji Conversion front end is being used for TTY input, the read (cooked mode) system call
in terminal input is regarded as a high-level library. In this case, scanf, which uses it, is also
regarded as a higo-level library. The Japanese version of Athena Widget (Text Wideget) in the X
Window System is a more typical library that is regarded as a high-level library.
- User interface libraries
Responding to one-character or one-key input, user interface libraries return various kinds of
information. They include the unfixed character string, fixed character string, marked segment
position, status dispaly character string, and candidate list character string. The libraries at this
level do not provide the detailed functions involving dictionary maintenance or learning control.
There is a little remaining room of divising the display fields although rough lines for Japanese
input user interface are restricted. It is recommended that application interfaces at this level be
used for an application that desires to obtain keys in raw mode in the TTY. Also, it is recommended
that they be used for an application that desires to input and display graphics and characters in a
single window.
- Dictionary access libraries
Dictionary access libraries are used to control dictionary access or candidate selection directly.
Kana-to-Kanji Conversion libraries at this level provide various function interfaces. They include
starting the use of Kana-to-Kanji Conversion system, converting the reading into Kanji, changing the
splitting of sentence-segment, fetching Next or Previous Candidate, controlling dictionary learning,
and maintaining dictionaries. Dictionary access libraries are used to construct a user interface or
high-level library. It is recommended that they not be used by ordinary users.
Canna provides three header files and three libraries. Their outlines are listed below:
- Header files
X11/kanji.h Used to input or output Japanese data with X.
canna/jrkanji.h Used to input or output TTY-level Japanese data.
canna/RK.h Used to use a dictionary access library.
- Libraries
libXnw Japanese version of Athena Widget Xaw. The application program does not need to
consider Kana-to-Kanji Conversion.
libXn Used to process Japanese data with X. When using XLookupKanjiString or
XDrawKanjiString, you must link this library.
libcanna Kernel for Japanese data input
Library link and header file include must be done as follows, depending on the function you use:
- Athena Widget
Header file canna/kanji.h
Library libXnw, libXn, libcanna
- XDrawKanjiString
Header file canna/kanji.h
Library libXn
- XLookupKanjiString, XKanjiControl
Header file canna/kanji.h
Library libXn, libcanna
- jrKanjiString, jrKanjiControl
Header file canna/jrkanji.h
Library libcanna
- Dictionary access library
Header file canna/RK.h
Library libcanna