Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /trunk/teraterm/teraterm/theme.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10338 - (hide annotations) (download) (as text)
Fri Oct 28 13:25:45 2022 UTC (17 months, 1 week ago) by zmatsuo
File MIME type: text/x-chdr
File size: 4218 byte(s)
テーマの文字背景の透過設定の種類を増やした

- 次の文字背景部分の透過を個別に設定できるようにした
  - 通常属性(SGR0)部
  - 反転属性(SGR7)部
  - その他の背景部分
- 従来は反転属性(SGR7)以外の文字背景部分しか設定できなかった
- テーマファイルのドキュメント修正
- IDC_CHECK_FAST_SIZE_MOVE にテキストを設定した
  - "Disable theme when moving or resizing window"
  - "ウィンドウ移動/リサイズ時テーマを一時的にdisableする"
1 zmatsuo 10134 /*
2     * Copyright (C) 1994-1998 T. Teranishi
3     * (C) 2022- 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     #pragma once
31    
32     #include <windows.h>
33    
34 zmatsuo 10256 #ifdef __cplusplus
35     extern "C" {
36     #endif
37    
38 zmatsuo 10134 typedef enum _BG_TYPE { BG_COLOR = 0, BG_PICTURE, BG_WALLPAPER, BG_NONE } BG_TYPE;
39     typedef enum _BG_PATTERN {
40     BG_STRETCH = 0,
41     BG_TILE,
42     BG_CENTER,
43     BG_FIT_WIDTH,
44     BG_FIT_HEIGHT,
45     BG_AUTOFIT,
46     BG_AUTOFILL
47     } BG_PATTERN;
48    
49     typedef struct {
50     BG_TYPE type;
51     BG_PATTERN pattern;
52     BOOL antiAlias;
53     COLORREF color;
54     int alpha;
55 zmatsuo 10332 wchar_t file[MAX_PATH];
56 zmatsuo 10134 } TBGSrc;
57    
58     typedef struct _BGTheme {
59     TBGSrc BGDest;
60     TBGSrc BGSrc1;
61     TBGSrc BGSrc2;
62 zmatsuo 10338 BYTE TextBackAlpha; // ��������(SGR0),back������Alpha
63     BYTE BGReverseTextAlpha; // ���]����(SGR7),back������Alpha
64     BYTE BackAlpha; // ��������back������Alpha
65 zmatsuo 10134 } BGTheme;
66    
67     ////////////////////
68     // color theme
69     ////////////////////
70    
71 zmatsuo 10303 // Character Attributes
72     // Normal(SGR 0), BOLD(SGR 1),...
73 zmatsuo 10134 typedef struct {
74 zmatsuo 10303 BOOL change; // TRUE/FALSE = default�F�������X����/���X������
75     BOOL enable; // TRUE/FALSE = ������������(Bold attribute��)�������F���L��/����������
76     COLORREF fg; // Fore color (���������������F���L��������)
77     COLORREF bg; // Back color (���������������F���L��������)
78 zmatsuo 10134 } TColorSetting;
79    
80 zmatsuo 10303 // ANSI Color
81 zmatsuo 10134 typedef struct {
82 zmatsuo 10303 BOOL change; // TRUE/FALSE = default�F�������X����/���X������
83     //BOOL enable; // �s�v��?
84     COLORREF color[16]; // ANSI color 256�F ��������16�F, (�O���������F,���������F���������F)
85 zmatsuo 10134 } TAnsiColorSetting;
86    
87 zmatsuo 10303 // color theme
88 zmatsuo 10134 typedef struct {
89 zmatsuo 10303 wchar_t name[50];
90     TColorSetting vt; // SGR 0
91 zmatsuo 10214 TColorSetting bold; // SGR 1
92     TColorSetting underline; // SGR 4
93     TColorSetting blink; // SGR 5
94     TColorSetting reverse; // SGR 7
95 zmatsuo 10134 TColorSetting url;
96     TAnsiColorSetting ansicolor;
97     } TColorTheme;
98    
99 zmatsuo 10256 typedef struct {
100     BG_PATTERN id;
101 zmatsuo 10332 const wchar_t *str;
102 zmatsuo 10256 } BG_PATTERN_ST;
103    
104     // setting / themefile.cpp
105 zmatsuo 10334 void ThemeSetEnable(BOOL enable);
106     BOOL ThemeGetEnable(void);
107 zmatsuo 10256 const BG_PATTERN_ST *ThemeBGPatternList(int index);
108    
109     // file / themefile.cpp
110     void ThemeLoadBG(const wchar_t *file, BGTheme *bg_theme);
111 zmatsuo 10303 void ThemeLoadColor(const wchar_t *fname, TColorTheme *color_theme);
112 zmatsuo 10256 void ThemeLoad(const wchar_t *fname, BGTheme *bg_theme, TColorTheme *color_theme);
113     void ThemeSaveBG(const BGTheme *bg_theme, const wchar_t *fname);
114     void ThemeSaveColor(TColorTheme *color_theme, const wchar_t *fname);
115    
116     // setting / vtdisp.c
117     void ThemeGetBG(BGTheme *bg_theme);
118     void ThemeSetBG(const BGTheme *bg_theme);
119     void ThemeGetColor(TColorTheme *data);
120     void ThemeSetColor(const TColorTheme *data);
121     void ThemeGetColorDefault(TColorTheme *data);
122     void ThemeGetColorDefaultTS(const TTTSet *pts, TColorTheme *color_theme);
123     void ThemeGetBGDefault(BGTheme *bg_theme);
124    
125 zmatsuo 10134 #ifdef __cplusplus
126     }
127     #endif

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