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

Last change on this file was 64, checked in by gyoung, 23 months ago

Remove code and comment used to prevent problems caused by a defective Timidity plugin since I fixed the plugin

File size: 6.7 KB
Line 
1/*
2 * (C) Chris Wohlgemuth 2002-2004
3 *
4 */
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, or (at your option)
9 * 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; see the file COPYING. If not, write to
18 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20/*
21 * If you need another license for your project/product contact me at
22 *
23 * http://www.os2world.com/cdwriting
24 * http://www.geocities.com/SiliconValley/Sector/5785/
25 */
26
27/*
28 * This file was generated by the SOM Compiler and Emitter Framework.
29 * Generated using:
30 * SOM Emitter emitctm: 2.42
31 */
32
33#ifndef SOM_Module_cwmidi_Source
34#define SOM_Module_cwmidi_Source
35#endif
36#define CWMIDI_Class_Source
37#define M_CWMIDI_Class_Source
38
39#define INCL_PM
40#include <os2.h>
41#include <stdio.h>
42#include "helpid.h"
43#include "cwmidi.ih"
44#include "cwaudioinc.h"
45#include "sys_funcs.h"
46
47extern char chrHelpLibrary[CCHMAXPATH];
48extern BOOL globalHaveTimidity;
49
50HMODULE queryResModuleHandle(void);
51HMODULE queryModuleHandle(void);
52BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
53BOOL mmclsCreateTheDefaultTemplate(M_WPObject *somSelf,
54 WPObject* Folder);
55
56
57/*
58 * The prototype for cwmidi_wpModifyPopupMenu was replaced by the following prototype:
59 */
60SOM_Scope BOOL SOMLINK cwmidi_wpModifyPopupMenu(MMMIDI *somSelf,
61 HWND hwndMenu,
62 HWND hwndCnr,
63 ULONG iPosition)
64{
65 BOOL bRC;
66 /* CWMIDIData *somThis = CWMIDIGetData(somSelf); */
67 MMMIDIMethodDebug("MMMIDI","cwmidi_wpModifyPopupMenu");
68
69 bRC=(MMMIDI_parent_MMAudio_wpModifyPopupMenu(somSelf,
70 hwndMenu,
71 hwndCnr,
72 iPosition));
73
74 WinSendMsg(hwndMenu, MM_DELETEITEM, MPFROM2SHORT( ID_MENU_CONVERT, FALSE), 0L);
75 return bRC;
76}
77
78
79SOM_Scope ULONG SOMLINK cwmidi_cwmmAddAudioInformationPage(MMMIDI *somSelf,
80 HWND hwndNotebook)
81
82{
83 /* MMMIDIData *somThis = MMMIDIGetData(somSelf); */
84 MMMIDIMethodDebug("MMMIDI","cwmidi_cwmmAddAudioInformationPage");
85
86 // return (MMMIDI_parent_MMAudio_cwmmAddAudioInformationPage(somSelf, hwndNotebook));
87 return SETTINGS_PAGE_REMOVED;
88}
89
90
91/*
92 * SOM_Scope PSZ SOMLINK cwmidiM_wpclsQueryInstanceType(M_CWMIDI *somSelf)
93 */
94
95/*
96 * The prototype for cwmidiM_wpclsQueryInstanceType was replaced by the following prototype:
97 */
98SOM_Scope PSZ SOMLINK cwmidiM_wpclsQueryInstanceType(M_MMMIDI *somSelf)
99{
100 /* M_CWMIDIData *somThis = M_CWMIDIGetData(somSelf); */
101 M_MMMIDIMethodDebug("M_MMMIDI","cwmidiM_wpclsQueryInstanceType");
102
103 return TYPE_MIDI;
104 // return "MIDI";
105}
106
107
108/*
109 * SOM_Scope PSZ SOMLINK cwmidiM_wpclsQueryInstanceFilter(M_CWMIDI *somSelf)
110 */
111
112/*
113 * The prototype for cwmidiM_wpclsQueryInstanceFilter was replaced by the following prototype:
114 */
115SOM_Scope PSZ SOMLINK cwmidiM_wpclsQueryInstanceFilter(M_MMMIDI *somSelf)
116{
117 /* M_CWMIDIData *somThis = M_CWMIDIGetData(somSelf); */
118 M_MMMIDIMethodDebug("M_MMMIDI","cwmidiM_wpclsQueryInstanceFilter");
119
120 return "*.mid";
121}
122
123
124/*
125 * SOM_Scope BOOL SOMLINK cwmidiM_wpclsQueryDefaultHelp(M_CWMIDI *somSelf,
126 * PULONG pHelpPanelId,
127 * PSZ pszHelpLibrary)
128 */
129
130/*
131 * The prototype for cwmidiM_wpclsQueryDefaultHelp was replaced by the following prototype:
132 */
133SOM_Scope BOOL SOMLINK cwmidiM_wpclsQueryDefaultHelp(M_MMMIDI *somSelf,
134 PULONG pHelpPanelId,
135 PSZ pszHelpLibrary)
136{
137 /* M_CWMIDIData *somThis = M_CWMIDIGetData(somSelf); */
138 M_MMMIDIMethodDebug("M_MMMIDI","cwmidiM_wpclsQueryDefaultHelp");
139
140 if(pHelpPanelId)
141 *pHelpPanelId=MIDIFILE_HELP_PANEL;
142 if(pszHelpLibrary)
143 strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
144 return TRUE;
145}
146
147
148/*
149 * SOM_Scope PSZ SOMLINK cwmidiM_wpclsQueryTitle(M_CWMIDI *somSelf)
150 */
151
152/*
153 * The prototype for cwmidiM_wpclsQueryTitle was replaced by the following prototype:
154 */
155SOM_Scope PSZ SOMLINK cwmidiM_wpclsQueryTitle(M_MMMIDI *somSelf)
156{
157 static char chrTitle[20]={0};
158 /* M_CWMIDIData *somThis = M_CWMIDIGetData(somSelf); */
159 M_MMMIDIMethodDebug("M_MMMIDI","cwmidiM_wpclsQueryTitle");
160 if(chrTitle[0]==0)
161 if(!getMessage(chrTitle, IDSTR_MIDITITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
162 strcpy(chrTitle, CLSTITLE_MIDI);
163
164 return chrTitle;
165}
166
167/*
168 * The prototype for cwmidiM_wpclsQueryIconData was replaced by the following prototype:
169 */
170SOM_Scope ULONG SOMLINK cwmidiM_wpclsQueryIconData(M_MMMIDI *somSelf,
171 PICONINFO pIconInfo)
172{
173 HMODULE hmod;
174 /* M_CWMIDIData *somThis = M_CWMIDIGetData(somSelf); */
175 M_MMMIDIMethodDebug("M_MMMIDI","cwmidiM_wpclsQueryIconData");
176
177 hmod=queryModuleHandle();
178 if(!hmod)
179 return M_MMMIDI_parent_M_MMAudio_wpclsQueryIconData(somSelf, pIconInfo);
180
181 if (pIconInfo) {
182 pIconInfo->fFormat = ICON_RESOURCE;
183 pIconInfo->hmod = hmod;
184 pIconInfo->resid = ID_ICONMIDIFILE;
185 } /* endif */
186
187 return ( sizeof(ICONINFO) );
188}
189
190
191SOM_Scope BOOL SOMLINK cwmidiM_wpclsCreateDefaultTemplates(M_MMMIDI *somSelf,
192 WPObject* Folder)
193{
194 /* M_MMMIDIData *somThis = M_MMMIDIGetData(somSelf); */
195 M_MMMIDIMethodDebug("M_MMMIDI","cwmidiM_wpclsCreateDefaultTemplates");
196
197 /* Default installation contains a MIDI IO-Proc. I'm lazy here and
198 don't check if it's still installed but just create a default template. */
199 mmclsCreateTheDefaultTemplate(somSelf, Folder);
200 return TRUE;
201 return (M_MMMIDI_parent_M_MMAudio_wpclsCreateDefaultTemplates(somSelf,
202 Folder));
203}
204
Note: See TracBrowser for help on using the repository browser.