#if defined(WASAP) || defined(WINAMP) || defined(FOOBAR2000) || defined(GSPLAYER) || defined(APOLLO)
#include <windows.h>
#include "gui.h"
#endif
#ifdef WINAMP
#include <commctrl.h>
#endif

#include "..\asap.h"

#ifdef WASAP

#define FILE_DESCRIPTION "WASAP - Windows Another Slight Atari Player"
#define INTERNAL_NAME "wasap"
#define ORIGINAL_FILENAME "wasap.exe"

IDI_APP ICON "wasap/wasap.ico"
IDI_STOP ICON "wasap/stop.ico"
IDI_PLAY ICON "wasap/play.ico"

IDR_TRAYMENU MENU
{
	POPUP "WASAP"
	{
		MENUITEM "&Open...", IDM_OPEN
		MENUITEM "&Stop", IDM_STOP
		MENUITEM "File &information...", IDM_FILE_INFO
		MENUITEM "Save as &WAV...", IDM_SAVE_WAV, GRAYED
		MENUITEM "&About WASAP...", IDM_ABOUT
		MENUITEM "&Exit", IDM_EXIT
	}
}

1 24
{
	"<?xml version=\0421.0\042?>"
	"<assembly xmlns=\042urn:schemas-microsoft-com:asm.v1\042 "
		"manifestVersion=\0421.0\042>"
	"<assemblyIdentity version=\0421.0.0.0\042 "
		"processorArchitecture=\042X86\042 "
		"name=\042WASAP\042 type=\042win32\042 />"
	"<dependency><dependentAssembly>"
	"<assemblyIdentity type=\042win32\042 "
		"name=\042Microsoft.Windows.Common-Controls\042 "
		"version=\0426.0.0.0\042 processorArchitecture=\042X86\042 "
		"publicKeyToken=\0426595b64144ccf1df\042 language=\042*\042 />"
	"</dependentAssembly></dependency>"
	"</assembly>"
}

#else /* WASAP */

#if defined(WINAMP)
#  define APP_NAME "Winamp"
#  define INTERNAL_NAME "in_asap"
#elif defined(FOOBAR2000)
#  define APP_NAME "foobar2000 0.9"
#  define INTERNAL_NAME "foo_asap"
#elif defined(GSPLAYER)
#  define APP_NAME "GSPlayer"
#  define INTERNAL_NAME "gspasap"
#elif defined(DSHOW)
#  define INTERNAL_NAME "asap_dsf"
#  define FILE_DESCRIPTION "ASAP DirectShow source filter"
#elif defined(APOLLO)
#  define APP_NAME "Apollo"
#  define INTERNAL_NAME "ASAP_Apollo"
#elif defined(XBMC)
#  define APP_NAME "XBMC"
#  define INTERNAL_NAME "xbmc_asap"
#elif defined(APOKEYSND)
#  define INTERNAL_NAME "apokeysnd"
#  define FILE_DESCRIPTION "Another POKEY sound emulator"
#endif
#ifndef FILE_DESCRIPTION
#  define FILE_DESCRIPTION "ASAP " APP_NAME " plugin"
#endif
#define ORIGINAL_FILENAME INTERNAL_NAME ".dll"

#if defined(WINAMP) || defined(FOOBAR2000) || defined(GSPLAYER) || defined(APOLLO)

