Blame src/m17n-gui.h

Packit Service a721b1
/* m17n-gui.h -- header file for the GUI API of the m17n library.
Packit Service a721b1
   Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Packit Service a721b1
     National Institute of Advanced Industrial Science and Technology (AIST)
Packit Service a721b1
     Registration Number H15PRO112
Packit Service a721b1
Packit Service a721b1
   This file is part of the m17n library.
Packit Service a721b1
Packit Service a721b1
   The m17n library is free software; you can redistribute it and/or
Packit Service a721b1
   modify it under the terms of the GNU Lesser General Public License
Packit Service a721b1
   as published by the Free Software Foundation; either version 2.1 of
Packit Service a721b1
   the License, or (at your option) any later version.
Packit Service a721b1
Packit Service a721b1
   The m17n library is distributed in the hope that it will be useful,
Packit Service a721b1
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service a721b1
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service a721b1
   Lesser General Public License for more details.
Packit Service a721b1
Packit Service a721b1
   You should have received a copy of the GNU Lesser General Public
Packit Service a721b1
   License along with the m17n library; if not, write to the Free
Packit Service a721b1
   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Packit Service a721b1
   Boston, MA 02110-1301 USA.  */
Packit Service a721b1
Packit Service a721b1
#ifndef _M17N_GUI_H_
Packit Service a721b1
#define _M17N_GUI_H_
Packit Service a721b1
Packit Service a721b1
#ifndef _M17N_FLT_H_
Packit Service a721b1
#include <m17n-flt.h>
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
#ifndef _M17N_H_
Packit Service a721b1
#include <m17n.h>
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
M17N_BEGIN_HEADER
Packit Service a721b1
Packit Service a721b1
#if !defined (FOR_DOXYGEN) || defined (DOXYGEN_INTERNAL_MODULE)
Packit Service a721b1
Packit Service a721b1
extern void m17n_init_win (void);
Packit Service a721b1
#undef M17N_INIT
Packit Service a721b1
#define M17N_INIT() m17n_init_win ()
Packit Service a721b1
Packit Service a721b1
extern void m17n_fini_win (void);
Packit Service a721b1
#undef M17N_FINI
Packit Service a721b1
#define M17N_FINI() m17n_fini_win ()
Packit Service a721b1
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
/***en @defgroup m17nGUI GUI API
Packit Service a721b1
    @brief API provided by libm17n-gui.so */
Packit Service a721b1
/***ja @defgroup m17nGUI GUI API
Packit Service a721b1
    @brief libm17n-gui.so が提供する API */
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
/*** @ingroup m17nGUI */
Packit Service a721b1
/***en @defgroup m17nFrame Frame */
Packit Service a721b1
/***ja @defgroup m17nFrame フレーム */
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
/*** @ingroup m17nFrame */
Packit Service a721b1
/***en
Packit Service a721b1
    @brief Type of frames.
Packit Service a721b1
Packit Service a721b1
    The type #MFrame is for a @e frame object.  Each frame holds
Packit Service a721b1
    various information about the corresponding physical display/input
Packit Service a721b1
    device.
Packit Service a721b1
Packit Service a721b1
    The internal structure of the type #MFrame is concealed from an
Packit Service a721b1
    application program, and its contents depend on the window system
Packit Service a721b1
    in use.  In the m17n-X library, it contains the information about
Packit Service a721b1
    @e display and @e screen in the X Window System.  */
Packit Service a721b1
Packit Service a721b1
/***ja
Packit Service a721b1
    @brief フレームの型宣言.
Packit Service a721b1
Packit Service a721b1
    #MFrame は、@e フレーム オブジェクト用の型である。
Packit Service a721b1
    個々のフレームは、それが対応する物理的な表示/入力デバイスの各種情報を保持する。
Packit Service a721b1
Packit Service a721b1
    #MFrame 型の内部構造は、アプリケーションプログラムからは見えない。
Packit Service a721b1
    またその内容は使用するウィンドウシステムに依存する。また m17n-X 
Packit Service a721b1
    ライブラリにおけるフレームは、X ウィンドウの @e display と @e screen 
Packit Service a721b1
    に関する情報を持つ。      */
Packit Service a721b1
Packit Service a721b1
typedef struct MFrame MFrame;
Packit Service a721b1
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
extern MSymbol Mdevice;
Packit Service a721b1
Packit Service a721b1
extern MSymbol Mfont;
Packit Service a721b1
extern MSymbol Mfont_width;
Packit Service a721b1
extern MSymbol Mfont_ascent;
Packit Service a721b1
extern MSymbol Mfont_descent;
Packit Service a721b1
extern MFrame *mframe_default;
Packit Service a721b1
Packit Service a721b1
extern MSymbol Mdisplay;
Packit Service a721b1
extern MSymbol Mscreen;
Packit Service a721b1
extern MSymbol Mdrawable;
Packit Service a721b1
extern MSymbol Mwidget;
Packit Service a721b1
extern MSymbol Mdepth;
Packit Service a721b1
extern MSymbol Mcolormap;
Packit Service a721b1
Packit Service a721b1
extern MFrame *mframe (MPlist *plist);
Packit Service a721b1
Packit Service a721b1
extern void *mframe_get_prop (MFrame *frame, MSymbol key);
Packit Service a721b1
Packit Service a721b1
/* end of frame module */
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
/*** @ingroup m17nGUI  */
Packit Service a721b1
/***en @defgroup m17nFont Font */
Packit Service a721b1
/***ja @defgroup m17nFont フォント */
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
/*** @ingroup m17nFont */
Packit Service a721b1
/***en
Packit Service a721b1
    @brief Type of fonts.
Packit Service a721b1
Packit Service a721b1
    The type #MFont is the structure defining fonts.  It contains
Packit Service a721b1
    information about the following properties of a font: foundry,
Packit Service a721b1
    family, weight, style, stretch, adstyle, registry, size, and
Packit Service a721b1
    resolution.
Packit Service a721b1
Packit Service a721b1
    This structure is used both for specifying a font in a fontset
Packit Service a721b1
    and for storing information about available system fonts.
Packit Service a721b1
Packit Service a721b1
    The internal structure is concealed from an application program.  */
Packit Service a721b1
Packit Service a721b1
/***ja
Packit Service a721b1
    @brief フォントの型宣言.
Packit Service a721b1
Packit Service a721b1
    #MFont 型はフォント指定用の構造体であり、フォントのプロパティである
Packit Service a721b1
    foundry, family, weight, style, stretch, adstyle, registry,
Packit Service a721b1
    size, resolution に関する情報を含む。
Packit Service a721b1
Packit Service a721b1
    この構造体はフォントセット内のフォントを指定する際と、使用可能なシステムフォントの情報を格納する際の両方に用いられる。
Packit Service a721b1
Packit Service a721b1
    内部構造はアプリケーションプログラムからは見えない。  */
Packit Service a721b1
Packit Service a721b1
/***
Packit Service a721b1
    @seealso
Packit Service a721b1
    mfont (), mfont_from_name (), mfont_find ().  */
