#ifndef	_SYS_API
#define	_SYS_API


///////////////////////////////////////////////////////////////////////////
//	By Wyp 98.10.12
//	定义空字符串
#define NULLSTRING	""

///////////////////////////////////////////////////////////////////////////
//	By Wyp 98.10.11
//	定义菜单类型
enum MENUTYPE{POPUPMENU,SEPARATOR,MENUITEM};

//	定义在指定菜单前或后加菜单
enum WHEREINS{BEFORE,AFTER,AFTERSEP};

_declspec(dllimport) void ebInitDebugRes(CString dllName);
_declspec(dllimport) void ebTermDebugRes();
_declspec(dllimport) int ebAddToolBar(UINT idToolBar);
_declspec(dllimport) int ebShowToolBar(UINT idToolBar);
_declspec(dllimport) int ebDelToolBar(UINT idToolBar);
_declspec(dllimport) int ebAddButton(UINT idToolBar);
_declspec(dllimport) int ebDelButton(UINT idToolBar);

_declspec(dllimport) int ebAppendMenu(UINT MenuID);
_declspec(dllimport) int ebDeleteMenu(UINT MenuID);
_declspec(dllimport) int ebDelMenuItem(MENUTYPE m_MenuType,CString m_MenuName,CString m_SubMenu=NULLSTRING,CString m_FirstSubMenu="");

_declspec(dllimport) int ebInsMenuItem(MENUTYPE m_MenuType,CString m_MenuName,CString m_SubMenu,
				   CString m_NeighborMenu,WHEREINS m_WhereIns=AFTER,UINT m_MenuID=0,
				   CString m_FirstSubMenu="");


_declspec(dllimport) int	ebCursorOn();
_declspec(dllimport) int	ebCursorOff();
_declspec(dllimport) int	ebRedraw();
_declspec(dllimport) int	ebDrawXOR(BOOL enable);

_declspec(dllimport) int	ebRegistFunc(FUNTABLE*  ft);
_declspec(dllimport) int	ebRegistHot (HOTTABLE *pHot);
_declspec(dllimport) int	ebRegistCmd(CMDDTABLE *pCmd);
_declspec(dllimport) int	ebDelFunc(FUNTABLE*  ft);
_declspec(dllimport) int	ebDelCmd(CMDDTABLE *pCmd);

_declspec(dllimport) int	ebEndCommand();

_declspec(dllimport) int	ebInitUndo();
_declspec(dllimport) int	ebUndo();
_declspec(dllimport) int	ebRedo();
_declspec(dllimport) int	ebEmptyUndoBuffer();

_declspec(dllimport) int	ebInitDlgPrev(HWND hWnd);
_declspec(dllimport) int	ebDestroyDlgPrev(HWND hWnd);
_declspec(dllimport) int	ebSetDlgPrevWin(EB_BOX  box, CRect&  prevrect, CPaintDC  *dc, CWnd  *pWnd);

_declspec(dllimport) int	ebFileOpen(CString name);
_declspec(dllimport) int	ebFileSave(CString name);
_declspec(dllimport) int	ebFilePartOpen(EB_SELECT& select,CString name);
_declspec(dllimport) int	ebFilePartSave(EB_SELECT& select,CString name);
_declspec(dllimport) int	ebSetSnapMode(int mode);
_declspec(dllimport) int	ebSetGridDistance(int distance);
_declspec(dllimport) int	ebSetGridShow(BOOL  IsShow=TRUE);
_declspec(dllimport) int	ebSetPaperScale(double  scale);
_declspec(dllimport) int	ebSetPaperDirect(short  direct);
_declspec(dllimport) int	ebSetPaperSize(int  size);
_declspec(dllimport) int	ebSetPaperSizeByUser(double  width, double  height);

_declspec(dllimport) int	ebGetSnapMode();
_declspec(dllimport) double ebGetGridDistance();
_declspec(dllimport) BOOL	ebGetGridShow();
_declspec(dllimport) double ebGetPaperScale();
_declspec(dllimport) short	ebGetPaperDirect();
_declspec(dllimport) int	ebGetPaperSize();
_declspec(dllimport) void	ebGetPaperSizeByUser(double&  width, double&  height);
_declspec(dllimport) CString ebGetCurrentFileName();

_declspec(dllimport) int	ebFilePartSaveOut(EB_SELECT& select,CString name);
_declspec(dllimport) int	ebChgRGBToIndex(COLORREF colorRGB);

_declspec(dllimport) int	ebDeleteMenu(CMenu* pSubMenu);
_declspec(dllimport) int	ebAppendMenu(CMenu* pSubMenu);

_declspec(dllimport) int	ebGetSnapMode();
_declspec(dllimport) double ebGetGridDistance();
_declspec(dllimport) BOOL	ebGetGridShow();
_declspec(dllimport) double ebGetPaperScale();
_declspec(dllimport) short	ebGetPaperDirect();
_declspec(dllimport) int	ebGetPaperSize();
_declspec(dllimport) void	ebGetPaperSizeByUser(double&  width, double&  height);
_declspec(dllimport) CString ebGetCurrentFileName();

_declspec(dllimport) CWnd*	ebGetMainFrame();
_declspec(dllimport) int	ebDwgFileOpen(CString name);

#endif