/* m17n-gui.h -- header file for the GUI API of the m17n library.
- 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
/***ja ÀþÉý¡Ê¥Ô¥¯¥»¥ëñ°Ì¡Ë. */
unsigned width;
+ /* @{ */
+ /*** Colors of borders. */
MSymbol color_top;
MSymbol color_bottom;
MSymbol color_left;
MSymbol color_right;
+ /* @} */
+ /* @{ */
+ /*** Margins */
unsigned inner_hmargin;
unsigned inner_vmargin;
unsigned outer_hmargin;
unsigned outer_vmargin;
+ /* @} */
} MFaceBoxProp;
/*=*/
/***ja 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢¥Õ¥©¥ó¥È¶³¦¤Ç¤Î¿åÊ¿Êý¸þ¤Î¥°¥ê¥Õ¤Î½Å¤Ê¤ê¤òÈò¤±¤ë¤¿¤á¤Î¥°¥ê¥Õ°ÌÃÖ¤ÎÄ´À°¤ò̵¸ú¤Ë¤¹¤ë¡£ */
unsigned disable_overlapping_adjustment : 1;
- /***en If nonzero, the values are minimum line ascent and descent
- pixels. */
- /***ja 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢ÃͤϹԤΠascent ¤È descent ¤ÎºÇ¾®Ãͤò¼¨¤¹¡£ */
+ /***en If nonzero, the values are minimum line ascent pixels. */
+ /***ja 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢ÃͤϹԤΠascent ¤ÎºÇ¾®Ãͤò¼¨¤¹¡£ */
unsigned int min_line_ascent;
+ /***en If nonzero, the values are minimum line descent pixels. */
+ /***ja 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢ÃͤϹԤΠdescent ¤ÎºÇ¾®Ãͤò¼¨¤¹¡£ */
unsigned int min_line_descent;
- /***en If nonzero, the values are maximum line ascent and descent
- pixels. */
- /***ja 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢ÃͤϹԤΠascent ¤È descent ¤ÎºÇÂçÃͤò¼¨¤¹¡£ */
+ /***en If nonzero, the values are maximum line ascent pixels. */
+ /***ja 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢ÃͤϹԤΠascent ¤ÎºÇÂçÃͤò¼¨¤¹¡£ */
unsigned int max_line_ascent;
+ /***en If nonzero, the values are maximum line descent pixels. */
+ /***ja 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢ÃͤϹԤΠdescent ¤ÎºÇÂçÃͤò¼¨¤¹¡£ */
unsigned int max_line_descent;
/***en If nonzero, the value specifies how many pixels each line can
¤Ï¡¢¶õÇò¤ò¸ì¤Î¶èÀÚ¤ê¤È¤·¤ÆÍѤ¤¤ë¥¹¥¯¥ê¥×¥ÈÍѤȤ·¤ÆÍÍѤǤ¢¤ë¡£ */
int (*line_break) (MText *mt, int pos, int from, int to, int line, int y);
+ /***en If nonzero, show the cursor according to \<cursor_width\>. */
+ /***ja ¥¼¥í¤Ç¤Ê¤±¤ì¤Ð \<cursor_width\> ¤Ë¤·¤¿¤¬¤Ã¤Æ¥«¡¼¥½¥ë¤òɽ¼¨¤¹¤ë¡£ */
int with_cursor;
/***en Specifies the character position to display a cursor. If it
*/
int disable_caching;
- /* If non-NULL, limit the drawing effect to the specified region. */
+ /***en If non-NULL, limit the drawing effect to the specified region. */
+ /***ja NULL ¤Ç¤Ê¤±¤ì¤Ðɽ¼¨¥¨¥ê¥¢¤ò»ØÄꤵ¤ì¤¿Îΰè¤Ë¸ÂÄꤹ¤ë¡£ */
MDrawRegion clip_region;
} MDrawControl;
¤Þ¤¿¡¢É½¼¨¥Ç¥Ð¥¤¥¹¤Î¶ë·ÁÎΰè¤òɽ¤¹¤Î¤Ë¤âÍѤ¤¤é¤ì¤ë¡£ */
typedef struct {
- int x, y;
- unsigned int width, height;
+ /*** X coordinates of a glyph or a text. */
+ int x;
+ /*** Y coordinates of a glyph or a text. */
+ int y;
+ /*** Pixel width of a glyph or a text. */
+ unsigned int width;
+ /*** Pixel height of a glyph or a text. */
+ unsigned int height;
} MDrawMetric;
/*=*/
typedef struct
{
- /***en Character range corresponding to the glyph. */
- /***ja ¥°¥ê¥Õ¤ËÂбþ¤¹¤ëʸ»ú¤ÎÈÏ°Ï. */
- int from, to;
-
- /***en Character ranges corresponding to the line of the glyph. */
- /***ja ¥°¥ê¥Õ¤ÎÎó¤ËÂбþ¤¹¤ëʸ»ú¤ÎÈÏ°Ï. */
- int line_from, line_to;
-
- /***en X/Y coordinates of the glyph. */
- /***ja ¥°¥ê¥Õ¤Î X/Y ºÂɸ. */
- int x, y;
+ /***en Start position of character range corresponding to the glyph. */
+ /***ja ¥°¥ê¥Õ¤ËÂбþ¤¹¤ëʸ»ú¤ÎÈϰϤγ«»Ï°ÌÃÖ. */
+ int from;
+
+ /***en End position of character range corresponding to the glyph. */
+ /***ja ¥°¥ê¥Õ¤ËÂбþ¤¹¤ëʸ»ú¤ÎÈϰϤνªÎ»°ÌÃÖ. */
+ int to;
+
+ /***en Start position of character range corresponding to the line of the glyph. */
+ /***ja °ì¹Ô¤Î¥°¥ê¥Õ¤ÎÎó¤ËÂбþ¤¹¤ëʸ»ú¤ÎÈϰϤγ«»Ï°ÌÃÖ. */
+ int line_from;
+ /***en End position of character range corresponding to the line of the glyph. */
+ /***ja °ì¹Ô¤Î¥°¥ê¥Õ¤ÎÎó¤ËÂбþ¤¹¤ëʸ»ú¤ÎÈϰϤνªÎ»°ÌÃÖ. */
+ int line_to;
+
+ /***en X coordinates of the glyph. */
+ /***ja ¥°¥ê¥Õ¤Î X ºÂɸ. */
+ int x;
+ /***en Y coordinates of the glyph. */
+ /***ja ¥°¥ê¥Õ¤Î Y ºÂɸ. */
+ int y;
/***en Metric of the glyph. */
/***ja ¥°¥ê¥Õ¤ÎÀ£Ë¡. */
MFont *font;
- /***en Character ranges corresponding to logically previous and next
- glyphs. Note that we do not need the members prev_to and
- next_from because they must be the same as the members from and
- to respectively. */
- /***ja ÏÀÍýŪ¤ÊÁ°¸å¤Î¥°¥ê¥Õ¤ËÂбþ¤¹¤ëʸ»ú¤ÎÈÏ°Ï¡£¥á¥ó¥Ð prev_to ¤È
- next_from ¤Ï¡¢¤½¤ì¤¾¤ì¥á¥ó¥Ð from ¤È to ¤ÈƱ¤¸¤Ç¤¢¤ë¤Ï¤º¤Ê¤Î¤ÇÉÔ
- ÍפǤ¢¤ë¡£ */
- int prev_from, next_to;
-
- /***en Character ranges corresponding to visually left and right
- glyphs. */
- /***ja ɽ¼¨¾å¤Îº¸±¦¤Î¥°¥ê¥Õ¤ËÂбþ¤¹¤ëʸ»ú¤ÎÈÏ°Ï¡£ */
- int left_from, left_to;
- int right_from, right_to;
+ /***en Character ranges corresponding to logically previous glyphs.
+ Note that we do not need the members prev_to because it must
+ be the same as the member \<from\>. */
+ /***ja ÏÀÍýŪ¤ÊÁ°¤Î¥°¥ê¥Õ¤ËÂбþ¤¹¤ëʸ»ú¤ÎÈÏ°Ï¡£¥á¥ó¥Ð prev_to ¤Ï¡¢¥á
+ ¥ó¥Ð from ¤ÈƱ¤¸¤Ç¤¢¤ë¤Ï¤º¤Ê¤Î¤ÇÉÔÍפǤ¢¤ë¡£ */
+ int prev_from;
+ /***en Character ranges corresponding to logically next glyphs.
+ Note that we do not need the members next_from because it must
+ be the same as the member \<to\> respectively. */
+ /***ja ÏÀÍýŪ¤Ê¸å¤Î¥°¥ê¥Õ¤ËÂбþ¤¹¤ëʸ»ú¤ÎÈÏ°Ï¡£¥á¥ó¥Ð next_from ¤Ï
+ ¥á¥ó¥Ð to ¤ÈƱ¤¸¤Ç¤¢¤ë¤Ï¤º¤Ê¤Î¤ÇÉÔÍפǤ¢¤ë¡£ */
+ int next_to;
+
+ /***en Start position of character ranges corresponding to visually
+ left glyphs. */
+ /***ja ɽ¼¨¾å¤Îº¸¤Î¥°¥ê¥Õ¤ËÂбþ¤¹¤ëʸ»ú¤ÎÈϰϤγ«»Ï°ÌÃÖ¡£ */
+ int left_from;
+ /***en End position of character ranges corresponding to visually
+ left glyphs. */
+ /***ja ɽ¼¨¾å¤Îº¸¤Î¥°¥ê¥Õ¤ËÂбþ¤¹¤ëʸ»ú¤ÎÈϰϤνªÎ»°ÌÃÖ¡£ */
+ int left_to;
+ /***en Start position of character ranges corresponding to visually
+ right glyphs. */
+ /***ja ɽ¼¨¾å¤Î±¦¤Î¥°¥ê¥Õ¤ËÂбþ¤¹¤ëʸ»ú¤ÎÈϰϤγ«»Ï°ÌÃÖ¡£ */
+ int right_from;
+ /***en End position of character ranges corresponding to visually
+ left glyphs. */
+ /***ja ɽ¼¨¾å¤Î±¦¤Î¥°¥ê¥Õ¤ËÂбþ¤¹¤ëʸ»ú¤ÎÈϰϤνªÎ»°ÌÃÖ¡£ */
+ int right_to;
/***en Logical width of the glyph. Nominal distance to the next
glyph. */
typedef struct
{
+ /* @{ */
/***en Character range corresponding to the glyph. */
/***ja ¥°¥ê¥Õ¤ËÂбþ¤¹¤ëʸ»ú¤ÎÈÏ°Ï. */
int from, to;
+ /* @} */
/***en Font glyph code of the glyph. */
/***ja ¥Õ¥©¥ó¥ÈÆâ¤Î¥°¥ê¥Õ¥³¡¼¥É¡£ */
/***en Logical width of the glyph. Nominal distance to the next
glyph. */
/***ja ¥°¥ê¥Õ¤ÎÏÀÍýŪÉý¡£¼¡¤Î¥°¥ê¥Õ¤È¤Î̾Ìܾå¤Îµ÷Î¥¡£ */
- int x_advance, y_advance;
-
- /***en X/Y offset relative to the glyph position. */
- /***ja ¥°¥ê¥Õ¤Î°ÌÃÖ¤ËÂФ¹¤ë X/Y ¥ª¥Õ¥»¥Ã¥È. */
- int x_off, y_off;
-
- /***en Metric of the glyph. */
- /***ja ¥°¥ê¥Õ¤ÎÀ£Ë¡. */
- int lbearing, rbearing, ascent, descent;
+ int x_advance;
+ /***en Logical height of the glyph. Nominal distance to the next
+ glyph. */
+ /***ja ¥°¥ê¥Õ¤ÎÏÀÍýŪ¹â¤µ¡£¼¡¤Î¥°¥ê¥Õ¤È¤Î̾Ìܾå¤Îµ÷Î¥¡£ */
+ int y_advance;
+
+ /***en X offset relative to the glyph position. */
+ /***ja ¥°¥ê¥Õ¤Î°ÌÃÖ¤ËÂФ¹¤ë X ¥ª¥Õ¥»¥Ã¥È. */
+ int x_off;
+ /***en Y offset relative to the glyph position. */
+ /***ja ¥°¥ê¥Õ¤Î°ÌÃÖ¤ËÂФ¹¤ë Y ¥ª¥Õ¥»¥Ã¥È. */
+ int y_off;
+
+ /***en Metric of the glyph (left-bearing). */
+ /***ja ¥°¥ê¥Õ¤ÎÀ£Ë¡ (left-bearing). */
+ int lbearing;
+ /***en Metric of the glyph (right-bearing). */
+ /***ja ¥°¥ê¥Õ¤ÎÀ£Ë¡ (right-bearing). */
+ int rbearing;
+ /***en Metric of the glyph (ascent). */
+ /***ja ¥°¥ê¥Õ¤ÎÀ£Ë¡ (ascent). */
+ int ascent;
+ /***en Metric of the glyph (descent). */
+ /***ja ¥°¥ê¥Õ¤ÎÀ£Ë¡ (descent). */
+ int descent;
/***en Font used for the glyph. Set to NULL if no font is found for
the glyph. */