curs_getcchar(3x) curs_getcchar(3x)
getcchar, setcchar - Get a wide character string and ren-
dition from a cchar_t or set a cchar_t from a wide-charac-
ter string
- cchar_t 値からワイド文字列と表示様式を取得する、
ワイド文字列から cchar_t 値をセットする
#include <curses.h>
int getcchar(
const cchar_t *wcval,
wchar_t *wch,
attr_t *attrs,
short *color_pair,
void *opts );
int setcchar(
cchar_t *wcval,
const wchar_t *wch,
const attr_t attrs,
short color_pair,
void *opts );
The getcchar function gets a wide-character string and
rendition from a cchar_t argument. When wch is not a null
pointer, the getcchar function does the following:
getcchar 関数は cchar_t 型引数からワイド文字列と表示様式を
取得します。
wch がヌルポインタでない場合、 getcchar 関数は次の
動作をします。
o Extracts information from a cchar_t value wcval
cchar_t 値 wcval から情報を引き出す
o Stores the character attributes in the location
pointed to by attrs
attrs の指す領域に文字の属性を格納する
o Stores the color-pair in the location pointed to by
color_pair
color_pair の指す領域に色のペアを格納する
o Stores the wide-character string, characters refer-
enced by wcval, into the array pointed to by wch.
wch の指す配列に wcval から参照される文字である
ワイド文字列を格納する
When wch is a null pointer, the getcchar function does the
following:
wch がヌルポインタの場合、 getcchar 関数は次の動作をします。
o Obtains the number of wide characters pointed to by
wcval
wcval の指すワイド文字の数を取得する
o Does not change the data referenced by attrs or
color_pair
attrs や color_pair の指すデータは変化させない
The setcchar function initializes the location pointed to
by wcval by using:
setcchar 関数は wcval の指す領域を以下を用いて初期化します。
o The character attributes in attrs
attrs にある文字属性
o The color pair in color_pair
color_pair にある色のペア
o The wide-character string pointed to by wch. The
string must be L'\0' terminated, contain at most one
spacing character, which must be the first.
wch の指すワイド文字列。文字列は L'\0' で終端され、
多くとも 1 つのスペーシング文字を、あれば先頭に含む必要が
あります。
Up to CCHARW_MAX-1 nonspacing characters may follow.
Additional nonspacing characters are ignored.
これに CCHARW_MAX-1 個までの非スペーシング文字を
続けることができます。
付加的な非スペーシング文字は無視されます。
The string may contain a single control character
instead. In that case, no nonspacing characters are
allowed.
文字列は上記の代わりに単一の制御文字を含むことができます。
その場合、非スペーシング文字を含むことは許されません。
The opts argument is reserved for future use. Currently,
an application must provide a null pointer as opts.
引数 opts は将来のために予約されています。
現在は、 opts としてヌルポインタを与えなければなりません。
The wcval argument may be a value generated by a call to
setcchar or by a function that has a cchar_t output argu-
ment. If wcval is constructed by any other means, the
effect is unspecified.
引数 wcval は setcchar 呼び出しまたは cchar_t 型の
出力引数を持つ関数で生成された値を指定できます。
他の方法で生成された wcval の場合、結果は不定です。
When wch is a null pointer, getcchar returns the number of
wide characters referenced by wcval, including one for a
trailing null.
getcchar は wch がヌルポインタの場合、 wcval から参照される
ワイド文字の数を返します。終端のヌルも 1 つと数えます。
When wch is not a null pointer, getcchar returns OK upon
successful completion, and ERR otherwise.
getcchar は wch がヌルポインタでない場合、
正常終了のとき OK を、そうでないとき ERR を返します。
Upon successful completion, setcchar returns OK. Other-
wise, it returns ERR.
setcchar は正常終了の場合に OK を、そうでない場合に ERR を
返します。
Functions 関数:
curs_attr(3x), curs_color(3x), curses(3x),
wcwidth(3).
curs_getcchar(3x)