X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fface.h;h=b9ead922def0a4be19618b9d2498181b0162d154;hb=38c091dbfa19be7db173231b0b5101577de2098e;hp=a174631e86a034294f588751fcea9f5d1513f142;hpb=81b778b62f74aff7afc1a09312862c4a3a8e4a99;p=m17n%2Fm17n-lib.git diff --git a/src/face.h b/src/face.h index a174631..b9ead92 100644 --- a/src/face.h +++ b/src/face.h @@ -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. */ #ifndef _M17N_FACE_H_ @@ -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, @@ -46,24 +46,26 @@ enum MFaceProperty MFACE_BOX, MFACE_VIDEOMODE, - /** Extention by applications. */ - MFACE_HOOK_FUNC, - MFACE_HOOK_ARG, - - /* In a realized face, this is already reflected in MFACE_SIZE, - thus is ignored. */ + /* In a realized face, this is ignored because it is already + reflected in MFACE_SIZE. */ MFACE_RATIO, + MFACE_HOOK_ARG, + MFACE_PROPERTY_MAX }; 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]; + + MFaceHookFunc hook; + + /** List of frames affected by the face modification. */ + MPlist *frame_list; }; @@ -78,13 +80,13 @@ struct MRealizedFace /** Properties of all stacked faces are merged into here. */ MFace face; + /** Font explicitly specified for the face (maybe NULL). */ + MFont *font; + /** From what faces this is realized. Keys are Mface and values are (MFace *). */ MPlist *base_face_list; - /* Initialized to the sum of ticks of the above faces. */ - unsigned tick; - /* Realized font, one of ->realized_font_list. */ MRealizedFont *rfont; @@ -101,12 +103,12 @@ 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; + int average_width; /** Pointer to a window system dependent object. */ void *info; @@ -116,8 +118,7 @@ struct MRealizedFace extern MFace *mface__default; extern MRealizedFace *mface__realize (MFrame *frame, MFace **faces, int num, - MSymbol language, MSymbol charset, - int limitted_size); + int limitted_size, MFont *font); extern MGlyph *mface__for_chars (MSymbol script, MSymbol language, MSymbol charset, MGlyph *from_g, MGlyph *to_g, @@ -125,4 +126,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_ */