Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /trunk/teraterm/teraterm/vtdisp.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10192 - (hide annotations) (download) (as text)
Fri Aug 26 14:29:24 2022 UTC (19 months, 2 weeks ago) by zmatsuo
File MIME type: text/x-chdr
File size: 5735 byte(s)
文字色設定の整理

- 反転表示、常に標準の背景色を使う、8/16/256色表示 を整理
  - 反転表示 = 文字のBGとFGの色が入れ替わる処理
- vtdisp.c の DispSetupDC() のみで表示文字の色設定を行うようにした
- 従来、カラーテーブルの入れ替え、上書きなどを行っていた
  - BGExchangeColor() を削除
  - テーブルの入れ替えなどを行っている部分を削除
- 文字背景色が標準属性背景色で上書きしなくても表示できるようにした
  - ウィンドウの設定ダイアログの「常に標準の背景色を使う」のチェック
  - TERATERM.INI の [Tera Term] セクション UseNormalBGColor=on/off
  - 次の手順で上書きされる
    - 標準色を使うのチェックが外れている状態から
    - チェックを入れて
    - TERATERM.INIを保存すると、背景色が標準背景色となる
- 各種文字色設定をテストするテストを追加 color-sgr-decscnm.pl
  - いろいろなパターンの色設定を表示
  - 反転表示
  - マニュアルにスクリプトについて追記
