//Helpers
function getClass(){
switch(window.InstanceType){
case 0:
return "{E7076D1C-A7BF-4f39-B771-BCBE88F2A2A8}";
case 1:
return "{97E27FAA-C0B3-4b8e-A693-ED7881E99FC1}";
default:
return "foo_ui_func_window_class";
}
}
//ǰfbľ
var fb_hWnd = et.GetHWND(getClass());

//ϳһβSendMessageExһ
function MakeLParam(a, b){return (a | b << 16);}

//ShowWindowExhttp://msdn.microsoft.com/en-us/library/windows/desktop/ms633548(v=vs.85).aspx
SW_FORCEMINIMIZE = 11;
SW_HIDE = 0;
SW_MAXIMIZE = 3;
SW_MINIMIZE = 6;
SW_RESTORE = 9;
SW_SHOW = 5;
SW_SHOWDEFAULT = 10;
SW_SHOWMAXIMIZED = 3;
SW_SHOWMINIMIZED = 2;
SW_SHOWMINNOACTIVE = 7;
SW_SHOWNA = 8;
SW_SHOWNOACTIVATE = 4;
SW_SHOWNORMAL = 1;

//et.Translate("w",0x0804,0x02000000);//ؼ
//et.Translate("",0x0804,0x04000000);//ط
//תʽοMSDNվ
/***********************************************************/
/////////////////////////////////////////////////////////////
/***********************************************************/
interface IWSHAliens {//  et - IWSHAliens
Properties:
Methods:
//شΪclassIDĴھ
	HWND GetHWND(classID);
//parentHWNDµĳָӴ
	HWND GetChildHWND(parentHWND, classID, index);
//ĳڵֱϵ
	HWND GetParentHWND(hWnd);

//WINAPI SendMessageķװ
	void SendMessageEx(hWnd, MsgNum, wParam, lParam);
//WINAPI ReleaseCaptureķװ
	void ReleaseCaptureEx();

//ƶĳָڣrefresh趨Ƿǿˢ
	void MoveWindowEx(hWnd, x, y, w, h, refresh = true);
//ȡϢذ棩idx08ǣ
/*
0=Ըڵx
1=Ըڵy
2=ڵĿȣ
3=ڵĸߣ
4=Ļx
5=Ļy
6,7,8ǱĿݲ*/
	int  GetWindowInfoEx(hWnd, Idx);
//ȡϢ෵ذ棩صֵҪ.toArray()תͨ顣
	VBArray GetWindowInfoAx(hWnd);

//ƴʾcommandοhelpers&flags
	void ShowWindowEx(hWnd, command);
//ָǷɼ
	boolean IsWindowVisibleEx(hWnd);
//ָǷС
	boolean IsMinimizedEx(hWnd);
//ָǷ
	boolean IsMaximizedEx(hWnd);

//ǰϵͳ汾Ƿwindows 6.0ϡʵôΪSPֻwin 6.0
	boolean IsVistaOrSeven();

//Чl,r,t,bעⲻҿߡl,r,t,bΪ-1ȫ͸
	void CreateGlass(hWnd, l, r, t, b);
//ǰϵͳǷЧ
	boolean IsGlassEnabled();

//ôĺWINAPIжӦķװ
	void ShowScrollBarEx(hWnd, target,show);
	boolean IsScrollbarVisible(hWnd, target);

//һⲿָļָ
	HCURSOR CreateCursor(filePath);
//ǰʽΪָʽʽ
	HCURSOR ChangeCursor(hCursor);
//ڳʱʹô˺ͷԴ
	void ReleaseCursor(hCursor);

//޸ĴʽغWINAPIжӦķװ
	void AddStyle(hWnd, style);
	void RemoveStyle(hWnd, style);
	void AddExStyle(hWnd, exstyle);
	void RemoveExStyle(hWnd, exstyle);
	int GetWindowStyleEx(hWnd);
	void SetWindowStyleEx(hWnd, style);

//Base64ַͼƬʽ
	IGdiBitmap DecodeBase64Image(dataString);

//һϢhWndΪfoobarڵhWndִн
	int CreateMessageBox(hWnd, caption, prompt, type);
//һhWndΪfoobarڵhWndؿ
	String CreateInputBox(hWnd, caption, prompt, defText);
//һļԻhWndΪfoobarڵhWnd
//һΪtrueԻ򣬷Ǵ򿪶Ի
//ļͲֵĹ"ļ|*.չ|ļ2|*.չ2|..."ӡ"txt"Ĭչ
//ڿѡеļַ
	String CreateFileDialog(hWnd, fileType, ext, window_title, save);

//ϵͳⲿ壬ӵGDIʽãflǷFBʹӵ塣
	boolean AddFontResourceX(fontFile, fl);
//ʱͷԴ
	boolean RemoveFontResourceX(fontFile, fl);

//趨
	void SetClipboardText(input);
//ؼ
	String GetClipboardText);();

//ıиֱ任
	String Translate(input, lcid, flag);
}

interface IThemeManager {
Methods:
	//SP extension:
	//Ʒı
	void DrawThemeTextEx(IGdiGraphics, text, color, x, y, w, h, iGlowSize = 10 , format = 0);
}

//SP Extension:
//һ˽ۺϣԵGDI+
gdi.CreatePrivateFontCollection();

interface IPrivateFontCollection
{
Properties:	
//Ա
	(readonly)int FamilyCount();
Methods:
//ۺ壬
	String AddFont(fontPath);
//ƷضӦ
	IGdiFont GetFont(name, size, style);
};