//ڷ http://msdn.microsoft.com/en-us/library/windows/desktop/ms632600%28v=vs.85%29.aspx
//չڷ http://msdn.microsoft.com/en-us/library/windows/desktop/ff700543%28v=vs.85%29.aspx


interface IWindow{
Properties:
   (read,write) Left;//
   (read,write) Top; 
   (read,write) Width; 
   (read,write) Height; 
   (read,write) Style; //ڷ
   (read,write) ExStyle;//չ
   (read,write) Caption;//ڱ
Methods:
	IWindow GetChild(class_name,index);//ȡΪclass_nameĵindex
	//flag=1 ͬGetParent
	//flag=2 ȡھ
	// http://msdn.microsoft.com/en-us/library/windows/desktop/ms633502%28v=vs.85%29.aspx
	IWindow GetAncestor(flag = 1);
	void SetParent(IWindow parent);
	void SendMsg(msg,wp,lp);
	//ϸflag http://msdn.microsoft.com/en-us/library/windows/desktop/ms633548%28v=vs.85%29.aspx 
	void Show(flag);
	void Move(x,y,w,h,redraw = false);
	boolean IsVisible();
	boolean IsMinimized();
	boolean IsMaximized();
	//vista+
	//mode = 0ʱl t r bӦ///ױ߾
	//mode = 1ʱӦ(l,t)(r,b)Ϊ/µľ
	void CreateGlass( l, r, t , b, mode = 0);
	//color ͸ɫ
	void SetWindowTransparency(opacity,color);
	int MsgBox(caption,prompt,type);
	String InputBox(caption="",prompt="",defval="",num_only = false);
	//mode
	// 0 ļ 1 ļ 2 Ŀ¼
	// Ŀ¼ʱtitle 
	String FileDialog(mode = 0,title="Open",filetype="All Files|*.*",defext="*");
	IGdiBitmap PrintWindow(client_only = false);
}

interface IPrivateFontCollection{
Properties:
	(readonly) FamilyCount;
Methods:
	int AddFont(path);
	IGdiFont GetFont(name,size,style);
}

//ʵ
interface IHttpRequest{
Methods:
    void AddHeader(str);
    void AddPostData(name,value);
    String Run(url);
    int RunAsync(url);//첽url󣬷cookieֵɺon_http_run_done(cookie,string);
}

interface WSHUtils{
Methods:
	IWindow GetWND(class_name);
	IWindow CreateWND(window_id);
	IWindow ReleaseCapture();
	boolean IsAeroEnabled();
	IGdiBitmap DecodeBase64Image(str);
	String GetClipboardText();
	void SetClipboardText(str);
	void PlaySound(path,flag);
	HCURSOR LoadCursorX(path);
	HCURSOR SetCursorX(handle);
	void ReleaseCursorX(handle);
	boolean IsVistaOrGreater();
	//http://msdn.microsoft.com/en-us/library/windows/desktop/dd318700%28v=vs.85%29.aspx
	String LCMapString(str,lcid,flag);
	//type_str:
	//"GET"
	//"POST"
	IHttpRequest CreateHttpRequest(type_str);
	VBArray GetWindowsVersion();
}

interface IThemeManager {
Methods:
	//Vista+
	void DrawThemeTextEx(IGdiGraphics, text, color, x, y, w, h, iGlowSize = 5 , format = 0);
}

interface IGdiUtils {
Methods:
	//ֵ0ɹ
	int AddFontResEx( path,fl=0);
	//flAddFontResExеֵͬ
	int RemoveFontResEx( path,fl=0);
	IPrivateFontCollection CreatePrivateFontCollection();
	IGdiBitmap CloneGraphics(IGdiGraphics,x,y,w,h);
}

interface IGdiGraphics{
Methods:
  void FillPie(x,y,w,h,start_angle,sweep_angle,color);
  void DrawPie(x,y,w,h,start_angle,sweep_angle,color);
}

interface IFbPlaylistManager {
Methods:
   string PlaylistGetAutoName(playlistIndex);//ԶȡбƣбĿ
   //б
   //FLAGs:
   //FLAG_ADD = 0x00000001
   //FLAG_REMOVE = 0x00000002
   //FLAG_REORDER  = 0x00000004
   //FLAG_REPLACE  = 0x00000008
   //FLAG_RENAME = 0x00000010
   //FLAG_REMOVE_PLAYLIST = 0x00000020
   void PlaylistLock(playlistIndex,flag);
   //עĲбindexĺʹøĺnew_indexunlock
   void PlaylistUnlock(playlistIndex);
   void ProcessLocationsAsync(urls);//ɺon_process_locations_done(metadbs)
}

//improve
interface IFbTitleFormat {
Methods:
    //foobar2000 v1.3.0 ϣעfromfile
    String Eval(force = false,fromfile = false);
    String EvalWithMetadb(IFbMetadbHandle,fromfile = false);
    void Dispose();
}

interface IFbMetadbHandle {
Methods:
    //foobar2000 v1.3.0 ϣע
    IFbFileInfo GetFileInfo(fromfile = false);
    void UpdateFileInfo(IFbFileInfo,force = false);
}

interface IFbUtils {
Methods:
    void ShowPreferences(guid_str="");
    boolean LoadPlaylistV2(path);
    boolean SavePlaylistV2(path,handles,overwrite = false);//overwrite=trueʱԭļΪ"ԭбļ.bak"
}

interface IWSHUtils {
Methods:
    //ҳGUID̨
    void PrintPreferencePageGUID();
    //pattern: -ʾ-ģ巽ʽзָe.g.   "c:\\%album%.jpg\ncover.jpg";
    IGdiBitmap GetAlbumArtV3(metadb, pattern , art_id = 0, need_stub = true, load_embed = true , use_fallback = true);
}