Packit Service a721b1
Packit Service a721b1
typedef struct MFont MFont;
Packit Service a721b1
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
extern MSymbol Mx, Mfreetype, Mxft;
Packit Service a721b1
Packit Service a721b1
extern MPlist *mfont_freetype_path;
Packit Service a721b1
Packit Service a721b1
extern MFont *mfont ();
Packit Service a721b1
Packit Service a721b1
extern MFont *mfont_copy (MFont *font);
Packit Service a721b1
Packit Service a721b1
extern MFont *mfont_parse_name (const char *name, MSymbol format);
Packit Service a721b1
Packit Service a721b1
extern char *mfont_unparse_name (MFont *font, MSymbol format);
Packit Service a721b1
Packit Service a721b1
/* These two are obsolete (from 1.1.0).  */
Packit Service a721b1
extern char *mfont_name (MFont *font);
Packit Service a721b1
extern MFont *mfont_from_name (const char *name);
Packit Service a721b1
Packit Service a721b1
extern MSymbol Mfoundry;
Packit Service a721b1
extern MSymbol Mfamily;
Packit Service a721b1
extern MSymbol Mweight;
Packit Service a721b1
extern MSymbol Mstyle;
Packit Service a721b1
extern MSymbol Mstretch;
Packit Service a721b1
extern MSymbol Madstyle;
Packit Service a721b1
extern MSymbol Mspacing;
Packit Service a721b1
extern MSymbol Mregistry;
Packit Service a721b1
extern MSymbol Msize;
Packit Service a721b1
extern MSymbol Mresolution;
Packit Service a721b1
extern MSymbol Mmax_advance;
Packit Service a721b1
extern MSymbol Motf;
Packit Service a721b1
extern MSymbol Mfontfile;
Packit Service a721b1
Packit Service a721b1
extern MSymbol Mfontconfig;
Packit Service a721b1
Packit Service a721b1
extern void *mfont_get_prop (MFont *font, MSymbol key);
Packit Service a721b1
Packit Service a721b1
extern int mfont_put_prop (MFont *font, MSymbol key, void *val);
Packit Service a721b1
Packit Service a721b1
extern int mfont_set_encoding (MFont *font,
Packit Service a721b1
			       MSymbol encoding_name, MSymbol repertory_name);
Packit Service a721b1
Packit Service a721b1
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
/***en
Packit Service a721b1
    @brief Find a font.
Packit Service a721b1
Packit Service a721b1
    The mfont_find () function returns a pointer to the available font
Packit Service a721b1
    that matches best with the specification $SPEC in frame $FRAME.
Packit Service a721b1
Packit Service a721b1
    $SCORE, if not NULL, must point to a place to store the score
Packit Service a721b1
    value which indicates how well the found font matches $SPEC.  The
Packit Service a721b1
    smaller score means a better match.
Packit Service a721b1
Packit Service a721b1
    $LIMITED_SIZE, if nonzero, forces the font selector to find a
Packit Service a721b1
    font not greater than the #Msize property of $SPEC.  */
Packit Service a721b1
Packit Service a721b1
/***ja
Packit Service a721b1
    @brief フォントを探す.
Packit Service a721b1
Packit Service a721b1
    関数 mfont_find () は、フレーム $FRAME 上でフォント定義 $SPEC 
Packit Service a721b1
    にもっとも合致する使用可能なフォントへのポインタを返す。  
Packit Service a721b1
Packit Service a721b1
    $SCORE は NULL であるか、見つかったフォントが $SPEC 
Packit Service a721b1
    にどれほど合っているかを示すスコアを保存する場所へのポインタである。
Packit Service a721b1
    スコアが小さいほど良く合っていることを意味する。
Packit Service a721b1
Packit Service a721b1
    $LIMITED_SIZE が 0 でなければ、$SPEC のプロパティ #Msize 
Packit Service a721b1
    より大きくないフォントだけが探される。
Packit Service a721b1
*/
Packit Service a721b1
Packit Service a721b1
extern MFont *mfont_find (MFrame *frame, MFont *spec,
Packit Service a721b1
			  int *score, int limited_size);
Packit Service a721b1
extern MSymbol *mfont_selection_priority ();
Packit Service a721b1
Packit Service a721b1
extern int mfont_set_selection_priority (MSymbol *keys);
Packit Service a721b1
Packit Service a721b1
extern int mfont_resize_ratio (MFont *font);
Packit Service a721b1
Packit Service a721b1
extern MPlist *mfont_list (MFrame *frame, MFont *font, MSymbol language,
Packit Service a721b1
			   int maxnum);
Packit Service a721b1
extern MPlist *mfont_list_family_names (MFrame *frame);
Packit Service a721b1
Packit Service a721b1
typedef struct MFontset MFontset;
Packit Service a721b1
Packit Service a721b1
extern int mfont_check (MFrame *frame, MFontset *fontset,
Packit Service a721b1
			MSymbol script, MSymbol language, MFont *font);
Packit Service a721b1
Packit Service a721b1
extern int mfont_match_p (MFont *font, MFont *spec);
Packit Service a721b1
Packit Service a721b1
extern MFont *mfont_open (MFrame *frame, MFont *font);
Packit Service a721b1
Packit Service a721b1
extern MFont *mfont_encapsulate (MFrame *frame, MSymbol data_type, void *data);
Packit Service a721b1
Packit Service a721b1
extern int mfont_close (MFont *font);
Packit Service a721b1
Packit Service a721b1
/* end of font module */
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
/*** @ingroup m17nGUI  */
Packit Service a721b1
/***en @defgroup m17nFontset Fontset */
Packit Service a721b1
/***ja @defgroup m17nFontset フォントセット */
Packit Service a721b1
/*=*/
Packit Service a721b1
/*** @addtogroup m17nFontset
Packit Service a721b1
     @{   */
Packit Service a721b1
extern MFontset *mfontset (char *name);
Packit Service a721b1
Packit Service a721b1
extern MSymbol mfontset_name (MFontset *fontset);
Packit Service a721b1
Packit Service a721b1
extern MFontset *mfontset_copy (MFontset *fontset, char *name);
Packit Service a721b1
Packit Service a721b1
extern int mfontset_modify_entry (MFontset *fontset,
Packit Service a721b1
				  MSymbol language, MSymbol script,
Packit Service a721b1
				  MSymbol charset,
Packit Service a721b1
				  MFont *spec, MSymbol layouter_name,
Packit Service a721b1
				  int how);
Packit Service a721b1
Packit Service a721b1
extern MPlist *mfontset_lookup (MFontset *fontset, MSymbol script,
Packit Service a721b1
				MSymbol language, MSymbol charset);
Packit Service a721b1
/*** @}   */
Packit Service a721b1
/* end of fontset module */
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
/*** @ingroup m17nGUI */
Packit Service a721b1
/***en @defgroup m17nFace Face */
Packit Service a721b1
/***ja @defgroup m17nFace フェース */
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
/*** @ingroup m17nFace */
Packit Service a721b1
/***en
Packit Service a721b1
    @brief Type of faces.
Packit Service a721b1
Packit Service a721b1
    The type #MFace is the structure of face objects.  The internal
Packit Service a721b1
    structure is concealed from an application program.  */
Packit Service a721b1
Packit Service a721b1
/***ja
Packit Service a721b1
    @brief フェースの型宣言.
Packit Service a721b1
Packit Service a721b1
    #MFace 型はフェースオブジェクトのための構造体である。
Packit Service a721b1
    内部構造はアプリケーションプログラムからは見えない。  */
