m17nIntro(3m17n)

πŸ“¦
version 1.8.4 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ m17nIntro ✨

okay bestie, welcome to m17nIntro(3m17n) β€” this is the intro page for The m17n Library πŸ’– like, the front door, the vibe-setting, the "hey girl come learn about m17n" moment. It's from the m17n library's own manual (that's the 3m17n part, iykyk).


🌸 NAME 🌸

m17nIntro_-_Introduc - - Introduction to the m17n library.

(not me spelling it exactly like that, I know, "Introduc" is giving unfinished homework but it's literally what the page says so I'm keeping it, no cap 🫢)


✨ SYNOPSIS ✨

πŸŽ€ Macros πŸŽ€

#define M17NLIB_MAJOR_VERSION
#define M17NLIB_MINOR_VERSION
#define M17NLIB_PATCH_LEVEL
#define M17NLIB_VERSION_NAME
#define M17N_INIT()
#define M17N_FINI()
  • M17N_INIT() β€” Initialize the m17n library.
  • M17N_FINI() β€” Finalize the m17n library.

πŸ¦‹ Enumerations πŸ¦‹

enum M17NStatus { M17N_NOT_INITIALIZED, M17N_CORE_INITIALIZED,
    M17N_SHELL_INITIALIZED, M17N_GUI_INITIALIZED }

That's the enumeration for the status of the m17n library. It's literally a vibe check for "how awake is this library rn".

πŸ’œ Functions πŸ’œ

enum M17NStatus m17n_status (void)

It reports which part of the m17n library is initialized. Very "what's the situation bestie" of it.


πŸ‘‘ Detailed Description πŸ‘‘

Introduction to the m17n library. Periodt.

πŸ’… API LEVELS πŸ’…

The API of the m17n library is divided into these five. Five! Not four, not six. Five.

  1. CORE API

It provides basic modules to handle M-texts. To use this API, an application program must include <m17n-core.h> and be linked with -lm17n-core.

  1. SHELL API

It provides modules for character properties, character set handling, code conversion, etc. 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 with -lm17n-core -lm17n.

When you use this API, CORE API is also available.

  1. FLT API

It provides modules for text shaping using mdbFLT. To use this API, an application program must include <m17n.h> and be linked with -lm17n-core -lm17n-flt.

When you use this API, CORE API is also available.

  1. GUI API

It provides GUI modules such as drawing and inputting M-texts on a graphic device. This API itself is independent of graphic devices, but most functions require an argument MFrame that is created for a specific type of graphic devices. The currently supported graphic devices are null device, the X Window System, and image data (gdImagePtr) of the GD library.

  • On a frame of a null device, you cannot draw text nor use input methods. However, functions like mdraw_glyph_list(), etc. are available.
  • On a frame of the X Window System, you can use the whole GUI API.
  • On a frame of the GD library, you can use all drawing API but cannot use input methods.

To use this API, an application program must include <m17n-gui.h> and be linked with -lm17n-core -lm17n -lm17n-gui.

When you use this API, CORE, SHELL, and FLT APIs are also available.

  1. MISC API

It provides miscellaneous functions to support error handling and debugging. This API cannot be used standalone; it must be used with one or more APIs listed above. To use this API, an application program must include <m17n-misc.h> in addition to one of the header files described above.

See also the section m17n-config(1).

🌈 ENVIRONMENT VARIABLES 🌈

The m17n library pays attention to the following environment variables. Like, it's listening. πŸ‘€

  • M17NDIR β€” The name of the directory that contains data of the m17n database. See Database for details.
  • MDEBUG_XXX β€” Environment variables whose names start with MDEBUG_ control debug information output. See Debugging for details.

⭐ API NAMING CONVENTION ⭐

The m17n library exports functions, variables, macros, and types. All of them start with the letter m or M, and are followed by an object name (e.g. symbol, plist) or a module name (e.g. draw, input). Note that the name of M-text objects start with mtext and not with mmtext. (yes bestie, do NOT write mmtext, that's a crime 🚨)

  • functions -- mobject() or mobject_xxx()

They start with m and are followed by an object name in lower case. Words are separated by _. For example, msymbol(), mtext_ref_char(), mdraw_text().

  • non-symbol variables -- mobject, or mobject_xxx

The naming convention is the same as functions (e.g. mface_large).

  • symbol variables -- Mname

Variables of the type MSymbol start with M and are followed by their names. Words are separated by _. For example, Mlanguage (the name is language), Miso_2022 (the name is iso-2022).

  • macros -- MOBJECT_XXX

They start with M and are followed by an object name in upper case. Words are separated by _.

  • types -- MObject or MObjectXxx

They start with M and are followed by capitalized object names. Words are concatenated directly and no _ are used. For example, MConverter, MInputDriver.


🧚 Macro Definition 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_PATCH_LEVEL

The M17NLIB_PATCH_LEVEL macro gives the patch level 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()

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

It is safe to call this macro multiple times, but in that case, the macro M17N_FINI() must be called the same times to free the memory. (matching energy, bestie β€” if you call it three times you gotta clean up three times πŸ’€)

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

SEE ALSO

M17N_FINI(), m17n_status()

#define M17N_FINI()

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

If the macro M17N_INIT() was called N times, the Nth call of this macro actually free the memory.

SEE ALSO

M17N_INIT(), m17n_status()


πŸ“ Enumeration Type Documentation πŸ“

enum M17NStatus

Enumeration for the status of the m17n library. The enum M17NStatus is used as a return value of the function m17n_status().

Enumerator

  • M17N_NOT_INITIALIZED β€” No modules is initialized, and all modules are finalized. (basically the library is asleep 😴)
  • M17N_CORE_INITIALIZED β€” Only the modules in CORE API are initialized.
  • M17N_SHELL_INITIALIZED β€” Only the modules in CORE and SHELL APIs are initialized.
  • M17N_GUI_INITIALIZED β€” All modules are initialized. (main character energy fr fr πŸ‘‘)

πŸ’– Author πŸ’–

Generated automatically by Doxygen for The m17n Library from the source code.

Copyright (C) 2001 Information-technology Promotion Agency (IPA)

Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>.


okay that's the whole page bestie, every last option, macro, enum and copyright line, nothing skipped, we ate and left no crumbs 🫢

and for the cute sign-off: this lil masterpiece is Version 1.8.4, dated Mon Sep 25 2023, and it lives under m17nIntro(3m17n) in The m17n Library manual. slay πŸ’…βœ¨

πŸ“¦ where this page comes from