Hello! You can get a character cell's pair number via PAIR_NUMBER(winch(w)), but only if you stay within pair number 0-255.
Did I understand correctly, that the only way to do that
for higher pair numbers is using the wide-character API?
So for instance:
cchar_t wch;
wchar_t wc[CCHARW_MAX];
attr_t attrs = WA_NORMAL;
short pair = 0;
if (win_wch(win, &wch) == OK)
getcchar(&wch, wc, &attrs, &pair, NULL);
Whereas CCHARW_MAX is ncurses-specific, but 5 is probably
a safe value even on PDCurses.
>From this follows that you must depend on wide-char APIs
if you need this functionality even if not actually using
wide-chars.
It's relevant because I believe there are still non-wide-char
builds of ncurses in the wild.
Yours sincerely,
Robin Haberkorn
--
@ii._._.*.._+__.+_+.+...+.+.++..+*+.+._.+...*_*.*.__+__._._.++..+_*.++__+__
.+_..*...+.+_+__.+._.+...*_+_+__._ ...*_ +.+._.+.._+*+_+__._._ .+_..+.+***_
. *_+_+__.+.*.++..+_+.*.__+_ _.+...*_*_+__.++*.+...++..+* +.+.._+__._+_.+..
.++..+*_.*...+*+.+.*_ +*+i2^rj.u#__%uu#_.%uu#_+%uu#_*!+!0a"t1010^t^c^c'0a^#
1010"=d'0a-100000"=d'0auuqq*100+q[_^euu]uq-rq:^/100@oo,+,+,+oqq^t0uq@o*+*!!
signature.asc
Description: PGP signature