Packit Service a721b1
Packit Service a721b1
typedef struct MFace MFace;
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
extern MSymbol Mforeground;
Packit Service a721b1
extern MSymbol Mbackground;
Packit Service a721b1
extern MSymbol Mvideomode;
Packit Service a721b1
extern MSymbol Mnormal;
Packit Service a721b1
extern MSymbol Mreverse;
Packit Service a721b1
extern MSymbol Mhline;
Packit Service a721b1
extern MSymbol Mbox;
Packit Service a721b1
extern MSymbol Mfontset;
Packit Service a721b1
extern MSymbol Mratio;
Packit Service a721b1
extern MSymbol Mhook_func;
Packit Service a721b1
extern MSymbol Mhook_arg;
Packit Service a721b1
Packit Service a721b1
/* Predefined faces.  */
Packit Service a721b1
extern MFace *mface_normal_video;
Packit Service a721b1
extern MFace *mface_reverse_video;
Packit Service a721b1
extern MFace *mface_underline;
Packit Service a721b1
extern MFace *mface_medium;
Packit Service a721b1
extern MFace *mface_bold;
Packit Service a721b1
extern MFace *mface_italic;
Packit Service a721b1
extern MFace *mface_bold_italic;
Packit Service a721b1
extern MFace *mface_xx_small;
Packit Service a721b1
extern MFace *mface_x_small;
Packit Service a721b1
extern MFace *mface_small;
Packit Service a721b1
extern MFace *mface_normalsize;
Packit Service a721b1
extern MFace *mface_large;
Packit Service a721b1
extern MFace *mface_x_large;
Packit Service a721b1
extern MFace *mface_xx_large;
Packit Service a721b1
extern MFace *mface_black;
Packit Service a721b1
extern MFace *mface_white;
Packit Service a721b1
extern MFace *mface_red;
Packit Service a721b1
extern MFace *mface_green;
Packit Service a721b1
extern MFace *mface_blue;
Packit Service a721b1
extern MFace *mface_cyan;
Packit Service a721b1
extern MFace *mface_yellow;
Packit Service a721b1
extern MFace *mface_magenta;
Packit Service a721b1
Packit Service a721b1
/* etc */
Packit Service a721b1
extern MSymbol Mface;
Packit Service a721b1
Packit Service a721b1
extern MFace *mface ();
Packit Service a721b1
Packit Service a721b1
extern int mface_equal (MFace *face1, MFace *face2);
Packit Service a721b1
Packit Service a721b1
extern MFace *mface_copy (MFace *face);
Packit Service a721b1
Packit Service a721b1
extern MFace *mface_merge (MFace *dst, MFace *src);
Packit Service a721b1
Packit Service a721b1
extern MFace *mface_from_font (MFont *font);
Packit Service a721b1
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
/*** @ingroup m17nFace */
Packit Service a721b1
/***en
Packit Service a721b1
    @brief Type of horizontal line spec of face.
Packit Service a721b1
Packit Service a721b1
    The type #MFaceHLineProp is to specify the detail of #Mhline
Packit Service a721b1
    property of a face.  The value of the property must be a pointer
Packit Service a721b1
    to an object of this type.  */
Packit Service a721b1
/***ja
Packit Service a721b1
    @brief フェースの水平線指定用型宣言.
Packit Service a721b1
Packit Service a721b1
    #MFaceHLineProp はフェースの #Mhline 
Packit Service a721b1
    プロパティの詳細を指定する型である。このプロパティの値はこの型のオブジェクトでなくてはならない。
Packit Service a721b1
      */
Packit Service a721b1
Packit Service a721b1
typedef struct
Packit Service a721b1
{
Packit Service a721b1
  /***en Type of the horizontal line.  */
Packit Service a721b1
  /***ja 水平線のタイプ.  */
Packit Service a721b1
  enum MFaceHLineType
Packit Service a721b1
    {
Packit Service a721b1
      MFACE_HLINE_BOTTOM,      
Packit Service a721b1
      MFACE_HLINE_UNDER,
Packit Service a721b1
      MFACE_HLINE_STRIKE_THROUGH,
Packit Service a721b1
      MFACE_HLINE_OVER,
Packit Service a721b1
      MFACE_HLINE_TOP
Packit Service a721b1
    } type;
Packit Service a721b1
Packit Service a721b1
  /***en Width of the line in pixels.  */
Packit Service a721b1
  /***ja 線幅(ピクセル単位).  */
Packit Service a721b1
  unsigned width;
Packit Service a721b1
Packit Service a721b1
  /***en Color of the line.  If the value is Mnil, foreground color of
Packit Service a721b1
      a merged face is used.  */
Packit Service a721b1
  /***ja 線の色.  Mnil ならば、統合したフェースの前景色が使われる。  */
Packit Service a721b1
  
Packit Service a721b1
  MSymbol color;
Packit Service a721b1
} MFaceHLineProp;
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
/*** @ingroup m17nFace */
Packit Service a721b1
/***en
Packit Service a721b1
    @brief Type of box spec of face.
Packit Service a721b1
Packit Service a721b1
    The type #MFaceBoxProp is to specify the detail of #Mbox property
Packit Service a721b1
    of a face.  The value of the property must be a pointer to an
Packit Service a721b1
    object of this type.  */
Packit Service a721b1
/***ja
Packit Service a721b1
    @brief フェースの囲み枠指定用型宣言.
Packit Service a721b1
Packit Service a721b1
    #MFaceBoxProp はフェースの #Mbox プロパティの詳細を指定する型である。
Packit Service a721b1
    このプロパティの値はこの型のオブジェクトへのポインタでなくてはならない。
Packit Service a721b1
      */
Packit Service a721b1
Packit Service a721b1
typedef struct
Packit Service a721b1
{
Packit Service a721b1
  /***en Width of the box line in pixels.  */
Packit Service a721b1
  /***ja 線幅(ピクセル単位).  */
Packit Service a721b1
  unsigned width;
Packit Service a721b1
Packit Service a721b1
  /* @{ */
Packit Service a721b1
  /*** Colors of borders.  */
Packit Service a721b1
  MSymbol color_top;
Packit Service a721b1
  MSymbol color_bottom;
Packit Service a721b1
  MSymbol color_left;
Packit Service a721b1
  MSymbol color_right;
Packit Service a721b1
  /* @} */
Packit Service a721b1
Packit Service a721b1
  /* @{ */
Packit Service a721b1
  /*** Margins  */
Packit Service a721b1
  unsigned inner_hmargin;
Packit Service a721b1
  unsigned inner_vmargin;
Packit Service a721b1
  unsigned outer_hmargin;
Packit Service a721b1
  unsigned outer_vmargin;
Packit Service a721b1
  /* @} */
Packit Service a721b1
Packit Service a721b1
} MFaceBoxProp;
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
/*** @ingroup m17nFace */
Packit Service a721b1
/***en
Packit Service a721b1
    @brief Type of hook function of face.
Packit Service a721b1
Packit Service a721b1
    #MFaceHookFunc is a type of a hook function of a face.  */
Packit Service a721b1
/***ja
Packit Service a721b1
    @brief フェースのフック関数の型宣言.
Packit Service a721b1
Packit Service a721b1
    #MFaceHookFunc はフェースのフック関数の型である。*/
Packit Service a721b1
typedef void (*MFaceHookFunc) (MFace *face, void *arg, void *info);
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
extern void *mface_get_prop (MFace *face, MSymbol key);
Packit Service a721b1
Packit Service a721b1
extern int mface_put_prop (MFace *face, MSymbol key, void *val);
Packit Service a721b1
Packit Service a721b1
extern MFaceHookFunc mface_get_hook (MFace *face);
Packit Service a721b1
Packit Service a721b1
extern int mface_put_hook (MFace *face, MFaceHookFunc func);
Packit Service a721b1
Packit Service a721b1
extern void mface_update (MFrame *frame, MFace *face);
Packit Service a721b1
Packit Service a721b1
/* end of face module */
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
/*** @ingroup m17nGUI */
Packit Service a721b1
/***en @defgroup m17nDraw Drawing */
Packit Service a721b1
/***ja @defgroup m17nDraw 表示 */
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
/*** @ingroup m17nDraw */
Packit Service a721b1
/***en
Packit Service a721b1
    @brief Window system dependent type for a window.
Packit Service a721b1
Packit Service a721b1
    The type #MDrawWindow is for a window; a rectangular area that
Packit Service a721b1
    works in several ways like a miniature screen.
Packit Service a721b1
Packit Service a721b1
    What it actually points depends on a window system.  A program
Packit Service a721b1
    that uses the m17n-X library must coerce the type @c Drawable to
Packit Service a721b1
    this type.  */
