Provided by: m17n-docs_1.6.2-5_all bug

NAME

       Face - A face is an object to control appearance of M-text.

   Data Structures
       struct MFaceHLineProp
           Type of horizontal line spec of face.
       struct MFaceBoxProp
           Type of box spec of face.

   Typedefs
       typedef struct MFace MFace
           Type of faces.
       typedef void(* MFaceHookFunc )(MFace *face, void *arg, void *info)
           Type of hook function of face.

   Functions
       MFace * mface ()
           Create a new face.
       MFace * mface_copy (MFace *face)
           Make a copy of a face.
       int mface_equal (MFace *face1, MFace *face2)
           Compare faces.
       MFace * mface_merge (MFace *dst, MFace *src)
           Merge faces.
       MFace * mface_from_font (MFont *font)
           Make a face from a font.
       void * mface_get_prop (MFace *face, MSymbol key)
           Get the value of a face property.
       MFaceHookFunc mface_get_hook (MFace *face)
           Get the hook function of a face.
       int mface_put_prop (MFace *face, MSymbol key, void *val)
           Set a value of a face property.
       int mface_put_hook (MFace *face, MFaceHookFunc func)
           Set a hook function to a face.
       void mface_update (MFrame *frame, MFace *face)
           Update a face.

   Variables: Keys of face property
       MSymbol Mforeground
           Key of a face property specifying foreground color.
       MSymbol Mbackground
           Key of a face property specifying background color.
       MSymbol Mvideomode
           Key of a face property specifying video mode.
       MSymbol Mratio
           Key of a face property specifying font size ratio.
       MSymbol Mhline
           Key of a face property specifying horizontal line.
       MSymbol Mbox
           Key of a face property specifying box.
       MSymbol Mfontset
           Key of a face property specifying fontset.
       MSymbol Mhook_func
           Key of a face property specifying hook.
       MSymbol Mhook_arg
           Key of a face property specifying argument of hook.

   Variables: Possible values of #Mvideomode property of face
        See the documentation of the variable Mvideomode.
       MSymbol Mnormal
       MSymbol Mreverse

   Variables: Predefined faces
       MFace * mface_normal_video
           Normal video face.
       MFace * mface_reverse_video
           Reverse video face.
       MFace * mface_underline
           Underline face.
       MFace * mface_medium
           Medium face.
       MFace * mface_bold
           Bold face.
       MFace * mface_italic
           Italic face.
       MFace * mface_bold_italic
           Bold italic face.
       MFace * mface_xx_small
           Smallest face.
       MFace * mface_x_small
           Smaller face.
       MFace * mface_small
           Small face.
       MFace * mface_normalsize
           Normalsize face.
       MFace * mface_large
           Large face.
       MFace * mface_x_large
           Larger face.
       MFace * mface_xx_large
           Largest face.
       MFace * mface_black
           Black face.
       MFace * mface_white
           White face.
       MFace * mface_red
           Red face.
       MFace * mface_green
           Green face.
       MFace * mface_blue
           Blue face.
       MFace * mface_cyan
           Cyan face.
       MFace * mface_yellow
           yellow face.
       MFace * mface_magenta
           Magenta face.

   Variables: The other symbols for face handling.
       MSymbol Mface
           Key of a text property specifying a face.

Detailed Description

       A face is an object to control appearance of M-text.

       A face is an object of the type MFace and controls how to draw M-texts. A face has a fixed
       number of face properties. Like other types of properties, a face property consists of a
       key and a value. A key is one of the following symbols:

       Mforeground, Mbackground, Mvideomode, Mhline, Mbox, Mfoundry, Mfamily, Mweight, Mstyle,
       Mstretch, Madstyle, Msize, Mfontset, Mratio, Mhook_func, Mhook_arg

       The notation 'xxx property of F' means the face property that belongs to face F and whose
       key is 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 using the value of that text property. This value must
       be a pointer to a face object.

       If there are multiple text properties whose key is Mface, and they are not conflicting one
       another, properties of those faces are merged and used.

       If no faces specify a certain property, the value of the default face is used.

Data Structure Documentation

   MFaceHLineProp
       Public Types:

       enum MFaceHLineType { MFACE_HLINE_BOTTOM, MFACE_HLINE_UNDER, MFACE_HLINE_STRIKE_THROUGH,
           MFACE_HLINE_OVER, MFACE_HLINE_TOP }

       FIELD DOCUMENTATION:

       enum MFaceHLineProp::MFaceHLineType  MFaceHLineProp::type

       unsigned MFaceHLineProp::width

       MSymbol MFaceHLineProp::color

   MFaceBoxProp
       FIELD DOCUMENTATION:

       unsigned MFaceBoxProp::width

       MSymbol MFaceBoxProp::color_top

       MSymbol MFaceBoxProp::color_bottom

       MSymbol MFaceBoxProp::color_left

       MSymbol MFaceBoxProp::color_right

       unsigned MFaceBoxProp::inner_hmargin

       unsigned MFaceBoxProp::inner_vmargin

       unsigned MFaceBoxProp::outer_hmargin

       unsigned MFaceBoxProp::outer_vmargin

