From 20227d3b873820b04a16ad0ee37593a4bff5ecc2 Mon Sep 17 00:00:00 2001 From: handa Date: Thu, 27 May 2004 08:39:32 +0000 Subject: [PATCH] (mface__init): Exchange foreground and background of mface__default. Call mface_put_prop to set hline of mface_underline, (mface__realize): Call frame->driver->XXX instead of mwin__XXX. (mface__free_realized): Don't call mwin__free_realized_face. --- src/face.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/face.c b/src/face.c index ffd0487..e815545 100644 --- a/src/face.c +++ b/src/face.c @@ -482,8 +482,8 @@ mface__init () mface__default->property[MFACE_ADSTYLE] = msymbol (""); mface__default->property[MFACE_SIZE] = (void *) 120; mface__default->property[MFACE_FONTSET] = mfontset (NULL); - mface__default->property[MFACE_FOREGROUND] = msymbol ("white"); - mface__default->property[MFACE_FONTSET] = msymbol ("black"); + 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; @@ -496,14 +496,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 (); @@ -682,7 +681,7 @@ mface__realize (MFrame *frame, MFace **faces, int num, if (rface->box && rface->box->width == 0) rface->box = NULL; rface->ascii_rface = rface; - mwin__realize_face (rface); + (*frame->driver->realize_face) (rface); func = (MFaceHookFunc) rface->face.property[MFACE_HOOK_FUNC]; if (func && func != noop_hook) @@ -766,7 +765,6 @@ mface__free_realized (MRealizedFace *rface) MPLIST_DO (plist, rface->non_ascii_list) free (MPLIST_VAL (plist)); M17N_OBJECT_UNREF (rface->non_ascii_list); - mwin__free_realized_face (rface); free (rface); } -- 1.7.10.4