Packit Service a721b1
/***ja 
Packit Service a721b1
    @brief ウィンドウシステムに依存する、ウィンドウの型宣言.
Packit Service a721b1
Packit Service a721b1
    #MDrawWindow はウィンドウ、すなわち幾つかの点でスクリーンのミニチュアとして働く矩形領域用の型である。
Packit Service a721b1
Packit Service a721b1
    実際に何を指すかはウィンドウシステムに依存する。 m17n X 
Packit Service a721b1
    ライブラリを利用するプログラムは @c Drawable 型をこの型に変換しなくてはならない。 */
Packit Service a721b1
Packit Service a721b1
typedef void *MDrawWindow;
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
/*** @ingroup m17nDraw */
Packit Service a721b1
/***en
Packit Service a721b1
    @brief Window system dependent type for a region.
Packit Service a721b1
Packit Service a721b1
    The type #MDrawRegion is for a region; an arbitrary set of pixels
Packit Service a721b1
    on the screen (typically a rectangular area).
Packit Service a721b1
Packit Service a721b1
    What it actually points depends on a window system.  A program
Packit Service a721b1
    that uses the m17n-X library must coerce the type @c Region to
Packit Service a721b1
    this type.  */
Packit Service a721b1
/***ja
Packit Service a721b1
    @brief ウィンドウシステムに依存する、領域の型宣言.
Packit Service a721b1
Packit Service a721b1
    #MDrawRegion は領域、すなわちスクリーン上の任意のピクセルの集合(典型的には矩形領域)用の型である。
Packit Service a721b1
Packit Service a721b1
    実際に何を指すかはウィンドウシステムに依存する。 m17n X 
Packit Service a721b1
    ライブラリを利用するプログラムは @c Region 型をこの型に変換しなくてはならない。  */
Packit Service a721b1
Packit Service a721b1
typedef void *MDrawRegion;
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
/*** @ingroup m17nDraw */
Packit Service a721b1
/***en
Packit Service a721b1
    @brief Type of a text drawing control.
Packit Service a721b1
Packit Service a721b1
    The type #MDrawControl is the structure that controls how to draw
Packit Service a721b1
    an M-text.  */
Packit Service a721b1
/***ja
Packit Service a721b1
    @brief テキスト表示制御の型宣言.
Packit Service a721b1
Packit Service a721b1
    #MDrawControl 型は、M-text をどう表示するかを制御する構造体である。
Packit Service a721b1
      */
