| 1 |
|
|---|
| 2 | /*
|
|---|
| 3 | *@@sourcefile syssound.h:
|
|---|
| 4 | * header file for syssound.c. See remarks there.
|
|---|
| 5 | *
|
|---|
| 6 | * Note: Version numbering in this file relates to XWorkplace version
|
|---|
| 7 | * numbering.
|
|---|
| 8 | *
|
|---|
| 9 | *@@include #define INCL_WINSHELLDATA
|
|---|
| 10 | *@@include #include <os2.h>
|
|---|
| 11 | *@@include #include "helpers\syssound.h"
|
|---|
| 12 | */
|
|---|
| 13 |
|
|---|
| 14 | /* Copyright (C) 1999-2009 Ulrich Mller.
|
|---|
| 15 | * This file is part of the "XWorkplace helpers" source package.
|
|---|
| 16 | * This is free software; you can redistribute it and/or modify
|
|---|
| 17 | * it under the terms of the GNU General Public License as published
|
|---|
| 18 | * by the Free Software Foundation, in version 2 as it comes in the
|
|---|
| 19 | * "COPYING" file of the XWorkplace main distribution.
|
|---|
| 20 | * This program is distributed in the hope that it will be useful,
|
|---|
| 21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 23 | * GNU General Public License for more details.
|
|---|
| 24 | */
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 | #if __cplusplus
|
|---|
| 28 | extern "C" {
|
|---|
| 29 | #endif
|
|---|
| 30 |
|
|---|
| 31 | #ifndef SYSSOUND_HEADER_INCLUDED
|
|---|
| 32 | #define SYSSOUND_HEADER_INCLUDED
|
|---|
| 33 |
|
|---|
| 34 | /********************************************************************
|
|---|
| 35 | *
|
|---|
| 36 | * Declarations
|
|---|
| 37 | *
|
|---|
| 38 | ********************************************************************/
|
|---|
| 39 |
|
|---|
| 40 | /* Undocumented WinAlarm Values to reflect changes to sound settings right away */
|
|---|
| 41 | #define WA_TEST 997
|
|---|
| 42 | #define WA_ENABLESOUNDS 998
|
|---|
| 43 | #define WA_APPLYVOLUMETOALL 999
|
|---|
| 44 | #define WA_FILECHANGED 1000
|
|---|
| 45 |
|
|---|
| 46 | /* keys for accessing sounds in MMPM.INI */
|
|---|
| 47 | #define MMINIKEY_SYSSOUNDS "MMPM2_AlarmSounds"
|
|---|
| 48 | #define MMINIKEY_SOUNDSETTINGS "MMPM2_AlarmSoundsData"
|
|---|
| 49 |
|
|---|
| 50 | // system sound indices in MMPM.INI
|
|---|
| 51 | #define MMSOUND_WARNING 0
|
|---|
| 52 | #define MMSOUND_INFORMATION 1
|
|---|
| 53 | #define MMSOUND_LOCKUP 10
|
|---|
| 54 | #define MMSOUND_ALARMCLOCK 11
|
|---|
| 55 | #define MMSOUND_PRINTERROR 12
|
|---|
| 56 | #define MMSOUND_ERROR 2
|
|---|
| 57 | #define MMSOUND_ANIMATEOPEN 3
|
|---|
| 58 | #define MMSOUND_ANIMATECLOSE 4
|
|---|
| 59 | #define MMSOUND_DRAG 5
|
|---|
| 60 | #define MMSOUND_DROP 6
|
|---|
| 61 | #define MMSOUND_SYSTEMSTARTUP 7
|
|---|
| 62 | #define MMSOUND_SHUTDOWN 8
|
|---|
| 63 | #define MMSOUND_SHREDDER 9
|
|---|
| 64 |
|
|---|
| 65 | // sound schemes INI keys in OS2SYS.INI
|
|---|
| 66 | #define MMINIKEY_SOUNDSCHEMES "PM_SOUND_SCHEMES_LIST"
|
|---|
| 67 |
|
|---|
| 68 | /********************************************************************
|
|---|
| 69 | *
|
|---|
| 70 | * Function prototypes
|
|---|
| 71 | *
|
|---|
| 72 | ********************************************************************/
|
|---|
| 73 |
|
|---|
| 74 | ULONG sndParseSoundData(PCSZ pszSoundData,
|
|---|
| 75 | PSZ pszDescr,
|
|---|
| 76 | PSZ pszFile,
|
|---|
| 77 | PULONG pulVolume);
|
|---|
| 78 |
|
|---|
| 79 | VOID sndQueryMmpmIniPath(PSZ pszMMPM);
|
|---|
| 80 |
|
|---|
| 81 | HINI sndOpenMmpmIni(HAB hab);
|
|---|
| 82 |
|
|---|
| 83 | BOOL sndQuerySystemSound(HAB hab,
|
|---|
| 84 | USHORT usIndex,
|
|---|
| 85 | PSZ pszDescr,
|
|---|
| 86 | PSZ pszFile,
|
|---|
| 87 | PULONG pulVolume);
|
|---|
| 88 |
|
|---|
| 89 | BOOL sndWriteSoundData(HINI hiniMMPM,
|
|---|
| 90 | USHORT usIndex,
|
|---|
| 91 | PCSZ pszDescr,
|
|---|
| 92 | PCSZ pszFile,
|
|---|
| 93 | ULONG ulVolume);
|
|---|
| 94 |
|
|---|
| 95 | BOOL sndSetSystemSound(HAB hab,
|
|---|
| 96 | USHORT usIndex,
|
|---|
| 97 | PCSZ pszDescr,
|
|---|
| 98 | PCSZ pszFile,
|
|---|
| 99 | ULONG ulVolume);
|
|---|
| 100 |
|
|---|
| 101 | BOOL sndDoesSchemeExist(PCSZ pszScheme,
|
|---|
| 102 | PSZ *ppszRealScheme);
|
|---|
| 103 |
|
|---|
| 104 | APIRET sndCreateSoundScheme(HINI hiniMMPM,
|
|---|
| 105 | PCSZ pszNewScheme);
|
|---|
| 106 |
|
|---|
| 107 | APIRET sndLoadSoundScheme(HINI hiniMMPM,
|
|---|
| 108 | PCSZ pszScheme);
|
|---|
| 109 |
|
|---|
| 110 | APIRET sndDestroySoundScheme(PCSZ pszScheme);
|
|---|
| 111 |
|
|---|
| 112 | VOID fixMmpmIni(void);
|
|---|
| 113 |
|
|---|
| 114 | #endif
|
|---|
| 115 |
|
|---|
| 116 | #if __cplusplus
|
|---|
| 117 | }
|
|---|
| 118 | #endif
|
|---|
| 119 |
|
|---|