Debian Codegraph @

wince/flowm.h

raw
1 /*************************************************************************/
2 /* */
3 /* Language Technologies Institute */
4 /* Carnegie Mellon University */
5 /* Copyright (c) 2008 */
6 /* All Rights Reserved. */
7 /* */
8 /* Permission is hereby granted, free of charge, to use and distribute */
9 /* this software and its documentation without restriction, including */
10 /* without limitation the rights to use, copy, modify, merge, publish, */
11 /* distribute, sublicense, and/or sell copies of this work, and to */
12 /* permit persons to whom this work is furnished to do so, subject to */
13 /* the following conditions: */
14 /* 1. The code must retain the above copyright notice, this list of */
15 /* conditions and the following disclaimer. */
16 /* 2. Any modifications must be clearly marked as such. */
17 /* 3. Original authors' names are not deleted. */
18 /* 4. The authors' names are not used to endorse or promote products */
19 /* derived from this software without specific prior written */
20 /* permission. */
21 /* */
22 /* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
23 /* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
24 /* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
25 /* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
26 /* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
27 /* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
28 /* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
29 /* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
30 /* THIS SOFTWARE. */
31 /* */
32 /*************************************************************************/
33
34 #ifndef __FLOWM_H_
35 #define __FLOWM_H_
36
37 /* Following the program structure in Boling's Promgramming in WinCE */
38 typedef LRESULT (*MsgDispatcher)(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam);
39 typedef struct MsgDispatch_struct
40 {
41 UINT Code; /* messages */
42 MsgDispatcher Fxn;
43 } MsgDispatch;
44
45 typedef LRESULT (*CMDDispatcher)(HWND h, WORD w, HWND h2, WORD w2);
46 typedef struct CMDDispatch_struct
47 {
48 UINT Code;
49 CMDDispatcher Fxn;
50 } CMDDispatch;
51
52 /* Some globals that serve to communcate between threads */
53 extern int flowm_play_status;
54 extern TCHAR fl_filename[257];
55 extern int flowm_file_pos;
56 extern int flowm_file_size;
57 extern int flowm_selected_voice;
58 extern int flowm_selected_relation;
59
60 extern HWND TTSWindow;
61 #define FL_MAX_MSG_CHARS 300
62 extern TCHAR fl_tts_msg[FL_MAX_MSG_CHARS];
63 extern TCHAR fl_fp_msg[FL_MAX_MSG_CHARS];
64
65 #define FLOWM_NUM_UTT_POS 200
66 extern int flowm_utt_pos_pos;
67 extern int flowm_prev_utt_pos[FLOWM_NUM_UTT_POS];
68 extern float flowm_duration;
69
70 /* The interface to the Flite TTS system */
71 void flowm_init();
72 void flowm_terminate();
73 int flowm_say_text(TCHAR *text);
74 int flowm_say_file(TCHAR *filename);
75 int flowm_save_wave(TCHAR *filename); /* save previous waveform */
76
77 float flowm_find_file_percentage();
78 TCHAR *flowm_voice_name(int i);
79
80 int InitApp (HINSTANCE h);
81 HWND InitInstance (HINSTANCE h, LPWSTR p , int i);
82
83 #ifdef __MINGW32__
84 /* These aren't needed in MINGW32 and give compiler warnings */
85 #undef CALLBACK
86 #define CALLBACK
87 #undef WINAPI
88 #define WINAPI
89 #endif
90
91 void WINAPI SystemIdleTimerReset( void);
92
93 LRESULT CALLBACK MainWndProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam);
94
95 LRESULT DoCreateMain(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam);
96 LRESULT DoNotifyMain (HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam);
97 LRESULT DoPaintMain(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam);
98 LRESULT DoSizeMain(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
99 LRESULT DoCommandMain(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
100 LRESULT DoSettingChangeMain(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam);
101 LRESULT DoHibernateMain(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam);
102 LRESULT DoActivateMain(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam);
103 LRESULT DoDestroyMain(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam);
104
105 LPARAM DoMainCommandExit(HWND hwnd,WORD idItem,HWND hwndCtl,WORD wNotifyCode);
106 LPARAM DoMainCommandAbout(HWND hwnd, WORD idItem,
107 HWND hwndCtl, WORD wNotifyCode);
108 LPARAM DoMainCommandPlay(HWND hwnd, WORD idItem,HWND hwndCtl,WORD wNotifyCode);
109 LPARAM DoMainCommandFile(HWND hwnd, WORD idItem,HWND hwndCtl,WORD wNotifyCode);
110 BOOL CALLBACK AboutDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
111 BOOL CALLBACK PlayDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
112 BOOL CALLBACK FileDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
113
114 #define FL_TOOLBAR1 101
115 #define FL_MAIN 102
116 #define FL_TOOLMENU 103
117 #define FL_ABOUTMENU 104
118 #define FL_RPTLIST 105
119
120 #define FLS_TOOLMENUNAME 150
121 #define FLS_ABOUTMENUNAME 151
122
123 #define FL_EXIT 201
124 #define FL_PLAY 202
125 #define FL_FILE 203
126 #define FL_ABOUT 204
127 #define FL_OPTIONS 205
128
129 #define FL_FILENAME 301
130 #define FL_TEXT 302
131 #define FL_PUSHPLAY 303
132 #define FL_PUSHTTS 304
133 #define FL_PUSHSTOP 305
134 #define FL_PUSHSELECT 306
135 #define FL_SYNTHTEXT 307
136 #define FL_FILEPOS 308
137 #define FL_PUSHFORWARD 309
138 #define FL_PUSHBACK 310
139 #define FL_BENCH 311
140 #define FL_SCREENOFF 312
141 #define FL_PUSHEND 313
142 #define FL_PUSHSAVE 314
143
144 #define FL_VOXLIST 401
145 #define FL_RELLIST 402
146 #define FL_OUTPUT 403
147
148 #define FL_MAX_TEXTLEN 256
149
150 #define FLOWM_PLAY 0
151 #define FLOWM_STOP 1
152 #define FLOWM_SKIP 2
153 #define FLOWM_BACKSKIP 3
154 #define FLOWM_BENCH 4
155
156 #endif