Packit Service a721b1
Packit Service a721b1
Packit Service a721b1
typedef struct
Packit Service a721b1
{
Packit Service a721b1
  /***en If nonzero, draw an M-text as image, i.e. with background
Packit Service a721b1
      filled with background colors of faces put on the M-text.
Packit Service a721b1
      Otherwise, the background is not changed.  */
Packit Service a721b1
  /***ja 0 でなければ、 M-text を画像として、すなわち背景を M-text 
Packit Service a721b1
      のフェースで指定されている背景色で埋めて表示する。そうでなければ背景は変わらない。  */
Packit Service a721b1
  unsigned as_image : 1;
Packit Service a721b1
Packit Service a721b1
  /***en If nonzero and the first glyph of each line has negative
Packit Service a721b1
      lbearing, shift glyphs horizontally to right so that no pixel is
Packit Service a721b1
      drawn to the left of the specified position.  */
Packit Service a721b1
  /***ja 0 でなく、各行の最初のグリフの lbearing 
Packit Service a721b1
      が負ならば、グリフを水平に右にずらして、指定した位置より左にピクセルが描かれないようにする。  */
Packit Service a721b1
  unsigned align_head : 1;
Packit Service a721b1
Packit Service a721b1
  /***en If nonzero, draw an M-text two-dimensionally, i.e., newlines
Packit Service a721b1
      in M-text breaks lines and the following characters are drawn in
Packit Service a721b1
      the next line.  If \<format\> is non-NULL, and the function
Packit Service a721b1
      returns nonzero line width, a line longer than that width is
Packit Service a721b1
      also broken.  */
Packit Service a721b1
  /***ja 0 でなければ、M-text を2次元的に、すなわち M-text 中の 
Packit Service a721b1
      newline で改行し、続く文字は次の行に表示する。もし \<format\> が 
Packit Service a721b1
      NULL でなく、その関数が 0 でない行幅を返せば、その幅より長い行も改行される。  */
Packit Service a721b1
  unsigned two_dimensional : 1;
Packit Service a721b1
Packit Service a721b1
  /***en If nonzero, draw an M-text to the right of a specified
Packit Service a721b1
      position.  */
Packit Service a721b1
  /***ja 0 でなければ、M-text を指定した位置の右に表示する。  */
Packit Service a721b1
  unsigned orientation_reversed : 1;
Packit Service a721b1
Packit Service a721b1
  /***en If nonzero, reorder glyphs correctly for bidi text.  */ 
Packit Service a721b1
  /***ja 0 なければ、bidi テキスト用にグリフを正しく整列する。  */
Packit Service a721b1
  unsigned enable_bidi : 1;
Packit Service a721b1
Packit Service a721b1
  /***en If nonzero, don't draw characters whose general category (in
Packit Service a721b1
      Unicode) is Cf (Other, format).  */
Packit Service a721b1
  /***ja 0 でなければ、ユニコードに置ける一般カテゴリが Cf (Other,
Packit Service a721b1
      format) である文字を表示しない。  */
Packit Service a721b1
  unsigned ignore_formatting_char : 1;
Packit Service a721b1
Packit Service a721b1
  /***en If nonzero, draw glyphs suitable for a terminal.  Not yet
Packit Service a721b1
      implemented.  */
Packit Service a721b1
  /***ja 0 でなければ、端末用のグリフを表示する。未実装。  */
Packit Service a721b1
  unsigned fixed_width : 1;
Packit Service a721b1
Packit Service a721b1
  /***en If nonzero, draw glyphs with anti-aliasing if a backend font
Packit Service a721b1
      driver supports it.  */
Packit Service a721b1
  /***ja 0 でなければ、アンチエーリアスでグリフを表示する。
Packit Service a721b1
      (バックエンドのフォントドライバがアンチエーリアス機能を持つ場合のみ。) */
Packit Service a721b1
  unsigned anti_alias : 1;
Packit Service a721b1
Packit Service a721b1
  /***en If nonzero, disable the adjustment of glyph positions to
Packit Service a721b1
      avoid horizontal overlapping at font boundary.  */
Packit Service a721b1
  /***ja 0 でなければ、フォント境界での水平方向のグリフの重なりを避けるためのグリフ位置の調整を無効にする。  */
Packit Service a721b1
  unsigned disable_overlapping_adjustment : 1;
Packit Service a721b1
Packit Service a721b1
  /***en If nonzero, the values are minimum line ascent pixels.  */
Packit Service a721b1
  /***ja 0 でなければ、値は行の ascent の最小値を示す。  */
Packit Service a721b1
  unsigned int min_line_ascent;
Packit Service a721b1
  /***en If nonzero, the values are minimum line descent pixels.  */
Packit Service a721b1
  /***ja 0 でなければ、値は行の descent の最小値を示す。  */
Packit Service a721b1
  unsigned int min_line_descent;
Packit Service a721b1
Packit Service a721b1
  /***en If nonzero, the values are maximum line ascent pixels.  */
Packit Service a721b1
  /***ja 0 でなければ、値は行の ascent の最大値を示す。  */
Packit Service a721b1
  unsigned int max_line_ascent;
Packit Service a721b1
  /***en If nonzero, the values are maximum line descent pixels.  */
Packit Service a721b1
  /***ja 0 でなければ、値は行の descent の最大値を示す。  */
Packit Service a721b1
  unsigned int max_line_descent;
Packit Service a721b1
Packit Service a721b1
  /***en If nonzero, the value specifies how many pixels each line can
Packit Service a721b1
      occupy on the display.  The value zero means that there is no
Packit Service a721b1
      limit.  It is ignored if \<format\> is non-NULL.  */
Packit Service a721b1
  /***ja 0 でなければ、値はこのディスプレイ上で各行が占めることのできるピクセル数を示す。
Packit Service a721b1
      0 は限定されないことを意味する。\<format\> が NULL でなければ無視される。   */
Packit Service a721b1
  unsigned int max_line_width;
Packit Service a721b1
Packit Service a721b1
  /***en If nonzero, the value specifies the distance between tab
Packit Service a721b1
      stops in columns (the width of one column is the width of a
Packit Service a721b1
      space in the default font of the frame).  The value zero means
Packit Service a721b1
      8.  */
Packit Service a721b1
  /***ja 0 でなければ、値はタブストップ間の距離をコラム単位
Packit Service a721b1
      (コラムはフレームのデフォルトフォントにおける空白文字の幅である)で示す。 
Packit Service a721b1
      0 は 8 を意味する。 */
Packit Service a721b1
  unsigned int tab_width;
Packit Service a721b1
Packit Service a721b1
  /***en If non-NULL, the value is a function that calculates the
Packit Service a721b1
      indentation and width limit of each line based on the line
Packit Service a721b1
      number LINE and the coordinate Y.  The function store the
Packit Service a721b1
      indentation and width limit at the place pointed by INDENT and
Packit Service a721b1
      WIDTH respectively.
Packit Service a721b1
Packit Service a721b1
      The indentation specifies how many pixels the first glyph of
Packit Service a721b1
      each line is shifted to the right (if the member
Packit Service a721b1
      \<orientation_reversed\> is zero) or to the left (otherwise).  If
Packit Service a721b1
      the value is negative, each line is shifted to the reverse
Packit Service a721b1
      direction.
Packit Service a721b1
Packit Service a721b1
      The width limit specifies how many pixels each line can occupy
Packit Service a721b1
      on the display.  The value 0 means that there is no limit.
Packit Service a721b1
Packit Service a721b1
      LINE and Y are reset to 0 when a line is broken by a newline
Packit Service a721b1
      character, and incremented each time when a long line is broken
Packit Service a721b1
      because of the width limit.
Packit Service a721b1
Packit Service a721b1
      This has an effect only when \<two_dimensional\> is nonzero.  */
Packit Service a721b1
  /***ja 0 でなければ、値は関数であり、その関数は行番号 LINE と座標 Y 
Packit Service a721b1
      に基づいて各行のインデントと最大幅を計算し、それぞれをINDENT と
Packit Service a721b1
      WIDTH で指される場所に保存する。
Packit Service a721b1
Packit Service a721b1
      インデントは、各行の最初のグリフを右(メンバ 
Packit Service a721b1
      \<orientation_reversed\> が 0 
Packit Service a721b1
      の時)あるいは左(それ以外の時)に何ピクセルずらすかを指定する。値が負ならば逆方向にずらす。
Packit Service a721b1
Packit Service a721b1
      最大幅は、各行がディスプレイ上で占めることのできるピクセル数の最大値である。値が
Packit Service a721b1
      0 の場合は制限を受けないことを意味する。
Packit Service a721b1
Packit Service a721b1
      LINE と Y は改行文字によって行が改まった際には 0 
Packit Service a721b1
      にリセットされ、長い行が最大幅の制限によって改行されるたびに 1 増やされる。
Packit Service a721b1
Packit Service a721b1
      これは \<two_dimensional\> が 0 でない場合にのみ有効である。  */
Packit Service a721b1
  void (*format) (int line, int y, int *indent, int *width);
Packit Service a721b1
Packit Service a721b1
  /***en If non-NULL, the value is a function that calculates a line
Packit Service a721b1
      breaking position when a line is too long to fit within the
Packit Service a721b1
      width limit.  POS is the position of the character next to the
Packit Service a721b1
      last one that fits within the limit.  FROM is the position of the
Packit Service a721b1
      first character of the line, and TO is the position of the last
Packit Service a721b1
      character displayed on the line if there were not width limit.
Packit Service a721b1
      LINE and Y are the same as the arguments to \<format\>.
Packit Service a721b1
Packit Service a721b1
      The function must return a character position to break the
Packit Service a721b1
      line.
Packit Service a721b1
Packit Service a721b1
      The function should not modify MT.
Packit Service a721b1
Packit Service a721b1
      The mdraw_default_line_break () function is useful for such a
Packit Service a721b1
      script that uses SPACE as a word separator.  */
Packit Service a721b1
  /***ja NULL でなければ、値は行が最大幅中に収まらない場合に行を改める位置を計算する関数である。
Packit Service a721b1
      POS は最大幅に収まる最後の文字の次の文字の位置である。FROM
Packit Service a721b1
      は行の最初の文字の位置、TO 
Packit Service a721b1
      は最大幅が指定されていなければその行に表示される最後の文字の位置である。LINE 
Packit Service a721b1
      と Y は \<format\> の引数と同様である。
Packit Service a721b1
Packit Service a721b1
      この関数は行を改める文字位置を返さなくてはならない。また MT を変更してはならない。
Packit Service a721b1
Packit Service a721b1
      関数 mdraw_default_line_break ()
Packit Service a721b1
      は、空白を語の区切りとして用いるスクリプト用として有用である。  */
Packit Service a721b1
  int (*line_break) (MText *mt, int pos, int from, int to, int line, int y);
Packit Service a721b1
Packit Service a721b1
  /***en If nonzero, show the cursor according to \<cursor_width\>.  */
Packit Service a721b1
  /***ja ゼロでなければ \<cursor_width\> にしたがってカーソルを表示する。 */
Packit Service a721b1
  int with_cursor;
Packit Service a721b1
Packit Service a721b1
  /***en Specifies the character position to display a cursor.  If it
Packit Service a721b1
      is greater than the maximum character position, the cursor is
Packit Service a721b1
      displayed next to the last character of an M-text.  If the value
Packit Service a721b1
      is negative, even if \<cursor_width\> is nonzero, cursor is not
Packit Service a721b1
      displayed.  */
Packit Service a721b1
  /***ja カーソルを表示する文字位置を示す。最大の文字位置より大きければ、カーソルは 
Packit Service a721b1
      M-text の最後の文字の隣に表示される。負ならば、
Packit Service a721b1
      \<cursor_width\> が 0 でなくてもカーソルは表示されない。
Packit Service a721b1
        */
Packit Service a721b1
  int cursor_pos;
Packit Service a721b1
Packit Service a721b1
  /***en If nonzero, display a cursor at the character position
Packit Service a721b1
      \<cursor_pos\>.  If the value is positive, it is the pixel width
Packit Service a721b1
      of the cursor.  If the value is negative, the cursor width is
Packit Service a721b1
      the same as the underlining glyph(s).  */
Packit Service a721b1
  /***ja 0 でなければ、\<cursor_pos\> にカーソルを表示する。
Packit Service a721b1
      値が正ならば、カーソルの幅はその値(ピクセル単位)である。
Packit Service a721b1
      負ならば、カーソルのあるグリフと同じ幅である。  */
Packit Service a721b1
  int cursor_width;
Packit Service a721b1
Packit Service a721b1
  /***en If nonzero and \<cursor_width\> is also nonzero, display double
Packit Service a721b1
      bar cursors; at the character position \<cursor_pos\> and at the
Packit Service a721b1
      logically previous character.  Both cursors have one pixel width
Packit Service a721b1
      with horizontal fringes at upper or lower positions.  */
Packit Service a721b1
  /***ja If 0 でなく、かつ \<cursor_width\> も 0 でなければ、バーカーソルを文字位置
Packit Service a721b1
      \<cursor_pos\> と論理的にそれの前にある文字の2ヶ所に表示する。
Packit Service a721b1
      双方とも1ピクセル幅で、上か下に水平の飾りがつく。*/
Packit Service a721b1
  int cursor_bidi;
Packit Service a721b1
Packit Service a721b1
  /***en If nonzero, on drawing partial text, pixels of surrounding
Packit Service a721b1
      texts that intrude into the drawing area are also drawn.  For
Packit Service a721b1
      instance, some CVC sequence of Thai text (C is consonant, V is
Packit Service a721b1
      upper vowel) is drawn so that V is placed over the middle of two
Packit Service a721b1
      Cs.  If this CVC sequence is already drawn and only the last C
Packit Service a721b1
      is drawn again (for instance by updating cursor position), the
Packit Service a721b1
      right half of V is erased if this member is zero.  By setting
Packit Service a721b1
      this member to nonzero, even with such a drawing, we can keep
Packit Service a721b1
      this CVC sequence correctly displayed.  */
Packit Service a721b1
  /***ja 0 でなければ、テキストの一部分を表示する際に、前後のテキストのうちその表示領域に侵入する部分も表示する。
Packit Service a721b1
      たとえば、タイ語テキスト 子音-母音-子音 
Packit Service a721b1
      というシークエンスのいくつかは、母音が二つの子音の間に上にのるように描かれる。
Packit Service a721b1
      このようなシークエンスがすでに描かれており、最後の子音だけを描き直す場合
Packit Service a721b1
      (たとえば、カーソル位置を更新する際など)このメンバが 0 
Packit Service a721b1
      であれば、母音の右半分が消されてしまう。これを 0 以外にすることによって、そのような際にも
Packit Service a721b1
      子音-母音-子音 のシークエンスを正しく表示し続けることができる。  */
Packit Service a721b1
  int partial_update;
Packit Service a721b1
Packit Service a721b1
  /***en If nonzero, don't cache the result of any drawing information
Packit Service a721b1
      of an M-text.  */
Packit Service a721b1
  /***ja 0 でなければ、M-text の表示に関する情報をキャッシュしない。
Packit Service a721b1
       */
Packit Service a721b1
  int disable_caching;
Packit Service a721b1
Packit Service a721b1
  /***en If non-NULL, limit the drawing effect to the specified region.  */
Packit Service a721b1
  /***ja NULL でなければ表示エリアを指定された領域に限定する。 */
Packit Service a721b1
  MDrawRegion clip_region;
Packit Service a721b1
Packit Service a721b1
} MDrawControl;
Packit Service a721b1
Packit Service a721b1
extern int mdraw_line_break_option;
Packit Service a721b1
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
/*** @ingroup m17nDraw */
Packit Service a721b1
/***en
Packit Service a721b1
    @brief Type of metric for glyphs and texts.
Packit Service a721b1
Packit Service a721b1
    The type #MDrawMetric is for a metric of a glyph and a drawn text.
Packit Service a721b1
    It is also used to represent a rectangle area of a graphic
Packit Service a721b1
    device.  */
