//	Album List for Winamp
//	Copyright (C) 1999-2001 Safai Ma
//
//	This program is free software; you can redistribute it and/or modify
//	it under the terms of the GNU General Public License as published by
//	the Free Software Foundation; either version 2 of the License, or
//	(at your option) any later version.
//
//	This program is distributed in the hope that it will be useful,
//	but WITHOUT ANY WARRANTY; without even the implied warranty of
//	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//	GNU General Public License for more details.
//
//	You should have received a copy of the GNU General Public License
//	along with this program; if not, write to the Free Software
//	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#ifndef __CONFIG_H__
#define __CONFIG_H__

#include "gen.h"

// our plugin structure
extern winampGeneralPurposePlugin plugin;

// some defines for the AL window dimensions
#define RESIZE_WIDTH		25
#define RESIZE_HEIGHT		29
#define MIN_WIDTH			275
#define MIN_HEIGHT			116
#define WINSHADE_HEIGHT		14

// all the AL configurable variables
extern int  al_wx;
extern int  al_wy;
extern int  al_open;
extern int  al_width;
extern int  al_height;
extern int	al_ws;
extern int	al_language;
extern BOOL al_add_cdroms;
extern char al_index[];
extern int  al_timeformat;
extern int  al_sortalbum;
extern int  al_append;
extern int	al_alphablend;
extern int  al_shownum;
extern int  al_showyear;
extern int  al_newverchk;
extern int  al_lastverchk;
extern int  al_ignore_pl;
extern int	al_ignore_m3u;
extern int  al_useid3;
extern int  al_dirstyle;
extern int  al_useplskin;
extern int  al_rmpltitle;
extern int  al_usecompression;
extern int  al_startup_scan;
extern int  al_enqueue;
extern int  al_keepsp;
extern int  al_loop;
extern int  al_showcover;
extern int  al_sortname;
extern int	al_fontsize;
extern int	al_searchsubdir;
extern int  al_fixtitles;
extern int  al_multidiscfix;
extern int	al_logfile;
extern int	al_autoadvance;
extern int	al_resume_play;
extern int  al_resume_time;
extern int  al_resume_pos;
extern char al_extlist[];
extern char al_multidiscnames[];
extern char al_lang[];
extern char szLangDir[];
extern char szLangINI[];
extern char szAlbumListDir[];
extern char szAlbumListPluginDir[];

// some of the Winamp configurable variables
extern int  pe_fontsize;
extern int  easymove;
extern int  aot;
extern int	snap;
extern int	snaplen;
extern int  shownumsinpl;
extern int  usecursors;
extern int  hilite;
extern int  fixtitles;
extern int  keeponscreen;
extern int  addtolist;
extern int  randskin;
extern int	bifont;
extern char szAppName[];
extern char szPluginINI[];
extern int  color_normal;
extern int  color_current;
extern int  color_normalbg;
extern int  color_selectedbg;
extern int  color_cdrom;
extern char color_font[];
extern int	al_instance;
extern DWORD wa_version;

// other stuff...
extern HWND hWndConfigPage;
extern BOOL bInternetReady;

extern BOOL bRefresh;

void config_read();
void config_winamp_read();
void config_write();

// utility functions
void GetVersionInformation(int &major, int &minor, int &build);
HINSTANCE GotoURL(LPCTSTR url, int showcmd);
void CenterWindow(HWND hwnd);
HWND ALFindWindow(LPCTSTR lpClassName, LPCTSTR lpWindowName);
int ALCountWindow(LPCTSTR lpClassName, LPCTSTR lpWindowName);
LPCTSTR ALSTRING(LPCTSTR str, LPCTSTR str2 = NULL);
void UpdateDialogStrings(HWND hWnd);
BOOL WriteString(HANDLE hFile, LPCTSTR lpszBuffer);
BOOL ResolveIt(HWND hwnd, LPCSTR lpszLinkFile, LPSTR lpszPath);

BOOL CALLBACK JumpToAlbumProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
BOOL CALLBACK RenameAlbumProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
BOOL CALLBACK AlbumInfoProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
BOOL CALLBACK ConfigTabsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);

#endif /* config.h */

