1 /*
2     TiMidity++ -- MIDI to WAVE converter and player
3     Copyright (C) 1999-2002 Masanao Izumo <mo@goice.co.jp>
4     Copyright (C) 1995 Tuukka Toivonen <tt@cgs.fi>
5 
6     This program is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10 
11     This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15 
16     You should have received a copy of the GNU General Public License
17     along with this program; if not, write to the Free Software
18     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19 */
20 #ifndef __W32G_UT2_H__
21 #define __W32G_UT2_H__
22 
23 extern int DlgChooseFontAndApply(HWND hwnd, HWND hwndFontChange, HFONT hFontPre, char *fontname, int *fontheight, int *fontwidth);
24 extern int DlgChooseFont(HWND hwnd, char *fontName, int *fontHeight, int *fontWidth);
25 
26 extern void SetWindowPosSize ( HWND parent_hwnd, HWND hwnd, int x, int y );
27 
28 // ini file of timidity window information
29 #define TIMIDITY_WINDOW_INI_FILE	timidity_window_inifile
30 
31 #define FONT_FLAGS_NONE			0x00
32 #define FONT_FLAGS_FIXED		0x01
33 #define FONT_FLAGS_ITALIC		0x02
34 #define FONT_FLAGS_BOLD			0x04
35 
36 // section of ini file
37 // [MainWnd]
38 // PosX =
39 // PosY =
40 typedef struct MAINWNDINFO_ {
41 	HWND hwnd;
42 	int PosX;
43 	int PosY;
44 	int CanvasMode;
45 } MAINWNDINFO;
46 extern MAINWNDINFO MainWndInfo;
47 
48 // section of ini file
49 // [ListWnd]
50 // PosX =
51 // PosY =
52 // Width =
53 // Height =
54 // fontName =
55 // fontWidth =
56 // fontHeight =
57 typedef struct LISTWNDINFO_ {
58 	HWND hwnd;
59 	int PosX;
60 	int PosY;
61 	int Width;		// save parameter
62 	int Height;		// save parameter
63 	HMENU hPopupMenu;
64 	HWND hwndListBox;
65 	HFONT hFontListBox;
66 	char *fontName;
67 	char fontNameJA[64];			// save parameter
68 	char fontNameEN[64];			// save parameter
69 	int fontWidth;				// save parameter
70 	int fontHeight;				// save parameter
71 	int fontFlags;			// save parameter
72 } LISTWNDINFO;
73 extern LISTWNDINFO ListWndInfo;
74 
75 // section of ini file
76 // [DocWnd]
77 // PosX =
78 // PosY =
79 // Width =
80 // Height =
81 // fontName =
82 // fontWidth =
83 // fontHeight =
84 #define DOCWND_DOCFILEMAX 10
85 typedef struct DOCWNDINFO_ {
86 	char DocFile[DOCWND_DOCFILEMAX][512];
87 	int DocFileMax;
88 	int DocFileCur;
89 	char *Text;
90 	int TextSize;
91 
92 	HWND hwnd;
93 	int PosX;
94 	int PosY;
95 	int Width;		// save parameter
96 	int Height;		// save parameter
97 	HMENU hPopupMenu;
98 	HWND hwndEdit;
99 	HFONT hFontEdit;
100 	char *fontName;
101 	char fontNameJA[64];			// save parameter
102 	char fontNameEN[64];			// save parameter
103 	int fontWidth;				// save parameter
104 	int fontHeight;				// save parameter
105 	int fontFlags;			// save parameter
106 //	HANDLE hMutex;
107 } DOCWNDINFO;
108 extern DOCWNDINFO DocWndInfo;
109 
110 // section of ini file
111 // [ConsoleWnd]
112 // PosX =
113 // PosY =
114 typedef struct CONSOLEWNDINFO_ {
115 	HWND hwnd;
116 	int PosX;
117 	int PosY;
118 } CONSOLEWNDINFO;
119 extern CONSOLEWNDINFO ConsoleWndInfo;
120 
121 extern int INISaveMainWnd(void);
122 extern int INILoadMainWnd(void);
123 extern int INISaveListWnd(void);
124 extern int INILoadListWnd(void);
125 extern int INISaveDocWnd(void);
126 extern int INILoadDocWnd(void);
127 extern int INISaveConsoleWnd(void);
128 extern int INILoadConsoleWnd(void);
129 
130 #endif /* __W32G_UT2_H__ */
131