#ifndef _WIN32_WCE
IDD_SETTINGS DIALOG 0, 0, 184, 216
#else
IDD_SETTINGS DIALOG 0, 0, 268, 142
#endif
#ifdef FOOBAR2000
STYLE WS_CHILD
#else
#  ifdef _WIN32_WCE
STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | WS_POPUP
#  else
STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW
#  endif
CAPTION "ASAP Settings"
#endif
FONT 8, "MS Sans Serif"
{
	AUTORADIOBUTTON "No time limit", IDC_UNLIMITED, 16, 16, 152, 12, BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP
	AUTORADIOBUTTON "Finish after", IDC_LIMITED, 16, 30, 48, 12
	EDITTEXT IDC_MINUTES, 68, 30, 16, 12, ES_NUMBER | ES_RIGHT | WS_BORDER | WS_TABSTOP
	LTEXT "m", IDC_STATIC, 88, 32, 10, 12
	EDITTEXT IDC_SECONDS, 100, 30, 16, 12, ES_NUMBER | ES_RIGHT | WS_BORDER | WS_TABSTOP
	LTEXT "s", IDC_STATIC, 120, 32, 10, 12
	AUTOCHECKBOX "Finish after", IDC_SILENCE, 16, 48, 48, 12
	EDITTEXT IDC_SILSECONDS, 68, 48, 16, 12, ES_NUMBER | ES_RIGHT | WS_BORDER | WS_TABSTOP
	LTEXT "seconds of silence", IDC_STATIC, 88, 50, 64, 12
	AUTORADIOBUTTON "Same as songs with unspecified duration", IDC_LOOPS, 16, 84, 152, 12, BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP
	AUTORADIOBUTTON "Finish when music starts repeating", IDC_NOLOOPS, 16, 98, 152, 12
#ifndef _WIN32_WCE
	AUTOCHECKBOX "Channel 1", IDC_MUTE1, 24, 132, 48, 12
	AUTOCHECKBOX "Channel 2", IDC_MUTE1 + 1, 24, 144, 48, 12
	AUTOCHECKBOX "Channel 3", IDC_MUTE1 + 2, 24, 156, 48, 12
	AUTOCHECKBOX "Channel 4", IDC_MUTE1 + 3, 24, 168, 48, 12
	AUTOCHECKBOX "Channel 1", IDC_MUTE1 + 4, 112, 132, 48, 12
	AUTOCHECKBOX "Channel 2", IDC_MUTE1 + 5, 112, 144, 48, 12
	AUTOCHECKBOX "Channel 3", IDC_MUTE1 + 6, 112, 156, 48, 12
	AUTOCHECKBOX "Channel 4", IDC_MUTE1 + 7, 112, 168, 48, 12
	GROUPBOX "Songs with unspecified duration", IDC_STATIC, 8, 4, 168, 64
	GROUPBOX "Songs marked as looping", IDC_STATIC, 8, 72, 168, 46
	GROUPBOX "Mute base POKEY", IDC_STATIC, 8, 122, 80, 64
	GROUPBOX "Mute extra POKEY", IDC_STATIC, 96, 122, 80, 64
#  ifndef FOOBAR2000
	DEFPUSHBUTTON "OK", IDOK, 38, 194, 50, 14
	PUSHBUTTON "Cancel", IDCANCEL, 96, 194, 50, 14
#  endif
#else
	AUTOCHECKBOX "Channel 1", IDC_MUTE1, 196, 14, 48, 12
	AUTOCHECKBOX "Channel 2", IDC_MUTE1 + 1, 196, 26, 48, 12
	AUTOCHECKBOX "Channel 3", IDC_MUTE1 + 2, 196, 38, 48, 12
	AUTOCHECKBOX "Channel 4", IDC_MUTE1 + 3, 196, 50, 48, 12
	AUTOCHECKBOX "Channel 1", IDC_MUTE1 + 4, 196, 82, 48, 12
	AUTOCHECKBOX "Channel 2", IDC_MUTE1 + 5, 196, 94, 48, 12
	AUTOCHECKBOX "Channel 3", IDC_MUTE1 + 6, 196, 106, 48, 12
	AUTOCHECKBOX "Channel 4", IDC_MUTE1 + 7, 196, 118, 48, 12
	GROUPBOX "Songs with unspecified duration", IDC_STATIC, 8, 4, 168, 64
	GROUPBOX "Songs marked as looping", IDC_STATIC, 8, 72, 168, 46
	GROUPBOX "Mute base POKEY", IDC_STATIC, 180, 4, 80, 64
	GROUPBOX "Mute extra POKEY", IDC_STATIC, 180, 72, 80, 64
	DEFPUSHBUTTON "OK", IDOK, 38, 122, 50, 14
	PUSHBUTTON "Cancel", IDCANCEL, 96, 122, 50, 14
#endif
}

#endif /* defined(WINAMP) || defined(FOOBAR2000) || defined(GSPLAYER) || defined(APOLLO) */