Typedef Documentation

   typedef struct MFace MFace
       Type of faces. The type MFace is the structure of face objects. The internal structure is
       concealed from an application program.

   typedef void(* MFaceHookFunc)(MFace *face, void *arg, void *info)
       Type of hook function of face. MFaceHookFunc is a type of a hook function of a face.

Variable Documentation

   MSymbol Mforeground
       Key of a face property specifying foreground color. The variable Mforeground is used as a
       key of face property. The property value must be a symbol whose name is a color name, or
       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.

   MSymbol Mbackground
       Key of a face property specifying background color. The variable Mbackground is used as a
       key of face property. The property value must be a symbol whose name is a color name, or
       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.

   MSymbol Mvideomode
       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.

       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 (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.

   MSymbol Mratio
       Key of a face property specifying font size ratio. The variable Mratio is used as a key of
       face property. The value RATIO must be an integer.

       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.

   MSymbol Mhline
       Key of a face property specifying horizontal line. The variable Mhline is used as a key of
       face property. The value must be a pointer to an object of type MFaceHLineProp, or NULL.

       The value 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.

   MSymbol Mbox
       Key of a face property specifying box. The variable Mbox is used as a key of face
       property. The value must be a pointer to an object of type MFaceBoxProp, or NULL.

       The value 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.

   MSymbol Mfontset
       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 NULL.

       The value 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.

   MSymbol Mhook_func
       Key of a face property specifying hook. The variable Mhook_func is used as a key of face
       property. The value must be a function of type MFaceHookFunc, or NULL.

       The value NULL means that the face does not specify a hook. Otherwise, the specified
       function is called before the face is realized.

   MSymbol Mhook_arg
       Key of a face property specifying argument of hook. 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.

   MSymbol Mnormal
   MSymbol Mreverse
   MFace* mface_normal_video
       Normal video face. The variable mface_normal_video points to a face that has the
       Mvideomode property with value 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).

   MFace* mface_reverse_video
       Reverse video face. The variable mface_reverse_video points to a face that has the
       Mvideomode property with value 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).

   MFace* mface_underline
       Underline face. The variable mface_underline points to a face that has the Mhline property
       with value a pointer to an object of type MFaceHLineProp. The members of the object are as
       follows:

           member  value
           -----   -----
           type    MFACE_HLINE_UNDER
           width   1
           color   Mnil

       The other properties are not specified. An M-text that has this face is drawn with an
       underline.

   MFace* mface_medium
       Medium face. The variable mface_medium points to a face that has the Mweight 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.

   MFace* mface_bold
       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.

   MFace* mface_italic
       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.

   MFace* mface_bold_italic
       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.

   MFace* mface_xx_small
       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.

   MFace* mface_x_small
       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.

   MFace* mface_small
       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.

   MFace* mface_normalsize
       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.

   MFace* mface_large
       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.

   MFace* mface_x_large
       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.

   MFace* mface_xx_large
       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.

   MFace* mface_black
       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.

   MFace* mface_white
       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.

   MFace* mface_red
       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.

   MFace* mface_green
       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.

   MFace* mface_blue
       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.

   MFace* mface_cyan
       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.

   MFace* mface_yellow
       yellow face. The variable mface_yellow points to a face that has the Mforeground property
       with value a symbol of name 'yellow'. The other properties are not specified. An M-text
       that has this face is drawn with yellow foreground.

   MFace* mface_magenta
       Magenta face. The variable mface_magenta points to a face that has the Mforeground
       property with value a symbol of name 'magenta'. The other properties are not specified. An
       M-text that has this face is drawn with magenta foreground.

   MSymbol Mface
       Key of a text property specifying a face. The variable Mface is a symbol of name 'face'. A
       text property whose key is this symbol must have a pointer to an object of type MFace.
       This is a managing key.

Author

       Generated automatically by Doxygen for The m17n Library from the source code.

COPYRIGHT

       Copyright (C) 2001 Information-technology Promotion Agency (IPA)
       Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology
       (AIST)
       Permission is granted to copy, distribute and/or modify this document under the terms of
       the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>.