Packit Service a721b1
/***ja
Packit Service a721b1
    @brief グリフとテキストの寸法の型宣言.
Packit Service a721b1
Packit Service a721b1
    #MDrawMetric はグリフと表示されたテキストの寸法用の型である。
Packit Service a721b1
    また、表示デバイスの矩形領域を表すのにも用いられる。 */
Packit Service a721b1
Packit Service a721b1
typedef struct {
Packit Service a721b1
  /*** X coordinates of a glyph or a text.  */
Packit Service a721b1
  int x;
Packit Service a721b1
  /*** Y coordinates of a glyph or a text.  */
Packit Service a721b1
  int y;
Packit Service a721b1
  /*** Pixel width of a glyph or a text.  */
Packit Service a721b1
  unsigned int width;
Packit Service a721b1
  /*** Pixel height of a glyph or a text.  */
Packit Service a721b1
  unsigned int height;
Packit Service a721b1
} MDrawMetric;
Packit Service a721b1
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
/*** @ingroup m17nDraw */
Packit Service a721b1
/***en
Packit Service a721b1
    @brief Type of information about a glyph.
Packit Service a721b1
Packit Service a721b1
    The type #MDrawGlyphInfo is the structure that contains
Packit Service a721b1
    information about a glyph.  It is used by mdraw_glyph_info ().  */
Packit Service a721b1
/***ja
Packit Service a721b1
    @brief グリフに関する情報の型宣言.
Packit Service a721b1
Packit Service a721b1
    #MDrawGlyphInfo 型はグリフに関する情報を含む構造体である。
Packit Service a721b1
    mdraw_glyph_info () はこれを用いる。  */
Packit Service a721b1
Packit Service a721b1
typedef struct
Packit Service a721b1
{
Packit Service a721b1
  /***en Start position of character range corresponding to the glyph.  */
Packit Service a721b1
  /***ja グリフに対応する文字の範囲の開始位置.  */
Packit Service a721b1
  int from;
Packit Service a721b1
Packit Service a721b1
  /***en End position of character range corresponding to the glyph.  */
Packit Service a721b1
  /***ja グリフに対応する文字の範囲の終了位置.  */
Packit Service a721b1
  int to;
Packit Service a721b1
Packit Service a721b1
  /***en Start position of character range corresponding to the line of the glyph.  */
Packit Service a721b1
  /***ja 一行のグリフの列に対応する文字の範囲の開始位置.  */
Packit Service a721b1
  int line_from;
Packit Service a721b1
  /***en End position of character range corresponding to the line of the glyph.  */
Packit Service a721b1
  /***ja 一行のグリフの列に対応する文字の範囲の終了位置.  */
Packit Service a721b1
  int line_to;
Packit Service a721b1
Packit Service a721b1
  /***en X coordinates of the glyph.  */
Packit Service a721b1
  /***ja グリフの X 座標.  */
Packit Service a721b1
  int x;
Packit Service a721b1
  /***en Y coordinates of the glyph.  */
Packit Service a721b1
  /***ja グリフの Y 座標.  */
Packit Service a721b1
  int y;
Packit Service a721b1
Packit Service a721b1
  /***en Metric of the glyph.  */
Packit Service a721b1
  /***ja グリフの寸法.  */
Packit Service a721b1
  MDrawMetric metrics;
Packit Service a721b1
Packit Service a721b1
  /***en Font used for the glyph.  Set to NULL if no font is found for
Packit Service a721b1
      the glyph.  */
Packit Service a721b1
  /***ja グリフに使われるフォント。見つからなければ NULL。 */
Packit Service a721b1
      
Packit Service a721b1
  MFont *font;
Packit Service a721b1
Packit Service a721b1
  /***en Character ranges corresponding to logically previous glyphs.
Packit Service a721b1
      Note that we do not need the members prev_to because it must
Packit Service a721b1
      be the same as the member \<from\>.  */
Packit Service a721b1
  /***ja 論理的な前のグリフに対応する文字の範囲。メンバ prev_to は、メ
Packit Service a721b1
      ンバ from と同じであるはずなので不要である。  */
Packit Service a721b1
  int prev_from;
Packit Service a721b1
  /***en Character ranges corresponding to logically next glyphs.
Packit Service a721b1
      Note that we do not need the members next_from because it must
Packit Service a721b1
      be the same as the member \<to\> respectively.  */
Packit Service a721b1
  /***ja 論理的な後のグリフに対応する文字の範囲。メンバ next_from は
Packit Service a721b1
      メンバ to と同じであるはずなので不要である。  */
Packit Service a721b1
  int next_to;
Packit Service a721b1
Packit Service a721b1
  /***en Start position of character ranges corresponding to visually
Packit Service a721b1
      left glyphs. */
Packit Service a721b1
  /***ja 表示上の左のグリフに対応する文字の範囲の開始位置。  */
Packit Service a721b1
  int left_from;
Packit Service a721b1
  /***en End position of character ranges corresponding to visually
Packit Service a721b1
      left glyphs. */
Packit Service a721b1
  /***ja 表示上の左のグリフに対応する文字の範囲の終了位置。  */
Packit Service a721b1
  int left_to;
Packit Service a721b1
  /***en Start position of character ranges corresponding to visually
Packit Service a721b1
      right glyphs. */
Packit Service a721b1
  /***ja 表示上の右のグリフに対応する文字の範囲の開始位置。  */
Packit Service a721b1
  int right_from;
Packit Service a721b1
  /***en End position of character ranges corresponding to visually
Packit Service a721b1
      left glyphs. */
Packit Service a721b1
  /***ja 表示上の右のグリフに対応する文字の範囲の終了位置。  */
Packit Service a721b1
  int right_to;
Packit Service a721b1
Packit Service a721b1
  /***en Logical width of the glyph.  Nominal distance to the next
Packit Service a721b1
      glyph.  */
Packit Service a721b1
  /***ja グリフの論理的幅。次のグリフとの名目上の距離。  */
Packit Service a721b1
  int logical_width;
Packit Service a721b1
} MDrawGlyphInfo;
Packit Service a721b1
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
/*** @ingroup m17nDraw */
Packit Service a721b1
/***en
Packit Service a721b1
    @brief Type of information about a glyph metric and font.
Packit Service a721b1
Packit Service a721b1
    The type #MDrawGlyph is the structure that contains information
Packit Service a721b1
    about a glyph metric and font.  It is used by the function
Packit Service a721b1
    mdraw_glyph_list ().  */
