#include "fontset.h"
#include "face.h"
-static int win_initialized;
-
#ifndef DLOPEN_SHLIB_EXT
#define DLOPEN_SHLIB_EXT ".so"
#endif
\f
/* External API */
-int
+void
m17n_init_win (void)
{
int mdebug_mask = MDEBUG_INIT;
- if (win_initialized++)
- return 0;
+ if (m17n__gui_initialized++)
+ return;
m17n_init ();
if (merror_code != MERROR_NONE)
- return -1;
+ {
+ m17n__gui_initialized--;
+ return;
+ }
MDEBUG_PUSH_TIME ();
register_device_library (Mx, "libm17n-X");
register_device_library (Mgd, "libm17n-gd");
- return 0;
+ return;
err:
MDEBUG_POP_TIME ();
MDEBUG_PRINT_TIME ("INIT", (stderr, " to initialize the m17n GUI module."));
MDEBUG_POP_TIME ();
- return -1;
}
void
m17n_fini_win (void)
{
int mdebug_mask = MDEBUG_FINI;
+ MPlist *plist;
- if (win_initialized > 1)
- win_initialized--;
- else
+ if (m17n__gui_initialized == 0
+ || --m17n__gui_initialized > 0)
+ return;
+
+ MDEBUG_PUSH_TIME ();
+ MDEBUG_PUSH_TIME ();
+ MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize device modules."));
+ MPLIST_DO (plist, device_library_list)
{
- MPlist *plist;
+ MDeviceLibraryInterface *interface = MPLIST_VAL (plist);
- win_initialized = 0;
- MDEBUG_PUSH_TIME ();
- MDEBUG_PUSH_TIME ();
- MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize device modules."));
- MPLIST_DO (plist, device_library_list)
+ if (interface->handle && interface->fini)
{
- MDeviceLibraryInterface *interface = MPLIST_VAL (plist);
-
- if (interface->handle && interface->fini)
- {
- (*interface->fini) ();
- dlclose (interface->handle);
- }
- free (interface->library);
+ (*interface->fini) ();
+ dlclose (interface->handle);
}
+ free (interface->library);
+ }
#ifdef HAVE_FREETYPE
- if (null_interface.handle)
- (*null_interface.fini) ();
+ if (null_interface.handle)
+ (*null_interface.fini) ();
#endif /* not HAVE_FREETYPE */
- M17N_OBJECT_UNREF (device_library_list);
- MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize input-gui module."));
- minput__win_fini ();
- MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize draw module."));
- mdraw__fini ();
- MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize face module."));
- mface__fini ();
- MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize fontset module."));
- mfont__fontset_fini ();
- MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize font module."));
- mfont__fini ();
- mframe_default = NULL;
- MDEBUG_POP_TIME ();
- MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize the gui modules."));
- MDEBUG_POP_TIME ();
- }
+ M17N_OBJECT_UNREF (device_library_list);
+ MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize input-gui module."));
+ minput__win_fini ();
+ MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize draw module."));
+ mdraw__fini ();
+ MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize face module."));
+ mface__fini ();
+ MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize fontset module."));
+ mfont__fontset_fini ();
+ MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize font module."));
+ mfont__fini ();
+ mframe_default = NULL;
+ MDEBUG_POP_TIME ();
+ MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize the gui modules."));
+ MDEBUG_POP_TIME ();
m17n_fini ();
}
The created frame uses the specified colormap.
- <li> #Mfont, the value must be #Mx or #Mfreetype.
+ <li> #Mfont, the value must be #Mx, #Mfreetype, or #Mxft.
- This specifies which font backend to use. #Mx means to use only X
- core fonts, and #Mfreetype means to use only local fonts supported
- by FreeType fonts. It is ignored if the specified font backend is
- not supported on the device. By default, all font backend
- supported on the device are used.
+ The created frame uses the specified font backend. The value #Mx
+ instructs to use X core fonts, #Mfreetype to use local fonts
+ supported by FreeType fonts, and #Mxft to use local fonts via Xft
+ library. You can specify this parameter more than once with
+ different values if you want to use multiple font backends. This
+ is ignored if the specified font backend is not supported on the
+ device.
+
+ When this parameter is not specified, all font backend supported
+ on the device are used.
</ul>
À¸À®¤µ¤ì¤¿¥Õ¥ì¡¼¥à¤Ï¡¢»ØÄꤷ¤¿¥«¥é¡¼¥Þ¥Ã¥×¤ò»ÈÍѤ¹¤ë¡£
- <li> #Mfont. ÃÍ¤Ï #Mx ¤« #Mfreetype ¤Ç¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
+ <li> #Mfont. Ãͤϡ¢#Mx, #Mfreetype, #Mxft ¤Î¤¤¤º¤ì¤«¡£
+
+ À¸À®¤µ¤ì¤¿¥Õ¥ì¡¼¥à¤Ï»ØÄꤷ¤¿¥Õ¥©¥ó¥È¥Ð¥Ã¥¯¥¨¥ó¥É¤ò»ÈÍѤ¹¤ë¡£Ãͤ¬
+ #Mx ¤Ç¤¢¤ì¤Ð X ¤Î¥³¥¢¥Õ¥©¥ó¥È¡¢#Mfreetype ¤Ç¤¢¤ì¤Ð FreeType ¤Ç¥µ¥Ý¡¼
+ ¥È¤µ¤ì¤Æ¤¤¤ë¥í¡¼¥«¥ë¥Õ¥©¥ó¥È¡¢#Mxft ¤Ç¤¢¤ì¤Ð Xft ¥é¥¤¥Ö¥é¥ê·Ðͳ¤Ç
+ ÍѤ¤¤ë¥í¡¼¥«¥ë¥Õ¥©¥ó¥È¤ò»ÈÍѤ¹¤ë¡£Ê£¿ô¤Î¥Õ¥©¥ó¥È¥Ð¥Ã¥¯¥¨¥ó¥É¤ò»ÈÍÑ
+ ¤·¤¿¤¤¾ì¹ç¤Ë¤Ï¡¢¤³¤Î¥Ñ¥é¥á¡¼¥¿¤òÊ£¿ô²ó¡¢°Û¤Ê¤ëÃͤǻØÄꤹ¤ë¤³¤È¤¬¤Ç
+ ¤¤ë¡£»ØÄꤷ¤¿¥Ð¥Ã¥¯¥¨¥ó¥É¤¬¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¥Ç¥Ð¥¤¥¹¤Ç¤Ï¡¢¤³¤Î
+ ¥Ñ¥é¥á¡¼¥¿¤Ï̵»ë¤µ¤ì¤ë¡£
- ¤³¤ì¤Ï¤É¤Î¥Õ¥©¥ó¥È¥Ð¥Ã¥¯¥¨¥ó¥É¤ò»È¤¦¤«¤ò»ØÄꤹ¤ë¡£#Mx ¤Ï X ¥³¥¢¥Õ¥©
- ¥ó¥È¤Î¤ß¤ò¡¢ #Mfreetype ¤Ï FreeType ¥é¥¤¥Ö¥é¥ê¤Ë¤è¤ë¥í¡¼¥«¥ë¥Õ¥©¥ó
- ¥È¤Î¤ß¤ò»È¤¦¤³¤È¤ò°ÕÌ£¤¹¤ë¡£¤â¤·»ØÄꤵ¤ì¤¿¥Õ¥©¥ó¥È¥Ð¥Ã¥¯¥¨¥ó¥É¤¬¥Õ
- ¥ì¡¼¥à¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Ê¤«¤Ã¤¿¤é¡¢¤³¤Î»ØÄê¤Ï̵»ë¤µ¤ì¤ë¡£¤³¤Î»ØÄê
- ¤¬¤Ê¤±¤ì¤Ð¥Õ¥ì¡¼¥à¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¤¹¤Ù¤Æ¤Î¥Õ¥©¥ó¥È¥Ð¥Ã¥¯¥¨¥ó¥É
- ¤¬»È¤ï¤ì¤ë¡£
+ ¤³¤Î¥Ñ¥é¥á¡¼¥¿¤¬Ìµ¤¤¾ì¹ç¤Ë¤Ï¡¢¥Ç¥Ð¥¤¥¹¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¤¹¤Ù¤Æ¤Î
+ ¥Õ¥©¥ó¥È¥Ð¥Ã¥¯¥¨¥ó¥É¤òÍøÍѤ¹¤ë¡£
</ul>