SLsmg_Char_Type 是否代表屏幕的字节数?
Does SLsmg_Char_Type represent bytes of the screen?
谁用过S-lang
库-系统是怎么用这个结构的?屏幕的每个字节是否都由这个结构表示?我使用库 newt
,最后一个使用 S-lang
。
typedef struct
{
unsigned int nchars;
SLwchar_Type wchars[SLSMG_MAX_CHARS_PER_CELL];
SLsmg_Color_Type color;
} SLsmg_Char_Type;
屏幕的每个 单元格 (不是 "byte")由 SLsmg_Char_Type
表示。
- A "cell" 是给定行和列的数据。
- 一个"byte"通常是8位(比这个结构小很多)。
SLsmg_char_at 的文档是这样说的:
int SLsmg_char_at(SLsmg_Char_Type *ch);
Returns the character and its attributes at the current
position. The SLsmg_Char_Type object is a structure
representing the character cell:
#define SLSMG_MAX_CHARS_PER_CELL 5
typedef struct
{
unsigned int nchars;
SLwchar_Type wchars[SLSMG_MAX_CHARS_PER_CELL];
SLsmg_Color_Type color;
}
SLsmg_Char_Type;
谁用过S-lang
库-系统是怎么用这个结构的?屏幕的每个字节是否都由这个结构表示?我使用库 newt
,最后一个使用 S-lang
。
typedef struct
{
unsigned int nchars;
SLwchar_Type wchars[SLSMG_MAX_CHARS_PER_CELL];
SLsmg_Color_Type color;
} SLsmg_Char_Type;
屏幕的每个 单元格 (不是 "byte")由 SLsmg_Char_Type
表示。
- A "cell" 是给定行和列的数据。
- 一个"byte"通常是8位(比这个结构小很多)。
SLsmg_char_at 的文档是这样说的:
int SLsmg_char_at(SLsmg_Char_Type *ch);
Returns the character and its attributes at the current
position. The SLsmg_Char_Type object is a structure
representing the character cell:
#define SLSMG_MAX_CHARS_PER_CELL 5
typedef struct
{
unsigned int nchars;
SLwchar_Type wchars[SLSMG_MAX_CHARS_PER_CELL];
SLsmg_Color_Type color;
}
SLsmg_Char_Type;