(shift_state): Don't reset ic_info->vars.
[m17n/m17n-lib.git] / src / face.h
index 9ab1d16..28c437b 100644 (file)
@@ -27,7 +27,7 @@ enum MFaceProperty
   {
     /** The font related properties.  */
     /* The order of MFACE_FOUNDRY to MFACE_ADSTYLE must be the same as
-       enum MFontProperty.  */
+       MFONT_FOUNDRY to MFONT_ADSTYLE of enum MFontProperty.  */
     MFACE_FOUNDRY,
     MFACE_FAMILY,
     MFACE_WEIGHT,
@@ -60,26 +60,15 @@ enum MFaceProperty
 struct MFace
 {
   M17NObject control;
-  /* Initialized to 0, and incremented by one each the face is
-     modified.  */
-  unsigned tick;
+
+  /** Properties of the face.  */
   void *property[MFACE_PROPERTY_MAX];
+
+  /** List of frames affected by the face modification.  */
+  MPlist *frame_list;
 };
 
 
-enum face_gc
-  {
-    MFACE_GC_NORMAL,
-    MFACE_GC_INVERSE,
-    MFACE_GC_SCRATCH,
-    MFACE_GC_HLINE,
-    MFACE_GC_BOX_TOP,
-    MFACE_GC_BOX_BOTTOM,
-    MFACE_GC_BOX_LEFT,
-    MFACE_GC_BOX_RIGHT,
-    MFACE_GCS
-  };
-
 /** A realized face is registered in MFrame->face_list, thus it does
     not have to be a managed object.  */
 
@@ -95,9 +84,6 @@ struct MRealizedFace
      (MFace *).  */
   MPlist *base_face_list;
 
-  /* Initialized to the sum of ticks of the above faces.  */
-  unsigned tick;
-
   /* Realized font, one of <frame>->realized_font_list.  */
   MRealizedFont *rfont;
 
@@ -114,9 +100,8 @@ struct MRealizedFace
       properties. */
   MRealizedFace *ascii_rface;
 
-  /** Realized face for undisplayable chars (no font found) that has
-      the same face properties. */
-  MRealizedFace *nofont_rface;
+  /** List of realized faces that have the same face properties.  */
+  MPlist *non_ascii_list;
 
   int ascent, descent;
   int space_width;
@@ -129,7 +114,6 @@ struct MRealizedFace
 extern MFace *mface__default;
 
 extern MRealizedFace *mface__realize (MFrame *frame, MFace **faces, int num,
-                                     MSymbol language, MSymbol charset,
                                      int limitted_size);
 
 extern MGlyph *mface__for_chars (MSymbol script, MSymbol language,
@@ -138,4 +122,6 @@ extern MGlyph *mface__for_chars (MSymbol script, MSymbol language,
 
 extern void mface__free_realized (MRealizedFace *rface);
 
+extern void mface__update_frame_face (MFrame *frame);
+
 #endif /* _M17N_FACE_H_ */