X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fface.c;h=f5d2ebf9cfafbde0dd3566f74319d307cff23a70;hb=9d7ee19cc55a52fb74e149402f20a5c4c7b0650a;hp=7c7df8beffb98f456f322f01d56eb29c14184ce1;hpb=81b778b62f74aff7afc1a09312862c4a3a8e4a99;p=m17n%2Fm17n-lib.git diff --git a/src/face.c b/src/face.c index 7c7df8b..f5d2ebf 100644 --- a/src/face.c +++ b/src/face.c @@ -1,5 +1,5 @@ /* face.c -- face module. - 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 @@ -33,8 +33,8 @@ #Mfoundry, #Mfamily, #Mweight, #Mstyle, #Mstretch, #Madstyle, #Msize, #Mfontset, #Mratio, #Mhook_func, #Mhook_arg - "The face property that belongs to face F and whose key is @c xxx" - may be shortened to "the xxx property of F". + The notation "xxx property of F" means the face property that + belongs to face F and whose key is @c Mxxx. The M-text drawing functions first search an M-text for the text property whose key is the symbol #Mface, then draw the M-text @@ -50,67 +50,27 @@ /***ja @addtogroup m17nFace - @brief ¥Õ¥§¡¼¥¹¤È¤Ï¡¢M-text ¤Îɽ¼¨¤òÀ©¸æ¤¹¤ë¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¢¤ë + @brief ¥Õ¥§¡¼¥¹¤È¤Ï¡¢M-text ¤Î¸«±É¤¨¤òÀ©¸æ¤¹¤ë¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¢¤ë. - @e ¥Õ¥§¡¼¥¹ ¤Ï #MFace ·¿¤Î¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¢¤ê¡¢M-text ¤Îɽ¼¨ÊýË¡ - ¤òÀ©¸æ¤¹¤ë¡£¥Õ¥§¡¼¥¹¤Ï¸ÇÄê¸Ä¿ô¤Î @e ¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£ ¤ò»ý¤Ä¡£ - ¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤Ï¥­¡¼¤ÈÃͤ«¤é¤Ê¤ë¡£¥­¡¼¤Ï¥·¥ó¥Ü¥ë¤Ç¤¢¤ê¡¢ + @e ¥Õ¥§¡¼¥¹ ¤Ï #MFace ·¿¤Î¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¢¤ê¡¢M-text + ¤Îɽ¼¨ÊýË¡¤òÀ©¸æ¤¹¤ë¡£¥Õ¥§¡¼¥¹¤Ï¸ÇÄê¸Ä¤Î @e ¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£ ¤ò»ý¤Ä¡£ + ¾¤Î¥×¥í¥Ñ¥Æ¥£Æ±ÍÍ¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤Ï¥­¡¼¤ÈÃͤ«¤é¤Ê¤ê¡¢¥­¡¼¤Ï°Ê²¼¤Î¥·¥ó¥Ü¥ë¤Î¤¤¤º¤ì¤«¤Ç¤¢¤ë¡£ - #Mforeground, #Mbackground, #Mvideomode, #Mhline, #Mbox, - #Mfoundry, #Mfamily, #Mweight, #Mstyle, #Mstretch, #Madstyle, - #Msize, #Mfontset, #Mratio, #Mhook_func, #Mhook_arg - - ¤Î¤¤¤º¤ì¤«¤Ç¤¢¤ë¡£¥­¡¼¤¬ #Mfontset ¤Ê¤é¤ÐÃͤϥե©¥ó¥È¥»¥Ã¥È¤Ø¤Î - ¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£¥­¡¼¤¬ #Msize ¤Ê¤é¤ÐÃͤÏÀ°¿ô¤Ç¤¢¤ë¡£¥­¡¼¤¬¤½¤ì°Ê - ³°¤Ê¤é¤ÐÃͤϥ·¥ó¥Ü¥ë¤Ç¤¢¤ë¡£¡Ö¥Õ¥§¡¼¥¹ F ¤Î¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤Î¤¦ - ¤Á¥­¡¼¤¬ @c Mxxx ¤Ç¤¢¤ë¤â¤Î¡×¤Î¤³¤È¤ò´Êñ¤Ë¡ÖF ¤Î xxx ¥×¥í¥Ñ¥Æ¥£¡× - ¤È¸Æ¤Ö¤³¤È¤¬¤¢¤ë¡£ - - Foreground ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢Á°·Ê¿§¤òɽ¤ï¤¹¡£ - - Background ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢ÇØ·Ê¿§¤òɽ¤ï¤¹¡£ - - Reverse ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢Á°·Ê¿§¤ÈÇØ·Ê¿§¤òÆþ¤ìÂؤ¨¤ë¤³¤È¤òɽ¤ï¤¹¡£ - - Underline ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢²¼Àþ¤ò°ú¤¯¤«Èݤ«¤òɽ¤ï¤¹¡£ - - Box ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢°Ï¤ßÏȤòɽ¼¨¤¹¤ë¤«Èݤ«¤òɽ¤ï¤¹¡£ - - Fontset ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢»ÈÍѤ¹¤ë¥Õ¥©¥ó¥È¥»¥Ã¥È¤òɽ¤ï¤¹¡£ - - Family ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢»ÈÍѤ¹¤ë¥Õ¥©¥ó¥È¤Î family ¥×¥í¥Ñ¥Æ¥£¤Î¥Ç - ¥Õ¥©¥ë¥ÈÃͤòɽ¤ï¤¹¡£ - - Weight ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢»ÈÍѤ¹¤ë¥Õ¥©¥ó¥È¤Î weight ¥×¥í¥Ñ¥Æ¥£¤Î¥Ç - ¥Õ¥©¥ë¥ÈÃͤòɽ¤ï¤¹¡£ - - Style ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢»ÈÍѤ¹¤ë¥Õ¥©¥ó¥È¤Î style ¥×¥í¥Ñ¥Æ¥£¤Î¥Ç¥Õ¥© - ¥ë¥ÈÃͤòɽ¤ï¤¹¡£ - - Stretch ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢»ÈÍѤ¹¤ë¥Õ¥©¥ó¥È¤Î stretch ¥×¥í¥Ñ¥Æ¥£¤Î - ¥Ç¥Õ¥©¥ë¥ÈÃͤòɽ¤ï¤¹¡£ - - Adstyle ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢»ÈÍѤ¹¤ë¥Õ¥©¥ó¥È¤Î adstyle ¥×¥í¥Ñ¥Æ¥£¤Î - ¥Ç¥Õ¥©¥ë¥ÈÃͤòɽ¤ï¤¹¡£ - - Size ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢»ÈÍѤ¹¤ë¥Õ¥©¥ó¥È¤Î size ¥×¥í¥Ñ¥Æ¥£¤Î¥Ç¥Õ¥© - ¥ë¥ÈÃͤòɽ¤ï¤¹¡£ + #Mforeground, #Mbackground, #Mvideomode, #Mhline, #Mbox, + #Mfoundry, #Mfamily, #Mweight, #Mstyle, #Mstretch, #Madstyle, + #Msize, #Mfontset, #Mratio, #Mhook_func, #Mhook_arg - M-text ¤Îɽ¼¨¤Ë´Ø¤¹¤ë m17n-win API ¤Î´Ø¿ô¤Ï¡¢¤Þ¤ººÇ½é¤Ë¤½¤Î M-text - ¤«¤é¥­¡¼¤¬¥·¥ó¥Ü¥ë #Mface ¤Ç¤¢¤ë¤è¤¦¤Ê¥Æ¥­¥¹¥È¥×¥í¥Ñ¥Æ¥£¤òµá¤á¡¢ - ¼¡¤Ë¤½¤ÎÃͤ˽¾¤Ã¤Æ M-text ¤òɽ¼¨¤¹¤ë¡£¤³¤ÎÃͤϥե§¡¼¥¹¥ª¥Ö¥¸¥§¥¯¥È - ¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£ + ¡Ö¥Õ¥§¡¼¥¹ F ¤Î¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤Î¤¦¤Á¥­¡¼¤¬ @c Mxxx + ¤Ç¤¢¤ë¤â¤Î¡×¤Î¤³¤È¤ò´Êñ¤Ë¡ÖF ¤Î xxx ¥×¥í¥Ñ¥Æ¥£¡×¤È¸Æ¤Ö¤³¤È¤¬¤¢¤ë¡£ - ¤â¤· M-text ¤¬¡¢#Mface ¤ò¥­¡¼¤È¤¹¤ë¥Æ¥­¥¹¥È¥×¥í¥Ñ¥Æ¥£¤òÊ£¿ô»ý¤Ã - ¤Æ¤ª¤ê¡¢¤«¤Ä¤½¤ì¤é¤ÎÃͤδ֤˾×Æͤ¬¤Ê¤¤¤Ê¤é¤Ð¡¢¥Õ¥§¡¼¥¹¾ðÊó¤ÏÁȤ߹ç - ¤ï¤µ¤ì¤ÆÍѤ¤¤é¤ì¤ë¡£¾×Æͤ¬¤¢¤ë¾ì¹ç¤Ï¡¢ºÇ¾åÁؤΥե§¡¼¥¹¤¬ÍѤ¤¤é¤ì¤ë¡£ + M-text ¤Îɽ¼¨´Ø¿ô¤Ï¡¢¤Þ¤ººÇ½é¤Ë¤½¤Î M-text ¤«¤é¥­¡¼¤¬¥·¥ó¥Ü¥ë + #Mface ¤Ç¤¢¤ë¤è¤¦¤Ê¥Æ¥­¥¹¥È¥×¥í¥Ñ¥Æ¥£¤òõ¤·¡¢¼¡¤Ë¤½¤ÎÃͤ˽¾¤Ã¤Æ + M-text ¤òɽ¼¨¤¹¤ë¡£¤³¤ÎÃͤϥե§¡¼¥¹¥ª¥Ö¥¸¥§¥¯¥È¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£ - ¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ÎºÇ¸å¤Î6¸Ä¡¢¤¹¤Ê¤ï¤Á family, weight, sytle, - stretch, adstyle ¤ª¤è¤Ó size ¤ÎÃÍ¤Ï fontset Ãæ¤Î¥Õ¥©¥ó¥È¤¬¤½¤ì¤é¤ò - »ØÄꤷ¤Æ¤¤¤Ê¤¤¾ì¹ç¤Î¥Ç¥Õ¥©¥ë¥È¤È¤·¤ÆÍѤ¤¤é¤ì¤ë¡£ + M-text ¤¬¡¢#Mface + ¤ò¥­¡¼¤È¤¹¤ë¥Æ¥­¥¹¥È¥×¥í¥Ñ¥Æ¥£¤òÊ£¿ô»ý¤Ã¤Æ¤ª¤ê¡¢¤«¤Ä¤½¤ì¤é¤ÎÃͤ¬¾×Æͤ·¤Ê¤¤¤Ê¤é¤Ð¡¢¥Õ¥§¡¼¥¹¾ðÊó¤ÏÁȤ߹ç¤ï¤µ¤ì¤ÆÍѤ¤¤é¤ì¤ë¡£ - ¤¢¤ë¥Æ¥­¥¹¥È°À­¤¬¤É¤Î¥Õ¥§¡¼¥¹¤Ë¤è¤Ã¤Æ¤â»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¡¢¥Ç - ¥Õ¥©¥ë¥È¥Õ¥§¡¼¥¹¤ÎÃͤ¬ÍѤ¤¤é¤ì¤ë¡£ */ + ¤¢¤ë¥Æ¥­¥¹¥È°À­¤¬¤É¤Î¥Õ¥§¡¼¥¹¤Ë¤è¤Ã¤Æ¤â»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¥Õ¥§¡¼¥¹¤ÎÃͤ¬ÍѤ¤¤é¤ì¤ë¡£ */ /*=*/ @@ -123,6 +83,7 @@ #include #include +#include "config.h" #include "m17n-gui.h" #include "m17n-misc.h" #include "internal.h" @@ -138,33 +99,85 @@ static M17NObjectArray face_table; -static MSymbol Mlatin; +MSymbol Mlatin; static MSymbol M_face_prop_index; -/** Find a realized face registered on FRAME that is realized from - FACE and using font RFONT. If RFONT is NULL, find any that - matches FACE. */ +static MPlist *hline_prop_list; +static MPlist *box_prop_list; + +/** Special hook function pointer that does nothing. */ +static MFaceHookFunc noop_hook; + +/** */ +static MFaceHLineProp * +get_hline_create (MFaceHLineProp *prop) +{ + MPlist *plist; + MFaceHLineProp *hline; + + if (prop->width == 0) + return MPLIST_VAL (hline_prop_list); + MPLIST_DO (plist, MPLIST_NEXT (hline_prop_list)) + { + hline = MPLIST_VAL (plist); + if (prop->type == hline->type + && prop->width == hline->width + && prop->color == hline->color) + return hline; + } + MSTRUCT_MALLOC (hline, MERROR_FACE); + *hline = *prop; + mplist_push (plist, Mt, hline); + return hline; +} + +static MFaceBoxProp * +get_box_create (MFaceBoxProp *prop) +{ + MPlist *plist; + MFaceBoxProp *box; + + if (prop->width == 0) + return MPLIST_VAL (box_prop_list); + MPLIST_DO (plist, MPLIST_NEXT (box_prop_list)) + { + box = MPLIST_VAL (plist); + if (prop->width == box->width + && prop->color_top == box->color_top + && prop->color_bottom == box->color_bottom + && prop->color_left == box->color_left + && prop->color_right == box->color_right + && prop->inner_hmargin == box->inner_hmargin + && prop->inner_vmargin == box->inner_vmargin + && prop->outer_hmargin == box->inner_hmargin + && prop->inner_vmargin == box->inner_vmargin) + return box; + } + MSTRUCT_MALLOC (box, MERROR_FACE); + *box = *prop; + mplist_push (plist, Mt, box); + return box; +} + +/** From FRAME->realized_face_list, find a realized face based on + FACE. */ static MRealizedFace * -find_realized_face (MFrame *frame, MFace *face, MRealizedFont *rfont) +find_realized_face (MFrame *frame, MFace *face, MFont *font) { - MPlist *rface_list; - MRealizedFace *rface; - int i; + MPlist *plist; - MPLIST_DO (rface_list, frame->realized_face_list) + MPLIST_DO (plist, frame->realized_face_list) { - rface = MPLIST_VAL (rface_list); - if (! rfont - || rface->rfont == rfont) - { - for (i = 0; i < MFACE_RATIO; i++) - if (rface->face.property[i] != face->property[i]) - break; - if (i == MFACE_RATIO) - return rface; - } + MRealizedFace *rface = MPLIST_VAL (plist); + + if (memcmp (rface->face.property, face->property, + sizeof face->property) == 0 + && (rface->font + ? (font && ! memcmp (rface->font, font, sizeof (MFont))) + : ! font)) + return rface; } return NULL; } @@ -176,10 +189,7 @@ free_face (void *object) if (face->property[MFACE_FONTSET]) M17N_OBJECT_UNREF (face->property[MFACE_FONTSET]); - if (face->property[MFACE_HLINE]) - free (face->property[MFACE_HLINE]); - if (face->property[MFACE_BOX]) - free (face->property[MFACE_BOX]); + M17N_OBJECT_UNREF (face->frame_list); M17N_OBJECT_UNREGISTER (face_table, face); free (object); } @@ -188,32 +198,38 @@ free_face (void *object) static MPlist * serialize_hline (MPlist *plist, MFaceHLineProp *hline) { - MPlist *pl = mplist (); + if (hline->width > 0) + { + MPlist *pl = mplist (); - mplist_add (pl, Minteger, (void *) hline->type); - mplist_add (pl, Minteger, (void *) hline->width); - mplist_add (pl, Msymbol, hline->color); - plist = mplist_add (plist, Mplist, pl); - M17N_OBJECT_UNREF (pl); + mplist_add (pl, Minteger, (void *) hline->type); + mplist_add (pl, Minteger, (void *) hline->width); + mplist_add (pl, Msymbol, hline->color); + plist = mplist_add (plist, Mplist, pl); + M17N_OBJECT_UNREF (pl); + } return plist; } static MPlist * serialize_box (MPlist *plist, MFaceBoxProp *box) { - MPlist *pl = mplist (); - - mplist_add (pl, Minteger, (void *) box->width); - mplist_add (pl, Minteger, (void *) box->inner_hmargin); - mplist_add (pl, Minteger, (void *) box->inner_vmargin); - mplist_add (pl, Minteger, (void *) box->outer_hmargin); - mplist_add (pl, Minteger, (void *) box->outer_vmargin); - mplist_add (pl, Msymbol, box->color_top); - mplist_add (pl, Msymbol, box->color_bottom); - mplist_add (pl, Msymbol, box->color_left); - mplist_add (pl, Msymbol, box->color_right); - plist = mplist_add (plist, Mplist, pl); - M17N_OBJECT_UNREF (pl); + if (box->width > 0) + { + MPlist *pl = mplist (); + + mplist_add (pl, Minteger, (void *) box->width); + mplist_add (pl, Minteger, (void *) box->inner_hmargin); + mplist_add (pl, Minteger, (void *) box->inner_vmargin); + mplist_add (pl, Minteger, (void *) box->outer_hmargin); + mplist_add (pl, Minteger, (void *) box->outer_vmargin); + mplist_add (pl, Msymbol, box->color_top); + mplist_add (pl, Msymbol, box->color_bottom); + mplist_add (pl, Msymbol, box->color_left); + mplist_add (pl, Msymbol, box->color_right); + plist = mplist_add (plist, Mplist, pl); + M17N_OBJECT_UNREF (pl); + } return plist; } @@ -227,7 +243,7 @@ serialize_face (void *val) MSymbol *key; MSymbol *type; MPlist *(*func) (MPlist *plist, void *val); - } serializer[MFACE_PROPERTY_MAX] + } serializer[MFACE_RATIO + 1] = { { &Mfoundry, &Msymbol }, { &Mfamily, &Msymbol }, { &Mweight, &Msymbol }, @@ -241,11 +257,9 @@ serialize_face (void *val) { &Mhline, NULL }, { &Mbox, NULL }, { &Mvideomode, &Msymbol }, - { NULL, NULL}, /* MFACE_HOOK_FUNC */ - { NULL, NULL}, /* MFACE_HOOK_ARG */ { &Mratio, &Minteger } }; - for (i = 0; i < MFACE_PROPERTY_MAX; i++) + for (i = 0; i <= MFACE_RATIO; i++) if (face->property[i] && serializer[i].key) { pl = mplist_add (pl, Msymbol, *serializer[i].key); @@ -347,7 +361,7 @@ deserialize_face (MPlist *plist) plist = MPLIST_NEXT (plist); if (MPLIST_TAIL_P (plist)) break; - if (index < 0 || index >= MFACE_PROPERTY_MAX) + if (index < 0 || index > MFACE_RATIO) continue; if (key == Mfoundry || key == Mfamily || key == Mweight || key == Mstyle || key == Mstretch || key == Madstyle @@ -398,11 +412,15 @@ int mface__init () { int i; + MFaceHLineProp *hline; + MFaceBoxProp *box; - face_table.count = 0; + M17N_OBJECT_ADD_ARRAY (face_table, "Face"); Mface = msymbol_as_managing_key ("face"); - msymbol_put (Mface, Mtext_prop_serializer, (void *) serialize_face); - msymbol_put (Mface, Mtext_prop_deserializer, (void *) deserialize_face); + msymbol_put_func (Mface, Mtext_prop_serializer, + M17N_FUNC (serialize_face)); + msymbol_put_func (Mface, Mtext_prop_deserializer, + M17N_FUNC (deserialize_face)); Mforeground = msymbol ("foreground"); Mbackground = msymbol ("background"); @@ -424,7 +442,7 @@ mface__init () MSymbol *key; /* Index (enum face_property) of the face property. */ int index; - } mface_prop_data[MFACE_PROPERTY_MAX] = + } mface_prop_data[MFACE_HOOK_ARG + 1] = { { &Mfoundry, MFACE_FOUNDRY }, { &Mfamily, MFACE_FAMILY }, { &Mweight, MFACE_WEIGHT }, @@ -438,10 +456,8 @@ mface__init () { &Mhline, MFACE_HLINE }, { &Mbox, MFACE_BOX }, { &Mvideomode, MFACE_VIDEOMODE }, - { &Mhook_func, MFACE_HOOK_FUNC }, - { &Mhook_arg, MFACE_HOOK_ARG }, { &Mratio, MFACE_RATIO }, - }; + { &Mhook_arg, MFACE_HOOK_ARG } }; for (i = 0; i < MFACE_PROPERTY_MAX; i++) /* We add one to distinguish it from no-property. */ @@ -449,15 +465,28 @@ mface__init () (void *) (mface_prop_data[i].index + 1)); } + hline_prop_list = mplist (); + MSTRUCT_CALLOC (hline, MERROR_FACE); + mplist_push (hline_prop_list, Mt, hline); + box_prop_list = mplist (); + MSTRUCT_CALLOC (box, MERROR_FACE); + mplist_push (box_prop_list, Mt, box); + mface__default = mface (); + mface__default->property[MFACE_FOUNDRY] = msymbol ("misc"); + mface__default->property[MFACE_FAMILY] = msymbol ("fixed"); mface__default->property[MFACE_WEIGHT] = msymbol ("medium"); mface__default->property[MFACE_STYLE] = msymbol ("r"); mface__default->property[MFACE_STRETCH] = msymbol ("normal"); + mface__default->property[MFACE_ADSTYLE] = msymbol (""); mface__default->property[MFACE_SIZE] = (void *) 120; mface__default->property[MFACE_FONTSET] = mfontset (NULL); - M17N_OBJECT_REF (mface__default->property[MFACE_FONTSET]); - /* mface__default->property[MFACE_FOREGROUND] =msymbol ("black"); */ - /* mface__default->property[MFACE_BACKGROUND] =msymbol ("white"); */ + mface__default->property[MFACE_FOREGROUND] = msymbol ("black"); + mface__default->property[MFACE_BACKGROUND] = msymbol ("white"); + mface__default->property[MFACE_HLINE] = hline; + mface__default->property[MFACE_BOX] = box; + mface__default->property[MFACE_VIDEOMODE] = Mnormal; + mface__default->hook = noop_hook; mface_normal_video = mface (); mface_normal_video->property[MFACE_VIDEOMODE] = (void *) Mnormal; @@ -466,14 +495,13 @@ mface__init () mface_reverse_video->property[MFACE_VIDEOMODE] = (void *) Mreverse; { - MFaceHLineProp *hline_prop; + MFaceHLineProp hline_prop; - MSTRUCT_MALLOC (hline_prop, MERROR_FACE); - hline_prop->type = MFACE_HLINE_UNDER; - hline_prop->width = 1; - hline_prop->color = Mnil; + hline_prop.type = MFACE_HLINE_UNDER; + hline_prop.width = 1; + hline_prop.color = Mnil; mface_underline = mface (); - mface_underline->property[MFACE_HLINE] = (void *) hline_prop; + mface_put_prop (mface_underline, Mhline, &hline_prop); } mface_medium = mface (); @@ -528,6 +556,8 @@ mface__init () void mface__fini () { + MPlist *plist; + M17N_OBJECT_UNREF (mface__default); M17N_OBJECT_UNREF (mface_normal_video); M17N_OBJECT_UNREF (mface_reverse_video); @@ -551,29 +581,40 @@ mface__fini () M17N_OBJECT_UNREF (mface_cyan); M17N_OBJECT_UNREF (mface_yellow); M17N_OBJECT_UNREF (mface_magenta); - free (work_gstring.glyphs); - mdebug__report_object ("Face", &face_table); + MPLIST_DO (plist, hline_prop_list) + free (MPLIST_VAL (plist)); + M17N_OBJECT_UNREF (hline_prop_list); + MPLIST_DO (plist, box_prop_list) + free (MPLIST_VAL (plist)); + M17N_OBJECT_UNREF (box_prop_list); + + free (work_gstring.glyphs); } -/** Return a realized face for ASCII characters from NUM number of - base faces pointed by FACES on the frame FRAME. */ +/** Return a face realized from NUM number of base faces pointed by + FACES on the frame FRAME. If SIZE is nonzero, it specifies the + maximum font size. */ MRealizedFace * -mface__realize (MFrame *frame, MFace **faces, int num, - MSymbol language, MSymbol charset, int size) +mface__realize (MFrame *frame, MFace **faces, int num, int size, MFont *font) { MRealizedFace *rface; MRealizedFont *rfont; MFace merged_face = *(frame->face); - void **props; int i, j; - unsigned tick; - MGlyph g; + MFaceHookFunc func; + MFont spec; - if (num == 0 && language == Mnil && charset == Mnil && frame->rface) + if (num == 0 && frame->rface && ! font) return frame->rface; + if (! mplist_find_by_value (frame->face->frame_list, frame)) + mplist_push (frame->face->frame_list, Mt, frame); + for (i = 0; i < num; i++) + if (! mplist_find_by_value (faces[i]->frame_list, frame)) + mplist_push (faces[i]->frame_list, Mt, frame); + for (i = 0; i < MFACE_PROPERTY_MAX; i++) for (j = num - 1; j >= 0; j--) if (faces[j]->property[i]) @@ -582,49 +623,142 @@ mface__realize (MFrame *frame, MFace **faces, int num, break; } - for (i = 0, tick = 0; i < num; i++) - tick += faces[i]->tick; + if (font) + { + if (font->type != MFONT_TYPE_REALIZED) + font = mfont_copy (font); + for (i = 0; i <= MFACE_ADSTYLE; i++) + if (font->property[i]) + merged_face.property[i] = FONT_PROPERTY (font, i); + if (font->size) + { + int font_size; - if (merged_face.property[MFACE_RATIO]) + if (font->size < 0) + font->size = ((double) (- font->size)) * frame->dpi / 72.27 + 0.5; + font_size = font->size; + merged_face.property[MFACE_SIZE] = (void *) font_size; + merged_face.property[MFACE_RATIO] = (void *) 0; + } + } + + if (! font || ! font->size) { - int font_size = (int) merged_face.property[MFACE_SIZE]; + double font_size = (int) merged_face.property[MFACE_SIZE]; + int ifont_size; - font_size *= (int) merged_face.property[MFACE_RATIO]; - font_size /= 100; - merged_face.property[MFACE_SIZE] = (void *) font_size; + if (font_size < 0) + font_size = - font_size * frame->dpi / 72.27; + if (merged_face.property[MFACE_RATIO] + && (int) merged_face.property[MFACE_RATIO] != 100) + { + font_size *= (int) merged_face.property[MFACE_RATIO]; + font_size /= 100; + } + ifont_size = font_size + 0.5; + merged_face.property[MFACE_SIZE] = (void *) ifont_size; + merged_face.property[MFACE_RATIO] = (void *) 0; } - rface = find_realized_face (frame, &merged_face, NULL); - if (rface && rface->tick == tick) - return rface->ascii_rface; + merged_face.property[MFACE_FOUNDRY] = Mnil; + rface = find_realized_face (frame, &merged_face, font); + if (rface) + { + if (font && font->type != MFONT_TYPE_REALIZED) + free (font); + return rface; + } MSTRUCT_CALLOC (rface, MERROR_FACE); + mplist_push (frame->realized_face_list, Mt, rface); rface->frame = frame; rface->face = merged_face; - rface->tick = tick; - props = rface->face.property; - - rface->rfontset = mfont__realize_fontset (frame, - (MFontset *) props[MFACE_FONTSET], - &merged_face); - g.c = ' '; - num = 1; - rfont = mfont__lookup_fontset (rface->rfontset, &g, &num, - msymbol ("latin"), language, Mnil, - size); + rface->font = font; + + if (font) + { + if (font->type == MFONT_TYPE_SPEC) + rfont = (MRealizedFont *) mfont_find (frame, font, NULL, 0); + else if (font->type == MFONT_TYPE_OBJECT) + { + MFONT_INIT (&spec); + spec.size = (int) merged_face.property[MFONT_SIZE]; + if (font->property[MFONT_REGISTRY]) + spec.property[MFONT_REGISTRY] = font->property[MFONT_REGISTRY]; + else + mfont_put_prop (&spec, Mregistry, + (font->source == MFONT_SOURCE_X + ? Miso8859_1 : Municode_bmp)); + rfont = mfont__open (frame, font, &spec); + } + else + rfont = (MRealizedFont *) font; + } + else + { + MFontset *fontset = (MFontset *) merged_face.property[MFACE_FONTSET]; + + rface->rfontset = mfont__realize_fontset (frame, fontset, &merged_face, + font); + rfont = NULL; + mfont__set_spec_from_face (&spec, &merged_face); + mfont_put_prop (&spec, Mregistry, Municode_bmp); + spec.source = MFONT_SOURCE_FT; + font = mfont__select (frame, &spec, 0); + if (font) + rfont = mfont__open (frame, font, &spec); + if (! rfont) + { + mfont_put_prop (&spec, Mregistry, Miso8859_1); + spec.source = MFONT_SOURCE_X; + font = mfont__select (frame, &spec, 0); + if (font) + rfont = mfont__open (frame, font, &spec); + } + if (! rfont) + { + num = 0; + rfont = mfont__lookup_fontset (rface->rfontset, NULL, &num, + Mlatin, Mnil, Mnil, size, 0); + } + } if (rfont) { rface->rfont = rfont; - g.otf_encoded = 0; - work_gstring.glyphs[0] = g; + rface->layouter = rfont->layouter; + rfont->layouter = Mnil; work_gstring.glyphs[0].rface = rface; - work_gstring.glyphs[1].code = MCHAR_INVALID_CODE; - work_gstring.glyphs[1].rface = rface; - mfont__get_metric (&work_gstring, 0, 2); - rface->space_width = work_gstring.glyphs[0].width; - rface->ascent = work_gstring.glyphs[1].ascent; - rface->descent = work_gstring.glyphs[1].descent; + work_gstring.glyphs[0].g.code = MCHAR_INVALID_CODE; + work_gstring.glyphs[0].g.measured = 0; + mfont__get_metric (&work_gstring, 0, 1); + rface->ascent = work_gstring.glyphs[0].g.ascent; + rface->descent = work_gstring.glyphs[0].g.descent; + work_gstring.glyphs[0].g.code + = mfont__encode_char (frame, (MFont *) rfont, NULL, ' '); + if (work_gstring.glyphs[0].g.code != MCHAR_INVALID_CODE) + { + work_gstring.glyphs[0].g.measured = 0; + mfont__get_metric (&work_gstring, 0, 1); + rface->space_width = work_gstring.glyphs[0].g.xadv; + } + else + rface->space_width = rfont->spec.size / 10; + if (rfont->average_width) + rface->average_width = rfont->average_width >> 6; + else + { + work_gstring.glyphs[0].g.code + = mfont__encode_char (frame, (MFont *) rfont, NULL, 'x'); + if (work_gstring.glyphs[0].g.code != MCHAR_INVALID_CODE) + { + work_gstring.glyphs[0].g.measured = 0; + mfont__get_metric (&work_gstring, 0, 1); + rface->average_width = work_gstring.glyphs[0].g.xadv; + } + else + rface->average_width = rface->space_width; + } } else { @@ -632,21 +766,30 @@ mface__realize (MFrame *frame, MFace **faces, int num, rface->space_width = frame->space_width; } - rface->hline = (MFaceHLineProp *) props[MFACE_HLINE]; - rface->box = (MFaceBoxProp *) props[MFACE_BOX]; + rface->hline = (MFaceHLineProp *) merged_face.property[MFACE_HLINE]; + if (rface->hline && rface->hline->width == 0) + rface->hline = NULL; + rface->box = (MFaceBoxProp *) merged_face.property[MFACE_BOX]; + if (rface->box && rface->box->width == 0) + rface->box = NULL; rface->ascii_rface = rface; - mwin__realize_face (rface); + (*frame->driver->realize_face) (rface); - mplist_add (frame->realized_face_list, Mt, rface); + func = rface->face.hook; + if (func && func != noop_hook) + (func) (&(rface->face), rface->info, rface->face.property[MFACE_HOOK_ARG]); + rface->non_ascii_list = mplist (); if (rface->rfont) { - MSTRUCT_CALLOC (rface->nofont_rface, MERROR_FACE); - *rface->nofont_rface = *rface; - rface->nofont_rface->rfont = NULL; + MRealizedFace *nofont; + + MSTRUCT_CALLOC (nofont, MERROR_FACE); + *nofont = *rface; + nofont->non_ascii_list = NULL; + nofont->rfont = NULL; + mplist_add (rface->non_ascii_list, Mt, nofont); } - else - rface->nofont_rface = rface; return rface; } @@ -656,56 +799,170 @@ MGlyph * mface__for_chars (MSymbol script, MSymbol language, MSymbol charset, MGlyph *from_g, MGlyph *to_g, int size) { - MRealizedFace *rface; - MRealizedFont *rfont; - int num = to_g - from_g, i; + MRealizedFont *rfont = from_g->rface->rfont; + MSymbol layouter; + int num = to_g - from_g; + int i; + + if (from_g->rface->font) + { + MRealizedFace *rface = from_g->rface, *new; + + if (! rfont) + rfont = mfontset__get_font (rface->frame, + rface->face.property[MFACE_FONTSET], + script, language, + rface->font, NULL); + else if (script != Mlatin) + rfont = mfontset__get_font (rface->frame, + rface->face.property[MFACE_FONTSET], + script, language, + (MFont *) rfont, NULL); + if (! rfont) + { + for (; from_g < to_g && from_g->rface->font; from_g++) + from_g->g.code = MCHAR_INVALID_CODE; + } + else + { + if (rface->rfont == rfont && rfont->layouter == Mnil) + new = rface; + else + { + MSTRUCT_MALLOC (new, MERROR_FACE); + mplist_push (rface->non_ascii_list, Mt, new); + *new = *rface; + new->rfont = rfont; + new->layouter = rfont->layouter; + rfont->layouter = Mnil; + new->non_ascii_list = NULL; + new->ascent = rfont->ascent >> 6; + new->descent = rfont->descent >> 6; + } + for (; from_g < to_g && from_g->rface->font; from_g++) + { + from_g->rface = new; + if (new->layouter) + { + MFLT *flt = mflt_get (new->layouter); + MCharTable *coverage; + + if (! flt + || ((coverage = mflt_coverage (flt)) + && ! (from_g->g.code + = (unsigned) mchartable_lookup (coverage, + from_g->g.c)))) + { + from_g->rface = rface; + from_g->g.code = mfont__encode_char (rfont->frame, + (MFont *) rfont, + NULL, from_g->g.c); + } + } + else + from_g->g.code = mfont__encode_char (rfont->frame, + (MFont *) rfont, + NULL, from_g->g.c); + } + } + return from_g; + } + + if (rfont && script == Mlatin) + { + for (i = 0; i < num; i++) + { + unsigned code = mfont__encode_char (rfont->frame, (MFont *) rfont, + NULL, from_g[i].g.c); + if (code == MCHAR_INVALID_CODE) + break; + from_g[i].g.code = code; + } + if (i == num || from_g[i].rface->font) + return from_g + i; + } rfont = mfont__lookup_fontset (from_g->rface->rfontset, from_g, &num, - script, language, charset, size); - if (! rfont) + script, language, charset, size, 0); + if (rfont) { - from_g->rface = from_g->rface->nofont_rface; - return (from_g + 1); + layouter = rfont->layouter; + rfont->layouter = Mnil; } - rface = find_realized_face (from_g->rface->frame, &(from_g->rface->face), - rfont); - if (! rface) + else { - MSTRUCT_MALLOC (rface, MERROR_FACE); - *rface = *from_g->rface->ascii_rface; - rface->rfont = rfont; - { - work_gstring.glyphs[0].code = MCHAR_INVALID_CODE; - work_gstring.glyphs[0].rface = rface; - mfont__get_metric (&work_gstring, 0, 1); - rface->ascent = work_gstring.glyphs[0].ascent; - rface->descent = work_gstring.glyphs[0].descent; - } - mwin__realize_face (rface); - mplist_add (from_g->rface->frame->realized_face_list, Mt, rface); + from_g->g.code = MCHAR_INVALID_CODE; + num = 1; + rfont = NULL; + layouter = Mnil; } + + to_g = from_g + num; + while (from_g < to_g) + { + MGlyph *g = from_g; + MRealizedFace *rface = from_g++->rface; - for (i = 0; i < num; i++, from_g++) - from_g->rface = rface; - return from_g; + while (from_g < to_g && rface == from_g->rface) from_g++; + if (rface->rfont != rfont + || rface->layouter != layouter) + { + MPlist *plist = mplist_find_by_value (rface->non_ascii_list, rfont); + MRealizedFace *new = NULL; + + while (plist) + { + new = MPLIST_VAL (plist); + if (new->layouter == layouter) + break; + plist = mplist_find_by_value (MPLIST_NEXT (plist), rfont); + } + if (! plist) + { + MSTRUCT_MALLOC (new, MERROR_FACE); + mplist_push (rface->non_ascii_list, Mt, new); + *new = *rface; + new->rfont = rfont; + new->layouter = layouter; + new->non_ascii_list = NULL; + if (rfont) + { + new->ascent = rfont->ascent >> 6; + new->descent = rfont->descent >> 6; + } + } + while (g < from_g) + g++->rface = new; + } + } + return to_g; } void mface__free_realized (MRealizedFace *rface) { - mwin__free_realized_face (rface); - if (rface == rface->ascii_rface) - { - if (! rface->nofont_rface) - mdebug_hook (); - else - free (rface->nofont_rface); - rface->nofont_rface = NULL; - } + MPlist *plist; + + MPLIST_DO (plist, rface->non_ascii_list) + free (MPLIST_VAL (plist)); + M17N_OBJECT_UNREF (rface->non_ascii_list); + if (rface->font && rface->font->type != MFONT_TYPE_REALIZED) + free (rface->font); free (rface); } +void +mface__update_frame_face (MFrame *frame) +{ + frame->rface = NULL; + frame->rface = mface__realize (frame, NULL, 0, 0, NULL); + frame->space_width = frame->rface->space_width; + frame->average_width = frame->rface->average_width; + frame->ascent = frame->rface->ascent; + frame->descent = frame->rface->descent; +} + /*** @} */ #endif /* !FOR_DOXYGEN || DOXYGEN_INTERNAL_MODULE */ @@ -716,7 +973,7 @@ mface__free_realized (MRealizedFace *rface) /*=*/ /***en @name Variables: Keys of face property */ -/***ja @name ÊÑ¿ô: ¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ò»ØÄꤹ¤ëÄêµÁºÑ¤ß¥·¥ó¥Ü¥ë */ +/***ja @name ÊÑ¿ô: ¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤Î¥­¡¼ */ /*** @{ */ /*=*/ @@ -728,17 +985,16 @@ mface__free_realized (MRealizedFace *rface) #Mnil. #Mnil means that the face does not specify a foreground color. - Otherwise, the foreground of an M-text is drawn by the specified color. */ - /***ja - @brief Á°·Ê¿§¤ò»ØÄꤹ¤ë¤¿¤á¤Î¥·¥ó¥Ü¥ë + @brief Á°·Ê¿§¤ò»ØÄꤹ¤ë¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¡¼¤Î¥­¡¼. + + ÊÑ¿ô #Mforeground ¤Ï¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤Î¥­¡¼¤È¤·¤ÆÍѤ¤¤é¤ì¤ë¡£ + ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢¿§Ì¾¤ò̾Á°¤È¤·¤Æ»ý¤Ä¥·¥ó¥Ü¥ë¤« #Mnil ¤Ç¤¢¤ë¡£ - ¥­¡¼¤¬ #Mforeground ¤Ç¤¢¤ë¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢¥·¥ó¥Ü¥ë @c - Mnil ¤Ç¤¢¤ë¤«¡¢¤¢¤ë¤¤¤Ï¿§Ì¾¤ò̾Á°¤È¤·¤Æ»ý¤Ä¥·¥ó¥Ü¥ë¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é - ¤Ê¤¤¡£Á°¼Ô¤Î¾ì¹ç¡¢Á°·Ê¿§¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£¸å¼Ô¤Î¾ì¹ç¤Ï¤½¤Î¥·¥ó¥Ü¥ë¤Î - ̾Á°¤Î¿§¤¬Á°·Ê¿§¤È¤Ê¤ë¡£ */ + #Mnil ¤Î¾ì¹ç¡¢Á°·Ê¿§¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£¤½¤¦¤Ç¤Ê¤±¤ì¤Ð M-text + ¤ÎÁ°·Ê¤Ï»ØÄꤵ¤ì¤¿¿§¤Çɽ¼¨¤µ¤ì¤ë¡£ */ MSymbol Mforeground; @@ -750,17 +1006,16 @@ MSymbol Mforeground; #Mnil. #Mnil means that the face does not specify a background color. - Otherwise, the background of an M-text is drawn by the specified color. */ - /***ja - @brief ÇØ·Ê¿§¤ò»ØÄꤹ¤ë¤¿¤á¤Î¥·¥ó¥Ü¥ë + @brief ÇØ·Ê¿§¤ò»ØÄꤹ¤ë¤¿¤á¤Î¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¡¼¤Î¥­¡¼. - ¥­¡¼¤¬ #Mbackground ¤Ç¤¢¤ë¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢¥·¥ó¥Ü¥ë @c - Mnil ¤Ç¤¢¤ë¤«¡¢¤¢¤ë¤¤¤Ï¿§Ì¾¤ò̾Á°¤È¤·¤Æ»ý¤Ä¥·¥ó¥Ü¥ë¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é - ¤Ê¤¤¡£Á°¼Ô¤Î¾ì¹ç¡¢ÇØ·Ê¿§¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£¸å¼Ô¤Î¾ì¹ç¤Ï¤½¤Î¥·¥ó¥Ü¥ë¤Î - ̾Á°¤Î¿§¤¬ÇØ·Ê¿§¤È¤Ê¤ë¡£ */ + ÊÑ¿ô #Mbackground ¤Ï¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤Î¥­¡¼¤È¤·¤ÆÍѤ¤¤é¤ì¤ë¡£ + ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢¿§Ì¾¤ò̾Á°¤È¤·¤Æ»ý¤Ä¥·¥ó¥Ü¥ë¤« #Mnil ¤Ç¤¢¤ë¡£ + + #Mnil ¤Î¾ì¹ç¡¢ÇØ·Ê¿§¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£¤½¤¦¤Ç¤Ê¤±¤ì¤Ð M-text + ¤ÎÇطʤϻØÄꤵ¤ì¤¿¿§¤Çɽ¼¨¤µ¤ì¤ë¡£ */ MSymbol Mbackground; @@ -768,25 +1023,30 @@ MSymbol Mbackground; @brief Key of a face property specifying video mode. The variable #Mvideomode is used as a key of face property. The - property value must be #Mnormal, #Mreverse, or #Mnil. + property value must be @b Mnormal, @b Mreverse, or #Mnil. - #Mnormal means that an M-text is drawn in normal video mode + @b Mnormal means that an M-text is drawn in normal video mode (i.e. the foreground is drawn by foreground color, the background is drawn by background color). - #Mreverse means that an M-text is drawn in reverse video mode + @b Mreverse means that an M-text is drawn in reverse video mode (i.e. the foreground is drawn by background color, the background is drawn by foreground color). #Mnil means that the face does not specify a video mode. */ - /***ja - @brief ¥Ó¥Ç¥ª¥â¡¼¥É¤ò»ØÄꤹ¤ë¤¿¤á¤Î¥·¥ó¥Ü¥ë + @brief ¥Ó¥Ç¥ª¥â¡¼¥É¤ò»ØÄꤹ¤ë¤¿¤á¤Î¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¡¼¤Î¥­¡¼. - ¥­¡¼¤¬ #Mvideomode ¤Ç¤¢¤ë¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϥ·¥ó¥Ü¥ë¤Ç¤Ê¤± - ¤ì¤Ð¤Ê¤é¤Ê¤¤¡£¤â¤· #Mreverse ¤Î¾ì¹ç¤ÏÁ°·Ê¿§¤ÈÇطʼ￧¤òÆþ¤ìÂؤ¨ - ¤ÆÍѤ¤¤ë¡£#Mnil ¤Î¾ì¹ç¤Ï¥Ó¥Ç¥ª¥â¡¼¥É¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£¤½¤ì°Ê³°¤Î¥· - ¥ó¥Ü¥ë¤Î¾ì¹çÁ°·Ê¿§¤ÈÇطʼ￧¤òÆþ¤ìÂؤ¨¤ò¹Ô¤Ê¤ï¤Ê¤¤¡£ */ + ÊÑ¿ô #Mvideomode ¤Ï¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤Î¥­¡¼¤È¤·¤ÆÍѤ¤¤é¤ì¤ë¡£¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢ + @b Mnormal, @b Mreverse, #Mnil ¤Î¤¤¤º¤ì¤«¤Ç¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£ + + @b Mnormal ¤Î¾ì¹ç¤Ï¡¢M-text + ¤òɸ½à¤Î¥Ó¥Ç¥ª¥â¡¼¥É¡ÊÁ°·Ê¤òÁ°·Ê¿§¤Ç¡¢ÇطʤòÇØ·Ê¿§¤Ç¡Ë¤Çɽ¼¨¤¹¤ë¡£ + + @b Mreverse ¤Î¾ì¹ç¤Ï¥ê¥Ð¡¼¥¹¥Ó¥Ç¥ª¥â¡¼¥É¤Ç¡ÊÁ°·Ê¤òÇØ·Ê¿§¤Ç¡¢ÇطʤòÁ°·Ê¿§¤Ç¡Ëɽ¼¨¤¹¤ë¡£ + + #Mnil ¤Î¾ì¹ç¤Ï¥Ó¥Ç¥ª¥â¡¼¥É¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£ + */ MSymbol Mvideomode; @@ -796,10 +1056,19 @@ MSymbol Mvideomode; The variable #Mratio is used as a key of face property. The value RATIO must be an integer. - The value @c NULL means that the face does not specify a - horizontal line. Otherwise, an M-text is drawn by a font of size - (FONTSIZE * RATIO / 100) where FONTSIZE is a font size specified - by the face property #Msize. */ + The value 0 means that the face does not specify a font size + ratio. Otherwise, an M-text is drawn by a font of size (FONTSIZE + * RATIO / 100) where FONTSIZE is a font size specified by the face + property #Msize. */ +/***ja + @brief ¥Õ¥©¥ó¥È¤Î¥µ¥¤¥º¤ÎÈæΨ¤ò»ØÄꤹ¤ë¤¿¤á¤Î¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¡¼¤Î¥­¡¼. + + ÊÑ¿ô #Mratio ¤Ï¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤Î¥­¡¼¤È¤·¤ÆÍѤ¤¤é¤ì¤ë¡£ÃÍ RATIO + ¤ÏÀ°¿ôÃͤǤʤ¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£ + + Ãͤ¬0¤Ê¤é¤Ð¡¢¥Õ¥©¥ó¥È¥µ¥¤¥º¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£¤½¤¦¤Ç¤Ê¤±¤ì¤Ð¡¢M-text + ¤Ï(FONTSIZE * RATIO / 100) ¤È¤¤¤¦¥µ¥¤¥º¤Î¥Õ¥©¥ó¥È¤Çɽ¼¨¤µ¤ì¤ë¡£ + FONTSIZE ¤Ï¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¡¼#Msize ¤Ç»ØÄꤵ¤ì¤¿¥µ¥¤¥º¤Ç¤¢¤ë¡£ */ MSymbol Mratio; @@ -813,14 +1082,15 @@ MSymbol Mratio; The value @c NULL means that the face does not specify this property. Otherwise, an M-text is drawn with a horizontal line by a way specified by the object that the value points to. */ - /***ja - @brief ²¼Àþ¤ò»ØÄꤹ¤ë¤¿¤á¤Î¥·¥ó¥Ü¥ë + @brief ¿åÊ¿Àþ¤ò»ØÄꤹ¤ë¤¿¤á¤Î¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¡¼¤Î¥­¡¼. + + ÊÑ¿ô #Mhline ¤Ï¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤Î¥­¡¼¤È¤·¤ÆÍѤ¤¤é¤ì¤ë¡£ÃÍ¤Ï + #MFaceHLineProp ·¿¥ª¥Ö¥¸¥§¥¯¥È¤Ø¤Î¥Ý¥¤¥ó¥¿¤« @c NULL ¤Ç¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£ - ¥­¡¼¤¬ #Munderline ¤Ç¤¢¤ë¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢¥·¥ó¥Ü¥ë - #Mt, #Mnil, #Munspecified ¤Î¤¤¤º¤ì¤«¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£#Mt - ¤Î¾ì¹ç¤Ï²¼ÀþÉÕ¤­¤Çɽ¼¨¤¹¤ë¡£#Mnil ¤Î¾ì¹ç¤Ï²¼Àþ¤òÉÕ¤±¤Ê¤¤¡£ - #Munspecified ¤Î¾ì¹ç¤Ï¤É¤Á¤é¤È¤â»ØÄꤵ¤ì¤Ê¤¤¡£ */ + Ãͤ¬ @c NULL ¤Ê¤é¤Ð¡¢¤³¤Î¥×¥í¥Ñ¥Æ¥£¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£ + ¤½¤¦¤Ç¤Ê¤±¤ì¤ÐÃͤ¬»Ø¤¹¥ª¥Ö¥¸¥§¥¯¥È¤Ë»ØÄꤵ¤ì¤¿¤è¤¦¤Ë¿åÊ¿Àþ¤òÉղä·¤Æ M-text + ¤òɽ¼¨¤¹¤ë¡£*/ MSymbol Mhline; @@ -833,19 +1103,20 @@ MSymbol Mhline; The value @c NULL means that the face does not specify a box. Otherwise, an M-text is drawn with a surrounding box by a way specified by the object that the value points to. */ - /***ja - @brief °Ï¤ßÏȤò»ØÄꤹ¤ë¤¿¤á¤Î¥·¥ó¥Ü¥ë + @brief °Ï¤ßÏȤò»ØÄꤹ¤ë¤¿¤á¤Î¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¡¼¤Î¥­¡¼. + + ÊÑ¿ô #Mbox ¤Ï¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤Î¥­¡¼¤È¤·¤ÆÍѤ¤¤é¤ì¤ë¡£ÃÍ¤Ï + #MFaceBoxProp ·¿¥ª¥Ö¥¸¥§¥¯¥È¤Ø¤Î¥Ý¥¤¥ó¥¿¤« @c NULL ¤Ç¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£ - ¥­¡¼¤¬ #Mbox ¤Ç¤¢¤ë¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢¥·¥ó¥Ü¥ë #Mt, @c - Mnil, #Munspecified ¤Î¤¤¤º¤ì¤«¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£#Mt ¤Î¾ì¹ç - ¤Ï°Ï¤ßÏÈÉÕ¤­¤Çɽ¼¨¤¹¤ë¡£#Mnil ¤Î¾ì¹ç¤Ï°Ï¤ßÏȤòÉÕ¤±¤Ê¤¤¡£@c - Munspecified ¤Î¾ì¹ç¤Ï¤É¤Á¤é¤È¤â»ØÄꤵ¤ì¤Ê¤¤¡£ */ + Ãͤ¬ @c NULL ¤Ê¤é¤Ð¡¢¤³¤Î¥Õ¥§¡¼¥¹¤Ï°Ï¤ßÏȤò»ØÄꤷ¤Æ¤¤¤Ê¤¤¡£ + ¤½¤¦¤Ç¤Ê¤±¤ì¤ÐÃͤ¬»Ø¤¹¥ª¥Ö¥¸¥§¥¯¥È¤Ë»ØÄꤵ¤ì¤¿¤è¤¦¤Ë°Ï¤ßÏȤòÉղä·¤Æ + M-text ¤òɽ¼¨¤¹¤ë¡£*/ MSymbol Mbox; /***en - @brief Key of a face property specifying fontset. + @brief Key of a face property specifying fontset. The variable #Mfontset is used as a key of face property. The value must be a pointer to an object of type #Mfontset, or @c @@ -854,16 +1125,16 @@ MSymbol Mbox; The value @c NULL means that the face does not specify a fontset. Otherwise, an M-text is drawn with a font selected from what specified in the fontset. */ - /***ja - @brief ¥Õ¥©¥ó¥È¥»¥Ã¥È¤ò»ØÄꤹ¤ë¤¿¤á¤Î¥·¥ó¥Ü¥ë + @brief ¥Õ¥©¥ó¥È¥»¥Ã¥È¤ò»ØÄꤹ¤ë¤¿¤á¤Î¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¡¼¤Î¥­¡¼. - ¥­¡¼¤¬ #Mfontset ¤Ç¤¢¤ë¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢¥·¥ó¥Ü¥ë @c - Munspecified ¤Ç¤¢¤ë¤«¡¢¤µ¤â¤Ê¤¯¤Ð¥Õ¥©¥ó¥È¥»¥Ã¥È¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤Ê¤± - ¤ì¤Ð¤Ê¤é¤Ê¤¤¡£Á°¼Ô¤Î¾ì¹ç¤Ï¥Õ¥©¥ó¥È¥»¥Ã¥È¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¤³¤È¤ò¼¨ - ¤·¡¢¸å¼Ô¤Î¾ì¹ç¤Ï¤½¤Î¥Ý¥¤¥ó¥¿¤Î»Ø¤¹¥Õ¥©¥ó¥È¥»¥Ã¥È¤¬¥Æ¥­¥¹¥Èɽ¼¨¤ËÍÑ - ¤¤¤é¤ì¤ë¡£ */ + ÊÑ¿ô #Mfontset ¤Ï¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤Î¥­¡¼¤È¤·¤ÆÍѤ¤¤é¤ì¤ë¡£ÃÍ¤Ï + #Mfontset ·¿¥ª¥Ö¥¸¥§¥¯¥È¤Ø¤Î¥Ý¥¤¥ó¥¿¤« @c NULL ¤Ç¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£ + Ãͤ¬ @c NULL ¤Ê¤é¤Ð¡¢¥Õ¥©¥ó¥È¥»¥Ã¥È¤Ï»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¡£ + ¤½¤¦¤Ç¤Ê¤±¤ì¤ÐÃͤ¬»Ø¤¹¥ª¥Ö¥¸¥§¥¯¥È¤Ë»ØÄꤵ¤ì¤¿¥Õ¥©¥ó¥È¥»¥Ã¥È¤«¤éÁª¤ó¤À¥Õ¥©¥ó¥È¤Ç + M-text ¤òɽ¼¨¤¹¤ë¡£*/ + MSymbol Mfontset; /***en @@ -875,7 +1146,14 @@ MSymbol Mfontset; The value @c NULL means that the face does not specify a hook. Otherwise, the specified function is called before the face is realized. */ +/***ja + @brief ¥Õ¥Ã¥¯¤ò»ØÄꤹ¤ë¤¿¤á¤Î¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¡¼¤Î¥­¡¼. + ÊÑ¿ô #Mhook_func ¤Ï¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤Î¥­¡¼¤È¤·¤ÆÍѤ¤¤é¤ì¤ë¡£ÃÍ¤Ï + #MFaceHookFunc ·¿¤Î´Ø¿ô¤« @c NULL ¤Ç¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£ + + Ãͤ¬ @c NULL ¤Ê¤é¤Ð¡¢¥Õ¥Ã¥¯¤Ï»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¡£ + ¤½¤¦¤Ç¤Ê¤±¤ì¤Ð¥Õ¥§¡¼¥¹¤ò¼Â¸½¤¹¤ëÁ°¤Ë»ØÄꤵ¤ì¤¿´Ø¿ô¤¬¸Æ¤Ð¤ì¤ë¡£ */ MSymbol Mhook_func; /***en @@ -884,7 +1162,11 @@ MSymbol Mhook_func; The variable #Mhook_arg is used as a key of face property. The value can be anything that is passed a hook function specified by the face property #Mhook_func. */ +/***ja + @brief ¥Õ¥Ã¥¯¤Î°ú¿ô¤ò»ØÄꤹ¤ë¤¿¤á¤Î¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¡¼¤Î¥­¡¼. + ÊÑ¿ô #Mhook_arg ¤Ï¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤Î¥­¡¼¤È¤·¤ÆÍѤ¤¤é¤ì¤ë¡£ + Ãͤϲ¿¤Ç¤â¤è¤¯¡¢¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£ #Mhook_func ¤Ç»ØÄꤵ¤ì¤ë´Ø¿ô¤ËÅϤµ¤ì¤ë¡£ */ MSymbol Mhook_arg; /*** @} */ @@ -892,11 +1174,13 @@ MSymbol Mhook_arg; /*** @ingroup m17nFace */ /***en @name Variables: Possible values of #Mvideomode property of face */ +/***ja @name ÊÑ¿ô¡§ ¥Õ¥§¡¼¥¹¤Î #Mvideomode ¥×¥í¥Ñ¥Æ¥£¤Î²Äǽ¤ÊÃÍ */ /*** @{ */ -/*=*/ /***en See the documentation of the variable #Mvideomode. */ +/***ja + ÊÑ¿ô #Mvideomode ¤ÎÀâÌÀ¤ò»²¾È¤Î¤³¤È¡£ */ MSymbol Mnormal; MSymbol Mreverse; /*** @} */ @@ -909,31 +1193,38 @@ MSymbol Mreverse; /*=*/ /***en - @brief Normal video face + @brief Normal video face. The variable #mface_normal_video points to a face that has the - #Mvideomode property with value #Mnormal. The other properties + #Mvideomode property with value @b Mnormal. The other properties are not specified. An M-text drawn with this face appear normal colors (i.e. the foreground is drawn by foreground color, and background is drawn by background color). */ +/***ja + @brief ɸ½à¥Ó¥Ç¥ª¥Õ¥§¡¼¥¹. + + ÊÑ¿ô #mface_normal_video ¤Ï #Mvideomode ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤ¬ @b Mnormal + ¤Ç¤¢¤ë¥Õ¥§¡¼¥¹¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£Â¾¤Î¥×¥í¥Ñ¥Æ¥£¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£ + ¤³¤Î¥Õ¥§¡¼¥¹¤Çɽ¼¨¤µ¤ì¤ëM-text + ¤Ïɸ½à¤Î¿§ (¤¹¤Ê¤ï¤ÁÁ°·Ê¤ÏÁ°·Ê¿§¡¢ÇطʤÏÇØ·Ê¿§¡Ë¤ÇÉÁ¤«¤ì¤ë¡£ */ MFace *mface_normal_video; /***en - @brief Reverse video face + @brief Reverse video face. The variable #mface_reverse_video points to a face that has the - #Mvideomode property with value #Mreverse. The other properties + #Mvideomode property with value @b Mreverse. The other properties are not specified. An M-text drawn with this face appear in reversed colors (i.e. the foreground is drawn by background color, and background is drawn by foreground color). */ - /***ja - @brief ¥ê¥Ð¡¼¥¹¥Õ¥§¡¼¥¹ + @brief ¥ê¥Ð¡¼¥¹¥Ó¥Ç¥ª¥Õ¥§¡¼¥¹. - ¥Ý¥¤¥ó¥¿ #maface_reverse ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Ï¡¢²¼ - ¤Ë¼¨¤¹¤è¤¦¤Ê¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ò»ý¤Ä¡£¤³¤Î¥Õ¥§¡¼¥¹¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì - ¤¿ M-text ¤ÏÁ°·Ê¿§¤ÈÇØ·Ê¿§¤¬Æþ¤ìÂؤï¤ë¡£ */ + ÊÑ¿ô #mface_reverse_video ¤Ï #Mvideomode ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤ¬ + @b Mreverse ¤Ç¤¢¤ë¥Õ¥§¡¼¥¹¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£Â¾¤Î¥×¥í¥Ñ¥Æ¥£¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£ + ¤³¤Î¥Õ¥§¡¼¥¹¤Çɽ¼¨¤µ¤ì¤ëM-text + ¤ÏÁ°·Ê¿§¤ÈÇØ·Ê¿§¤¬Æþ¤ìÂؤï¤Ã¤Æ (¤¹¤Ê¤ï¤ÁÁ°·Ê¤ÏÇØ·Ê¿§¡¢ÇطʤÏÁ°·Ê¿§¡ËÉÁ¤«¤ì¤ë¡£ */ MFace *mface_reverse_video; @@ -954,6 +1245,21 @@ MFace *mface_reverse_video; The other properties are not specified. An M-text that has this face is drawn with an underline. */ +/***ja + @brief ²¼Àþ¥Õ¥§¡¼¥¹. + + ÊÑ¿ô #mface_underline ¤Ï #Mhline ¥×¥í¥Ñ¥Æ¥¤¤ÎÃͤ¬ #MFaceHLineProp + ·¿¥ª¥Ö¥¸¥§¥¯¥È¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¥Õ¥§¡¼¥¹¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£¥ª¥Ö¥¸¥§¥¯¥È¤Î¥á¥ó¥Ð¤Ï°Ê²¼¤ÎÄ̤ꡣ + +@verbatim + ¥á¥ó¥Ð ÃÍ + ----- ----- + type MFACE_HLINE_UNDER + width 1 + color Mnil +@endverbatim + + ¾¤Î¥×¥í¥Ñ¥Æ¥£¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£¤³¤Î¥Õ¥§¡¼¥¹¤ò»ý¤Ä M-text ¤Ï²¼ÀþÉÕ¤­¤Çɽ¼¨¤µ¤ì¤ë¡£*/ MFace *mface_underline; @@ -964,314 +1270,291 @@ MFace *mface_underline; property with value a symbol of name "medium". The other properties are not specified. An M-text that has this face is drawn with a font of medium weight. */ +/***ja + @brief ¥ß¥Ç¥£¥¢¥à¥Õ¥§¡¼¥¹. + + ÊÑ¿ô #mface_medium ¤Ï #Mweight ¥×¥í¥Ñ¥Æ¥¤¤ÎÃͤ¬ "medium" + ¤È¤¤¤¦Ì¾Á°¤ò¤â¤Ä¥·¥ó¥Ü¥ë¤Ç¤¢¤ë¤è¤¦¤Ê¥Õ¥§¡¼¥¹¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£ + ¾¤Î¥×¥í¥Ñ¥Æ¥£¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£¤³¤Î¥Õ¥§¡¼¥¹¤ò»ý¤Ä M-text + ¤Ï¡¢¥ß¥Ç¥£¥¢¥à¥¦¥§¥¤¥È¤Î¥Õ¥©¥ó¥È¤Çɽ¼¨¤µ¤ì¤ë¡£ */ MFace *mface_medium; /***en - @brief Bold face + @brief Bold face. The variable #mface_bold points to a face that has the #Mweight property with value a symbol of name "bold". The other properties are not specified. An M-text that has this face is drawn with a font of bold weight. */ - /***ja - @brief ¥Ü¡¼¥ë¥É¥Õ¥§¡¼¥¹ + @brief ¥Ü¡¼¥ë¥É¥Õ¥§¡¼¥¹. - ¥Ý¥¤¥ó¥¿ #mface_bold ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Ï¡¢weight - ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤȤ·¤Æ¥Ü¡¼¥ë¥ÉÂΤò°ÕÌ£¤¹¤ë¥·¥¹¥Æ¥à°Í¸¤Î¥·¥ó¥Ü¥ë¤ò»ý - ¤Ä¡£Â¾¤Î¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϲ¼¤Ë¼¨¤¹¤È¤ª¤ê¤Ç¤¢¤ë¡£¤³¤Î¥Õ¥§¡¼¥¹ - ¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤Ï¥Ü¡¼¥ë¥ÉÂΤȤʤ롣 */ + ÊÑ¿ô #mface_bold ¤Ï #Mweight ¥×¥í¥Ñ¥Æ¥¤¤ÎÃͤ¬ "bold" + ¤È¤¤¤¦Ì¾Á°¤ò¤â¤Ä¥·¥ó¥Ü¥ë¤Ç¤¢¤ë¤è¤¦¤Ê¥Õ¥§¡¼¥¹¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£ + ¾¤Î¥×¥í¥Ñ¥Æ¥£¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£¤³¤Î¥Õ¥§¡¼¥¹¤ò»ý¤Ä M-text + ¤Ï¡¢¥Ü¡¼¥ë¥É¥Õ¥©¥ó¥È¤Çɽ¼¨¤µ¤ì¤ë¡£ */ MFace *mface_bold; /***en - @brief Italic face + @brief Italic face. The variable #mface_italic points to a face that has the #Mstyle property with value a symbol of name "italic". The other properties are not specified. An M-text that has this face is drawn with a font of italic style. */ - /***ja - @brief ¥¤¥¿¥ê¥Ã¥¯¥Õ¥§¡¼¥¹ + @brief ¥¤¥¿¥ê¥Ã¥¯¥Õ¥§¡¼¥¹. - ¥Ý¥¤¥ó¥¿ #mface_italic ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Ï¡¢style - ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤȤ·¤Æ¥¤¥¿¥ê¥Ã¥¯ÂΤò°ÕÌ£¤¹¤ë¥·¥¹¥Æ¥à°Í¸¤Î¥·¥ó¥Ü¥ë¤ò - »ý¤Ä¡£Â¾¤Î¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϲ¼¤Ë¼¨¤¹Ä̤ê¤Ç¤¢¤ë¡£¤³¤Î¥Õ¥§¡¼¥¹ - ¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤Ï¥¤¥¿¥ê¥Ã¥¯ÂΤȤʤ롣 */ + ÊÑ¿ô #mface_italic ¤Ï #Mstyle ¥×¥í¥Ñ¥Æ¥¤¤ÎÃͤ¬ "italic" + ¤È¤¤¤¦Ì¾Á°¤ò¤â¤Ä¥·¥ó¥Ü¥ë¤Ç¤¢¤ë¤è¤¦¤Ê¥Õ¥§¡¼¥¹¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£ + ¾¤Î¥×¥í¥Ñ¥Æ¥£¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£¤³¤Î¥Õ¥§¡¼¥¹¤ò»ý¤Ä M-text + ¤Ï¡¢¥¤¥¿¥ê¥Ã¥¯ÂΤÇɽ¼¨¤µ¤ì¤ë¡£ */ MFace *mface_italic; /***en - @brief Bold italic face + @brief Bold italic face. The variable #mface_bold_italic points to a face that has the #Mweight property with value a symbol of name "bold", and #Mstyle property with value a symbol of name "italic". The other properties are not specified. An M-text that has this face is drawn with a font of bold weight and italic style. */ - /***ja - @brief ¥Ü¡¼¥ë¥É¥¤¥¿¥ê¥Ã¥¯¥Õ¥§¡¼¥¹ + @brief ¥Ü¡¼¥ë¥É¥¤¥¿¥ê¥Ã¥¯¥Õ¥§¡¼¥¹. - ¥Ý¥¤¥ó¥¿ #mface_bold_italic ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Î - ¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤Ï¡¢weight ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤȤ·¤Æ¥Ü¡¼¥ë¥ÉÂΤò°ÕÌ£ - ¤¹¤ë¥·¥¹¥Æ¥à°Í¸¤Î¥·¥ó¥Ü¥ë¤ò¡¢style ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤȤ·¤Æ¥¤¥¿¥ê¥Ã¥¯ - ÂΤò°ÕÌ£¤¹¤ë¥·¥¹¥Æ¥à°Í¸¤Î¥·¥ó¥Ü¥ë¤ò¡¢¤½¤ì°Ê³°¤Î¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£ - ¤ÎÃͤȤ·¤Æ²¼¤Ë¼¨¤¹¤â¤Î¤ò¤½¤ì¤¾¤ì»ý¤Ä¡£¤³¤Î¥Õ¥§¡¼¥¹¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì - ¤¿ M-text ¤Ï¥Ü¡¼¥ë¥É¥¤¥¿¥ê¥Ã¥¯ÂΤȤʤ롣 */ + ÊÑ¿ô #mface_bold_italic ¤Ï¡¢#Mweight ¥×¥í¥Ñ¥Æ¥¤¤ÎÃͤ¬ "bold" + ¤È¤¤¤¦Ì¾Á°¤ò¤â¤Ä¥·¥ó¥Ü¥ë¤Ç¤¢¤ê¡¢¤«¤Ä #Mstyle ¥×¥í¥Ñ¥Æ¥¤¤ÎÃͤ¬ "italic" + ¤È¤¤¤¦Ì¾Á°¤ò¤â¤Ä¥·¥ó¥Ü¥ë¤Ç¤¢¤ë¤è¤¦¤Ê¥Õ¥§¡¼¥¹¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£ + ¾¤Î¥×¥í¥Ñ¥Æ¥£¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£¤³¤Î¥Õ¥§¡¼¥¹¤ò»ý¤Ä M-text + ¤Ï¡¢¥Ü¡¼¥ë¥É¥¤¥¿¥ê¥Ã¥¯ÂΤÇɽ¼¨¤µ¤ì¤ë¡£ */ MFace *mface_bold_italic; /***en - @brief Smallest face + @brief Smallest face. The variable #mface_xx_small points to a face that has the #Mratio property with value 50. The other properties are not specified. An M-text that has this face is drawn with a font whose size is 50% of a normal font. */ - /***ja - @brief ºÇ¾®¤Î¥Õ¥§¡¼¥¹ + @brief ºÇ¾®¤Î¥Õ¥§¡¼¥¹. - ¥Ý¥¤¥ó¥¿ #mface_xx_small ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Ï¡¢²¼ - ¤Ë¼¨¤¹¤è¤¦¤Ê¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ò»ý¤Ä¡£¤³¤³¤Ç @c N ¤Ï @c - mface_normalsize ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Î size ¥×¥í¥Ñ¥Æ¥£ - ¤ÎÃͤǤ¢¤ë¡£¤³¤Î¥Õ¥§¡¼¥¹¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤ÎÂ礭¤µ¤Ï¡¢ @c - mface_normalsize ¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤ÎÂ礭¤µ¤Î 50% ¤Ë¤Ê¤ë¡£ + ÊÑ¿ô #mface_xx_small ¤Ï¡¢#Mratio ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤ¬ 50 + ¤Ç¤¢¤ë¥Õ¥§¡¼¥¹¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£Â¾¤Î¥×¥í¥Ñ¥Æ¥£¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£ + ¤³¤Î¥Õ¥§¡¼¥¹¤ò»ý¤Ä M-text ¤Ïɸ½à¥Õ¥©¥ó¥È¤Î 50% ¤ÎÂ礭¤µ¤Î¥Õ¥©¥ó¥È¤òÍѤ¤¤Æɽ¼¨¤µ¤ì¤ë¡£ */ MFace *mface_xx_small; /***en - @brief Smaller face + @brief Smaller face. The variable #mface_x_small points to a face that has the #Mratio property with value 66. The other properties are not specified. An M-text that has this face is drawn with a font whose size is 66% of a normal font. */ - /***ja - @brief ¤è¤ê¾®¤µ¤¤¥Õ¥§¡¼¥¹ + @brief ¤è¤ê¾®¤µ¤¤¥Õ¥§¡¼¥¹. - ¥Ý¥¤¥ó¥¿ #mface_x_small ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Ï¡¢²¼ - ¤Ë¼¨¤¹¤è¤¦¤Ê¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ò»ý¤Ä¡£¤³¤³¤Ç @c N ¤Ï - #mface_normalsize ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Î size ¥×¥í¥Ñ¥Æ¥£ - ¤ÎÃͤǤ¢¤ë¡£¤³¤Î¥Õ¥§¡¼¥¹¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤ÎÂ礭¤µ¤Ï¡¢ - #mface_normalsize ¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤ÎÂ礭¤µ¤Î 66% ¤Ë¤Ê¤ë¡£ + ÊÑ¿ô #mface_x_small ¤Ï¡¢#Mratio ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤ¬ 66 + ¤Ç¤¢¤ë¥Õ¥§¡¼¥¹¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£Â¾¤Î¥×¥í¥Ñ¥Æ¥£¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£ + ¤³¤Î¥Õ¥§¡¼¥¹¤ò»ý¤Ä M-text ¤Ïɸ½à¥Õ¥©¥ó¥È¤Î 66% ¤ÎÂ礭¤µ¤Î¥Õ¥©¥ó¥È¤òÍѤ¤¤Æɽ¼¨¤µ¤ì¤ë¡£ */ MFace *mface_x_small; /***en - @brief Small face + @brief Small face. The variable #mface_x_small points to a face that has the #Mratio property with value 75. The other properties are not specified. An M-text that has this face is drawn with a font whose size is 75% of a normal font. */ - /***ja - @brief ¾®¤µ¤¤¥Õ¥§¡¼¥¹ + @brief ¾®¤µ¤¤¥Õ¥§¡¼¥¹. - ¥Ý¥¤¥ó¥¿ #mface_small ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Ï¡¢²¼ - ¤Ë¼¨¤¹¤è¤¦¤Ê¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ò»ý¤Ä¡£¤³¤³¤Ç @c N ¤Ï - #mface_normalsize ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Î size ¥×¥í¥Ñ¥Æ¥£ - ¤ÎÃͤǤ¢¤ë¡£¤³¤Î¥Õ¥§¡¼¥¹¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤ÎÂ礭¤µ¤Ï¡¢ - #mface_normalsize ¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤ÎÂ礭¤µ¤Î 75% ¤Ë¤Ê¤ë¡£ + ÊÑ¿ô #mface_small ¤Ï¡¢#Mratio ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤ¬ 75 + ¤Ç¤¢¤ë¥Õ¥§¡¼¥¹¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£Â¾¤Î¥×¥í¥Ñ¥Æ¥£¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£ + ¤³¤Î¥Õ¥§¡¼¥¹¤ò»ý¤Ä M-text ¤Ïɸ½à¥Õ¥©¥ó¥È¤Î 75% ¤ÎÂ礭¤µ¤Î¥Õ¥©¥ó¥È¤òÍѤ¤¤Æɽ¼¨¤µ¤ì¤ë¡£ */ MFace *mface_small; /***en - @brief Normalsize face + @brief Normalsize face. The variable #mface_normalsize points to a face that has the #Mratio property with value 100. The other properties are not specified. An M-text that has this face is drawn with a font whose size is the same as a normal font. */ - /***ja - @brief ɸ½à¤ÎÂ礭¤µ¤Î¥Õ¥§¡¼¥¹ + @brief ɸ½à¤ÎÂ礭¤µ¤Î¥Õ¥§¡¼¥¹. - ¥Ý¥¤¥ó¥¿ #mface_normalsize ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Ï¡¢²¼¤Ë - ¼¨¤¹¤è¤¦¤Ê¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ò»ý¤Ä¡£¤³¤³¤Ç @c N ¤Ï¥Ý¥¤¥ó¥È¥µ¥¤¥º¤ò - ɽ¤ï¤¹À°¿ô¤Ç¤¢¤ë¡£¤³¤Î¥Õ¥§¡¼¥¹¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤ÎÂ礭¤µ¤Ï¡¢ - ¥Ç¥Õ¥©¥ë¥È¥Õ¥ì¡¼¥à¤Î¥Ç¥Õ¥©¥ë¥È¥Õ¥©¥ó¥È¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤Î - Â礭¤µ¤ËÅù¤·¤¤¡£ */ + ÊÑ¿ô #mface_normalsize ¤Ï¡¢#Mratio ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤ¬ 100 + ¤Ç¤¢¤ë¥Õ¥§¡¼¥¹¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£Â¾¤Î¥×¥í¥Ñ¥Æ¥£¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£ + ¤³¤Î¥Õ¥§¡¼¥¹¤ò»ý¤Ä M-text ¤Ïɸ½à¥Õ¥©¥ó¥È¤ÈƱ¤¸Â礭¤µ¤Î¥Õ¥©¥ó¥È¤òÍѤ¤¤Æɽ¼¨¤µ¤ì¤ë¡£ + */ MFace *mface_normalsize; /***en - @brief Large face + @brief Large face. The variable #mface_large points to a face that has the #Mratio property with value 120. The other properties are not specified. An M-text that has this face is drawn with a font whose size is 120% of a normal font. */ - /***ja - @brief Â礭¤¤¥Õ¥§¡¼¥¹ + @brief Â礭¤¤¥Õ¥§¡¼¥¹. - ¥Ý¥¤¥ó¥¿ #mface_large ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Ï¡¢²¼ - ¤Ë¼¨¤¹¤è¤¦¤Ê¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ò»ý¤Ä¡£¤³¤³¤Ç @c N ¤Ï - #mface_normalsize ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Î size ¥×¥í¥Ñ¥Æ¥£ - ¤ÎÃͤǤ¢¤ë¡£¤³¤Î¥Õ¥§¡¼¥¹¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤ÎÂ礭¤µ¤Ï¡¢ - #mface_normalsize ¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤ÎÂ礭¤µ¤Î 120% ¤Ë¤Ê¤ë¡£ + ÊÑ¿ô #mface_large ¤Ï¡¢#Mratio ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤ¬ 120 + ¤Ç¤¢¤ë¥Õ¥§¡¼¥¹¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£Â¾¤Î¥×¥í¥Ñ¥Æ¥£¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£ + ¤³¤Î¥Õ¥§¡¼¥¹¤ò»ý¤Ä M-text ¤Ïɸ½à¥Õ¥©¥ó¥È¤Î 120% ¤ÎÂ礭¤µ¤Î¥Õ¥©¥ó¥È¤òÍѤ¤¤Æɽ¼¨¤µ¤ì¤ë¡£ */ MFace *mface_large; /***en - @brief Larger face + @brief Larger face. The variable #mface_x_large points to a face that has the #Mratio property with value 150. The other properties are not specified. An M-text that has this face is drawn with a font whose size is 150% of a normal font. */ - /***ja - @brief ¤è¤êÂ礭¤¤¥Õ¥§¡¼¥¹ + @brief ¤â¤Ã¤ÈÂ礭¤¤¥Õ¥§¡¼¥¹. - ¥Ý¥¤¥ó¥¿ #mface_x_large ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Ï¡¢²¼ - ¤Ë¼¨¤¹¤è¤¦¤Ê¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ò»ý¤Ä¡£¤³¤³¤Ç @c N ¤Ï - #mface_normalsize ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Î size ¥×¥í¥Ñ¥Æ¥£ - ¤ÎÃͤǤ¢¤ë¡£¤³¤Î¥Õ¥§¡¼¥¹¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤ÎÂ礭¤µ¤Ï¡¢ - #mface_normalsize ¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤ÎÂ礭¤µ¤Î 150% ¤Ë¤Ê¤ë¡£ + ÊÑ¿ô #mface_x_large ¤Ï¡¢#Mratio ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤ¬ 150 + ¤Ç¤¢¤ë¥Õ¥§¡¼¥¹¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£Â¾¤Î¥×¥í¥Ñ¥Æ¥£¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£ + ¤³¤Î¥Õ¥§¡¼¥¹¤ò»ý¤Ä M-text ¤Ïɸ½à¥Õ¥©¥ó¥È¤Î 150% ¤ÎÂ礭¤µ¤Î¥Õ¥©¥ó¥È¤òÍѤ¤¤Æɽ¼¨¤µ¤ì¤ë¡£ */ MFace *mface_x_large; /***en - @brief Largest face + @brief Largest face. The variable #mface_xx_large points to a face that has the #Mratio property with value 200. The other properties are not specified. An M-text that has this face is drawn with a font whose size is 200% of a normal font. */ - /***ja - @brief ºÇÂç¤Î¥Õ¥§¡¼¥¹ + @brief ºÇÂç¤Î¥Õ¥§¡¼¥¹. - ¥Ý¥¤¥ó¥¿ #mface_xx_large ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Ï¡¢²¼ - ¤Ë¼¨¤¹¤è¤¦¤Ê¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ò»ý¤Ä¡£¤³¤³¤Ç @c N ¤Ï - #mface_normalsize ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Î size ¥×¥í¥Ñ¥Æ¥£ - ¤ÎÃͤǤ¢¤ë¡£¤³¤Î¥Õ¥§¡¼¥¹¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤ÎÂ礭¤µ¤Ï¡¢ - #mface_normalsize ¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤ÎÂ礭¤µ¤Î 200% ¤Ë¤Ê¤ë¡£ + ÊÑ¿ô #mface_xx_large ¤Ï¡¢#Mratio ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤ¬ 200 + ¤Ç¤¢¤ë¥Õ¥§¡¼¥¹¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£Â¾¤Î¥×¥í¥Ñ¥Æ¥£¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£ + ¤³¤Î¥Õ¥§¡¼¥¹¤ò»ý¤Ä M-text ¤Ïɸ½à¥Õ¥©¥ó¥È¤Î 200% ¤ÎÂ礭¤µ¤Î¥Õ¥©¥ó¥È¤òÍѤ¤¤Æɽ¼¨¤µ¤ì¤ë¡£ */ MFace *mface_xx_large; /***en - @brief Black face + @brief Black face. The variable #mface_black points to a face that has the #Mforeground property with value a symbol of name "black". The other properties are not specified. An M-text that has this face is drawn with black foreground. */ +/***ja + @brief ¹õ¥Õ¥§¡¼¥¹. -/***ja - @brief ¹õ¥Õ¥§¡¼¥¹ - - ¥Ý¥¤¥ó¥¿ #mface_black ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Ï¡¢ - #Mforeground ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤȤ·¤Æ"black" ¤È¤¤¤¦Ì¾Á°¤Î¥·¥ó¥Ü - ¥ë¤ò»ý¤Ä¡£Â¾¤Î¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϲ¼¤Ë¼¨¤¹¤È¤ª¤ê¤Ç¤¢¤ë¡£¤³¤Î - ¥Õ¥§¡¼¥¹¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤ÎÁ°·Ê¿§¤Ï¹õ¤Ë¤Ê¤ë¡£ */ + ÊÑ¿ô #mface_black ¤Ï¡¢#Mforeground ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤȤ·¤Æ "black" + ¤È¤¤¤¦Ì¾Á°¤Î¥·¥ó¥Ü¥ë¤ò»ý¤Ä¤è¤¦¤Ê¥Õ¥§¡¼¥¹¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£ + ¾¤Î¥×¥í¥Ñ¥Æ¥£¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£¤³¤Î¥Õ¥§¡¼¥¹¤ò»ý¤Ä M-text + ¤ÏÁ°·Ê¿§¤È¤·¤Æ¹õ¤òÍѤ¤¤Æɽ¼¨¤µ¤ì¤ë¡£ */ MFace *mface_black; /***en - @brief White face + @brief White face. The variable #mface_white points to a face that has the #Mforeground property with value a symbol of name "white". The other properties are not specified. An M-text that has this face is drawn with white foreground. */ - /***ja - @brief Çò¥Õ¥§¡¼¥¹ + @brief Çò¥Õ¥§¡¼¥¹. - ¥Ý¥¤¥ó¥¿ #mface_white ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Ï¡¢ - foreground ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤȤ·¤Æ"white" ¤È¤¤¤¦Ì¾Á°¤Î¥·¥ó¥Ü - ¥ë¤ò»ý¤Ä¡£Â¾¤Î¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϲ¼¤Ë¼¨¤¹¤È¤ª¤ê¤Ç¤¢¤ë¡£¤³¤Î - ¥Õ¥§¡¼¥¹¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤ÎÁ°·Ê¿§¤ÏÇò¤Ë¤Ê¤ë¡£ */ + ÊÑ¿ô #mface_white ¤Ï¡¢#Mforeground ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤȤ·¤Æ "white" + ¤È¤¤¤¦Ì¾Á°¤Î¥·¥ó¥Ü¥ë¤ò»ý¤Ä¤è¤¦¤Ê¥Õ¥§¡¼¥¹¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£ + ¾¤Î¥×¥í¥Ñ¥Æ¥£¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£¤³¤Î¥Õ¥§¡¼¥¹¤ò»ý¤Ä M-text + ¤ÏÁ°·Ê¿§¤È¤·¤ÆÇò¤òÍѤ¤¤Æɽ¼¨¤µ¤ì¤ë¡£ */ MFace *mface_white; /***en - @brief Red face + @brief Red face. The variable #mface_red points to a face that has the #Mforeground property with value a symbol of name "red". The other properties are not specified. An M-text that has this face is drawn with red foreground. */ - /***ja - @brief ÀÖ¥Õ¥§¡¼¥¹ + @brief ÀÖ¥Õ¥§¡¼¥¹. - ¥Ý¥¤¥ó¥¿ #mface_red ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Ï¡¢ - foreground ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤȤ·¤Æ"red" ¤È¤¤¤¦Ì¾Á°¤Î¥·¥ó¥Ü - ¥ë¤ò»ý¤Ä¡£Â¾¤Î¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϲ¼¤Ë¼¨¤¹¤È¤ª¤ê¤Ç¤¢¤ë¡£¤³¤Î - ¥Õ¥§¡¼¥¹¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤ÎÁ°·Ê¿§¤ÏÀ֤ˤʤ롣 */ + ÊÑ¿ô #mface_red ¤Ï¡¢#Mforeground ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤȤ·¤Æ "red" + ¤È¤¤¤¦Ì¾Á°¤Î¥·¥ó¥Ü¥ë¤ò»ý¤Ä¤è¤¦¤Ê¥Õ¥§¡¼¥¹¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£ + ¾¤Î¥×¥í¥Ñ¥Æ¥£¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£¤³¤Î¥Õ¥§¡¼¥¹¤ò»ý¤Ä M-text + ¤ÏÁ°·Ê¿§¤È¤·¤ÆÀÖ¤òÍѤ¤¤Æɽ¼¨¤µ¤ì¤ë¡£ */ MFace *mface_red; /***en - @brief Green face + @brief Green face. The variable #mface_green points to a face that has the #Mforeground property with value a symbol of name "green". The other properties are not specified. An M-text that has this face is drawn with green foreground. */ - /***ja - @brief ÎÐ¥Õ¥§¡¼¥¹ + @brief ÎÐ¥Õ¥§¡¼¥¹. - ¥Ý¥¤¥ó¥¿ #mface_green ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Ï¡¢ - foreground ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤȤ·¤Æ"green" ¤È¤¤¤¦Ì¾Á°¤Î¥·¥ó¥Ü - ¥ë¤ò»ý¤Ä¡£Â¾¤Î¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϲ¼¤Ë¼¨¤¹¤È¤ª¤ê¤Ç¤¢¤ë¡£¤³¤Î - ¥Õ¥§¡¼¥¹¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤ÎÁ°·Ê¿§¤ÏÎФˤʤ롣 */ + ÊÑ¿ô #mface_green ¤Ï¡¢#Mforeground ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤȤ·¤Æ "green" + ¤È¤¤¤¦Ì¾Á°¤Î¥·¥ó¥Ü¥ë¤ò»ý¤Ä¤è¤¦¤Ê¥Õ¥§¡¼¥¹¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£ + ¾¤Î¥×¥í¥Ñ¥Æ¥£¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£¤³¤Î¥Õ¥§¡¼¥¹¤ò»ý¤Ä M-text + ¤ÏÁ°·Ê¿§¤È¤·¤ÆÎФòÍѤ¤¤Æɽ¼¨¤µ¤ì¤ë¡£ */ MFace *mface_green; /***en - @brief Blue face + @brief Blue face. The variable #mface_blue points to a face that has the #Mforeground property with value a symbol of name "blue". The other properties are not specified. An M-text that has this face is drawn with blue foreground. */ - /***ja - @brief ÀÄ¥Õ¥§¡¼¥¹ + @brief ÀÄ¥Õ¥§¡¼¥¹. - ¥Ý¥¤¥ó¥¿ #mface_blue ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Ï¡¢ - foreground ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤȤ·¤Æ"blue" ¤È¤¤¤¦Ì¾Á°¤Î¥·¥ó¥Ü - ¥ë¤ò»ý¤Ä¡£Â¾¤Î¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϲ¼¤Ë¼¨¤¹¤È¤ª¤ê¤Ç¤¢¤ë¡£¤³¤Î - ¥Õ¥§¡¼¥¹¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤ÎÁ°·Ê¿§¤ÏÀĤˤʤ롣 */ + ÊÑ¿ô #mface_blue ¤Ï¡¢#Mforeground ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤȤ·¤Æ "blue" + ¤È¤¤¤¦Ì¾Á°¤Î¥·¥ó¥Ü¥ë¤ò»ý¤Ä¤è¤¦¤Ê¥Õ¥§¡¼¥¹¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£ + ¾¤Î¥×¥í¥Ñ¥Æ¥£¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£¤³¤Î¥Õ¥§¡¼¥¹¤ò»ý¤Ä M-text + ¤ÏÁ°·Ê¿§¤È¤·¤ÆÀĤòÍѤ¤¤Æɽ¼¨¤µ¤ì¤ë¡£ */ MFace *mface_blue; /***en - @brief Cyan face + @brief Cyan face. The variable #mface_cyan points to a face that has the #Mforeground property with value a symbol of name "cyan". The other properties are not specified. An M-text that has this face is drawn with cyan foreground. */ - /***ja - @brief ¥·¥¢¥ó¥Õ¥§¡¼¥¹ + @brief ¥·¥¢¥ó¥Õ¥§¡¼¥¹. - ¥Ý¥¤¥ó¥¿ #mface_cyan ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Ï¡¢ - foreground ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤȤ·¤Æ"cyan" ¤È¤¤¤¦Ì¾Á°¤Î¥·¥ó¥Ü - ¥ë¤ò»ý¤Ä¡£Â¾¤Î¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϲ¼¤Ë¼¨¤¹¤È¤ª¤ê¤Ç¤¢¤ë¡£¤³¤Î - ¥Õ¥§¡¼¥¹¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤ÎÁ°·Ê¿§¤Ï¥·¥¢¥ó¤Ë¤Ê¤ë¡£ */ + ÊÑ¿ô #mface_cyan ¤Ï¡¢#Mforeground ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤȤ·¤Æ "cyan" + ¤È¤¤¤¦Ì¾Á°¤Î¥·¥ó¥Ü¥ë¤ò»ý¤Ä¤è¤¦¤Ê¥Õ¥§¡¼¥¹¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£ + ¾¤Î¥×¥í¥Ñ¥Æ¥£¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£¤³¤Î¥Õ¥§¡¼¥¹¤ò»ý¤Ä M-text + ¤ÏÁ°·Ê¿§¤È¤·¤Æ¥·¥¢¥ó¤òÍѤ¤¤Æɽ¼¨¤µ¤ì¤ë¡£ */ MFace *mface_cyan; /***en - @brief yellow face + @brief yellow face. The variable #mface_yellow points to a face that has the #Mforeground property with value a symbol of name "yellow". The @@ -1279,18 +1562,17 @@ MFace *mface_cyan; is drawn with yellow foreground. */ /***ja - @brief ²«¥Õ¥§¡¼¥¹ + @brief ²«¥Õ¥§¡¼¥¹. - ¥Ý¥¤¥ó¥¿ #mface_yellow ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Ï¡¢ - foreground ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤȤ·¤Æ"yellow" ¤È¤¤¤¦Ì¾Á°¤Î¥·¥ó¥Ü - ¥ë¤ò»ý¤Ä¡£Â¾¤Î¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϲ¼¤Ë¼¨¤¹¤È¤ª¤ê¤Ç¤¢¤ë¡£¤³¤Î - ¥Õ¥§¡¼¥¹¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤ÎÁ°·Ê¿§¤Ï²«¿§¤Ë¤Ê¤ë¡£ */ + ÊÑ¿ô #mface_yellow ¤Ï¡¢#Mforeground ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤȤ·¤Æ "yellow" + ¤È¤¤¤¦Ì¾Á°¤Î¥·¥ó¥Ü¥ë¤ò»ý¤Ä¤è¤¦¤Ê¥Õ¥§¡¼¥¹¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£ + ¾¤Î¥×¥í¥Ñ¥Æ¥£¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£¤³¤Î¥Õ¥§¡¼¥¹¤ò»ý¤Ä M-text + ¤ÏÁ°·Ê¿§¤È¤·¤Æ²«¿§¤òÍѤ¤¤Æɽ¼¨¤µ¤ì¤ë¡£ */ MFace *mface_yellow; - /***en - @brief Magenta face + @brief Magenta face. The variable #mface_magenta points to a face that has the #Mforeground property with value a symbol of name "magenta". The @@ -1298,12 +1580,12 @@ MFace *mface_yellow; is drawn with magenta foreground. */ /***ja - @brief ¥Þ¥¼¥ó¥¿¥Õ¥§¡¼¥¹ + @brief ¥Þ¥¼¥ó¥¿¥Õ¥§¡¼¥¹. - ¥Ý¥¤¥ó¥¿ #mface_magenta ¤Ë¤è¤Ã¤Æ»Ø¤µ¤ì¤ëÄêµÁºÑ¤ß¥Õ¥§¡¼¥¹¤Ï¡¢ - foreground ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤȤ·¤Æ"magenta" ¤È¤¤¤¦Ì¾Á°¤Î¥·¥ó¥Ü - ¥ë¤ò»ý¤Ä¡£Â¾¤Î¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϲ¼¤Ë¼¨¤¹¤È¤ª¤ê¤Ç¤¢¤ë¡£¤³¤Î - ¥Õ¥§¡¼¥¹¤ò»È¤Ã¤Æɽ¼¨¤µ¤ì¤¿ M-text ¤ÎÁ°·Ê¿§¤Ï¥Þ¥¼¥ó¥¿¤Ë¤Ê¤ë¡£ */ + ÊÑ¿ô #mface_magenta ¤Ï¡¢#Mforeground ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤȤ·¤Æ + "magenta" ¤È¤¤¤¦Ì¾Á°¤Î¥·¥ó¥Ü¥ë¤ò»ý¤Ä¤è¤¦¤Ê¥Õ¥§¡¼¥¹¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£ + ¾¤Î¥×¥í¥Ñ¥Æ¥£¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£¤³¤Î¥Õ¥§¡¼¥¹¤ò»ý¤Ä M-text + ¤ÏÁ°·Ê¿§¤È¤·¤Æ¥Þ¥¼¥ó¥¿¤òÍѤ¤¤Æɽ¼¨¤µ¤ì¤ë¡£ */ MFace *mface_magenta; @@ -1311,7 +1593,7 @@ MFace *mface_magenta; /*=*/ /***en @name Variables: The other symbols for face handling. */ -/***ja @name ÊÑ¿ô: ¥Õ¥§¡¼¥¹¤ò¼è¤ê°·¤¦¤¿¤á¤Î¤½¤Î¾¤ÎÄêµÁºÑ¤ß¥·¥ó¥Ü¥ë */ +/***ja @name ÊÑ¿ô: ¥Õ¥§¡¼¥¹¤ò¼è¤ê°·¤¦¤¿¤á¤Î¤½¤Î¾¤Î¥·¥ó¥Ü¥ë */ /*** @{ */ /*=*/ @@ -1323,11 +1605,12 @@ MFace *mface_magenta; of type #MFace. This is a managing key. */ /***ja - @brief ¥Æ¥­¥¹¥È¥×¥í¥Ñ¥Æ¥£¤Î¥­¡¼¤È¤Ê¤ë¥·¥ó¥Ü¥ë + @brief ¥Õ¥§¡¼¥¹¤ò»ØÄꤹ¤ë¥Æ¥­¥¹¥È¥×¥í¥Ñ¥Æ¥£¤Î¥­¡¼. - ¥·¥ó¥Ü¥ë #Mface ¤Ï "face" ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Ä¡£¥­¡¼¤¬ @c - Mface ¤Ç¤¢¤ë¤è¤¦¤Ê¥Æ¥­¥¹¥È¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢¥Õ¥§¡¼¥¹¥ª¥Ö¥¸¥§¥¯¥È¤Ø - ¤Î¥Ý¥¤¥ó¥¿¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£ */ + ÊÑ¿ô #Mface ¤Ï "face" + ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Ä¥·¥ó¥Ü¥ë¤Ç¤¢¤ë¡£¤³¤Î¥·¥ó¥Ü¥ë¤ò¥­¡¼¤È¤¹¤ë¥Æ¥­¥¹¥È¥×¥í¥Ñ¥Æ¥£¤Ï¡¢ + #MFace ·¿¤Î¥ª¥Ö¥¸¥§¥¯¥È¤Ø¤Î¥Ý¥¤¥ó¥¿¤ò»ý¤¿¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£ + ¤³¤ì¤Ï´ÉÍý¥­¡¼¤Ç¤¢¤ë¡£ */ MSymbol Mface; /*=*/ @@ -1344,14 +1627,13 @@ MSymbol Mface; This function returns a pointer to the created face. */ /***ja - @brief ¿·¤·¤¤¥Õ¥§¡¼¥¹¤ò¤Ä¤¯¤ë + @brief ¿·¤·¤¤¥Õ¥§¡¼¥¹¤ò¤Ä¤¯¤ë. - ´Ø¿ô mface () ¤Ï¿·¤·¤¤¥Õ¥§¡¼¥¹¥ª¥Ö¥¸¥§¥¯¥È¤òºî¤ë¡£ - ºî¤é¤ì¤¿¥Õ¥§¡¼¥¹¤Î¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤Ï°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ë¡£ + ´Ø¿ô mface () + ¤Ï¥×¥í¥Ñ¥Æ¥£¤ò°ìÀÚ»ý¤¿¤Ê¤¤¿·¤·¤¤¥Õ¥§¡¼¥¹¥ª¥Ö¥¸¥§¥¯¥È¤òºî¤ë¡£ - @li ¥­¡¼ #Mfontset ¤ËÂФ¹¤ëÃÍ¤Ï @c NULL - @li ¥­¡¼ #Msize ¤ËÂФ¹¤ëÃÍ¤Ï 0 - @li ¤½¤Î¾¤Î¥­¡¼¤ËÂФ¹¤ëÃÍ¤Ï #Munspecified */ + @return + ¤³¤Î´Ø¿ô¤Ïºî¤Ã¤¿¥Õ¥§¡¼¥¹¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£ */ MFace * mface () @@ -1359,6 +1641,7 @@ mface () MFace *face; M17N_OBJECT (face, free_face, MERROR_FACE); + face->frame_list = mplist (); M17N_OBJECT_REGISTER (face_table, face); return face; } @@ -1372,10 +1655,10 @@ mface () pointer to the created copy. */ /***ja - @brief ¥Õ¥§¡¼¥¹¤Î¥³¥Ô¡¼¤òºî¤ë + @brief ¥Õ¥§¡¼¥¹¤Î¥³¥Ô¡¼¤òºî¤ë. - ´Ø¿ô mface_copy () ¤Ï¥Õ¥§¡¼¥¹ $FACE ¤Î¥³¥Ô¡¼¤òºî¤ê¡¢¤½¤ì¤Ø¤Î¥Ý¥¤¥ó - ¥¿¤òÊÖ¤¹¡£ */ + ´Ø¿ô mface_copy () ¤Ï¥Õ¥§¡¼¥¹ $FACE + ¤Î¥³¥Ô¡¼¤òºî¤ê¡¢¤½¤Î¥³¥Ô¡¼¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£ */ MFace * mface_copy (MFace *face) @@ -1386,28 +1669,61 @@ mface_copy (MFace *face) *copy = *face; copy->control.ref_count = 1; M17N_OBJECT_REGISTER (face_table, copy); + copy->frame_list = mplist (); if (copy->property[MFACE_FONTSET]) M17N_OBJECT_REF (copy->property[MFACE_FONTSET]); - if (copy->property[MFACE_HLINE]) - { - MFaceHLineProp *val; + return copy; +} - MSTRUCT_MALLOC (val, MERROR_FACE); - *val = *((MFaceHLineProp *) copy->property[MFACE_HLINE]); - copy->property[MFACE_HLINE] = val; +/*=*/ +/***en + @brief Compare faces. + + The mface_equal () function compares faces $FACE1 and $FACE2. + + @return + If two faces have the same property values, return 1. + Otherwise return 0. */ + +int +mface_equal (MFace *face1, MFace *face2) +{ + MFaceHLineProp *hline1, *hline2; + MFaceBoxProp *box1, *box2; + int i; + + if (face1 == face2) + return 1; + if (memcmp (face1->property, face2->property, sizeof face1->property) == 0) + return 1; + for (i = MFACE_FOUNDRY; i <= MFACE_BACKGROUND; i++) + if (face1->property[i] != face2->property[i]) + return 0; + for (i = MFACE_VIDEOMODE; i <= MFACE_RATIO; i++) + if (face1->property[i] != face2->property[i]) + return 0; + hline1 = (MFaceHLineProp *) face1->property[MFACE_HLINE]; + hline2 = (MFaceHLineProp *) face2->property[MFACE_HLINE]; + if (hline1 != hline2) + { + if (! hline1 || ! hline2) + return 0; + if (memcmp (hline1, hline2, sizeof (MFaceHLineProp)) != 0) + return 0; } - if (copy->property[MFACE_BOX]) + box1 = (MFaceBoxProp *) face1->property[MFACE_BOX]; + box2 = (MFaceBoxProp *) face2->property[MFACE_BOX]; + if (box1 != box2) { - MFaceBoxProp *val; - - MSTRUCT_MALLOC (val, MERROR_FACE); - *val = *((MFaceBoxProp *) copy->property[MFACE_BOX]); - copy->property[MFACE_BOX] = val; + if (! box1 || ! box2) + return 0; + if (memcmp (box1, box2, sizeof (MFaceBoxProp)) != 0) + return 0; } - - return copy; + return 1; } + /*=*/ /***en @brief Merge faces. @@ -1418,34 +1734,41 @@ mface_copy (MFace *face) @return This function returns $DST. */ +/***ja + @brief ¥Õ¥§¡¼¥¹¤òÅý¹ç¤¹¤ë. + + ´Ø¿ô mface_merge () ¤Ï¡¢¥Õ¥§¡¼¥¹ $SRC ¤Î¥×¥í¥Ñ¥Æ¥£¤ò¥Õ¥§¡¼¥¹ $DST + ¤ËÅý¹ç¤¹¤ë¡£ + + @return + ¤³¤Î´Ø¿ô¤Ï $DST ¤òÊÖ¤¹¡£ */ + MFace * mface_merge (MFace *dst, MFace *src) { int i; + MPlist *plist; for (i = 0; i < MFACE_PROPERTY_MAX; i++) if (src->property[i]) { - dst->property[i] = src->property[i]; if (i == MFACE_FONTSET) - M17N_OBJECT_REF (dst->property[i]); - else if (i == MFACE_HLINE) { - MFaceHLineProp *val; - - MSTRUCT_MALLOC (val, MERROR_FACE); - *val = *((MFaceHLineProp *) dst->property[MFACE_HLINE]); - dst->property[MFACE_HLINE] = val; - } - else if (i == MFACE_BOX) - { - MFaceBoxProp *val; - - MSTRUCT_MALLOC (val, MERROR_FACE); - *val = *((MFaceBoxProp *) dst->property[MFACE_BOX]); - dst->property[MFACE_BOX] = val; + M17N_OBJECT_UNREF (dst->property[i]); + M17N_OBJECT_REF (src->property[i]); } + dst->property[i] = src->property[i]; } + + MPLIST_DO (plist, dst->frame_list) + { + MFrame *frame = MPLIST_VAL (plist); + + frame->tick++; + if (dst == frame->face) + mface__update_frame_face (frame); + } + return dst; } @@ -1457,6 +1780,12 @@ mface_merge (MFace *dst, MFace *src) The mface_from_font () function return a newly created face while reflecting the properties of $FONT in its properties. */ +/***ja + @brief ¥Õ¥©¥ó¥È¤«¤é¥Õ¥§¡¼¥¹¤òºî¤ë. + + ´Ø¿ô mface_from_font () ¤Ï¥Õ¥©¥ó¥È $FONT + ¤Î¥×¥í¥Ñ¥Æ¥£¤ò¥×¥í¥Ñ¥Æ¥£¤È¤·¤Æ»ý¤Ä¿·¤·¤¤¥Õ¥§¡¼¥¹¤òºî¤ê¡¢¤½¤ì¤òÊÖ¤¹¡£ */ + MFace * mface_from_font (MFont *font) { @@ -1492,25 +1821,24 @@ mface_from_font (MFont *font) #merror_code. */ /***ja - @brief ¥Õ¥§¡¼¥¹¤Î¥×¥í¥Ñ¥Æ¥£ÃͤòÆÀ¤ë + @brief ¥Õ¥§¡¼¥¹¤Î¥×¥í¥Ñ¥Æ¥£¤ÎÃͤòÆÀ¤ë. - ´Ø¿ô mface_get_prop () ¤Ï¡¢¥Õ¥§¡¼¥¹ $FACE ¤¬»ý¤Ä¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£ - ¤ÎÆâ¡¢¥­¡¼¤¬ $KEY ¤Ç¤¢¤ë¤â¤Î¤ÎÃͤòÊÖ¤¹¡£$KEY ¤Ï²¼µ­¤Î¤¤¤º¤ì¤«¤Ç¤Ê - ¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£ + ´Ø¿ô mface_get_prop () ¤Ï¡¢¥Õ¥§¡¼¥¹ $FACE + ¤¬»ý¤Ä¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ÎÆâ¡¢¥­¡¼¤¬ $KEY ¤Ç¤¢¤ë¤â¤Î¤ÎÃͤòÊÖ¤¹¡£ + $KEY ¤Ï²¼µ­¤Î¤¤¤º¤ì¤«¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£ #Mforeground, #Mbackground, #Mvideomode, #Mhline, #Mbox, #Mfoundry, #Mfamily, #Mweight, #Mstyle, #Mstretch, #Madstyle, - #Msize, #Mfontset, #Mratio, #Mhook_func, #Mhook_arg + #Msize, #Mfontset, #Mratio, #Mhook_arg - @return - ¤â¤· $KEY ¤¬ #Mfontset ¤Ê¤é¤Ð¡¢mface_get_prop () ¤Ï¥Õ¥©¥ó¥È¥»¥Ã - ¥È¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£¤â¤· $KEY ¤¬ #Msize ¤Ê¤é¤ÐÀ°¿ô¤òÊÖ¤¹¡£¤½¤ì - °Ê³°¤Î¾ì¹ç¤Ï¥·¥ó¥Ü¥ë¤òÊÖ¤¹¡£¥¨¥é¡¼¤¬¸¡½Ð¤µ¤ì¤¿¾ì¹ç¤Ï @c NULL ¤òÊÖ - ¤·¡¢³°ÉôÊÑ¿ô #merror_code ¤Ë¥¨¥é¡¼¥³¡¼¥É¤òÀßÄꤹ¤ë¡£ */ + @return + Ìá¤êÃͤη¿¤Ï $KEY ¤Ë°Í¸¤¹¤ë¡£¾åµ­¤Î¥­¡¼¤ÎÀâÌÀ¤ò»²¾È¤¹¤ë¤³¤È¡£ + ¥¨¥é¡¼¤¬¸¡½Ð¤µ¤ì¤¿¾ì¹ç¤Ï @c NULL ¤òÊÖ¤·¡¢³°ÉôÊÑ¿ô #merror_code + ¤Ë¥¨¥é¡¼¥³¡¼¥É¤òÀßÄꤹ¤ë¡£ */ /*** @seealso - mface_put_prop () + mface_put_prop (), mface_put_hook () @errors @c MERROR_FACE */ @@ -1521,14 +1849,38 @@ mface_get_prop (MFace *face, MSymbol key) int index = (int) msymbol_get (key, M_face_prop_index) - 1; if (index < 0) - MERROR (MERROR_FACE, NULL); + { + if (key == Mhook_func) + /* This unsafe code is for backward compatiblity. */ + return (void *) face->hook; + MERROR (MERROR_FACE, NULL); + } return face->property[index]; } /*=*/ /***en - @brief Set a value of a face face property. + @brief Get the hook function of a face. + + The mface_get_hook () function returns the hook function of face + $FACE. */ + +/***ja + @brief ¥Õ¥§¡¼¥¹¤Î¥Õ¥Ã¥¯´Ø¿ô¤òÆÀ¤ë. + + ´Ø¿ô mface_get_hook () ¤Ï¥Õ¥§¡¼¥¹ $FACE ¤Î¥Õ¥Ã¥¯´Ø¿ô¤òÊÖ¤¹¡£ */ + +MFaceHookFunc +mface_get_hook (MFace *face) +{ + return face->hook; +} + +/*=*/ + +/***en + @brief Set a value of a face property. The mface_put_prop () function assigns $VAL to the property whose key is $KEY in face $FACE. $KEY must be one the followings: @@ -1545,29 +1897,25 @@ mface_get_prop (MFace *face, MSymbol key) documentation of the above keys. @return - If the operation was successful, mface_put_prop returns () 0. + If the operation was successful, mface_put_prop () returns 0. Otherwise it returns -1 and assigns an error code to the external variable #merror_code. */ /***ja - @brief ¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ÎÃͤòÀßÄꤹ¤ë + @brief ¥Õ¥§¡¼¥¹¥×¥í¥Ñ¥Æ¥£¤ÎÃͤòÀßÄꤹ¤ë. - ´Ø¿ô mface_put_prop () ¤Ï¡¢¥Õ¥§¡¼¥¹ $FACE Æâ¤Ç¥­¡¼¤¬$KEY ¤Ç¤¢¤ë¥× - ¥í¥Ñ¥Æ¥£¤ÎÃͤò $VAL ¤ËÀßÄꤹ¤ë¡£$KEY ¤Ï°Ê²¼¤Î¤¤¤º¤ì¤«¤Ç¤Ê¤¯¤Æ¤Ï¤Ê - ¤é¤Ê¤¤¡£ + ´Ø¿ô mface_put_prop () ¤Ï¡¢¥Õ¥§¡¼¥¹ $FACE Æâ¤Ç¥­¡¼¤¬ $KEY + ¤Ç¤¢¤ë¥×¥í¥Ñ¥Æ¥£¤ÎÃͤò $VAL ¤ËÀßÄꤹ¤ë¡£$KEY + ¤Ï°Ê²¼¤Î¤¤¤º¤ì¤«¤Ç¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£ #Mforeground, #Mbackground, #Mvideomode, #Mhline, #Mbox, #Mfoundry, #Mfamily, #Mweight, #Mstyle, #Mstretch, #Madstyle, #Msize, #Mfontset, #Mratio, #Mhook_func, #Mhook_arg. ¤³¤ì¤é¤Î¤¦¤Á¤Î¡¢¥Õ¥©¥ó¥È´ØÏ¢¤Î¥×¥í¥Ñ¥Æ¥£ (#Mfamily ¤«¤é #Msize - ¤Þ¤Ç) ¤Ï¡¢¥Õ¥§¡¼¥¹¤Î¥Õ¥©¥ó¥È¥»¥Ã¥ÈÃæ¤Î¥Õ¥©¥ó¥È¤Ë´Ø¤¹¤ë¥Ç¥Õ¥©¥ë¥ÈÃÍ - ¤È¤Ê¤ë¡£ + ¤Þ¤Ç) ¤Ï¡¢¥Õ¥§¡¼¥¹¤Î¥Õ¥©¥ó¥È¥»¥Ã¥ÈÃæ¤Î¥Õ¥©¥ó¥È¤Ë´Ø¤¹¤ë¥Ç¥Õ¥©¥ë¥ÈÃͤȤʤꡢ¸Ä¡¹¤Î¥Õ¥©¥ó¥È¤¬Ãͤò»ØÄꤷ¤Ê¤«¤Ã¤¿¾ì¹ç¤ËÍѤ¤¤é¤ì¤ë¡£ - ¤â¤· $KEY ¤¬ #Mfontset ¤Ê¤é $VAL ¤Ï #MFontset ·¿¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç - ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£¤â¤· $KEY ¤¬ #Msize ¤Ê¤é¤Ð $VAL ¤ÏÀ°¿ô¤Ç¤Ê¤±¤ì - ¤Ð¤Ê¤é¤Ê¤¤¡£$KEY ¤¬¤½¤ì°Ê³°¤Î¾ì¹ç¡¢$VAL ¤Ï¥·¥ó¥Ü¥ë¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê - ¤¤¡£ + Ìá¤êÃͤη¿¤Ï $KEY ¤Ë°Í¸¤¹¤ë¡£¾åµ­¤Î¥­¡¼¤ÎÀâÌÀ¤ò»²¾È¤¹¤ë¤³¤È¡£ @return ½èÍý¤¬À®¸ù¤·¤¿¾ì¹ç¡¢mface_put_prop () ¤Ï 0 ¤òÊÖ¤¹¡£¼ºÇÔ¤·¤¿¾ì¹ç¤Ï @@ -1584,29 +1932,43 @@ int mface_put_prop (MFace *face, MSymbol key, void *val) { int index = (int) msymbol_get (key, M_face_prop_index) - 1; + MPlist *plist; - if (index < 0) - MERROR (MERROR_FACE, -1); - if (key == Mfontset) - M17N_OBJECT_REF (val); - else if (key == Mhline) + if (key == Mhook_func) { - MFaceHLineProp *newval; + /* This unsafe code is for backward compatiblity. */ + if (face->hook == (MFaceHookFunc) val) + return 0; + face->hook = (MFaceHookFunc) val; + } + else + { + if (index < 0) + MERROR (MERROR_FACE, -1); + if (key == Mfontset) + { + if (face->property[index]) + M17N_OBJECT_UNREF (face->property[index]); + M17N_OBJECT_REF (val); + } + else if (key == Mhline) + val = get_hline_create (val); + else if (key == Mbox) + val = get_box_create (val); - MSTRUCT_MALLOC (newval, MERROR_FACE); - *newval = *((MFaceHLineProp *) val); - val = newval; + if (face->property[index] == val) + return 0; + face->property[index] = val; } - else if (key == Mbox) + + MPLIST_DO (plist, face->frame_list) { - MFaceBoxProp *newval; + MFrame *frame = MPLIST_VAL (plist); - MSTRUCT_MALLOC (newval, MERROR_FACE); - *newval = *((MFaceBoxProp *) val); - val = newval; + frame->tick++; + if (face == frame->face) + mface__update_frame_face (frame); } - face->property[index] = val; - face->tick++; return 0; } @@ -1614,24 +1976,64 @@ mface_put_prop (MFace *face, MSymbol key, void *val) /*=*/ /***en + @brief Set a hook function to a face. + + The mface_set_hook () function sets the hook function of face + $FACE to $FUNC. */ + +/***ja + @brief ¥Õ¥§¡¼¥¹¤Î¥Õ¥Ã¥¯´Ø¿ô¤òÀßÄꤹ¤ë. + + ´Ø¿ô mface_set_hook () ¤Ï¡¢¥Õ¥§¡¼¥¹ $FACE ¤Î¥Õ¥Ã¥¯´Ø¿ô¤ò$FUNC ¤ËÀß + Äꤹ¤ë¡£ */ + +int +mface_put_hook (MFace *face, MFaceHookFunc func) +{ + if (face->hook != func) + { + MPlist *plist; + face->hook = func; + + MPLIST_DO (plist, face->frame_list) + { + MFrame *frame = MPLIST_VAL (plist); + + frame->tick++; + if (face == frame->face) + mface__update_frame_face (frame); + } + } + return 0; +} + +/*=*/ + +/***en @brief Update a face. - The mface_update () function update $FACE on $FRAME by calling a - hook function of $FACE (if any). */ + The mface_update () function update face $FACE on frame $FRAME by + calling a hook function of $FACE (if any). */ + +/***ja + @brief ¥Õ¥§¡¼¥¹¤ò¹¹¿·¤¹¤ë. + + ´Ø¿ô mface_update () ¤Ï¥Õ¥ì¡¼¥à $FRAME ¤Î¥Õ¥§¡¼¥¹ $FACE ¤ò $FACE + ¤Î¥Õ¥Ã¥¯´Ø¿ô¤ò¡Ê¤¢¤ì¤Ð¡Ë¸Æ¤ó¤Ç¹¹¿·¤¹¤ë¡£ */ void mface_update (MFrame *frame, MFace *face) { - MFaceHookFunc func = (MFaceHookFunc) face->property[MFACE_HOOK_FUNC]; + MFaceHookFunc func = face->hook; MPlist *rface_list; MRealizedFace *rface; - if (func) + if (func && func != noop_hook) { MPLIST_DO (rface_list, frame->realized_face_list) { rface = MPLIST_VAL (rface_list); - if ((MFaceHookFunc) rface->face.property[MFACE_HOOK_FUNC] == func) + if (rface->face.hook == func) (func) (&(rface->face), rface->face.property[MFACE_HOOK_ARG], rface->info); } @@ -1647,15 +2049,24 @@ mface_update (MFrame *frame, MFace *face) /*=*/ /***en - @brief Dump a face + @brief Dump a face. - The mdebug_dump_face () function prints $FACE in a human readable + The mdebug_dump_face () function prints face $FACE in a human readable way to the stderr. $INDENT specifies how many columns to indent the lines but the first one. @return This function returns $FACE. */ +/***ja + @brief ¥Õ¥§¡¼¥¹¤ò¥À¥ó¥×¤¹¤ë. + + ´Ø¿ô mdebug_dump_face () ¤Ï¥Õ¥§¡¼¥¹ $FACE ¤ò stderr + ¤Ë¿Í´Ö¤Ë²ÄÆɤʷÁ¤Ç°õºþ¤¹¤ë¡£ $INDENT ¤Ï£²¹ÔÌܰʹߤΥ¤¥ó¥Ç¥ó¥È¤ò»ØÄꤹ¤ë¡£ + + @return + ¤³¤Î´Ø¿ô¤Ï $FACE ¤òÊÖ¤¹¡£ */ + MFace * mdebug_dump_face (MFace *face, int indent) {