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 10134 - (hide annotations) (download) (as text)
Tue Aug 9 15:11:40 2022 UTC (20 months ago) by zmatsuo
Original Path: trunk/teraterm/teraterm/bg_theme.h
File MIME type: text/x-chdr
File size: 3000 byte(s)
Theme Editor Dialog を追加

- Theme Editor Dialog の追加
  - 背景画像、文字色の修正を行うダイアログ
  - teraterm/themedlg.*
  - doc/ja/html/menu/setup-additional-visual-theme.html(ヘルプ)
- [その他の設定]-[表示タブ]変更(teraterm/addsetting.cpp)
  - eterm関連を無効化(非表示)
  - 起動時テーマファイル指定を追加
  - テーマエディタ起動ボタンを追加
- tttset 変更
  - eterm_lookfeel_t.BGEnable の内容を変更
    - 0/1/2 = theme使用しない/固定テーマ/ランダムテーマ
  - 削除
    - BGImageFilePath
    - BGImgBrightness
- vtdisp.c
  - テーマ(色、背景)を操作するAPIを追加
  - 自動でテーマを読み込まないようにした
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     typedef enum _BG_TYPE { BG_COLOR = 0, BG_PICTURE, BG_WALLPAPER, BG_NONE } BG_TYPE;
35     typedef enum _BG_PATTERN {
36     BG_STRETCH = 0,
37     BG_TILE,
38     BG_CENTER,
39     BG_FIT_WIDTH,
40     BG_FIT_HEIGHT,
41     BG_AUTOFIT,
42     BG_AUTOFILL
43     } BG_PATTERN;
44    
45     typedef struct {
46     BG_TYPE type;
47     BG_PATTERN pattern;
48     BOOL antiAlias;
49     COLORREF color;
50     int alpha;
51     char file[MAX_PATH];
52     } TBGSrc;
53    
54     typedef struct _BGTheme {
55     TBGSrc BGDest;
56     TBGSrc BGSrc1;
57     TBGSrc BGSrc2;
58     int BGReverseTextAlpha;
59     } BGTheme;
60    
61     ////////////////////
62     // color theme
63     ////////////////////
64    
65     typedef struct {
66     BOOL change;
67     BOOL enable;
68     COLORREF fg;
69     COLORREF bg;
70     } TColorSetting;
71    
72     typedef struct {
73     BOOL change;
74     BOOL enable;
75     COLORREF color[16];
76     } TAnsiColorSetting;
77    
78     typedef struct {
79     char name[50];
80     TColorSetting vt;
81     TColorSetting bold;
82     TColorSetting blink;
83     TColorSetting reverse;
84     TColorSetting url;
85     TAnsiColorSetting ansicolor;
86     } TColorTheme;
87    
88     #ifdef __cplusplus
89     extern "C" {
90     #endif
91     void BGLoad(const wchar_t *fname, BGTheme *bg_theme, TColorTheme *color_theme);
92     void BGSave(const BGTheme *bg_theme, const wchar_t *fname);
93     void BGSaveColor(TColorTheme *color_theme, const wchar_t *fname);
94     void BGSet(const BGTheme *bg_theme);
95     void BGGet(BGTheme *bg_theme);
96     void GetColorData(TColorTheme *data);
97     void BGSetColorData(const TColorTheme *data);
98     void BGGetColorDefault(TColorTheme *data);
99     #ifdef __cplusplus
100     }
101     #endif

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