| 1 | /* | 
|---|
| 2 | * This file is (C) Chris Wohlgemuth 2002 | 
|---|
| 3 | */ | 
|---|
| 4 | /* | 
|---|
| 5 | * This program is free software; you can redistribute it and/or modify | 
|---|
| 6 | * it under the terms of the GNU General Public License as published by | 
|---|
| 7 | * the Free Software Foundation; either version 2, or (at your option) | 
|---|
| 8 | * any later version. | 
|---|
| 9 | * | 
|---|
| 10 | * This program is distributed in the hope that it will be useful, | 
|---|
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|---|
| 13 | * GNU General Public License for more details. | 
|---|
| 14 | * | 
|---|
| 15 | * You should have received a copy of the GNU General Public License | 
|---|
| 16 | * along with this program; see the file COPYING.  If not, write to | 
|---|
| 17 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 
|---|
| 18 | */ | 
|---|
| 19 | #define INCL_DOS | 
|---|
| 20 | #define INCL_WIN | 
|---|
| 21 | #define INCL_GPIBITMAPS | 
|---|
| 22 | #include <os2.h> | 
|---|
| 23 |  | 
|---|
| 24 | #define INCL_MCIOS2 | 
|---|
| 25 | #include <os2me.h> | 
|---|
| 26 |  | 
|---|
| 27 |  | 
|---|
| 28 | #include "except.h" | 
|---|
| 29 |  | 
|---|
| 30 | #define IDTIMER_PLAY  5L | 
|---|
| 31 | #define PLAYTIMER_DELAY 1000 | 
|---|
| 32 |  | 
|---|
| 33 | #define STATUS_LENGTH 200 | 
|---|
| 34 |  | 
|---|
| 35 | #ifdef DEBUG | 
|---|
| 36 | void writeDebugLog(char *text); | 
|---|
| 37 | #endif | 
|---|
| 38 |  | 
|---|
| 39 |  | 
|---|
| 40 | #pragma SOMAsDefault(on) | 
|---|
| 41 | #include <som.hh> | 
|---|
| 42 | #include <somcls.hh> | 
|---|
| 43 | #pragma SOMNoMangling(on) | 
|---|
| 44 | /*#include "progfolder.h"*/ | 
|---|
| 45 | #include "wpshadow.hh" | 
|---|
| 46 |  | 
|---|
| 47 | #pragma SOMAsDefault(off) | 
|---|
| 48 | typedef struct _MYVIEWITEM | 
|---|
| 49 | { | 
|---|
| 50 | BOOL bIsInUseList; | 
|---|
| 51 | USEITEM useItem; | 
|---|
| 52 | VIEWITEM viewItem; | 
|---|
| 53 | }MYVIEWITEM; | 
|---|
| 54 |  | 
|---|
| 55 | typedef struct | 
|---|
| 56 | { | 
|---|
| 57 | INT id; | 
|---|
| 58 | RECTL rclSource; | 
|---|
| 59 | HBITMAP hbmSource; | 
|---|
| 60 | RECTL rclDest; | 
|---|
| 61 | }CONTROLINFO; | 
|---|
| 62 |  | 
|---|
| 63 | typedef struct | 
|---|
| 64 | { | 
|---|
| 65 | BITMAPINFOHEADER bmpInfoHdr; | 
|---|
| 66 | HBITMAP hbm; | 
|---|
| 67 | }LOADEDBITMAP; | 
|---|
| 68 |  | 
|---|
| 69 |  | 
|---|
| 70 | #pragma SOMAsDefault(on) | 
|---|
| 71 |  | 
|---|
| 72 | class M_CWAudioShadow:public M_WPShadow | 
|---|
| 73 | { | 
|---|
| 74 | /* The name of of the new class */ | 
|---|
| 75 | #pragma SOMClassName(*,"M_CWAudioShadow") | 
|---|
| 76 | /* Required SOM version */ | 
|---|
| 77 | #pragma SOMClassVersion(*,1,2) | 
|---|
| 78 | #pragma SOMCallstyle(oidl) | 
|---|
| 79 | public: | 
|---|
| 80 | virtual PSZ  wpclsQueryTitle(); | 
|---|
| 81 | virtual ULONG wpclsQueryDetailsInfo( PCLASSFIELDINFO* ppClassFieldInfo, PULONG pSize); | 
|---|
| 82 | #if 0 | 
|---|
| 83 | virtual void wpclsInitData(); | 
|---|
| 84 | virtual       ULONG wpclsQueryIconData(PICONINFO pIconInfo); | 
|---|
| 85 | virtual       ULONG wpclsQueryIconDataN(PICONINFO pIconInfo, ULONG ulIconIndex); | 
|---|
| 86 | virtual void wpclsUnInitData(); | 
|---|
| 87 | virtual ULONG wpclsQueryStyle(); | 
|---|
| 88 | virtual BOOL wpclsQueryDefaultHelp(PULONG HelpPanelId,PSZ HelpLibrary); | 
|---|
| 89 | virtual BOOL wpclsCreateDefaultTemplates(WPObject * wpObject); | 
|---|
| 90 | #endif | 
|---|
| 91 |  | 
|---|
| 92 | #pragma SOMReleaseOrder() | 
|---|
| 93 | #pragma SOMIDLPass(*,"Implementation-End","dllname = mediafld;") | 
|---|
| 94 | }; | 
|---|
| 95 |  | 
|---|
| 96 | class CWAudioShadow:public WPShadow | 
|---|
| 97 | { | 
|---|
| 98 | #pragma SOMClassName(*,"CWAudioShadow") | 
|---|
| 99 | #pragma SOMMetaClass(CWAudioShadow,"M_CWAudioShadow") | 
|---|
| 100 | #pragma SOMClassVersion(CWAudioShadow,1,2) | 
|---|
| 101 | #pragma SOMCallstyle(oidl) | 
|---|
| 102 | private: | 
|---|
| 103 |  | 
|---|
| 104 | public: | 
|---|
| 105 |  | 
|---|
| 106 | virtual ULONG wpQueryDetailsData(PVOID* ppDetailsData, PULONG pcp); | 
|---|
| 107 |  | 
|---|
| 108 | #if 0 | 
|---|
| 109 | virtual BOOL wpMenuItemHelpSelected(ULONG MenuId); | 
|---|
| 110 | virtual ULONG wpFilterPopupMenu(ULONG ulFlags, HWND hwndCnr, BOOL fMultiSelect); | 
|---|
| 111 | virtual BOOL wpModifyPopupMenu(HWND hwndMenu, HWND hwndCnr, ULONG ulPosition); | 
|---|
| 112 | virtual BOOL wpMenuItemSelected(HWND hwndFrame,ULONG ulMenuId); | 
|---|
| 113 | virtual ULONG wpAddFolderView2Page(HWND hwndNotebook); | 
|---|
| 114 | virtual MRESULT wpDragOver(HWND hwndCnr,PDRAGINFO pDragInfo); | 
|---|
| 115 | virtual BOOL wpAddSettingsPages(HWND hwndNotebook); | 
|---|
| 116 | virtual BOOL wpAddToContent(WPObject* Object); | 
|---|
| 117 | virtual BOOL wpDeleteFromContent(WPObject* Object); | 
|---|
| 118 | virtual BOOL cwIsWaveFile(WPObject* wpObject); | 
|---|
| 119 | virtual ULONG cwSetWriteFlags(ULONG ulNewWriteFlags,ULONG ulMask); | 
|---|
| 120 | virtual ULONG cwQueryWriteFlags(); | 
|---|
| 121 | virtual BOOL wpRestoreState(ULONG ulReserved); | 
|---|
| 122 | virtual BOOL wpSaveState(); | 
|---|
| 123 | virtual MRESULT wpDragOver(HWND hwndCnr,PDRAGINFO pDragInfo); | 
|---|
| 124 | virtual MRESULT wpDrop(HWND hwndCnr,PDRAGINFO pDragInfo,PDRAGITEM pDragItem); | 
|---|
| 125 | #endif | 
|---|
| 126 |  | 
|---|
| 127 | #pragma SOMReleaseOrder() | 
|---|
| 128 |  | 
|---|
| 129 | #pragma SOMIDLPass(CWMediaFolder,"Implementation-End","dllname = mediafld;") | 
|---|
| 130 | }; | 
|---|
| 131 |  | 
|---|
| 132 |  | 
|---|
| 133 |  | 
|---|
| 134 |  | 
|---|
| 135 |  | 
|---|
| 136 |  | 
|---|
| 137 |  | 
|---|
| 138 |  | 
|---|
| 139 |  | 
|---|
| 140 |  | 
|---|
| 141 |  | 
|---|
| 142 |  | 
|---|
| 143 |  | 
|---|
| 144 |  | 
|---|
| 145 |  | 
|---|