Updated DispCount handling

This commit is contained in:
Paul Tucker
2000-03-25 14:42:48 +00:00
parent 0b51f81520
commit 2d0e5ab9c0
3 changed files with 14 additions and 2 deletions

View File

@@ -158,6 +158,7 @@ extern void hb_gt_GetText( USHORT uiTop, USHORT uiLeft, USHORT uiBottom, USHOR
extern void hb_gt_PutText( USHORT uiTop, USHORT uiLeft, USHORT uiBottom, USHORT uiRight, BYTE * pbySrc );
extern void hb_gt_SetAttribute( USHORT uiTop, USHORT uiLeft, USHORT uiBottom, USHORT uiRight, BYTE byAttr );
extern void hb_gt_DispBegin( void );
extern USHORT hb_gt_DispCount( void );
extern void hb_gt_DispEnd( void );
extern BOOL hb_gt_SetMode( USHORT uiRows, USHORT uiCols );
extern BOOL hb_gt_GetBlink( void );

View File

@@ -39,6 +39,8 @@
#include "hbapigt.h"
static USHORT s_uiDispCount;
void hb_gt_Init( int iFilenoStdin, int iFilenoStdout, int iFilenoStderr )
{
HB_TRACE(HB_TR_DEBUG, ("hb_gt_Init()"));
@@ -288,6 +290,8 @@ void hb_gt_DispBegin( void )
{
HB_TRACE(HB_TR_DEBUG, ("hb_gt_DispBegin()"));
++s_uiDispCount;
/* TODO: Is there a way to change screen buffers?
ie: can we write somewhere without it going to the screen
and then update the screen from this buffer at a later time?
@@ -299,6 +303,8 @@ void hb_gt_DispEnd()
{
HB_TRACE(HB_TR_DEBUG, ("hb_gt_DispEnd()"));
--s_uiDispCount;
/* TODO: here we flush the buffer, and restore normal screen writes */
}
@@ -360,3 +366,8 @@ char * hb_gt_Version( void )
{
return "Harbour Terminal: (template)"
}
USHORT hb_gt_DispCount()
{
return s_uiDispCount;
}

View File

@@ -51,7 +51,7 @@ static USHORT s_uiMaxCol;
static USHORT s_uiCursorStyle;
static BOOL s_bBlink;
static int s_iFilenoStdout;
static USHORT s_uiDispBegin;
static USHORT s_uiDispCount;
void hb_gt_Init( int iFilenoStdin, int iFilenoStdout, int iFilenoStderr )
{
@@ -60,7 +60,7 @@ void hb_gt_Init( int iFilenoStdin, int iFilenoStdout, int iFilenoStderr )
HB_SYMBOL_UNUSED( iFilenoStdin );
HB_SYMBOL_UNUSED( iFilenoStderr );
s_uiDispBegin = 0;
s_uiDispCount = 0;
s_iRow = 0;
s_iCol = 0;