#if !defined(_command_control_)
#define _command_control_

typedef VOID (* PCOMMANDFUNC)(int pArgs, char *argv[] );

typedef enum {
	CONSOLECOMMAND_ACTIVE = 0,		/* Active  */
	CONSOLECOMMAND_SUSPEND,			/* Suspend */
	CONSOLECOMMAND_SLEEP,
	CONSOLECOMMAND_WAKEUP
}CONSOLECOMMAND;

typedef struct {
	PKMVOID				pPrev;
	PKMVOID				pNext;
	PCOMMANDFUNC		pCommand;
	PKMCALLBACKFUNC		pPreprocess;
	PKMVOID				pData;
	PKMCALLBACKFUNC		pDrawFunc;
	CONSOLECOMMAND		Attrib;
	char				CommandName[32];
}COMMANDSTRUCT, *PCOMMANDSTRUCT;

typedef struct {
	PCOMMANDSTRUCT 	RegistTop;
	KMDWORD			nRegistratedCommand;
}COMMANDCONTROL, *PCOMMANDCONTROL;



/*
	Prototype
*/
void InitializeCommand(void);
int RegisterCommand(PCOMMANDFUNC pFunc, PKMCALLBACKFUNC pPreprocess, PKMVOID pData, PKMCALLBACKFUNC pDrawFunc, char* pszName);
int ExecuteCommand(char *pszCommandLine);
int ExecuteDrawCommand(PKMVERTEXBUFFDESC pBuffDesc);
int ExecutePreprocess(void);


/*
	Command Initialize
*/

void InitMemCommand(void);
void InitBorderCommand(void);
void InitClsCommand(void);
void InitHelpCommand(void);

extern COMMANDCONTROL Command;

#endif
