Develop and Download Open Source Software

Browse Subversion Repository

Contents of /branches/ttcomtester/teraterm/teraterm/vtdisp.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10521 - (show annotations) (download) (as text)
Fri Jan 20 16:03:38 2023 UTC (14 months, 2 weeks ago) by zmatsuo
File MIME type: text/x-chdr
File size: 6308 byte(s)
add communication test tool
1 /*
2 * Copyright (C) 1994-1998 T. Teranishi
3 * (C) 2008- TeraTerm Project
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 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 *
18 * 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 */
29
30 /* TERATERM.EXE, VT terminal display routines */
31
32 #pragma once
33
34 #include "buffer.h" // for TCharAttr
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 /* Constants */
41 /* for DispSetColor() / DispGetColor() */
42 // ANSIColor -- 0-255
43 #define CS_VT_NORMALFG 256
44 #define CS_VT_NORMALBG 257
45 #define CS_VT_BOLDFG 258
46 #define CS_VT_BOLDBG 259
47 #define CS_VT_BLINKFG 260
48 #define CS_VT_BLINKBG 261
49 #define CS_VT_REVERSEFG 262
50 #define CS_VT_REVERSEBG 263
51 #define CS_VT_URLFG 264
52 #define CS_VT_URLBG 265
53 #define CS_VT_UNDERFG 266
54 #define CS_VT_UNDERBG 267
55 #define CS_TEK_FG 268
56 #define CS_TEK_BG 269
57 #define CS_ANSICOLOR_ALL 270
58 #define CS_SP_ALL 271
59 #define CS_UNSPEC 0xffffffff
60 #define CS_ALL 0xfffffffe // DispResetColor() �������g�p
61
62 /* prototypes */
63 void BGInitialize(BOOL initialize_once);
64 void BGLoadThemeFile(const TTTSet *pts);
65 void BGSetupPrimary(BOOL forceSetup);
66
67 void BGOnSettingChange(void);
68 void BGOnEnterSizeMove(void);
69 void BGOnExitSizeMove(void);
70
71 void InitDisp(void);
72 void EndDisp(void);
73 void DispReset(void);
74 void DispConvWinToScreen
75 (int Xw, int Yw, int *Xs, int *Ys, PBOOL Right);
76 void DispConvScreenToWin
77 (int Xs, int Ys, int *Xw, int *Yw);
78 void ChangeFont(void);
79 void ResetIME(void);
80 void ChangeCaret(void);
81 void CaretKillFocus(BOOL show);
82 void UpdateCaretPosition(BOOL enforce);
83 void CaretOn(void);
84 void CaretOff(void);
85 void DispDestroyCaret(void);
86 BOOL IsCaretOn(void);
87 void DispEnableCaret(BOOL On);
88 BOOL IsCaretEnabled(void);
89 void DispSetCaretWidth(BOOL DW);
90 void DispChangeWinSize(int Nx, int Ny);
91 void ResizeWindow(int x, int y, int w, int h, int cw, int ch);
92 void PaintWindow(HDC PaintDC, RECT PaintRect, BOOL fBkGnd,
93 int* Xs, int* Ys, int* Xe, int* Ye);
94 void DispEndPaint(void);
95 void DispClearWin(void);
96 void DispChangeBackground(void);
97 void DispChangeWin(void);
98 void DispInitDC(void);
99 void DispReleaseDC(void);
100 void DispSetupDC(TCharAttr Attr, BOOL Reverse);
101 void DispStrA(const char *Buff, const char *WidthInfo, int Count, int Y, int* X);
102 void DispStrW(const wchar_t *StrW, const char *WidthInfo, int Count, int Y, int* X);
103 void DispEraseCurToEnd(int YEnd, const TCharAttr *attr);
104 void DispEraseHomeToCur(int YHome, const TCharAttr *attr);
105 void DispEraseCharsInLine(int XStart, int Count, const TCharAttr *attr);
106 BOOL DispDeleteLines(int Count, int YEnd);
107 BOOL DispInsertLines(int Count, int YEnd);
108 BOOL IsLineVisible(int* X, int* Y);
109 void AdjustScrollBar(void);
110 void DispScrollToCursor(int CurX, int CurY);
111 void DispScrollNLines(int Top, int Bottom, int Direction);
112 void DispCountScroll(int n);
113 void DispUpdateScroll(void);
114 void DispScrollHomePos(void);
115 void DispAutoScroll(POINT p);
116 void DispHScroll(int Func, int Pos);
117 void DispVScroll(int Func, int Pos);
118 void DispSetupFontDlg(HWND hwndOwner);
119 void DispRestoreWinSize(void);
120 void DispSetWinPos(void);
121 void DispSetActive(BOOL ActiveFlag);
122 int TCharAttrCmp(TCharAttr a, TCharAttr b);
123 void DispSetColor(unsigned int num, COLORREF color);
124 void DispResetColor(unsigned int num);
125 COLORREF DispGetColor(unsigned int num);
126 void DispSetCurCharAttr(TCharAttr Attr);
127 void DispMoveWindow(int x, int y);
128 void DispShowWindow(int mode);
129 void DispResizeWin(int w, int h);
130 BOOL DispWindowIconified(void);
131 void DispGetWindowPos(int *x, int *y, BOOL client);
132 void DispGetWindowSize(int *width, int *height, BOOL client);
133 void DispGetRootWinSize(int *x, int *y, BOOL inPixels);
134 int DispFindClosestColor(int red, int green, int blue);
135 void DrawStrW(HDC DC, HDC BGDC, const wchar_t *StrW, const char *WidthInfo, int Count, int font_width, int font_height,
136 int Y, int *X);
137 void DrawStrA(HDC DC, HDC BGDC, const char *StrA, const char *WidthInfo, int Count, int font_width, int font_height,
138 int Y, int *X);
139
140 extern int WinWidth, WinHeight;
141 extern HFONT VTFont[AttrFontMask+1];
142 extern int FontHeight, FontWidth, ScreenWidth, ScreenHeight;
143 extern BOOL AdjustSize, DontChangeSize;
144 extern int CursorX, CursorY;
145 extern int WinOrgX, WinOrgY, NewOrgX, NewOrgY;
146 extern int NumOfLines, NumOfColumns;
147 extern int PageStart, BuffEnd;
148 extern TCharAttr DefCharAttr;
149
150 extern BOOL IMEstat;
151 extern BOOL IMECompositionState;
152
153 // for DispHScroll(), DispVScroll()
154 #define SCROLL_BOTTOM 1
155 #define SCROLL_LINEDOWN 2
156 #define SCROLL_LINEUP 3
157 #define SCROLL_PAGEDOWN 4
158 #define SCROLL_PAGEUP 5
159 #define SCROLL_POS 6
160 #define SCROLL_TOP 7
161
162 // for DispShowWindow()
163 #define WINDOW_MINIMIZE 1
164 #define WINDOW_MAXIMIZE 2
165 #define WINDOW_RESTORE 3
166 #define WINDOW_RAISE 4
167 #define WINDOW_LOWER 5
168 #define WINDOW_REFRESH 6
169 #define WINDOW_TOGGLE_MAXIMIZE 7
170
171 #ifdef __cplusplus
172 }
173 #endif

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26