#ifdef WINAMP
IDD_PROGRESS DIALOG 0, 0, 160, 48
STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | WS_POPUP | WS_VISIBLE
CAPTION "Please wait"
FONT 8, "MS Sans Serif"
{
	CTEXT "Adding subsongs to the playlist", IDC_STATIC, 8, 8, 144, 12
	CONTROL "", IDC_PROGRESS, PROGRESS_CLASS, 0, 8, 24, 144, 12
}
#endif

#endif /* WASAP */

#if defined(WASAP) || defined(WINAMP) || defined(APOLLO)
#ifdef WINAMP
#define INFO_Y  18
#else
#define INFO_Y  0
#endif
IDD_INFO DIALOG 0, 0, 300, 102+INFO_Y
STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE
CAPTION "File information"
FONT 8, "MS Sans Serif"
{
#ifdef WINAMP
	AUTOCHECKBOX "Show information about the currently &playing file", IDC_PLAYING, 46, 8, 284, 12
#endif
	RTEXT "&Filename:", IDC_STATIC, 8, 10+INFO_Y, 30, 12
	EDITTEXT IDC_FILENAME, 46, 8+INFO_Y, 246, 12, ES_LEFT | ES_AUTOHSCROLL | ES_READONLY | WS_BORDER | WS_TABSTOP
	RTEXT "&Author:", IDC_STATIC, 8, 24+INFO_Y, 30, 12
	EDITTEXT IDC_AUTHOR, 46, 22+INFO_Y, 246, 12, ES_LEFT | ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
	RTEXT "&Name:", IDC_STATIC, 8, 38+INFO_Y, 30, 12
	EDITTEXT IDC_NAME, 46, 36+INFO_Y, 246, 12, ES_LEFT | ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
	RTEXT "&Date:", IDC_STATIC, 8, 52+INFO_Y, 30, 12
	EDITTEXT IDC_DATE, 46, 50+INFO_Y, 246, 12, ES_LEFT | ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
	RTEXT "S&ong:", IDC_STATIC, 8, 66+INFO_Y, 30, 12
	COMBOBOX IDC_SONGNO, 46, 64+INFO_Y, 26, 12, CBS_DROPDOWNLIST | WS_TABSTOP
	RTEXT "&Time:", IDC_STATIC, 80, 66+INFO_Y, 20, 12
	EDITTEXT IDC_TIME, 108, 64+INFO_Y, 40, 12
	AUTOCHECKBOX "&Loop", IDC_LOOP, 156, 64+INFO_Y, 40, 12
	DEFPUSHBUTTON "&Save", IDC_SAVE, 106, 82+INFO_Y, 50, 14
	PUSHBUTTON "&Convert", IDC_CONVERT, 164, 82+INFO_Y, 70, 14
	PUSHBUTTON "Close", IDCANCEL, 242, 82+INFO_Y, 50, 14
}
#endif /* defined(WASAP) || defined(WINAMP) || defined(APOLLO) */

1 VERSIONINFO
	FILEVERSION ASAP_VERSION_MAJOR, ASAP_VERSION_MINOR, ASAP_VERSION_MICRO, 0
	PRODUCTVERSION ASAP_VERSION_MAJOR, ASAP_VERSION_MINOR, ASAP_VERSION_MICRO, 0
	FILEFLAGSMASK 0x3fL
	FILEFLAGS 0x0L
	FILEOS 0x40004L
	FILETYPE 0x1L
	FILESUBTYPE 0x0L
{
	BLOCK "StringFileInfo"
	{
		BLOCK "040904b0"
		{
			VALUE "CompanyName", "Piotr Fusik\0"
			VALUE "FileDescription", FILE_DESCRIPTION "\0"
			VALUE "FileVersion", ASAP_VERSION "\0"
			VALUE "InternalName", INTERNAL_NAME "\0"
			VALUE "LegalCopyright", "Copyleft " ASAP_YEARS "\0"
			VALUE "OriginalFilename", ORIGINAL_FILENAME "\0"
			VALUE "ProductName", "ASAP\0"
			VALUE "ProductVersion", ASAP_VERSION "\0"
		}
	}
	BLOCK "VarFileInfo"
	{
		VALUE "Translation", 0x409, 1200
	}
}
