source: branches/classes/c/c_audio/cwcdtrack.c

Last change on this file was 104, checked in by gyoung, 2 years ago

Remaining changes from merge with Lars 2.9 branch

File size: 13.5 KB
Line 
1
2/*
3 * This file was generated by the SOM Compiler.
4 * Generated using:
5 * SOM incremental update: 2.47
6 */
7
8
9/*
10 * (C) Chris Wohlgemuth 2002-2004
11 *
12 */
13/*
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2, or (at your option)
17 * any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; see the file COPYING. If not, write to
26 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
27 */
28/*
29 * If you need another license for your project/product contact me at
30 *
31 * http://www.os2world.com/cdwriting
32 * http://www.geocities.com/SiliconValley/Sector/5785/
33 */
34
35/*
36 * This file was generated by the SOM Compiler and Emitter Framework.
37 * Generated using:
38 * SOM Emitter emitctm: 2.42
39 */
40
41#ifndef SOM_Module_cwcdtrack_Source
42#define SOM_Module_cwcdtrack_Source
43#endif
44#define CWCDTrack_Class_Source
45#define M_CWCDTrack_Class_Source
46
47#define INCL_PM
48#define INCL_DOS
49#define INCL_DOSERRORS
50
51#include "os2.h"
52#include <stdio.h>
53#include "cwaudio.h"
54#include "cwcdtrack.ih"
55#include "cwaudioinc.h"
56
57#define IDINFO_TRACKNUM 100
58#define SETUP_CDTRKTRACKNUM "CWCDTTRACKNUM"
59#define CDTRACK_HELP_PANEL 30
60
61PSZ _queryMp3HelpLibraryName(void);
62HMODULE queryModuleHandle(void);
63HMODULE queryResModuleHandle(void);
64BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
65
66SOM_Scope BOOL SOMLINK cwcdtrackM_wpclsCreateDefaultTemplates(M_MMCDTrack *somSelf,
67 WPObject* Folder)
68{
69 /* M_MMCDTrackData *somThis = M_MMCDTrackGetData(somSelf); */
70 M_MMCDTrackMethodDebug("M_MMCDTrack","cwcdtrackM_wpclsCreateDefaultTemplates");
71
72 /* We don't need a template */
73 return TRUE;
74
75 /* return (M_MMCDTrack_parent_M_MMAudio_wpclsCreateDefaultTemplates(somSelf,
76 Folder));*/
77}
78
79
80/*
81 * The prototype for cwcdtrack_wpQueryFileSize was replaced by the following prototype:
82 */
83SOM_Scope ULONG SOMLINK cwcdtrack_wpQueryFileSize(MMCDTrack *somSelf)
84{
85
86 /* MMAudioData *somThis = MMAudioGetData(somSelf);*/
87 /* CWCDTrackData *somThis = CWCDTrackGetData(somSelf);*/
88 MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpQueryFileSize");
89
90 return (_cwmmQueryTrackInfo(somSelf, NULLHANDLE, 0, IDINFO_PLAYTIME)*44100*4);
91 // return (_ulPlaySecs*44100*4);
92}
93
94/*
95 * The prototype for cwcdtrack_wpSetupOnce was replaced by the following prototype:
96 */
97SOM_Scope BOOL SOMLINK cwcdtrack_wpSetupOnce(MMCDTrack *somSelf,
98 PSZ pszSetupString)
99{
100 BOOL rc;
101 char buffer[CCHMAXPATH];
102 ULONG bufferSize;
103
104 MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpSetupOnce");
105
106
107#if 0
108 _ulPlaySecs=0;
109 sprintf(_chrPlayTime, "%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
110#endif
111
112 _cwmmSetTrackInfo(somSelf, NULLHANDLE, 16, IDINFO_BPS);
113 _cwmmSetTrackInfo(somSelf, NULLHANDLE, 2, IDINFO_CHANNELS);
114 _cwmmSetTrackInfo(somSelf, NULLHANDLE, 44100, IDINFO_SAMPLERATE);
115
116 bufferSize=sizeof(buffer);
117 if(_wpScanSetupString(somSelf, pszSetupString, SETUP_CDTRKTRACKNUM, buffer, &bufferSize))
118 {
119 ULONG ulTrack=atoi(buffer);
120 MMCDTrackData *somThis = MMCDTrackGetData(somSelf);
121 if(ulTrack>0 && ulTrack<100) {
122 _ulTrackNum=ulTrack;
123 _wpCnrRefreshDetails(somSelf);
124 }
125 }
126 rc=(MMCDTrack_parent_MMAudio_wpSetupOnce(somSelf, pszSetupString));
127 // _wpCnrRefreshDetails(somSelf);
128 _wpSetup(somSelf, "DEFAULTVIEW=SETTINGS");
129
130 return rc;
131}
132
133/*
134 * SOM_Scope BOOL SOMLINK cwcdtrack_wpSetup(CWCDTrack *somSelf,
135 * PSZ pszSetupString)
136 */
137SOM_Scope BOOL SOMLINK cwcdtrack_wpSetup(MMCDTrack *somSelf,
138 PSZ pszSetupString)
139{
140BOOL rc;
141/*CWCDTrackData *somThis = CWCDTrackGetData(somSelf);*/
142 MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpSetup");
143
144 rc=(MMCDTrack_parent_MMAudio_wpSetup(somSelf, pszSetupString));
145
146 return rc;
147}
148
149/*
150 * The prototype for cwcdtrack_wpAddFileMenuPage was replaced by the following prototype:
151 */
152SOM_Scope ULONG SOMLINK cwcdtrack_wpAddFileMenuPage(MMCDTrack *somSelf,
153 HWND hwndNotebook)
154{
155 MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpAddFileMenuPage");
156
157 return SETTINGS_PAGE_REMOVED;
158}
159
160/*
161 * The prototype for cwcdtrack_wpAddFile1Page was replaced by the following prototype:
162 */
163SOM_Scope ULONG SOMLINK cwcdtrack_wpAddFile1Page(MMCDTrack *somSelf,
164 HWND hwndNotebook)
165{
166 MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpAddFile1Page");
167
168 return SETTINGS_PAGE_REMOVED;
169}
170
171/*
172 * The prototype for cwcdtrack_wpAddFile2Page was replaced by the following prototype:
173 */
174SOM_Scope ULONG SOMLINK cwcdtrack_wpAddFile2Page(MMCDTrack *somSelf,
175 HWND hwndNotebook)
176{
177 MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpAddFile2Page");
178
179 return SETTINGS_PAGE_REMOVED;
180}
181
182/*
183 * The prototype for cwcdtrack_wpAddFile3Page was replaced by the following prototype:
184 */
185SOM_Scope ULONG SOMLINK cwcdtrack_wpAddFile3Page(MMCDTrack *somSelf,
186 HWND hwndNotebook)
187{
188 MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpAddFile3Page");
189
190 return SETTINGS_PAGE_REMOVED;
191}
192
193/*
194 * The prototype for cwcdtrack_wpAddFileTypePage was replaced by the following prototype:
195 */
196SOM_Scope ULONG SOMLINK cwcdtrack_wpAddFileTypePage(MMCDTrack *somSelf,
197 HWND hwndNotebook)
198{
199 MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpAddFileTypePage");
200
201 return SETTINGS_PAGE_REMOVED;
202}
203
204/*
205 * The prototype for cwcdtrack_wpFilterPopupMenu was replaced by the following prototype:
206 */
207SOM_Scope ULONG SOMLINK cwcdtrack_wpFilterPopupMenu(MMCDTrack *somSelf,
208 ULONG ulFlags,
209 HWND hwndCnr,
210 BOOL fMultiSelect)
211{
212
213 /* MMCDTrackData *somThis = MMCDTrackGetData(somSelf);*/
214 MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpFilterPopupMenu");
215
216 return CTXT_SETTINGS | CTXT_HELP | CTXT_DELETE;
217
218 /* We don't want to have XFolder or WPS-Wizard menus here. These are useless
219 for tracks. */
220#if 0
221 rc=(MMCDTrack_parent_MMAudio_wpFilterPopupMenu(somSelf,
222 ulFlags,
223 hwndCnr,
224 fMultiSelect));
225
226 return (CTXT_SETTINGS | rc) & ~( CTXT_OPEN|CTXT_DELETE|CTXT_ARRANGE|CTXT_NEW|CTXT_PICKUP);
227#endif
228}
229
230
231/*
232 * The prototype for cwcdtrack_wpModifyPopupMenu was replaced by the following prototype:
233 */
234SOM_Scope BOOL SOMLINK cwcdtrack_wpModifyPopupMenu(MMCDTrack *somSelf,
235 HWND hwndMenu,
236 HWND hwndCnr,
237 ULONG iPosition)
238{
239 /* MMCDTrackData *somThis = MMCDTrackGetData(somSelf);*/
240 MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpModifyPopupMenu");
241
242 return TRUE;
243 /* We don't want to have XFolder or WPS-Wizard menus here. These are useless
244 for tracks. */
245#if 0
246 rc= (MMCDTrack_parent_MMAudio_wpModifyPopupMenu(somSelf,
247 hwndMenu,
248 hwndCnr,
249 iPosition));
250 /* WinSendMsg(hwndMenu, MM_REMOVEITEM, MPFROM2SHORT(0xBC0D, TRUE), 0);*/
251 return rc;
252#endif
253}
254
255/*
256 * The prototype for cwcdtrack_wpInsertPopupMenuItems was replaced by the following prototype:
257 */
258SOM_Scope BOOL SOMLINK cwcdtrack_wpInsertPopupMenuItems(MMCDTrack *somSelf,
259 HWND hwndMenu,
260 ULONG iPosition,
261 HMODULE hmod,
262 ULONG MenuID,
263 ULONG SubMenuID)
264{
265 /* MMCDTrackData *somThis = MMCDTrackGetData(somSelf);*/
266 MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpInsertPopupMenuItems");
267
268 return (MMCDTrack_parent_MMAudio_wpInsertPopupMenuItems(somSelf,
269 hwndMenu,
270 iPosition,
271 hmod,
272 MenuID,
273 SubMenuID));
274}
275
276/*
277 * The prototype for cwcdtrack_cwmmQueryTrackInfo was replaced by the following prototype:
278 */
279
280/*
281 * SOM_Scope ULONG SOMLINK cwcdtrack_cwmmQueryTrackInfo(MMCDTrack *somSelf,
282 * char** chrString,
283 * ULONG ulSize,
284 * int iWhich)
285 */
286
287/*
288 * The prototype for cwcdtrack_cwmmQueryTrackInfo was replaced by the following prototype:
289 */
290
291/*
292 * SOM_Scope ULONG SOMLINK cwcdtrack_cwmmQueryTrackInfo(MMCDTrack *somSelf,
293 * PSZ chrString,
294 * ULONG ulSize,
295 * int iWhich)
296 */
297
298/*
299 * The prototype for cwcdtrack_cwmmQueryTrackInfo was replaced by the following prototype:
300 */
301SOM_Scope ULONG SOMLINK cwcdtrack_cwmmQueryTrackInfo(MMCDTrack *somSelf,
302 PSZ chrString,
303 ULONG ulSize,
304 ULONG iWhich)
305{
306 MMCDTrackData *somThis = MMCDTrackGetData(somSelf);
307 MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_cwmmQueryTrackInfo");
308
309 switch(iWhich)
310 {
311 case IDINFO_TRACKNUM:
312 {
313 return _ulTrackNum;
314 }
315 default:
316 break;
317 }
318 return (MMCDTrack_parent_MMAudio_cwmmQueryTrackInfo(somSelf,
319 chrString,
320 ulSize,
321 iWhich));
322}
323
324/*
325 * The prototype for cwcdtrackM_wpclsQueryStyle was replaced by the following prototype:
326 */
327SOM_Scope ULONG SOMLINK cwcdtrackM_wpclsQueryStyle(M_MMCDTrack *somSelf)
328{
329 /* M_CWCDTrackData *somThis = M_CWCDTrackGetData(somSelf); */
330 M_MMCDTrackMethodDebug("M_MMCDTrack","cwcdtrackM_wpclsQueryStyle");
331
332 return (M_MMCDTrack_parent_M_MMAudio_wpclsQueryStyle(somSelf)
333 |CLSSTYLE_NEVERLINK|CLSSTYLE_NEVERCOPY|CLSSTYLE_NEVERMOVE|CLSSTYLE_NEVERPRINT|CLSSTYLE_DONTTEMPLATE);
334}
335
336/*
337 * The prototype for cwcdtrackM_wpclsQueryTitle was replaced by the following prototype:
338 */
339SOM_Scope PSZ SOMLINK cwcdtrackM_wpclsQueryTitle(M_MMCDTrack *somSelf)
340{
341 static char chrTitle[20]={0};
342
343 /* M_CWCDTrackData *somThis = M_CWCDTrackGetData(somSelf); */
344 M_MMCDTrackMethodDebug("M_MMCDTrack","cwcdtrackM_wpclsQueryTitle");
345
346 if(chrTitle[0]==0)
347 if(!getMessage(chrTitle, IDSTR_CDTRACKTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
348 strcpy(chrTitle, CLSTITLE_CDTRACK);
349
350 return chrTitle;
351}
352
353/*
354 * The prototype for cwcdtrackM_wpclsQueryInstanceType was replaced by the following prototype:
355 */
356SOM_Scope PSZ SOMLINK cwcdtrackM_wpclsQueryInstanceType(M_MMCDTrack *somSelf)
357{
358 /* M_CWCDTrackData *somThis = M_CWCDTrackGetData(somSelf); */
359 M_MMCDTrackMethodDebug("M_MMCDTrack","cwcdtrackM_wpclsQueryInstanceType");
360
361 return TYPE_CDTRACK;
362}
363
364/*
365 * The prototype for cwcdtrackM_wpclsQueryDefaultHelp was replaced by the following prototype:
366 */
367
368SOM_Scope BOOL SOMLINK cwcdtrackM_wpclsQueryDefaultHelp(M_MMCDTrack *somSelf,
369 PULONG pHelpPanelId,
370 PSZ pszHelpLibrary)
371{
372 PSZ pszHelpLibName;
373 /* M_CWCDTrackData *somThis = M_CWCDTrackGetData(somSelf); */
374 M_MMCDTrackMethodDebug("M_MMCDTrack","cwcdtrackM_wpclsQueryDefaultHelp");
375
376 if((pszHelpLibName=_queryMp3HelpLibraryName())!=NULLHANDLE)
377 {
378 if(pHelpPanelId)
379 *pHelpPanelId=CDTRACK_HELP_PANEL;
380 if(pszHelpLibrary)
381 strncpy(pszHelpLibrary, pszHelpLibName, CCHMAXPATH);
382 return TRUE;
383 }
384
385 return (M_MMCDTrack_parent_M_MMAudio_wpclsQueryDefaultHelp(somSelf,
386 pHelpPanelId,
387 pszHelpLibrary));
388}
389
390
391
392
Note: See TracBrowser for help on using the repository browser.