*** empty log message ***
[m17n/m17n-lib.git] / src / m17n-gui.h
1 /* m17n-gui.h -- header file for the GUI API of the m17n library.
2    Copyright (C) 2003, 2004
3      National Institute of Advanced Industrial Science and Technology (AIST)
4      Registration Number H15PRO112
5
6    This file is part of the m17n library.
7
8    The m17n library is free software; you can redistribute it and/or
9    modify it under the terms of the GNU Lesser General Public License
10    as published by the Free Software Foundation; either version 2.1 of
11    the License, or (at your option) any later version.
12
13    The m17n library is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16    Lesser General Public License for more details.
17
18    You should have received a copy of the GNU Lesser General Public
19    License along with the m17n library; if not, write to the Free
20    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21    02111-1307, USA.  */
22
23 #ifndef _M17N_GUI_H_
24 #define _M17N_GUI_H_
25
26 #ifndef _M17N_H_
27 #include <m17n.h>
28 #endif
29
30 #ifdef __cplusplus
31 extern "C"
32 {
33 #endif
34
35 extern void m17n_init_win (void);
36 #undef M17N_INIT
37 #define M17N_INIT() m17n_init_win ()
38
39 extern void m17n_fini_win (void);
40 #undef M17N_FINI
41 #define M17N_FINI() m17n_fini_win ()
42
43 /***en @defgroup m17nGUI GUI API */
44 /***ja @defgroup m17nGUI GUI API */
45 /*=*/
46
47 /*** @ingroup m17nGUI */
48 /***en @defgroup m17nFrame Frame */
49 /***ja @defgroup m17nFrame ¥Õ¥ì¡¼¥à */
50 /*=*/
51
52 /*** @ingroup m17nFrame */
53 /***en
54     @brief Type of frames.
55
56     The type #MFrame is for a @e frame object.  Each frame holds
57     various information about the corresponding physical display/input
58     device.
59
60     The internal structure of the type #MFrame is concealed from an
61     application program, and its contents depend on the window system
62     in use.  In the m17n-X library, it contains the information about
63     @e display and @e screen in the X Window System.  */
64
65 /***ja
66     @brief ¥Õ¥ì¡¼¥à¤Î·¿Àë¸À.
67
68     #MFrame ¤Ï¡¢@e ¥Õ¥ì¡¼¥à ¥ª¥Ö¥¸¥§¥¯¥ÈÍѤη¿¤Ç¤¢¤ë¡£¸Ä¡¹¤Î¥Õ¥ì¡¼¥à¤Ï¡¢
69     ¤½¤ì¤¬Âбþ¤¹¤ëʪÍýŪ¤Êɽ¼¨¡¿ÆþÎϥǥХ¤¥¹¤Î³Æ¼ï¾ðÊó¤òÊÝ»ý¤¹¤ë¡£
70
71     #MFrame ·¿¤ÎÆâÉô¹½Â¤¤Ï¡¢»ÈÍѤ¹¤ë¥¦¥£¥ó¥É¥¦¥·¥¹¥Æ¥à¤Ë°Í¸¤·¡¢¤Þ¤¿¥¢
72     ¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤«¤é¤Ï¸«¤¨¤Ê¤¤¡£m17n-X ¥é¥¤¥Ö¥é¥ê¤Ë¤ª¤±¤ë
73     ¥Õ¥ì¡¼¥à¤Ï¡¢X ¥¦¥£¥ó¥É¥¦¤Î @e display ¤È @e screen ¤Ë´Ø¤¹¤ë¾ðÊó¤ò
74     »ý¤Ä¡£
75       */
76
77 typedef struct MFrame MFrame;
78
79 /*=*/
80
81 extern MSymbol Mfont;
82 extern MSymbol Mfont_width;
83 extern MSymbol Mfont_ascent;
84 extern MSymbol Mfont_descent;
85 extern MFrame *mframe_default;
86
87 extern MFrame *mframe (MPlist *plist);
88
89 extern void *mframe_get_prop (MFrame *frame, MSymbol key);
90
91 /* end of frame module */
92 /*=*/
93
94 /*** @ingroup m17nGUI  */
95 /***en @defgroup m17nFont Font */
96 /***ja @defgroup m17nFont ¥Õ¥©¥ó¥È */
97 /*=*/
98
99 /*** @ingroup m17nFont */
100 /***en
101     @brief Type of fonts.
102
103     The type #MFont is the structure defining fonts.  It contains
104     information about the following properties of a font: foundry,
105     family, weight, style, stretch, adstyle, registry, size, and
106     resolution.
107
108     This structure is used both for specifying a font in a fontset
109     and for storing information about available system fonts.
110
111     The internal structure is concealed from an application program.  */
112
113 /***ja
114     @brief ¥Õ¥©¥ó¥È¤Î·¿Àë¸À.
115
116     #MFont ·¿¤Ï¥Õ¥©¥ó¥È»ØÄêÍѤι½Â¤ÂΤǤ¢¤ê¡¢¥Õ¥©¥ó¥È¤Î¥×¥í¥Ñ¥Æ¥£¤Ç¤¢
117     ¤ë fondry, family, weight, style, stretch, adstyle, registry,
118     size, resolution ¤Ë´Ø¤¹¤ë¾ðÊó¤ò´Þ¤à¡£
119
120     ¤³¤Î¹½Â¤ÂΤϥե©¥ó¥È¥»¥Ã¥ÈÆâ¤Î¥Õ¥©¥ó¥È¤ò»ØÄꤹ¤ëºÝ¤È¡¢»ÈÍѲÄǽ¤Ê¥·
121     ¥¹¥Æ¥à¥Õ¥©¥ó¥È¤Î¾ðÊó¤ò³ÊǼ¤¹¤ëºÝ¤ÎξÊý¤ËÍѤ¤¤é¤ì¤ë¡£
122
123     ÆâÉô¹½Â¤¤Ï¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤«¤é¤Ï¸«¤¨¤Ê¤¤¡£  */
124
125 /***
126     @seealso
127     mfont (), mfont_from_name (), mfont_find ().  */
128
129 typedef struct MFont MFont;
130
131 /*=*/
132
133 extern MSymbol Mfont;
134
135 extern MPlist *mfont_freetype_path;
136
137 extern MFont *mfont ();
138
139 extern MFont *mfont_from_name (char *name);
140
141 extern MFont *mfont_copy (MFont *font);
142
143 extern char *mfont_name (MFont *font);
144
145 extern MFont *mfont_from_spec (char *family, char *weight, char *slant,
146                                char *swidth, char *adstyle, char *registry,
147                                unsigned short point, unsigned short res);
148
149 extern MSymbol Mfoundry;
150 extern MSymbol Mfamily;
151 extern MSymbol Mweight;
152 extern MSymbol Mstyle;
153 extern MSymbol Mstretch;
154 extern MSymbol Madstyle;
155 extern MSymbol Mregistry;
156 extern MSymbol Msize;
157 extern MSymbol Mresolution;
158
159 extern void *mfont_get_prop (MFont *font, MSymbol key);
160
161 extern int mfont_put_prop (MFont *font, MSymbol key, void *val);
162
163 extern int mfont_set_encoding (MFont *font,
164                                MSymbol encoding_name, MSymbol repertory_name);
165
166
167 /*=*/
168
169 /***en
170     @brief Find a font.
171
172     The mfont_find () function returns a pointer to the available font
173     that matches best with the specification $SPEC in frame $FRAME.
174
175     $SCORE, if not NULL, must point to a place to store the score
176     value which indicates how well the found font matches $SPEC.  The
177     smaller score means a better match.
178
179     $LIMITED_SIZE, if nonzero, forces the font selector to find a
180     font not greater than the #Msize property of $SPEC.  */
181
182 /***ja
183     @brief ¥Õ¥©¥ó¥È¤òõ¤¹.
184
185     ´Ø¿ô mfont_find () ¤Ï¡¢¥Õ¥ì¡¼¥à $FRAME ¾å¤Ç¥Õ¥©¥ó¥ÈÄêµÁ $SPEC ¤Ë¤â¤Ã
186     ¤È¤â¹çÃפ¹¤ë»ÈÍѲÄǽ¤Ê¥Õ¥©¥ó¥È¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£  
187
188     $SCORE ¤Ï NULL ¤Ç¤¢¤ë¤«¡¢¸«¤Ä¤«¤Ã¤¿¥Õ¥©¥ó¥È¤¬ $SPEC ¤Ë¤É¤ì¤Û¤É¹ç¤Ã
189     ¤Æ¤¤¤ë¤«¤ò¼¨¤¹¥¹¥³¥¢¤òÊݸ¤¹¤ë¾ì½ê¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£¥¹¥³¥¢¤¬¾®¤µ
190     ¤¤¤Û¤ÉÎɤ¯¹ç¤Ã¤Æ¤¤¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
191
192     $LIMITED_SIZE ¤¬ 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢$SPEC ¤Î¥×¥í¥Ñ¥Æ¥£ #Msize ¤è¤êÂ礭
193     ¤¯¤Ê¤¤¥Õ¥©¥ó¥È¤À¤±¤¬Ãµ¤µ¤ì¤ë¡£
194 */
195
196 extern MFont *mfont_find (MFrame *frame, MFont *spec,
197                           int *score, int limited_size);
198
199 extern MSymbol *mfont_selection_priority ();
200
201 extern int mfont_set_selection_priority (MSymbol *keys);
202
203 /* end of font module */
204 /*=*/
205
206 /*** @ingroup m17nGUI  */
207 /***en @defgroup m17nFontset Fontset */
208 /***ja @defgroup m17nFontset ¥Õ¥©¥ó¥È¥»¥Ã¥È */
209 /*=*/
210
211 typedef struct MFontset MFontset;
212
213 extern MFontset *mfontset (char *name);
214
215 extern MSymbol mfontset_name (MFontset *fontset);
216
217 extern MFontset *mfontset_copy (MFontset *fontset, char *name);
218
219 extern int mfontset_modify_entry (MFontset *fontset,
220                                   MSymbol language, MSymbol script,
221                                   MSymbol charset,
222                                   MFont *spec, MSymbol layouter_name,
223                                   int how);
224
225 /* end of fontset module */
226 /*=*/
227
228 /*** @ingroup m17nGUI */
229 /***en @defgroup m17nFace Face */
230 /***ja @defgroup m17nFace ¥Õ¥§¡¼¥¹ */
231 /*=*/
232
233 /*** @ingroup m17nFace */
234 /***en
235     @brief Type of faces.
236
237     The type #MFace is the structure of face objects.  The internal
238     structure is concealed from an application program.  */
239
240 /***ja
241     @brief ¥Õ¥§¡¼¥¹¤Î·¿Àë¸À.
242
243     #MFace ·¿¤Ï¥Õ¥§¡¼¥¹¥ª¥Ö¥¸¥§¥¯¥È¤Î¤¿¤á¤Î¹½Â¤ÂΤǤ¢¤ë¡£ÆâÉô¹½Â¤¤Ï
244     ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤«¤é¤Ï¸«¤¨¤Ê¤¤¡£  */
245
246 typedef struct MFace MFace;
247 /*=*/
248
249 extern MSymbol Mforeground;
250 extern MSymbol Mbackground;
251 extern MSymbol Mvideomode;
252 extern MSymbol Mnormal;
253 extern MSymbol Mreverse;
254 extern MSymbol Mhline;
255 extern MSymbol Mbox;
256 extern MSymbol Mfontset;
257 extern MSymbol Mratio;
258 extern MSymbol Mhook_func;
259 extern MSymbol Mhook_arg;
260
261 /* Predefined faces.  */
262 extern MFace *mface_normal_video;
263 extern MFace *mface_reverse_video;
264 extern MFace *mface_underline;
265 extern MFace *mface_medium;
266 extern MFace *mface_bold;
267 extern MFace *mface_italic;
268 extern MFace *mface_bold_italic;
269 extern MFace *mface_xx_small;
270 extern MFace *mface_x_small;
271 extern MFace *mface_small;
272 extern MFace *mface_normalsize;
273 extern MFace *mface_large;
274 extern MFace *mface_x_large;
275 extern MFace *mface_xx_large;
276 extern MFace *mface_black;
277 extern MFace *mface_white;
278 extern MFace *mface_red;
279 extern MFace *mface_green;
280 extern MFace *mface_blue;
281 extern MFace *mface_cyan;
282 extern MFace *mface_yellow;
283 extern MFace *mface_magenta;
284
285 /* etc */
286 extern MSymbol Mface;
287
288 extern MFace *mface ();
289
290 extern MFace *mface_copy (MFace *face);
291
292 extern MFace *mface_merge (MFace *dst, MFace *src);
293
294 extern MFace *mface_from_font (MFont *font);
295
296 /*=*/
297
298 /*** @ingroup m17nFace */
299 /***en
300     @brief Type of horizontal line spec of face.
301
302     The type #MFaceHLineProp is to specify the detail of #Mhline
303     property of a face.  The value of the property must be a pointer
304     to an object of this type.  */
305 /***ja
306     @brief ¥Õ¥§¡¼¥¹¤Î¿åÊ¿Àþ»ØÄêÍÑ·¿Àë¸À.
307
308     #MFaceHLineProp ¤Ï¥Õ¥§¡¼¥¹¤Î #Mhline ¥×¥í¥Ñ¥Æ¥£¤Î¾ÜºÙ¤ò»ØÄꤹ¤ë·¿
309     ¤Ç¤¢¤ë¡£¤³¤Î¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϤ³¤Î·¿¤Î¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
310       */
311
312 typedef struct
313 {
314   /***en Type of the horizontal line.  */
315   /***ja ¿åÊ¿Àþ¤Î¥¿¥¤¥×.  */
316   enum MFaceHLineType
317     {
318       MFACE_HLINE_BOTTOM,      
319       MFACE_HLINE_UNDER,
320       MFACE_HLINE_STRIKE_THROUGH,
321       MFACE_HLINE_OVER,
322       MFACE_HLINE_TOP
323     } type;
324
325   /***en Width of the line in pixels.  */
326   /***ja ÀþÉý¡Ê¥Ô¥¯¥»¥ëñ°Ì¡Ë.  */
327   unsigned width;
328
329   /***en Color of the line.  If the value is Mnil, foreground color of
330       a merged face is used.  */
331   /***ja Àþ¤Î¿§.  Mnil ¤Ê¤é¤Ð¡¢Åý¹ç¤·¤¿¥Õ¥§¡¼¥¹¤ÎÁ°·Ê¿§¤¬»È¤ï¤ì¤ë¡£  */
332   
333   MSymbol color;
334 } MFaceHLineProp;
335 /*=*/
336
337 /*** @ingroup m17nFace */
338 /***en
339     @brief Type of box spec of face.
340
341     The type #MFaceBoxProp is to specify the detail of #Mbox property
342     of a face.  The value of the property must be a pointer to an
343     object of this type.  */
344 /***ja
345     @brief ¥Õ¥§¡¼¥¹¤Î°Ï¤ßÏÈ»ØÄêÍÑ·¿Àë¸À.
346
347     #MFaceBoxProp ¤Ï¥Õ¥§¡¼¥¹¤Î #Mbox ¥×¥í¥Ñ¥Æ¥£¤Î¾ÜºÙ¤ò»ØÄꤹ¤ë·¿¤Ç¤¢
348     ¤ë¡£¤³¤Î¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϤ³¤Î·¿¤Î¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
349       */
350
351 typedef struct
352 {
353   /***en Width of the box line in pixels.  */
354   /***ja ÀþÉý¡Ê¥Ô¥¯¥»¥ëñ°Ì¡Ë.  */
355   unsigned width;
356
357   MSymbol color_top;
358   MSymbol color_bottom;
359   MSymbol color_left;
360   MSymbol color_right;
361
362   unsigned inner_hmargin;
363   unsigned inner_vmargin;
364   unsigned outer_hmargin;
365   unsigned outer_vmargin;
366
367 } MFaceBoxProp;
368 /*=*/
369
370 /*** @ingroup m17nFace */
371 /***en
372     @brief Type of hook function of face.
373
374     The type #MFaceHookFunc is to specify the #Mhook property of a
375     face.  The value of the property must be function of this
376     type.  */
377 /***ja
378     @brief ¥Õ¥§¡¼¥¹¤Î¥Õ¥Ã¥¯´Ø¿ô¤Î·¿Àë¸À.
379
380     #MFaceHookFunc ¤Ï¥Õ¥§¡¼¥¹¤Î #Mhook ¥×¥í¥Ñ¥Æ¥£¤ò»ØÄꤹ¤ë·¿¤Ç¤¢¤ë¡£
381     ¤³¤Î¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢¤³¤Î·¿¤Î´Ø¿ô¤Ç¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
382       */
383 typedef void *(*MFaceHookFunc) (MFace *face, void *arg, void *info);
384 /*=*/
385
386 extern void *mface_get_prop (MFace *face, MSymbol key);
387
388 extern int mface_put_prop (MFace *face, MSymbol key, void *val);
389
390 extern void mface_update (MFrame *frame, MFace *face);
391
392 /* end of face module */
393 /*=*/
394
395 /*** @ingroup m17nGUI */
396 /***en @defgroup m17nDraw Drawing */
397 /***ja @defgroup m17nDraw É½¼¨ */
398 /*=*/
399
400 /*** @ingroup m17nDraw */
401 /***en
402     @brief Window system dependent type for a window.
403
404     The type #MDrawWindow is for a window; a rectangular area that
405     works in several ways like a miniature screen.
406
407     What it actually points depends on a window system.  A program
408     that uses the m17n-X library must coerce the type @c Drawable to
409     this type.  */
410 /***ja 
411     @brief ¥¦¥£¥ó¥É¥¦¥·¥¹¥Æ¥à¤Ë°Í¸¤¹¤ë¡¢¥¦¥£¥ó¥É¥¦¤Î·¿Àë¸À.
412
413     #MDrawWindow ¤Ï¥¦¥£¥ó¥É¥¦¡¢¤¹¤Ê¤ï¤Á´ö¤Ä¤«¤ÎÅÀ¤Ç¥¹¥¯¥ê¡¼¥ó¤Î¥ß¥Ë¥Á¥å
414     ¥¢¤È¤·¤ÆƯ¤¯¶ë·ÁÎΰèÍѤη¿¤Ç¤¢¤ë¡£
415
416     ¼ÂºÝ¤Ë²¿¤ò»Ø¤¹¤«¤Ï¥¦¥£¥ó¥É¥¦¥·¥¹¥Æ¥à¤Ë°Í¸¤¹¤ë¡£ m17n X ¥é¥¤¥Ö¥é¥ê
417     ¤òÍøÍѤ¹¤ë¥×¥í¥°¥é¥à¤Ï @c Drawable ·¿¤ò¤³¤Î·¿¤ËÊÑ´¹¤·¤Ê¤¯¤Æ¤Ï¤Ê¤é
418     ¤Ê¤¤¡£ */
419
420 typedef void *MDrawWindow;
421 /*=*/
422
423 /*** @ingroup m17nDraw */
424 /***en
425     @brief Window system dependent type for a region.
426
427     The type #MDrawRegion is for a region; an arbitrary set of pixels
428     on the screen (typically a rectangular area).
429
430     What it actually points depends on a window system.  A program
431     that uses the m17n-X library must coerce the type @c Region to
432     this type.  */
433 /***ja
434     @brief ¥¦¥£¥ó¥É¥¦¥·¥¹¥Æ¥à¤Ë°Í¸¤¹¤ë¡¢Îΰè¤Î·¿Àë¸À.
435
436     #MDrawRegion ¤ÏÎΰ衢¤¹¤Ê¤ï¤Á¥¹¥¯¥ê¡¼¥ó¾å¤ÎǤ°Õ¤Î¥Ô¥¯¥»¥ë¤Î½¸¹ç
437    ¡Êŵ·¿Åª¤Ë¤Ï¶ë·ÁÎΰè¡ËÍѤη¿¤Ç¤¢¤ë¡£
438
439     ¼ÂºÝ¤Ë²¿¤ò»Ø¤¹¤«¤Ï¥¦¥£¥ó¥É¥¦¥·¥¹¥Æ¥à¤Ë°Í¸¤¹¤ë¡£ m17n X ¥é¥¤¥Ö¥é¥ê
440     ¤òÍøÍѤ¹¤ë¥×¥í¥°¥é¥à¤Ï @c Region ·¿¤ò¤³¤Î·¿¤ËÊÑ´¹¤·¤Ê¤¯¤Æ¤Ï¤Ê¤é
441     ¤Ê¤¤¡£  */
442
443 typedef void *MDrawRegion;
444 /*=*/
445
446 /*** @ingroup m17nDraw */
447 /***en
448     @brief Type of a text drawing control.
449
450     The type #MDrawControl is the structure that controls how to draw
451     an M-text.  */
452 /***ja
453     @brief ¥Æ¥­¥¹¥Èɽ¼¨¤Î¥³¥ó¥È¥í¡¼¥ë¤Î·¿Àë¸À.
454
455     #MDrawControl ·¿¤Ï¡¢M-text ¤ò¤É¤¦É½¼¨¤¹¤ë¤«¤òÀ©¸æ¤¹¤ë¹½Â¤ÂΤǤ¢¤ë¡£
456       */
457
458
459 typedef struct
460 {
461   /***en If nonzero, draw an M-text as image, i.e. with background
462       filled with background colors of faces put on the M-text.
463       Otherwise, the background is not changed.  */
464   /***ja 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢ M-text ¤ò²èÁü¤È¤·¤Æ¡¢¤¹¤Ê¤ï¤ÁÇطʤò M-text ¤Î
465       ¥Õ¥§¡¼¥¹¤Ç»ØÄꤵ¤ì¤Æ¤¤¤ëÇØ·Ê¿§¤ÇËä¤á¤Æɽ¼¨¤¹¤ë¡£¤½¤¦¤Ç¤Ê¤±¤ì¤ÐÇØ
466       ·Ê¤ÏÊѤï¤é¤Ê¤¤¡£  */
467   unsigned as_image : 1;
468
469   /***en If nonzero and the first glyph of each line has negative
470       lbearing, shift glyphs horizontally to right so that no pixel is
471       drawn to the left of the specified position.  */
472   /***ja 0 ¤Ç¤Ê¤¯¡¢³Æ¹Ô¤ÎºÇ½é¤Î¥°¥ê¥Õ¤Îlbearing ¤¬Éé¤Ê¤é¤Ð¡¢¥°¥ê¥Õ¤ò¿å
473       Ê¿¤Ë±¦¤Ë¤º¤é¤·¤Æ¡¢»ØÄꤷ¤¿°ÌÃÖ¤è¤êº¸¤Ë¥Ô¥¯¥»¥ë¤¬ÉÁ¤«¤ì¤Ê¤¤¤è¤¦¤Ë
474       ¤¹¤ë¡£  */
475   unsigned align_head : 1;
476
477   /***en If nonzero, draw an M-text two-dimensionally, i.e., newlines
478       in M-text breaks lines and the following characters are drawn in
479       the next line.  If <format> is non-NULL, and the function
480       returns nonzero line width, a line longer than that width is
481       also broken.  */
482   /***ja 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢M-text ¤ò£²¼¡¸µÅª¤Ë¡¢¤¹¤Ê¤ï¤ÁM-text Ãæ¤Î 
483       newline ¤Ç²þ¹Ô¤·¡¢Â³¤¯Ê¸»ú¤Ï¼¡¤®¤Î¹Ô¤Ëɽ¼¨¤¹¤ë¡£¤â¤· <format> ¤¬ 
484       NULL ¤Ç¤Ê¤¯¡¢¤½¤Î´Ø¿ô¤¬ 0 ¤Ç¤Ê¤¤¹ÔÉý¤òÊÖ¤»¤Ð¡¢¤½¤ÎÉý¤è¤êŤ¤¹Ô¤â
485       ²þ¹Ô¤µ¤ì¤ë¡£  */
486   unsigned two_dimensional : 1;
487
488   /***en If nonzero, draw an M-text to the right of a specified
489       position.  */
490   /***ja 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢M-text ¤ò»ØÄꤷ¤¿°ÌÃ֤ᦤËɽ¼¨¤¹¤ë¡£  */
491   unsigned orientation_reversed : 1;
492
493   /***en If nonzero, reorder glyphs correctly for bidi text.  */ 
494   /***ja 0 ¤Ê¤±¤ì¤Ð¡¢bidi ¥Æ¥­¥¹¥ÈÍѤ˥°¥ê¥Õ¤òÀµ¤·¤¯À°Î󤹤롣  */
495   unsigned enable_bidi : 1;
496
497   /***en If nonzero, don't draw characters whose general category (in
498       Unicode) is Cf (Other, format).  */
499   /***ja 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢¥æ¥Ë¥³¡¼¥É¤ËÃÖ¤±¤ë°ìÈÌ¥«¥Æ¥´¥ê¤¬ Cf (Other,
500       format) ¤Ç¤¢¤ëʸ»ú¤òɽ¼¨¤·¤Ê¤¤¡£  */
501   unsigned ignore_formatting_char : 1;
502
503   /***en If nonzero, draw glyphs suitable for a terminal.  Not yet
504       implemented.  */
505   /***ja 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢Ã¼ËöÍѤΥ°¥ê¥Õ¤òɽ¼¨¤¹¤ë¡£¡Ê̤¼ÂÁõ¡£¡Ë  */
506   unsigned fixed_width : 1;
507
508   /***en If nonzero, draw glyphs with anti-aliasing if a backend font
509       driver supports it.  */
510   /***ja 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢¥¢¥ó¥Á¥¨¡¼¥ê¥¢¥¹¤Ç¥°¥ê¥Õ¤òɽ¼¨¤¹¤ë¡£¡Ê¥Ð¥Ã¥¯¥¨
511       ¥ó¥É¤Î¥Õ¥©¥ó¥È¥É¥é¥¤¥Ð¤¬¥¢¥ó¥Á¥¨¡¼¥ê¥¢¥¹µ¡Ç½¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤ë¾ì
512       ¹ç¤Î¤ß¡£¡Ë */
513   unsigned anti_alias : 1;
514
515   /***en If nonzero, the values are minimum line ascent and descent
516       pixels.  */
517   /***ja 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢ÃͤϹԤΠascent ¤È descent ¤ÎºÇ¾®Ãͤò¼¨¤¹¡£  */
518   unsigned int min_line_ascent;
519   unsigned int min_line_descent;
520
521   /***en If nonzero, the values are maximum line ascent and descent
522       pixels.  */
523   /***ja 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢ÃͤϹԤΠascent ¤È descent ¤ÎºÇÂçÃͤò¼¨¤¹¡£  */
524   unsigned int max_line_ascent;
525   unsigned int max_line_descent;
526
527   /***en If nonzero, the value specifies how many pixels each line can
528       occupy on the display.  The value zero means that there is no
529       limit.  It is ignored if <format> is non-NULL.  */
530   /***ja 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢ÃͤϤ³¤Î¥Ç¥£¥¹¥×¥ì¥¤¾å¤Ç³Æ¹Ô¤¬Àê¤á¤ë¤³¤È¤Î¤Ç¤­
531       ¤ë¥Ô¥¯¥»¥ë¿ô¤ò¼¨¤¹¡£ 0 ¤Ï¸ÂÄꤵ¤ì¤Ê¤¤¤³¤È¤ò°ÕÌ£¤¹¤ë¡£<format> ¤¬
532       NULL ¤Ç¤Ê¤±¤ì¤Ð̵»ë¤µ¤ì¤ë¡£   */
533   unsigned int max_line_width;
534
535   /***en If nonzero, the value specifies the distance between tab
536       stops in columns (the width of one column is the width of a
537       space in the default font of the frame).  The value zero means
538       8.  */
539   /***ja 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢Ãͤϥ¿¥Ö¥¹¥È¥Ã¥×´Ö¤Îµ÷Î¥¤ò¥³¥é¥àñ°Ì¡Ê¥³¥é¥à¤Ï
540       ¥Õ¥ì¡¼¥à¤Î¥Ç¥Õ¥©¥ë¥È¥Õ¥©¥ó¥È¤Ë¤ª¤±¤ë¶õÇòʸ»ú¤ÎÉý¤Ç¤¢¤ë¡Ë¤Ç¼¨¤¹¡£ 
541       0 ¤Ï 8 ¤ò°ÕÌ£¤¹¤ë¡£ */
542   unsigned int tab_width;
543
544   /***en If non-NULL, the value is a function that calculates the
545       indentation and width limit of each line based on the line
546       number LINE and the coordinate Y.  The function store the
547       indentation and width limit at the place pointed by INDENT and
548       WIDTH respectively.
549
550       The indentation specifies how many pixels the first glyph of
551       each line is shifted to the right (if the member
552       <orientation_reversed> is zero) or to the left (otherwise).  If
553       the value is negative, each line is shifted to the reverse
554       direction.
555
556       The width limit specifies how many pixels each line can occupy
557       on the display.  The value 0 means that there is no limit.
558
559       LINE and Y are reset to 0 when a line is broken by a newline
560       character, and incremented each time when a long line is broken
561       because of the width limit.
562
563       This has an effect only when <two_dimensional> is nonzero.  */
564   /***ja 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢Ãͤϴؿô¤Ç¤¢¤ê¡¢¤½¤Î´Ø¿ô¤Ï¹ÔÈÖ¹æ LINE ¤ÈºÂɸ Y 
565       ¤Ë´ð¤Å¤¤¤Æ³Æ¹Ô¤Î¥¤¥ó¥Ç¥ó¥È¤ÈºÇÂçÉý¤ò·×»»¤·¡¢¤½¤ì¤¾¤ì¤òINDENT ¤È
566       WIDTH ¤Ç»Ø¤µ¤ì¤ë¾ì½ê¤ËÊݸ¤¹¤ë¡£
567
568       ¥¤¥ó¥Ç¥ó¥È¤Ï¡¢³Æ¹Ô¤ÎºÇ½é¤Î¥°¥ê¥Õ¤¬±¦¡Ê¥á¥ó¥Ð 
569       <orientation_reversed> ¤¬ 0 ¤Î»þ¡Ë¤¢¤ë¤¤¤Ïº¸¡Ê¤½¤ì°Ê³°¤Î»þ¡Ë¤Ë²¿
570       ¥Ô¥¯¥»¥ë¤º¤é¤¹¤ò»ØÄꤹ¤ë¡£Ãͤ¬Éé¤Ê¤é¤ÐµÕÊý¸þ¤Ë¤º¤é¤¹¡£
571
572       ºÇÂçÉý¤Ï¡¢³Æ¹Ô¤¬¥Ç¥£¥¹¥×¥ì¥¤¾å¤ÇÀê¤á¤ë¤³¤È¤Î¤Ç¤­¤ë¥Ô¥¯¥»¥ë¿ô¤ÎºÇ
573       ÂçÃͤǤ¢¤ë¡£Ãͤ¬ 0 ¤Î¾ì¹ç¤ÏÀ©¸Â¤ò¼õ¤±¤Ê¤¤¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
574
575       LINE ¤È Y ¤Ï²þ¹Ôʸ»ú¤Ë¤è¤Ã¤Æ¹Ô¤¬²þ¤Þ¤Ã¤¿ºÝ¤Ë¤Ï 0 ¤Ë¥ê¥»¥Ã¥È¤µ¤ì¡¢
576       ºÇÂçÉý¤Ë¤è¤Ã¤Æ¹Ô¤¬²þ¤Þ¤Ã¤¿¾ì¹ç¤Ë¤Ï 1 ¤Å¤ÄÁý¤ä¤µ¤ì¤ë¡£
577
578       ¤³¤ì¤Ï <two_dimensional> ¤¬ 0 ¤Ç¤Ê¤¤¾ì¹ç¤Ë¤Î¤ßÍ­¸ú¤Ç¤¢¤ë¡£  */
579   void (*format) (int line, int y, int *indent, int *width);
580
581   /***en If non-NULL, the value is a function that calculates a line
582       breaking position when a line is too long to fit within the
583       width limit.  POS is a position of the character next to the
584       last one that fits within the limit.  FROM is a position of the
585       first character of the line, and TO is a position of the last
586       character displayed on the line if there were not width limit.
587       LINE and Y are the same as the arguments to <format>.
588
589       The function must return a character position to break the
590       line.
591
592       The function should not modify MT.
593
594       The mdraw_default_line_break () function is useful for such a
595       script that uses SPACE as a word separator.  */
596   /***ja NULL ¤Ç¤Ê¤±¤ì¤Ð¡¢ÃͤϹԤ¬ºÇÂçÉýÃæ¤Ë¼ý¤Þ¤é¤Ê¤¤¾ì¹ç¤Ë¹Ô¤ò²þ¤á¤ë
597       °ÌÃÖ¤ò·×»»¤¹¤ë´Ø¿ô¤Ç¤¢¤ë¡£POS ¤ÏºÇÂçÉý¤Ë¼ý¤Þ¤ëºÇ¸å¤Îʸ»ú¤Î¼¡¤Îʸ
598       »ú¤Î°ÌÃ֤Ǥ¢¤ë¡£FROM ¤Ï¹Ô¤ÎºÇ½é¤Îʸ»ú¤Î°ÌÃÖ¡¢TO ¤ÏºÇÂçÉý¤¬»ØÄꤵ
599       ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¤½¤Î¹Ô¤Ëɽ¼¨¤µ¤ì¤ëºÇ¸å¤Îʸ»ú¤Î°ÌÃ֤Ǥ¢¤ë¡£LINE ¤È 
600       Y ¤Ï <format> ¤Î°ú¿ô¤ÈƱ¤¸¤Ç¤¢¤ë¡£
601
602       ¤³¤Î´Ø¿ô¤Ï¹Ô¤ò²þ¤á¤ëʸ»ú°ÌÃÖ¤òÊÖ¤µ¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£¤Þ¤¿MT ¤ò
603       Êѹ¹¤·¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
604
605       ´Ø¿ô mdraw_default_line_break () ¤Ï¡¢¶õÇò¤ò¸ì¤Î¶èÀÚ¤ê¤È¤·¤ÆÍѤ¤
606       ¤ë¥¹¥¯¥ê¥×¥ÈÍѤȤ·¤ÆÍѤ¤¤ë¤³¤È¤¬¤Ç¤­¤ë¡£  */
607   int (*line_break) (MText *mt, int pos, int from, int to, int line, int y);
608
609   int with_cursor;
610
611   /***en Specifies the character position to display a cursor.  If it
612       is greater than the maximum character position, the cursor is
613       displayed next to the last character of an M-text.  If the value
614       is negative, even if <cursor_width> is nonzero, cursor is not
615       displayed.  */
616   /***ja ¥«¡¼¥½¥ë¤òɽ¼¨¤¹¤ëʸ»ú°ÌÃÖ¤ò¼¨¤¹¡£ºÇÂç¤Îʸ»ú°ÌÃÖ¤è¤êÂ礭¤±¤ì
617       ¤Ð¡¢¥«¡¼¥½¥ë¤ÏM-text ¤ÎºÇ¸å¤Îʸ»ú¤ÎÎÙ¤Ëɽ¼¨¤µ¤ì¤ë¡£Éé¤Ê¤é¤Ð¡¢
618       <cursor_width> ¤¬ 0 ¤Ç¤Ê¤¯¤Æ¤â¥«¡¼¥½¥ë¤Ïɽ¼¨¤µ¤ì¤Ê¤¤¡£
619         */
620   int cursor_pos;
621
622   /***en If nonzero, display a cursor at the character position
623       <cursor_pos>.  If the value is positive, it is the pixel width
624       of the cursor.  If the value is negative, the cursor width is
625       the same as the underlining glyph(s).  */
626   /***ja 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢<cursor_pos> ¤Ë¥«¡¼¥½¥ë¤òɽ¼¨¤¹¤ë¡£Ãͤ¬Àµ¤Ê¤é¤Ð¡¢
627       ¥«¡¼¥½¥ë¤ÎÉý¤Ï¤½¤ÎÃÍ¡Ê¥Ô¥¯¥»¥ëñ°Ì¡Ë¤Ç¤¢¤ë¡£Éé¤Ê¤é¤Ð¡¢¥«¡¼¥½¥ë¤Î
628       ¤¢¤ë¥°¥ê¥Õ¤ÈƱ¤¸Éý¤Ç¤¢¤ë¡£  */
629   int cursor_width;
630
631   /***en If nonzero and <cursor_width> is also nonzero, display double
632       bar cursors; at the character position <cursor_pos> and at the
633       logically previous character.  Both cursors have one pixel width
634       with horizontal fringes at upper or lower positions.  */
635   /***ja If 0 ¤Ç¤Ê¤¯¡¢¤«¤Ä <cursor_width> ¤â 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢¥Ð¡¼¥«¡¼¥½
636       ¥ë¤òʸ»ú°ÌÃÖ<cursor_pos> ¤ÈÏÀÍýŪ¤Ë¤½¤ì¤ÎÁ°¤Ë¤¢¤ëʸ»ú¤Î£²¥ö½êɽ
637       ¼¨¤¹¤ë¡£ÁÐÊý¤È¤â£±¥Ô¥¯¥»¥ëÉý¤Ç¡¢¾å²¼¤Ë¿åÊ¿¤Î¾þ¤ê¤¬¤Ä¤¯¡£*/
638   int cursor_bidi;
639
640   /***en If nonzero, on drawing partial text, pixels of surrounding
641       texts that intrude into the drawing area are also drawn.  For
642       instance, some CVC sequence of Thai text (C is consonant, V is
643       upper vowel) is drawn so that V is placed over the middle of two
644       Cs.  If this CVC sequence is already drawn and only the last C
645       is drawn again (for instance by updating cursor position), the
646       right half of V is erased if this member is zero.  By setting
647       this member to nonzero, even with such a drawing, we can keep
648       this CVC sequence correctly displayed.  */
649   /***ja 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢¥Æ¥­¥¹¥È¤Î°ìÉôʬ¤òɽ¼¨¤¹¤ëºÝ¤Ë¡¢Á°¸å¤Î¥Æ¥­¥¹¥È
650       ¤Î¤¦¤Á¤½¤Îɽ¼¨Îΰè¤Ë¿¯Æþ¤¹¤ëÉôʬ¤âɽ¼¨¤¹¤ë¡£¤¿¤È¤¨¤Ð¡¢¥¿¥¤¸ìʸ½ñ
651       ¤Î»Ò²»-Êì²»-»Ò²»¤È¤¤¤¦¥·¡¼¥¯¥¨¥ó¥¹¤Î¤¤¤¯¤Ä¤«¤Ï¡¢Êì²»¤¬Æó¤Ä¤Î»Ò²»
652       ¤Î´Ö¤Ë¾å¤Ë¤Î¤ë¤è¤¦¤ËÉÁ¤«¤ì¤ë¡£¤³¤Î¤è¤¦¤Ê¥·¡¼¥¯¥¨¥ó¥¹¤¬¤¹¤Ç¤ËÉÁ¤«
653       ¤ì¤Æ¤ª¤ê¡¢ºÇ¸å¤Î»Ò²»¤À¤±¤òÉÁ¤­Ä¾¤¹¾ì¹ç¡Ê¤¿¤È¤¨¤Ð¡¢¥«¡¼¥½¥ë°ÌÃÖ¤ò
654       ¹¹¿·¤¹¤ëºÝ¤Ê¤É¡Ë¤³¤Î¥á¥ó¥Ð¤¬ 0 ¤Ç¤¢¤ì¤Ð¡¢Êì²»¤Î±¦È¾Ê¬¤¬¾Ã¤µ¤ì¤Æ
655       ¤·¤Þ¤¦¡£¤³¤ì¤ò 0 °Ê³°¤Ë¤¹¤ë¤³¤È¤Ë¤è¤Ã¤Æ¡¢¤½¤Î¤è¤¦¤ÊºÝ¤Ë¤â»Ò²»-Êì
656       ²»-»Ò²»¥·¡¼¥¯¥¨¥ó¥¹¤òÀµ¤·¤¯É½¼¨¤·Â³¤±¤ë¤³¤È¤¬¤Ç¤­¤ë¡£  */
657   int partial_update;
658
659   /***en If nonzero, don't cache the result of any drawing information
660       of an M-text.  */
661   /***ja 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢M-text ¤Îɽ¼¨¤Ë´Ø¤¹¤ë¾ðÊó¤ò¥­¥ã¥Ã¥·¥å¤·¤Ê¤¤¡£
662        */
663   int disable_caching;
664
665   /* If non-NULL, limit the drawing effect to the specified region.  */
666   MDrawRegion clip_region;
667
668 } MDrawControl;
669
670 /*=*/
671
672 /*** @ingroup m17nDraw */
673 /***en
674     @brief Type of metric for gylphs and texts.
675
676     The type #MDrawMetric is for a metric of a glyph and a drawn text.
677     It is also used to represent a rectangle area of a graphic
678     device.  */
679 /***ja
680     @brief ¥°¥ê¥Õ¤È¥Æ¥­¥¹¥È¤ÎÀ£Ë¡¤Î·¿Àë¸À.
681
682     #MDrawMetric ¤Ï¥°¥ê¥Õ¤Èɽ¼¨¤µ¤ì¤¿¥Æ¥­¥¹¥È¤ÎÀ£Ë¡ÍѤη¿¤Ç¤¢¤ë¡£¤Þ¤¿¡¢
683     É½¼¨¥Ç¥Ð¥¤¥¹¤Î¶ë·ÁÎΰè¤òɽ¤¹¤Î¤Ë¤âÍѤ¤¤é¤ì¤ë¡£ */
684
685 typedef struct {
686   int x, y;
687   unsigned int width, height;
688 } MDrawMetric;
689
690 /*=*/
691
692 /*** @ingroup m17nDraw */
693 /***en
694     @brief Type of information about a glyph.
695
696     The type #MDrawGlyphInfo is the structure that contains
697     information about a glyph.  It is used by mdraw_glyph_info ().  */
698 /***ja
699     @brief ¥°¥ê¥Õ¤Ë´Ø¤¹¤ë¾ðÊó¤Î·¿Àë¸À.
700
701     #MDrawGlyphInfo ·¿¤Ï¥°¥ê¥Õ¤Ë´Ø¤¹¤ë¾ðÊó¤ò´Þ¤à¹½Â¤ÂΤǤ¢¤ë¡£
702     mdraw_glyph_info () ¤Ï¤³¤ì¤òÍѤ¤¤ë¡£  */
703
704 typedef struct
705 {
706   /***en Character range corresponding to the glyph.  */
707   /***ja ¥°¥ê¥Õ¤ËÂбþ¤¹¤ëʸ»ú¤ÎÈÏ°Ï.  */
708   int from, to;
709
710   /***en Character ranges corresponding to the line of the glyph.  */
711   /***ja  ¥°¥ê¥Õ¤ÎÎó¤ËÂбþ¤¹¤ëʸ»ú¤ÎÈÏ°Ï.  */
712   int line_from, line_to;
713
714   /***en X/Y coordinates of the glyph.  */
715   /***ja ¥°¥ê¥Õ¤Î X/Y ºÂɸ.  */
716   int x, y;
717
718   /***en Metric of the glyph.  */
719   /***ja ¥°¥ê¥Õ¤ÎÀ£Ë¡.  */
720   MDrawMetric this;
721
722   /***en Font used for the glyph.  Set to NULL if no font is found for
723       the glyph.  */
724   /***ja ¤½¤Î¥°¥ê¥ÕÍѤ˻Ȥï¤ì¤ë¥Õ¥©¥ó¥È¡£¸«¤Ä¤«¤é¤Ê¤±¤ì¤Ð NULL¡£
725       the glyph.  */
726   MFont *font;
727
728   /***en Character ranges corresponding to logically previous and next
729       glyphs.  Note that we do not need the members prev_to and
730       next_from because they must be the same as the members from and
731       to respectively.  */
732   /***ja ÏÀÍýŪ¤ÊÁ°¸å¤Î¥°¥ê¥Õ¤ËÂбþ¤¹¤ëʸ»ú¤ÎÈÏ°Ï¡£¥á¥ó¥Ð prev_to ¤È
733       next_from ¤Ï¡¢¤½¤ì¤¾¤ì¥á¥ó¥Ð from ¤Èto ¤ÈƱ¤¸¤Ç¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤
734       ¤¿¤áÉÔÍפǤ¢¤ë¤³¤È¤ËÃí°Õ¡£  */
735   int prev_from, next_to;
736
737   /***en Character ranges corresponding to visually left and right
738       glyphs. */
739   /***ja »ë³ÐŪ¤Êº¸±¦¤Î¥°¥ê¥Õ¤ËÂбþ¤¹¤ëʸ»ú¤ÎÈÏ°Ï¡£  */
740   int left_from, left_to;
741   int right_from, right_to;
742
743 } MDrawGlyphInfo;
744
745 /*=*/
746
747 /***en
748     @brief Type of text items.
749
750     The type #MDrawTextItem is for @e textitem objects.
751     Each textitem contains an M-text and some other information to
752     control the drawing of the M-text.  */
753
754 /***ja
755     @brief textitem ¤Î·¿Àë¸À.
756
757     #MDrawTextItem ¤Ï @e ¥Æ¥­¥¹¥È¥¢¥¤¥Æ¥à ¥ª¥Ö¥¸¥§¥¯¥ÈÍѤη¿¤Ç¤¢¤ë¡£³Æ
758     ¥Æ¥­¥¹¥È¥¢¥¤¥Æ¥à¤Ï¡¢1¸Ä¤Î M-text ¤È¡¢¤½¤Îɽ¼¨¤òÀ©¸æ¤¹¤ë¤¿¤á¤Î³Æ¼ï
759     ¾ðÊó¤ò´Þ¤ó¤Ç¤¤¤ë¡£
760
761     @latexonly \IPAlabel{MTextItem} @endlatexonly  */
762
763 typedef struct
764 {
765   /***en M-text. */
766   /***ja M-text. */
767   MText *mt;                      
768
769   /***en Optional change in the position (in the unit of pixel) along
770       the X-axis before the M-text is drawn.  */
771   /***ja M-text É½¼¨Á°¤Ë¹Ô¤Ê¤¦X¼´Êý¸þ¤Î°ÌÃÖÄ´À° (¥Ô¥¯¥»¥ëñ°Ì) */
772   int delta;                     
773
774   /***en Pointer to a face object.  Each property of the face, if not
775       Mnil, overrides the same property of face(s) specified as a text
776       property in <mt>.  */
777   /***ja ¥Õ¥§¡¼¥¹¥ª¥Ö¥¸¥§¥¯¥È¤Ø¤Î¥Ý¥¤¥ó¥¿¡£¥Õ¥§¡¼¥¹¤Î³Æ¥×¥í¥Ñ¥Æ¥£¤Ï 
778       Mnil ¤Ç¤Ê¤±¤ì¤Ð <mt> ¤Ç»ØÄꤵ¤ì¤¿¥Õ¥§¡¼¥¹¤ÎƱ¤¸¥×¥í¥Ñ¥Æ¥£¤ËÍ¥Àè
779       ¤¹¤ë*/
780   MFace *face;
781
782   /***en Pointer to a draw control object.  The M-text <mt> is drawn
783       by mdraw_text_with_control () with this control object.  */
784   /***ja É½¼¨À©¸æ¥ª¥Ö¥¸¥§¥¯¥È¤Ø¤Î¥Ý¥¤¥ó¥¿¡£ mdraw_text_with_control () 
785       ¤Ï¤³¤Î¥ª¥Ö¥¸¥§¥¯¥È¤òÍѤ¤¤Æ M-text <mt> ¤òɽ¼¨¤¹¤ë¡£  */
786   MDrawControl *control;
787
788 } MDrawTextItem;
789
790 /*=*/
791
792 extern int mdraw_text (MFrame *frame, MDrawWindow win, int x, int y,
793                        MText *mt, int from, int to);
794
795 extern int mdraw_image_text (MFrame *frame, MDrawWindow win, int x, int y,
796                              MText *mt, int from, int to);
797
798 extern int mdraw_text_with_control (MFrame *frame, MDrawWindow win,
799                                     int x, int y, MText *mt, int from, int to,
800                                     MDrawControl *control);
801
802 extern int mdraw_coordinates_position (MFrame *frame,
803                                        MText *mt, int from, int to,
804                                        int x, int y, MDrawControl *control);
805
806 extern int mdraw_text_extents (MFrame *frame,
807                                MText *mt, int from, int to,
808                                MDrawControl *control,
809                                MDrawMetric *overall_ink_return,
810                                MDrawMetric *overall_logical_return,
811                                MDrawMetric *overall_line_return);
812
813 extern int mdraw_text_per_char_extents (MFrame *frame,
814                                         MText *mt, int from, int to,
815                                         MDrawControl *control,
816                                         MDrawMetric *ink_array_return,
817                                         MDrawMetric *logical_array_return,
818                                         int array_size,
819                                         int *num_chars_return,
820                                         MDrawMetric *overall_ink_return,
821                                         MDrawMetric *overall_logical_return);
822
823 extern int mdraw_glyph_info (MFrame *frame, MText *mt, int from, int pos,
824                              MDrawControl *control, MDrawGlyphInfo *info);
825
826 extern void mdraw_text_items (MFrame *frame, MDrawWindow win, int x, int y,
827                               MDrawTextItem *items, int nitems);
828
829 extern void mdraw_per_char_extents (MFrame *frame, MText *mt,
830                                     MDrawMetric *array_return,
831                                     MDrawMetric *overall_return);
832
833 extern int mdraw_default_line_break (MText *mt, int pos,
834                                      int from, int to, int line, int y);
835
836 extern void mdraw_clear_cache (MText *mt);
837
838 /* end of drawing module */
839 /*=*/
840
841 /*** @ingroup m17nGUI */
842 /***en @defgroup m17nInputMethodWin Input Method (GUI) */
843 /***ja @defgroup m17nInputMethodWin ÆþÎϥ᥽¥Ã¥É (GUI) */
844 /*=*/
845
846 extern MInputDriver minput_gui_driver;
847
848 /*=*/
849 /*** @ingroup m17nInputMethodWin */
850 /***en 
851     @brief Type of the argument to the function minput_create_ic ().
852
853     The type #MInputGUIArgIC is for the argument $ARG of the function
854     minput_create_ic () to create an input context of an internal
855     input method.  */
856
857 /***ja
858     @brief ´Ø¿ô minput_create_ic () ¤Î°ú¿ô¤Î·¿Àë¸À.
859
860     #MInputGUIArgIC ¤Ï¡¢´Ø¿ô minput_create_ic () ¤¬ÆâÉôÆþÎϥ᥽¥Ã¥É¤Î
861     ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤òÀ¸À®¤¹¤ëºÝ¤Î¡¢°ú¿ô $ARG ÍѤη¿¤Ç¤¢¤ë¡£  */
862
863 typedef struct
864 {
865   /***en Frame of the client.  */
866   /***ja ¥¯¥é¥¤¥¢¥ó¥È¤Î¥Õ¥ì¡¼¥à  */
867   MFrame *frame;
868
869   /***en Window on which to display the preedit and status text.  */
870   /***ja preedit ¥Æ¥­¥¹¥È¤È status ¥Æ¥­¥¹¥È¤òɽ¼¨¤¹¤ë¥¦¥£¥ó¥É¥¦  */
871   MDrawWindow client;
872
873   /***en Window that the input context has a focus on.  */
874   /***ja ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤¬¥Õ¥©¡¼¥«¥¹¤ò¤ª¤¤¤Æ¤¤¤ë¥¦¥£¥ó¥É¥¦  */
875   MDrawWindow focus;
876 } MInputGUIArgIC;
877
878 /*=*/
879
880 extern MSymbol minput_event_to_key (MFrame *frame, void *event);
881
882 /* end of input module */
883 /*=*/
884 /* end of window modules */
885 /*=*/
886
887 extern MFace *mdebug_dump_face (MFace *face, int indent);
888 extern MFont *mdebug_dump_font (MFont *font);
889 extern MFontset *mdebug_dump_fontset (MFontset *fontset, int indent);
890
891 #ifdef __cplusplus
892 }
893 #endif
894
895 #endif /* _M17N_GUI_H_ */
896
897 /*
898   Local Variables:
899   coding: euc-japan
900   End:
901 */