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 10661 - (hide annotations) (download) (as text)
Tue Apr 4 13:28:09 2023 UTC (12 months, 1 week ago) by zmatsuo
File MIME type: text/x-chdr
File size: 4364 byte(s)
関数名を変更

- ThemeSetEnable() -> ThemeEnable()
- ThemeGetEnable() -> ThemeIsEnabled()
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 zmatsuo 10385 BOOL enable;
53 zmatsuo 10134 BOOL antiAlias;
54 zmatsuo 10385 COLORREF color; // type=BG_PICTURE, BG_WALLPAPER���A���������������h���������F
55 zmatsuo 10134 int alpha;
56 zmatsuo 10332 wchar_t file[MAX_PATH];
57 zmatsuo 10134 } TBGSrc;
58    
59     typedef struct _BGTheme {
60 zmatsuo 10385 TBGSrc BGDest; // �w�i����
61     TBGSrc BGSrc1; // ����(Windows���f�X�N�g�b�v�w�i)
62     TBGSrc BGSrc2; // fill color
63 zmatsuo 10338 BYTE TextBackAlpha; // ��������(SGR0),back������Alpha
64     BYTE BGReverseTextAlpha; // ���]����(SGR7),back������Alpha
65     BYTE BackAlpha; // ��������back������Alpha
66 zmatsuo 10134 } BGTheme;
67    
68     ////////////////////
69     // color theme
70     ////////////////////
71    
72 zmatsuo 10303 // Character Attributes
73     // Normal(SGR 0), BOLD(SGR 1),...
74 zmatsuo 10134 typedef struct {
75 zmatsuo 10303 BOOL change; // TRUE/FALSE = default�F�������X����/���X������
76     BOOL enable; // TRUE/FALSE = ������������(Bold attribute��)�������F���L��/����������
77     COLORREF fg; // Fore color (���������������F���L��������)
78     COLORREF bg; // Back color (���������������F���L��������)
79 zmatsuo 10134 } TColorSetting;
80    
81 zmatsuo 10303 // ANSI Color
82 zmatsuo 10134 typedef struct {
83 zmatsuo 10303 BOOL change; // TRUE/FALSE = default�F�������X����/���X������
84     //BOOL enable; // �s�v��?
85     COLORREF color[16]; // ANSI color 256�F ��������16�F, (�O���������F,���������F���������F)
86 zmatsuo 10134 } TAnsiColorSetting;
87    
88 zmatsuo 10303 // color theme
89 zmatsuo 10134 typedef struct {
90 zmatsuo 10303 wchar_t name[50];
91     TColorSetting vt; // SGR 0
92 zmatsuo 10214 TColorSetting bold; // SGR 1
93     TColorSetting underline; // SGR 4
94     TColorSetting blink; // SGR 5
95     TColorSetting reverse; // SGR 7
96 zmatsuo 10134 TColorSetting url;
97     TAnsiColorSetting ansicolor;
98     } TColorTheme;
99    
100 zmatsuo 10256 typedef struct {
101     BG_PATTERN id;
102 zmatsuo 10332 const wchar_t *str;
103 zmatsuo 10256 } BG_PATTERN_ST;
104    
105     // setting / themefile.cpp
106 zmatsuo 10661 void ThemeEnable(BOOL enable);
107     BOOL ThemeIsEnabled(void);
108 zmatsuo 10256 const BG_PATTERN_ST *ThemeBGPatternList(int index);
109    
110     // file / themefile.cpp
111     void ThemeLoadBG(const wchar_t *file, BGTheme *bg_theme);
112 zmatsuo 10303 void ThemeLoadColor(const wchar_t *fname, TColorTheme *color_theme);
113 zmatsuo 10256 void ThemeLoad(const wchar_t *fname, BGTheme *bg_theme, TColorTheme *color_theme);
114     void ThemeSaveBG(const BGTheme *bg_theme, const wchar_t *fname);
115     void ThemeSaveColor(TColorTheme *color_theme, const wchar_t *fname);
116    
117     // setting / vtdisp.c
118     void ThemeGetBG(BGTheme *bg_theme);
119     void ThemeSetBG(const BGTheme *bg_theme);
120     void ThemeGetColor(TColorTheme *data);
121     void ThemeSetColor(const TColorTheme *data);
122     void ThemeGetColorDefault(TColorTheme *data);
123     void ThemeGetColorDefaultTS(const TTTSet *pts, TColorTheme *color_theme);
124     void ThemeGetBGDefault(BGTheme *bg_theme);
125    
126 zmatsuo 10134 #ifdef __cplusplus
127     }
128     #endif

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