Packit Service a721b1
/***ja
Packit Service a721b1
    @brief グリフの寸法とフォントに関する情報の型宣言.
Packit Service a721b1
Packit Service a721b1
    #MDrawGlyph 型はグリフの寸法とフォントに関する情報を含む構造体である。
Packit Service a721b1
    mdraw_glyph_list () はこれを用いる。  */
Packit Service a721b1
Packit Service a721b1
typedef struct
Packit Service a721b1
{
Packit Service a721b1
  /* @{ */
Packit Service a721b1
  /***en Character range corresponding to the glyph.  */
Packit Service a721b1
  /***ja グリフに対応する文字の範囲.  */
Packit Service a721b1
  int from, to;
Packit Service a721b1
  /* @} */
Packit Service a721b1
Packit Service a721b1
  /***en Font glyph code of the glyph.  */
Packit Service a721b1
  /***ja フォント内のグリフコード。  */
Packit Service a721b1
  int glyph_code;
Packit Service a721b1
Packit Service a721b1
  /***en Logical width of the glyph.  Nominal distance to the next
Packit Service a721b1
      glyph.  */
Packit Service a721b1
  /***ja グリフの論理的幅。次のグリフとの名目上の距離。  */
Packit Service a721b1
  int x_advance;
Packit Service a721b1
  /***en Logical height of the glyph.  Nominal distance to the next
Packit Service a721b1
      glyph.  */
Packit Service a721b1
  /***ja グリフの論理的高さ。次のグリフとの名目上の距離。  */
Packit Service a721b1
  int y_advance;
Packit Service a721b1
Packit Service a721b1
  /***en X offset relative to the glyph position.  */
Packit Service a721b1
  /***ja グリフの位置に対する X オフセット.  */
Packit Service a721b1
  int x_off;
Packit Service a721b1
  /***en Y offset relative to the glyph position.  */
Packit Service a721b1
  /***ja グリフの位置に対する Y オフセット.  */
Packit Service a721b1
  int y_off;
Packit Service a721b1
Packit Service a721b1
  /***en Metric of the glyph (left-bearing).  */
Packit Service a721b1
  /***ja グリフの寸法 (left-bearing).  */
Packit Service a721b1
  int lbearing;
Packit Service a721b1
  /***en Metric of the glyph (right-bearing).  */
Packit Service a721b1
  /***ja グリフの寸法 (right-bearing).  */
Packit Service a721b1
  int rbearing;
Packit Service a721b1
  /***en Metric of the glyph (ascent).  */
Packit Service a721b1
  /***ja グリフの寸法 (ascent).  */
Packit Service a721b1
  int ascent;
Packit Service a721b1
  /***en Metric of the glyph (descent).  */
Packit Service a721b1
  /***ja グリフの寸法 (descent).  */
Packit Service a721b1
  int descent;
Packit Service a721b1
Packit Service a721b1
  /***en Font used for the glyph.  Set to NULL if no font is found for
Packit Service a721b1
      the glyph.  */
Packit Service a721b1
  /***ja グリフに使われるフォント。見つからなければ NULL。  */
Packit Service a721b1
  MFont *font;
Packit Service a721b1
Packit Service a721b1
  /***en Type of the font.  One of Mx, Mfreetype, Mxft.  */
Packit Service a721b1
  /***ja フォントのタイプ。Mx、Mfreetype、Mxft のいずれか。  */
Packit Service a721b1
  MSymbol font_type;
Packit Service a721b1
Packit Service a721b1
  /***en Pointer to the font structure.  The actual type is
Packit Service a721b1
      (XFontStruct *) if \<font_type\> member is Mx, FT_Face if
Packit Service a721b1
      \<font_type\> member is Mfreetype, and (XftFont *) if \<font_type\>
Packit Service a721b1
      member is Mxft.  */
Packit Service a721b1
  /***ja フォントの構造体へのポインタ。実際の型は \<font_type\> メンバが
Packit Service a721b1
      Mx なら (XFontStruct *)、 Mfreetype なら FT_Face、Mxft 
Packit Service a721b1
      なら (XftFont *)。 */
Packit Service a721b1
  void *fontp;
Packit Service a721b1
Packit Service a721b1
} MDrawGlyph;
Packit Service a721b1
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
/***en
Packit Service a721b1
    @brief Type of textitems.
Packit Service a721b1
Packit Service a721b1
    The type #MDrawTextItem is for @e textitem objects.
Packit Service a721b1
    Each textitem contains an M-text and some other information to
Packit Service a721b1
    control the drawing of the M-text.  */
Packit Service a721b1
Packit Service a721b1
/***ja
Packit Service a721b1
    @brief textitem の型宣言.
Packit Service a721b1
Packit Service a721b1
    #MDrawTextItem は @e テキストアイテム オブジェクト用の型である。
Packit Service a721b1
    各テキストアイテムは、 1 個の M-text と、その表示を制御するための情報を含んでいる。
Packit Service a721b1
Packit Service a721b1
    @latexonly \IPAlabel{MTextItem} @endlatexonly  */