1 doda 6806 /*
2     * Copyright (C) 1994-1998 T. Teranishi
3 nmaya 9048 * (C) 2008- 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, VT terminal display routines */
31 zmatsuo 8675
32     #include "buffer.h" // for TCharAttr
33    
34 maya 3227 #ifdef __cplusplus
35     extern "C" {
36     #endif
37    
38     /* prototypes */
39 yutakapon 8106 void BGInitialize(BOOL initialize_once);
40 zmatsuo 10134 void BGLoadThemeFile(TTTSet *pts);
41     void BGSetupPrimary(BOOL forceSetup);
42     void BGWriteThemeFile(const wchar_t *theme_file);
43 maya 3227
44     void BGOnSettingChange(void);
45     void BGOnEnterSizeMove(void);
46     void BGOnExitSizeMove(void);
47    
48 zmatsuo 9991 void InitDisp(void);
49     void EndDisp(void);
50     void DispReset(void);
51 maya 3227 void DispConvWinToScreen
52     (int Xw, int Yw, int *Xs, int *Ys, PBOOL Right);
53     void DispConvScreenToWin
54     (int Xs, int Ys, int *Xw, int *Yw);
55 zmatsuo 9991 //void SetLogFont(void);
56     void ChangeFont(void);
57     void ResetIME(void);
58     void ChangeCaret(void);
59 maya 3227 void CaretKillFocus(BOOL show);
60 doda 3322 void UpdateCaretPosition(BOOL enforce);
61 zmatsuo 9991 void CaretOn(void);
62     void CaretOff(void);
63     void DispDestroyCaret(void);
64     BOOL IsCaretOn(void);
65 maya 3227 void DispEnableCaret(BOOL On);
66 zmatsuo 9991 BOOL IsCaretEnabled(void);
67 maya 3227 void DispSetCaretWidth(BOOL DW);
68     void DispChangeWinSize(int Nx, int Ny);
69     void ResizeWindow(int x, int y, int w, int h, int cw, int ch);
70     void PaintWindow(HDC PaintDC, RECT PaintRect, BOOL fBkGnd,
71     int* Xs, int* Ys, int* Xe, int* Ye);
72 zmatsuo 9991 void DispEndPaint(void);
73     void DispClearWin(void);
74     void DispChangeBackground(void);
75     void DispChangeWin(void);
76     void DispInitDC(void);
77     void DispReleaseDC(void);
78 maya 3227 void DispSetupDC(TCharAttr Attr, BOOL Reverse);
79 zmatsuo 9040 void DispStr(const char *Buff, int Count, int Y, int* X);
80 doda 8445 void DispStrW(const wchar_t *StrW, const char *WidthInfo, int Count, int Y, int* X);
81 maya 3227 void DispEraseCurToEnd(int YEnd);
82     void DispEraseHomeToCur(int YHome);
83     void DispEraseCharsInLine(int XStart, int Count);
84     BOOL DispDeleteLines(int Count, int YEnd);
85     BOOL DispInsertLines(int Count, int YEnd);
86     BOOL IsLineVisible(int* X, int* Y);
87 zmatsuo 9991 void AdjustScrollBar(void);
88 maya 3227 void DispScrollToCursor(int CurX, int CurY);
89     void DispScrollNLines(int Top, int Bottom, int Direction);
90 zmatsuo 9991 void DispCountScroll(int n);
91     void DispUpdateScroll(void);
92     void DispScrollHomePos(void);
93 maya 3227 void DispAutoScroll(POINT p);
94     void DispHScroll(int Func, int Pos);
95     void DispVScroll(int Func, int Pos);
96 zmatsuo 9991 void DispSetupFontDlg(void);
97     void DispRestoreWinSize(void);
98     void DispSetWinPos(void);
99 maya 3227 void DispSetActive(BOOL ActiveFlag);
100 zmatsuo 9991 void InitColorTable(void);
101 maya 3227 void DispSetNearestColors(int start, int end, HDC DispCtx);
102     int TCharAttrCmp(TCharAttr a, TCharAttr b);
103 doda 4770 void DispSetColor(unsigned int num, COLORREF color);
104     void DispResetColor(unsigned int num);
105     COLORREF DispGetColor(unsigned int num);
106 maya 3227 void DispSetCurCharAttr(TCharAttr Attr);
107 doda 3297 void DispMoveWindow(int x, int y);
108 doda 3302 void DispShowWindow(int mode);
109 doda 3464 void DispResizeWin(int w, int h);
110 zmatsuo 9991 BOOL DispWindowIconified(void);
111 doda 7271 void DispGetWindowPos(int *x, int *y, BOOL client);
112 doda 7270 void DispGetWindowSize(int *width, int *height, BOOL client);
113 doda 7272 void DispGetRootWinSize(int *x, int *y, BOOL inPixels);
114 doda 5073 int DispFindClosestColor(int red, int green, int blue);
115 doda 6306 void UpdateBGBrush(void);
116 zmatsuo 9040 void DrawStrW(HDC DC, HDC BGDC, const wchar_t *StrW, const char *WidthInfo, int Count,
117     int font_width, int font_height, int Y, int* X);
118     void DrawStrA(HDC DC, HDC BGDC, const char *StrA, int Count,
119     int font_width, int font_height, int Y, int* X);
120 maya 3227
121     extern int WinWidth, WinHeight;
122     extern HFONT VTFont[AttrFontMask+1];
123     extern int FontHeight, FontWidth, ScreenWidth, ScreenHeight;
124     extern BOOL AdjustSize, DontChangeSize;
125     extern int CursorX, CursorY;
126     extern int WinOrgX, WinOrgY, NewOrgX, NewOrgY;
127     extern int NumOfLines, NumOfColumns;
128     extern int PageStart, BuffEnd;
129     extern TCharAttr DefCharAttr;
130    
131 zmatsuo 7434 extern BOOL IMEstat;
132 zmatsuo 7534 extern BOOL IMECompositionState;
133 zmatsuo 7434
134 maya 3227 #define SCROLL_BOTTOM 1
135     #define SCROLL_LINEDOWN 2
136     #define SCROLL_LINEUP 3
137     #define SCROLL_PAGEDOWN 4
138     #define SCROLL_PAGEUP 5
139     #define SCROLL_POS 6
140     #define SCROLL_TOP 7
141    
142 doda 3309 #define WINDOW_MINIMIZE 1
143     #define WINDOW_MAXIMIZE 2
144     #define WINDOW_RESTORE 3
145     #define WINDOW_RAISE 4
146     #define WINDOW_LOWER 5
147 doda 3310 #define WINDOW_REFRESH 6
148 doda 7274 #define WINDOW_TOGGLE_MAXIMIZE 7
149 doda 3309
150 zmatsuo 10134 #include "bg_theme.h"
151    
152     typedef struct {
153     BG_PATTERN id;
154     const char *str;
155     } BG_PATTERN_ST;
156    
157     const BG_PATTERN_ST *GetBGPatternList(int index);
158    
159 maya 3227 #ifdef __cplusplus
160     }
161     #endif

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