Removed CURON/CUROFF constants. Use a boolean instead.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22042 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -125,7 +125,7 @@ TermParse::GetReaderBuf(uchar &c)
|
|||||||
fView->UpdateLine();
|
fView->UpdateLine();
|
||||||
|
|
||||||
// Reset cursor blinking time and turn on cursor blinking.
|
// Reset cursor blinking time and turn on cursor blinking.
|
||||||
fView->SetCurDraw(CURON);
|
fView->SetCurDraw(true);
|
||||||
|
|
||||||
// wait new input from pty.
|
// wait new input from pty.
|
||||||
do {
|
do {
|
||||||
@@ -146,7 +146,7 @@ TermParse::GetReaderBuf(uchar &c)
|
|||||||
release_sem(fReaderLocker);
|
release_sem(fReaderLocker);
|
||||||
}
|
}
|
||||||
|
|
||||||
fView->SetCurDraw(CUROFF);
|
fView->SetCurDraw(false);
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -144,10 +144,10 @@ TermView::TermView(BRect frame, int32 argc, const char **argv, int32 historySize
|
|||||||
fScrollBarRange(0),
|
fScrollBarRange(0),
|
||||||
fFrameResized(false),
|
fFrameResized(false),
|
||||||
fLastCursorTime(0),
|
fLastCursorTime(0),
|
||||||
fCursorDrawFlag(CURON),
|
fCursorDrawFlag(true),
|
||||||
fCursorStatus(CURON),
|
fCursorStatus(true),
|
||||||
fCursorBlinkingFlag(CURON),
|
fCursorBlinkingFlag(true),
|
||||||
fCursorRedrawFlag(CURON),
|
fCursorRedrawFlag(true),
|
||||||
fCursorHeight(0),
|
fCursorHeight(0),
|
||||||
fCurPos(0, 0),
|
fCurPos(0, 0),
|
||||||
fCurStack(0, 0),
|
fCurStack(0, 0),
|
||||||
@@ -193,10 +193,10 @@ TermView::TermView(int rows, int columns, int32 argc, const char **argv, int32 h
|
|||||||
fScrollBarRange(0),
|
fScrollBarRange(0),
|
||||||
fFrameResized(false),
|
fFrameResized(false),
|
||||||
fLastCursorTime(0),
|
fLastCursorTime(0),
|
||||||
fCursorDrawFlag(CURON),
|
fCursorDrawFlag(true),
|
||||||
fCursorStatus(CURON),
|
fCursorStatus(true),
|
||||||
fCursorBlinkingFlag(CURON),
|
fCursorBlinkingFlag(true),
|
||||||
fCursorRedrawFlag(CURON),
|
fCursorRedrawFlag(true),
|
||||||
fCursorHeight(0),
|
fCursorHeight(0),
|
||||||
fCurPos(0, 0),
|
fCurPos(0, 0),
|
||||||
fCurStack(0, 0),
|
fCurStack(0, 0),
|
||||||
@@ -243,10 +243,10 @@ TermView::TermView(BMessage *archive)
|
|||||||
fScrollBarRange(0),
|
fScrollBarRange(0),
|
||||||
fFrameResized(false),
|
fFrameResized(false),
|
||||||
fLastCursorTime(0),
|
fLastCursorTime(0),
|
||||||
fCursorDrawFlag(CURON),
|
fCursorDrawFlag(true),
|
||||||
fCursorStatus(CURON),
|
fCursorStatus(true),
|
||||||
fCursorBlinkingFlag(CURON),
|
fCursorBlinkingFlag(true),
|
||||||
fCursorRedrawFlag(CURON),
|
fCursorRedrawFlag(true),
|
||||||
fCursorHeight(0),
|
fCursorHeight(0),
|
||||||
fCurPos(0, 0),
|
fCurPos(0, 0),
|
||||||
fCurStack(0, 0),
|
fCurStack(0, 0),
|
||||||
@@ -1006,15 +1006,15 @@ TermView::DrawCursor()
|
|||||||
void
|
void
|
||||||
TermView::BlinkCursor()
|
TermView::BlinkCursor()
|
||||||
{
|
{
|
||||||
if (fCursorDrawFlag == CURON
|
if (fCursorDrawFlag
|
||||||
&& fCursorBlinkingFlag == CURON
|
&& fCursorBlinkingFlag
|
||||||
&& Window()->IsActive()) {
|
&& Window()->IsActive()) {
|
||||||
if (fCursorStatus == CURON)
|
if (fCursorStatus)
|
||||||
_TermDraw(fCurPos, fCurPos);
|
_TermDraw(fCurPos, fCurPos);
|
||||||
else
|
else
|
||||||
DrawCursor();
|
DrawCursor();
|
||||||
|
|
||||||
fCursorStatus = fCursorStatus == CURON ? CUROFF : CURON;
|
fCursorStatus = !fCursorStatus;
|
||||||
fLastCursorTime = system_time();
|
fLastCursorTime = system_time();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1024,16 +1024,16 @@ TermView::BlinkCursor()
|
|||||||
void
|
void
|
||||||
TermView::SetCurDraw(bool flag)
|
TermView::SetCurDraw(bool flag)
|
||||||
{
|
{
|
||||||
if (flag == CUROFF) {
|
if (!flag) {
|
||||||
if (fCursorStatus == CURON)
|
if (fCursorStatus)
|
||||||
_TermDraw(fCurPos, fCurPos);
|
_TermDraw(fCurPos, fCurPos);
|
||||||
|
|
||||||
fCursorStatus = CUROFF;
|
fCursorStatus = false;
|
||||||
fCursorDrawFlag = CUROFF;
|
fCursorDrawFlag = false;
|
||||||
} else {
|
} else {
|
||||||
if (fCursorDrawFlag == CUROFF) {
|
if (!fCursorDrawFlag) {
|
||||||
fCursorDrawFlag = CURON;
|
fCursorDrawFlag = true;
|
||||||
fCursorStatus = CURON;
|
fCursorStatus = true;
|
||||||
|
|
||||||
if (LockLooper()) {
|
if (LockLooper()) {
|
||||||
DrawCursor();
|
DrawCursor();
|
||||||
@@ -1561,7 +1561,7 @@ TermView::Draw(BRect updateRect)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fCursorStatus == CURON)
|
if (fCursorStatus)
|
||||||
DrawCursor();
|
DrawCursor();
|
||||||
|
|
||||||
Window()->EndViewTransaction();
|
Window()->EndViewTransaction();
|
||||||
|
|||||||
@@ -19,10 +19,6 @@
|
|||||||
#include <String.h>
|
#include <String.h>
|
||||||
#include <View.h>
|
#include <View.h>
|
||||||
|
|
||||||
/* Cursor Blinking flag */
|
|
||||||
#define CUROFF 0
|
|
||||||
#define CURON 1
|
|
||||||
|
|
||||||
|
|
||||||
class BClipboard;
|
class BClipboard;
|
||||||
class BMessageRunner;
|
class BMessageRunner;
|
||||||
|
|||||||
Reference in New Issue
Block a user