www.pudn.com > emGUI.rar > application.h


/* 
 *  Application layer 
 * 
 * 
 *  COPYRIGHT (c) 2001 - 2010. 
 *  emTech System Corporation. 
 * 
 *  The license and distribution terms for this file may be 
 *  found in found in the file LICENSE. 
 */ 
 
/*	Huangf emcore@263.net 
 */ 
 
#ifndef __APPLICATION_h 
#define __APPLICATION_h 
 
/* App Struct */ 
struct Application{ 
	Chain_Node		node; 
	Chain_Control	WinList; 
	 
	int				*phCount;		/* the count of the example have actived */ 
	unsigned32		msgQ;			/* message list */ 
	unsigned32		(*appProc)();	/* the proc of message */ 
	unsigned32		msgBuf[4];		/* message buffer */ 
}; 
 
typedef struct Application Application;  
typedef struct Application *AppID; 
 
void 		AppInitialization(); 
Application *FirstApplication(); 
 
/*  API for application */ 
Application *CreateApplication( 
	void 		*appMain, 
	void		*appProc, 
	unsigned32	*phCount 
); 
 
void DestroyApplication( 
	Application *app 
); 
 
boolean SwitchApplication( 
	Application *newapp 
); 
#endif