Packit Service a721b1
Packit Service a721b1
typedef struct
Packit Service a721b1
{
Packit Service a721b1
  /***en M-text. */
Packit Service a721b1
  /***ja M-text. */
Packit Service a721b1
  MText *mt;                      
Packit Service a721b1
Packit Service a721b1
  /***en Optional change in the position (in the unit of pixel) along
Packit Service a721b1
      the X-axis before the M-text is drawn.  */
Packit Service a721b1
  /***ja M-text 表示前に行なうX軸方向の位置調整 (ピクセル単位) */
Packit Service a721b1
  int delta;                     
Packit Service a721b1
Packit Service a721b1
  /***en Pointer to a face object.  Each property of the face, if not
Packit Service a721b1
      Mnil, overrides the same property of face(s) specified as a text
Packit Service a721b1
      property in \<mt\>.  */
Packit Service a721b1
  /***ja フェースオブジェクトへのポインタ。フェースの各プロパティは 
Packit Service a721b1
      Mnil でなければ \<mt\> で指定されたフェースの同じプロパティに優先する*/
Packit Service a721b1
  MFace *face;
Packit Service a721b1
Packit Service a721b1
  /***en Pointer to a draw control object.  The M-text \<mt\> is drawn
Packit Service a721b1
      by mdraw_text_with_control () with this control object.  */
Packit Service a721b1
  /***ja 表示制御オブジェクトへのポインタ。 mdraw_text_with_control () 
Packit Service a721b1
      はこのオブジェクトを用いて M-text \<mt\> を表示する。  */
Packit Service a721b1
  MDrawControl *control;
Packit Service a721b1
Packit Service a721b1
} MDrawTextItem;
Packit Service a721b1
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
extern int mdraw_text (MFrame *frame, MDrawWindow win, int x, int y,
Packit Service a721b1
		       MText *mt, int from, int to);
Packit Service a721b1
Packit Service a721b1
extern int mdraw_image_text (MFrame *frame, MDrawWindow win, int x, int y,
Packit Service a721b1
			     MText *mt, int from, int to);
Packit Service a721b1
Packit Service a721b1
extern int mdraw_text_with_control (MFrame *frame, MDrawWindow win,
Packit Service a721b1
				    int x, int y, MText *mt, int from, int to,
Packit Service a721b1
				    MDrawControl *control);
Packit Service a721b1
Packit Service a721b1
extern int mdraw_coordinates_position (MFrame *frame,
Packit Service a721b1
				       MText *mt, int from, int to,
Packit Service a721b1
				       int x, int y, MDrawControl *control);
Packit Service a721b1
Packit Service a721b1
extern int mdraw_text_extents (MFrame *frame,
Packit Service a721b1
			       MText *mt, int from, int to,
Packit Service a721b1
			       MDrawControl *control,
Packit Service a721b1
			       MDrawMetric *overall_ink_return,
Packit Service a721b1
			       MDrawMetric *overall_logical_return,
Packit Service a721b1
			       MDrawMetric *overall_line_return);
Packit Service a721b1
Packit Service a721b1
extern int mdraw_text_per_char_extents (MFrame *frame,
Packit Service a721b1
					MText *mt, int from, int to,
Packit Service a721b1
					MDrawControl *control,
Packit Service a721b1
					MDrawMetric *ink_array_return,
Packit Service a721b1
					MDrawMetric *logical_array_return,
Packit Service a721b1
					int array_size,
Packit Service a721b1
					int *num_chars_return,
Packit Service a721b1
					MDrawMetric *overall_ink_return,
Packit Service a721b1
					MDrawMetric *overall_logical_return);
Packit Service a721b1
Packit Service a721b1
extern int mdraw_glyph_info (MFrame *frame, MText *mt, int from, int pos,
Packit Service a721b1
			     MDrawControl *control, MDrawGlyphInfo *info);
Packit Service a721b1
Packit Service a721b1
extern int mdraw_glyph_list (MFrame *frame, MText *mt, int from, int to,
Packit Service a721b1
			     MDrawControl *control, MDrawGlyph *glyphs,
Packit Service a721b1
			     int array_size, int *num_glyphs_return);
Packit Service a721b1
Packit Service a721b1
extern void mdraw_text_items (MFrame *frame, MDrawWindow win, int x, int y,
Packit Service a721b1
			      MDrawTextItem *items, int nitems);
Packit Service a721b1
Packit Service a721b1
extern void mdraw_per_char_extents (MFrame *frame, MText *mt,
Packit Service a721b1
				    MDrawMetric *array_return,
Packit Service a721b1
				    MDrawMetric *overall_return);
Packit Service a721b1
Packit Service a721b1
extern int mdraw_default_line_break (MText *mt, int pos,
Packit Service a721b1
				     int from, int to, int line, int y);
Packit Service a721b1
Packit Service a721b1
extern void mdraw_clear_cache (MText *mt);
Packit Service a721b1
Packit Service a721b1
/* end of drawing module */
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
/*** @ingroup m17nGUI */
Packit Service a721b1
/***en @defgroup m17nInputMethodWin Input Method (GUI) */
Packit Service a721b1
/***ja @defgroup m17nInputMethodWin 入力メソッド (GUI) */
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
extern MInputDriver minput_gui_driver;
Packit Service a721b1
Packit Service a721b1
/*=*/
Packit Service a721b1
/*** @ingroup m17nInputMethodWin */
Packit Service a721b1
/***en 
Packit Service a721b1
    @brief Type of the argument to the function minput_create_ic ().
Packit Service a721b1
Packit Service a721b1
    The type #MInputGUIArgIC is for the argument $ARG of the function
Packit Service a721b1
    minput_create_ic () to create an input context of an internal
Packit Service a721b1
    input method.  */
Packit Service a721b1
Packit Service a721b1
/***ja
Packit Service a721b1
    @brief 関数 minput_create_ic () の引数の型宣言.
Packit Service a721b1
Packit Service a721b1
    #MInputGUIArgIC は、関数 minput_create_ic () 
Packit Service a721b1
    が内部入力メソッドの入力コンテクストを生成する際の、引数 $ARG 用の型である。  */
Packit Service a721b1
Packit Service a721b1
typedef struct
Packit Service a721b1
{
Packit Service a721b1
  /***en Frame of the client.  */
Packit Service a721b1
  /***ja クライアントのフレーム  */
Packit Service a721b1
  MFrame *frame;
Packit Service a721b1
Packit Service a721b1
  /***en Window on which to display the preedit and status text.  */
Packit Service a721b1
  /***ja preedit テキストと status テキストを表示するウィンドウ  */
Packit Service a721b1
  MDrawWindow client;
Packit Service a721b1
Packit Service a721b1
  /***en Window that the input context has a focus on.  */
Packit Service a721b1
  /***ja 入力コンテクストがフォーカスをおいているウィンドウ  */
Packit Service a721b1
  MDrawWindow focus;
Packit Service a721b1
} MInputGUIArgIC;
Packit Service a721b1
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
extern MSymbol minput_event_to_key (MFrame *frame, void *event);
Packit Service a721b1
Packit Service a721b1
/* end of input module */
Packit Service a721b1
/*=*/
Packit Service a721b1
/* end of window modules */
Packit Service a721b1
/*=*/
Packit Service a721b1
Packit Service a721b1
extern MFace *mdebug_dump_face (MFace *face, int indent);
Packit Service a721b1
extern MFont *mdebug_dump_font (MFont *font);
Packit Service a721b1
extern MFontset *mdebug_dump_fontset (MFontset *fontset, int indent);
Packit Service a721b1
Packit Service a721b1
M17N_END_HEADER
Packit Service a721b1
Packit Service a721b1
#endif /* _M17N_GUI_H_ */
Packit Service a721b1
Packit Service a721b1
/*
Packit Service a721b1
  Local Variables:
Packit Service a721b1
  coding: euc-japan
Packit Service a721b1
  End:
Packit Service a721b1
*/