Enlarge attributes to 32 bit instead of 16. This prepares 256-color support for terminal.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38089 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
3614af01cd
commit
6100b6aa33
@ -267,7 +267,7 @@ BasicTerminalBuffer::IsFullWidthChar(int32 row, int32 column) const
|
||||
|
||||
int
|
||||
BasicTerminalBuffer::GetChar(int32 row, int32 column, UTF8Char& character,
|
||||
uint16& attributes) const
|
||||
uint32& attributes) const
|
||||
{
|
||||
TerminalLine* lineBuffer = ALLOC_LINE_ON_STACK(fWidth);
|
||||
TerminalLine* line = _HistoryLineAt(row, lineBuffer);
|
||||
@ -289,7 +289,7 @@ BasicTerminalBuffer::GetChar(int32 row, int32 column, UTF8Char& character,
|
||||
|
||||
int32
|
||||
BasicTerminalBuffer::GetString(int32 row, int32 firstColumn, int32 lastColumn,
|
||||
char* buffer, uint16& attributes) const
|
||||
char* buffer, uint32& attributes) const
|
||||
{
|
||||
TerminalLine* lineBuffer = ALLOC_LINE_ON_STACK(fWidth);
|
||||
TerminalLine* line = _HistoryLineAt(row, lineBuffer);
|
||||
|
@ -77,10 +77,10 @@ public:
|
||||
bool IsFullWidthChar(int32 row, int32 column) const;
|
||||
int GetChar(int32 row, int32 column,
|
||||
UTF8Char& character,
|
||||
uint16& attributes) const;
|
||||
uint32& attributes) const;
|
||||
int32 GetString(int32 row, int32 firstColumn,
|
||||
int32 lastColumn, char* buffer,
|
||||
uint16& attributes) const;
|
||||
uint32& attributes) const;
|
||||
void GetStringFromRegion(BString& string,
|
||||
const TermPos& start,
|
||||
const TermPos& end) const;
|
||||
|
@ -183,9 +183,9 @@ enum{
|
||||
#define FONT 0x0100
|
||||
#define RESERVE 0x0080
|
||||
#define DUMPCR 0x0040
|
||||
#define FORECOLOR 0x0038
|
||||
#define BACKCOLOR 0x0007
|
||||
#define CHAR_ATTRIBUTES 0x773f
|
||||
#define FORECOLOR 0xFF0000
|
||||
#define BACKCOLOR 0xFF000000
|
||||
#define CHAR_ATTRIBUTES 0xFFFF7700
|
||||
|
||||
#define IS_WIDTH(x) (((x) & A_WIDTH) )
|
||||
#define IS_BOLD(x) (((x) & BOLD) )
|
||||
@ -196,11 +196,11 @@ enum{
|
||||
#define IS_BACKSET(x) (((x) & BACKSET) )
|
||||
#define IS_FONT(x) (((x) & FONT) )
|
||||
#define IS_CR(x) (((x) & DUMPCR) )
|
||||
#define IS_FORECOLOR(x) (((x) & FORECOLOR) >> 3)
|
||||
#define IS_BACKCOLOR(x) (((x) & BACKCOLOR) )
|
||||
#define IS_FORECOLOR(x) (((x) & FORECOLOR) >> 16)
|
||||
#define IS_BACKCOLOR(x) (((x) & BACKCOLOR) >> 24)
|
||||
|
||||
#define FORECOLORED(x) ((x) << 3)
|
||||
#define BACKCOLORED(x) ((x) << 0)
|
||||
#define FORECOLORED(x) ((x) << 16)
|
||||
#define BACKCOLORED(x) ((x) << 24)
|
||||
|
||||
|
||||
#endif // TERMCONST_H_INCLUDED
|
||||
|
@ -84,8 +84,8 @@ private:
|
||||
|
||||
int fFd;
|
||||
|
||||
ushort fAttr;
|
||||
ushort fSavedAttr;
|
||||
uint32 fAttr;
|
||||
uint32 fSavedAttr;
|
||||
|
||||
thread_id fParseThread;
|
||||
thread_id fReaderThread;
|
||||
|
@ -849,7 +849,7 @@ TermView::_Deactivate()
|
||||
|
||||
//! Draw part of a line in the given view.
|
||||
void
|
||||
TermView::_DrawLinePart(int32 x1, int32 y1, uint16 attr, char *buf,
|
||||
TermView::_DrawLinePart(int32 x1, int32 y1, uint32 attr, char *buf,
|
||||
int32 width, bool mouse, bool cursor, BView *inView)
|
||||
{
|
||||
rgb_color rgb_fore = fTextForeColor, rgb_back = fTextBackColor;
|
||||
@ -926,7 +926,7 @@ TermView::_DrawCursor()
|
||||
int32 firstVisible = _LineAt(0);
|
||||
|
||||
UTF8Char character;
|
||||
uint16 attr;
|
||||
uint32 attr;
|
||||
|
||||
bool cursorVisible = _IsCursorVisible();
|
||||
|
||||
@ -1156,7 +1156,7 @@ TermView::Draw(BRect updateRect)
|
||||
for (int32 i = k; i <= x2;) {
|
||||
int32 lastColumn = x2;
|
||||
bool insideSelection = _CheckSelectedRegion(j, i, lastColumn);
|
||||
uint16 attr;
|
||||
uint32 attr;
|
||||
int32 count = fVisibleTextBuffer->GetString(j - firstVisible, i,
|
||||
lastColumn, buf, attr);
|
||||
|
||||
@ -1198,7 +1198,7 @@ void
|
||||
TermView::_DoPrint(BRect updateRect)
|
||||
{
|
||||
#if 0
|
||||
ushort attr;
|
||||
uint32 attr;
|
||||
uchar buf[1024];
|
||||
|
||||
const int numLines = (int)((updateRect.Height()) / fFontHeight);
|
||||
|
@ -139,7 +139,7 @@ private:
|
||||
void _Activate();
|
||||
void _Deactivate();
|
||||
|
||||
void _DrawLinePart(int32 x1, int32 y1, uint16 attr,
|
||||
void _DrawLinePart(int32 x1, int32 y1, uint32 attr,
|
||||
char* buffer, int32 width, bool mouse,
|
||||
bool cursor, BView* inView);
|
||||
void _DrawCursor();
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
struct TerminalCell {
|
||||
UTF8Char character;
|
||||
uint16 attributes;
|
||||
uint32 attributes;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user