| 1 |
doda |
6806 |
/* |
| 2 |
|
|
* Copyright (C) 1994-1998 T. Teranishi |
| 3 |
doda |
8445 |
* (C) 2005-2019 TeraTerm Project |
| 4 |
doda |
6806 |
* All rights reserved. |
| 5 |
|
|
* |
| 6 |
doda |
6841 |
* Redistribution and use in source and binary forms, with or without |
| 7 |
|
|
* modification, are permitted provided that the following conditions |
| 8 |
|
|
* are met: |
| 9 |
doda |
6806 |
* |
| 10 |
doda |
6841 |
* 1. Redistributions of source code must retain the above copyright |
| 11 |
|
|
* notice, this list of conditions and the following disclaimer. |
| 12 |
|
|
* 2. Redistributions in binary form must reproduce the above copyright |
| 13 |
|
|
* notice, this list of conditions and the following disclaimer in the |
| 14 |
|
|
* documentation and/or other materials provided with the distribution. |
| 15 |
|
|
* 3. The name of the author may not be used to endorse or promote products |
| 16 |
|
|
* derived from this software without specific prior written permission. |
| 17 |
doda |
6806 |
* |
| 18 |
doda |
6841 |
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR |
| 19 |
|
|
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
| 20 |
|
|
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| 21 |
|
|
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 22 |
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
| 23 |
|
|
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 24 |
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 25 |
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 26 |
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 27 |
|
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 |
doda |
6806 |
*/ |
| 29 |
maya |
3227 |
|
| 30 |
|
|
/* TERATERM.EXE, scroll buffer routines */ |
| 31 |
|
|
|
| 32 |
|
|
#ifdef __cplusplus |
| 33 |
|
|
extern "C" { |
| 34 |
|
|
#endif |
| 35 |
|
|
|
| 36 |
|
|
void InitBuffer(); |
| 37 |
|
|
void LockBuffer(); |
| 38 |
|
|
void UnlockBuffer(); |
| 39 |
|
|
void FreeBuffer(); |
| 40 |
|
|
void BuffReset(); |
| 41 |
|
|
void BuffAllSelect(); |
| 42 |
|
|
void BuffScreenSelect(); |
| 43 |
|
|
void BuffCancelSelection(); |
| 44 |
|
|
void ChangeSelectRegion(); |
| 45 |
|
|
void BuffScroll(int Count, int Bottom); |
| 46 |
|
|
void BuffInsertSpace(int Count); |
| 47 |
|
|
void BuffEraseCurToEnd(); |
| 48 |
|
|
void BuffEraseHomeToCur(); |
| 49 |
|
|
void BuffInsertLines(int Count, int YEnd); |
| 50 |
|
|
void BuffEraseCharsInLine(int XStart, int Count); |
| 51 |
|
|
void BuffDeleteLines(int Count, int YEnd); |
| 52 |
|
|
void BuffDeleteChars(int Count); |
| 53 |
|
|
void BuffEraseChars(int Count); |
| 54 |
|
|
void BuffFillWithE(); |
| 55 |
|
|
void BuffDrawLine(TCharAttr Attr, int Direction, int C); |
| 56 |
|
|
void BuffEraseBox(int XStart, int YStart, int XEnd, int YEnd); |
| 57 |
doda |
5090 |
void BuffFillBox(char c, int XStart, int YStart, int XEnd, int YEnd); |
| 58 |
doda |
5089 |
void BuffCopyBox(int SrcXStart, int SrcYStart, int SrcXEnd, int SrcYEnd, int SrcPage, int DstX, int DstY, int DstPage); |
| 59 |
doda |
5095 |
void BuffChangeAttrBox(int XStart, int YStart, int XEnd, int YEnd, PCharAttr attr, PCharAttr mask); |
| 60 |
doda |
7086 |
void BuffChangeAttrStream(int XStart, int YStart, int XEnd, int YEnd, PCharAttr attr, PCharAttr mask); |
| 61 |
maya |
3227 |
void BuffCBCopy(BOOL Table); |
| 62 |
doda |
8445 |
void BuffCBCopyUnicode(BOOL Table); |
| 63 |
maya |
3227 |
void BuffPrint(BOOL ScrollRegion); |
| 64 |
|
|
void BuffDumpCurrentLine(BYTE TERM); |
| 65 |
|
|
void BuffPutChar(BYTE b, TCharAttr Attr, BOOL Insert); |
| 66 |
|
|
void BuffPutKanji(WORD w, TCharAttr Attr, BOOL Insert); |
| 67 |
doda |
8445 |
int BuffPutUnicode(unsigned int uc, TCharAttr Attr, BOOL Insert); |
| 68 |
maya |
3227 |
void BuffUpdateRect(int XStart, int YStart, int XEnd, int YEnd); |
| 69 |
|
|
void UpdateStr(); |
| 70 |
|
|
void UpdateStrUnicode(void); |
| 71 |
|
|
void MoveCursor(int Xnew, int Ynew); |
| 72 |
|
|
void MoveRight(); |
| 73 |
|
|
void BuffSetCaretWidth(); |
| 74 |
|
|
void BuffScrollNLines(int n); |
| 75 |
|
|
void BuffClearScreen(); |
| 76 |
|
|
void BuffUpdateScroll(); |
| 77 |
|
|
void CursorUpWithScroll(); |
| 78 |
|
|
int BuffUrlDblClk(int Xw, int Yw); |
| 79 |
|
|
void BuffDblClk(int Xw, int Yw); |
| 80 |
|
|
void BuffTplClk(int Yw); |
| 81 |
|
|
void BuffSeveralPagesSelect(int Xw, int Yw); |
| 82 |
|
|
void BuffStartSelect(int Xw, int Yw, BOOL Box); |
| 83 |
|
|
void BuffChangeSelect(int Xw, int Yw, int NClick); |
| 84 |
|
|
void BuffEndSelect(); |
| 85 |
|
|
void BuffChangeWinSize(int Nx, int Ny); |
| 86 |
|
|
void BuffChangeTerminalSize(int Nx, int Ny); |
| 87 |
|
|
void ChangeWin(); |
| 88 |
|
|
void ClearBuffer(); |
| 89 |
|
|
void SetTabStop(); |
| 90 |
|
|
void CursorForwardTab(int count, BOOL AutoWrapMode); |
| 91 |
|
|
void CursorBackwardTab(int count); |
| 92 |
|
|
void ClearTabStop(int Ps); |
| 93 |
|
|
void ShowStatusLine(int Show); |
| 94 |
doda |
3312 |
void BuffLineContinued(BOOL mode); |
| 95 |
|
|
#define SetLineContinued() BuffLineContinued(TRUE) |
| 96 |
|
|
#define ClearLineContinued() BuffLineContinued(FALSE) |
| 97 |
maya |
3227 |
void BuffRegionScrollUpNLines(int n); |
| 98 |
|
|
void BuffRegionScrollDownNLines(int n); |
| 99 |
|
|
void BuffSetCurCharAttr(TCharAttr Attr); |
| 100 |
doda |
3743 |
void BuffSaveScreen(); |
| 101 |
|
|
void BuffRestoreScreen(); |
| 102 |
doda |
3745 |
void BuffDiscardSavedScreen(); |
| 103 |
doda |
4070 |
void BuffSelectedEraseCharsInLine(int XStart, int Count); |
| 104 |
|
|
void BuffSelectedEraseCurToEnd(); |
| 105 |
|
|
void BuffSelectedEraseHomeToCur(); |
| 106 |
|
|
void BuffSelectedEraseScreen(); |
| 107 |
doda |
5091 |
void BuffSelectiveEraseBox(int XStart, int YStart, int XEnd, int YEnd); |
| 108 |
doda |
4243 |
void BuffScrollLeft(int count); |
| 109 |
|
|
void BuffScrollRight(int count); |
| 110 |
yutakapon |
4932 |
int BuffGetCurrentLineData(char *buf, int bufsize); |
| 111 |
yutakapon |
5392 |
int BuffGetAnyLineData(int offset_y, char *buf, int bufsize); |
| 112 |
doda |
5279 |
BOOL BuffCheckMouseOnURL(int Xw, int Yw); |
| 113 |
doda |
8445 |
wchar_t *BuffGetCharInfo(int Xw, int Yw); |
| 114 |
|
|
void BuffSetCursorCharAttr(int x, int y, TCharAttr Attr); |
| 115 |
|
|
TCharAttr BuffGetCursorCharAttr(int x, int y); |
| 116 |
maya |
3227 |
|
| 117 |
|
|
extern int StatusLine; |
| 118 |
doda |
5324 |
extern int CursorTop, CursorBottom, CursorLeftM, CursorRightM; |
| 119 |
maya |
3227 |
extern BOOL Selected; |
| 120 |
|
|
extern BOOL Wrap; |
| 121 |
|
|
|
| 122 |
doda |
6175 |
#define isCursorOnStatusLine (StatusLine && CursorY == NumOfLines-1) |
| 123 |
doda |
5324 |
|
| 124 |
maya |
3227 |
#ifdef __cplusplus |
| 125 |
|
|
} |
| 126 |
|
|
#endif |