www.pudn.com > emGUI.rar > emGUI-sys.h
/* * emGUI system specific 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 __EMGUI_SYS_h #define __EMGUI_SYS_h #include#include /* configure emGUI system event queue size */ #define EMGUI_SYSQ_SIZE 128 /* configure emGUI task priority */ #define EMGUI_SYSTHREAD_PRIORITY 32 #define EMGUI_SYSTHREAD_STACKSIZE 4096 /* configure emGUI Normal Application priority */ #define EMGUI_APPLICATION_PRIORITY 128 #define EMGUI_APPLICATION_STACKSIZE 8192 /* configure application message queue size */ #define APPLICATION_MESSAGEQ_SIZE 512 struct Application; struct Window; typedef unsigned32 (*LPWinMainProc)(struct Application *); typedef unsigned32 (*LPWinProc)(struct Window *, unsigned16, unsigned16, unsigned32); typedef unsigned32 (*LPAppProc)(struct Application *, unsigned16, unsigned16, unsigned32); unsigned32 DefaultWndProc( struct Window *wID, unsigned16 msg, unsigned16 nParam, unsigned32 lParam ); unsigned32 DefaultAppProc( struct Application *appID, unsigned16 msg, unsigned16 nParam, unsigned32 lParam ); /* PROCPTR */ typedef unsigned long (*PROCPTR)( unsigned long, unsigned long, unsigned long, unsigned long ); typedef struct { unsigned32 _evType; unsigned32 _evParam1; unsigned32 _evParam2; unsigned32 _evParam3; } _SysEvent; extern _SysEvent _evSys_Snapshot; #include "application.h" #include "window.h" #include "event.h" #include "device.h" #include "devfont.h" void emGUI_sysInitialoization(); boolean SysGetEvent( unsigned32 timo ); void SysSendEvent( unsigned32 type, unsigned32 data1, unsigned32 data2, unsigned32 data3 ); /* create application task & message queue */ unsigned32 CreateMsgQ(); unsigned32 CreateAppTask( struct Application *app, void *appMain ); /* destroy application task & message queue */ void SysDeleteTask( unsigned32 taskID ); void SysDeleteMsgQ( unsigned32 msgqID ); /* Peek Message from Application */ boolean SysGetAppMessage( struct Application *app ); boolean SysSendAppMessage(); /* Post message to System, Application, Window */ void PostAppMessage( AppID appID, unsigned16 msg, unsigned16 nParam, unsigned32 lParam ); void PostMessage( WndID wndID, unsigned16 msg, unsigned16 nParam, unsigned32 lParam ); void PostSysMessage( unsigned16 msg, unsigned16 nParam, unsigned32 lParam ); /* every application should call this function at the end */ void SysApplicationTermination(); /* initialization emGUI */ void emGUIInitialization(); /***********************************************************************/ /* implement in screen device driver */ int SysPixelPerByte(); int SysBytesPerScreen(); #endif