X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fm17n-gui.c;h=5903bf598e16895c9f1242253485ce9efba34a9a;hb=fab40b485745418275aa92252a35144525e3d902;hp=98247c490df048475da4d7b7b93c33ee867322fc;hpb=56c1829968166c5e46f88bdc302325c216cc6157;p=m17n%2Fm17n-lib.git diff --git a/src/m17n-gui.c b/src/m17n-gui.c index 98247c4..5903bf5 100644 --- a/src/m17n-gui.c +++ b/src/m17n-gui.c @@ -1,5 +1,5 @@ /* m17n-gui.c -- body of the GUI API. - Copyright (C) 2003, 2004 + Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 National Institute of Advanced Industrial Science and Technology (AIST) Registration Number H15PRO112 @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the m17n library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 02111-1307, USA. */ /***en @@ -88,7 +88,7 @@ typedef struct { /** Name of the dynamic library (e.g. "libm17n-X.so"). */ char *library; - /** Handle fo the dynamic library. */ + /** Handle of the dynamic library. */ void *handle; /** Function to call just after loading the library. */ int (*init) (); @@ -125,9 +125,11 @@ register_device_library (MSymbol name, char *lib) MDeviceLibraryInterface *interface; MSTRUCT_CALLOC (interface, MERROR_WIN); - interface->library = malloc (strlen (lib) + interface->library = malloc (strlen (M17N_MODULE_DIR) + 1 + + strlen (lib) + strlen (DLOPEN_SHLIB_EXT) + 1); - sprintf (interface->library, "%s%s", lib, DLOPEN_SHLIB_EXT); + sprintf (interface->library, "%s/%s%s", M17N_MODULE_DIR, lib, + DLOPEN_SHLIB_EXT); if (! device_library_list) device_library_list = mplist (); mplist_add (device_library_list, name, interface); @@ -237,12 +239,13 @@ static MDeviceLibraryInterface null_interface = void m17n_init_win (void) { - int mdebug_mask = MDEBUG_INIT; + int mdebug_flag = MDEBUG_INIT; merror_code = MERROR_NONE; if (m17n__gui_initialized++) return; m17n_init (); + m17n_init_flt (); if (merror_code != MERROR_NONE) { m17n__gui_initialized--; @@ -264,6 +267,7 @@ m17n_init_win (void) Mdrawable = msymbol ("drawable"); Mdepth = msymbol ("depth"); Mwidget = msymbol ("widget"); + Mcolormap = msymbol ("colormap"); MDEBUG_PUSH_TIME (); if (mfont__init () < 0) @@ -296,7 +300,7 @@ m17n_init_win (void) void m17n_fini_win (void) { - int mdebug_mask = MDEBUG_FINI; + int mdebug_flag = MDEBUG_FINI; MPlist *plist; if (m17n__gui_initialized == 0 @@ -320,23 +324,27 @@ m17n_fini_win (void) } #ifdef HAVE_FREETYPE if (null_interface.handle) - (*null_interface.fini) (); + { + (*null_interface.fini) (); + null_interface.handle = NULL; + } #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.")); + MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize input-gui module.")); mdraw__fini (); - MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize face module.")); + MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize draw module.")); mface__fini (); - MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize fontset module.")); + MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize face module.")); mfont__fontset_fini (); - MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize font module.")); + MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize fontset module.")); mfont__fini (); + MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize font module.")); mframe_default = NULL; MDEBUG_POP_TIME (); MDEBUG_PRINT_TIME ("FINI", (stderr, " to finalize the gui modules.")); MDEBUG_POP_TIME (); + m17n_fini_flt (); m17n_fini (); } @@ -366,8 +374,8 @@ m17n_fini_win (void) These are the symbols to use in a parameter to create a frame. See the function mframe () for details. - #Mdevice, #Mdisplay, #Mscreen, #Mdrawable, #Mdepth, and #Mcolormap - are also keys of a frame property. */ + @b Mdevice, @b Mdisplay, @b Mscreen, @b Mdrawable, @b Mdepth, and + @b Mcolormap are also keys of a frame property. */ /***ja @name ÊÑ¿ô¡§ ¥Õ¥ì¡¼¥à¥Ñ¥é¥á¡¼¥¿ÍÑ¥­¡¼ @@ -375,8 +383,8 @@ m17n_fini_win (void) ¥Õ¥ì¡¼¥à¤òÀ¸À®¤¹¤ëºÝ¤Î¥Ñ¥é¥á¡¼¥¿¤ËÍѤ¤¤ë¥·¥ó¥Ü¥ë¡£¾Ü¤·¤¯¤Ï´Ø¿ô mframe () ¤ÎÀâÌÀ»²¾È¡£ - #Mdevice¡¢ #Mdisplay¡¢ #Mscreen¡¢ #Mdrawable¡¢ #Mdepth¡¢#Mcolormap - ¤Ï¥Õ¥ì¡¼¥à¥×¥í¥Ñ¥Æ¥£¤Î¥­¡¼¤Ç¤â¤¢¤ë¡£ */ + @b Mdevice¡¢ @b Mdisplay¡¢ @b Mscreen¡¢ @b Mdrawable¡¢ @b Mdepth¡¢ + @b Mcolormap ¤Ï¥Õ¥ì¡¼¥à¥×¥í¥Ñ¥Æ¥£¤Î¥­¡¼¤Ç¤â¤¢¤ë¡£ */ /*=*/ @@ -419,14 +427,14 @@ MSymbol Mfont_descent; - In addition, if the value of the key #Mdevice is #Mx, the + In addition, if the value of the key @b Mdevice is #Mx, the following keys are recognized. They are to specify the root window and the depth of drawables that can be used with the frame.