⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kr_krcontext.h

📁 这是法国Kaleido公司提供了一个手机mmi设计平台
💻 H
字号:
/*
* Created on 24 may 2004
*
* @author DigitalAirways (c) 2004
* 
* This software is the confidential and proprietary information of
* DigitalAirways, sarl. ("Confidential Information").  You shall not
* disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into
* with DigitalAirways.
* A copy of this license is included in the licence.txt file included
* in this software package.
* 
*/

#ifndef __KR_KRCONTEXT__
#define __KR_KRCONTEXT__

#include "KR_Object.h"
#include "KR_Messages.h"
#include "KR_Serializer.h"
#include "KR_KRuntime.h"

class KPage ;
class Option ;
class ObjectReader ;

class KREBDLIBS_API KRContext
{
private:
	// Message queues.
	KRMessages* scheduledQueue ;
	KRMessages* quickQueue ;
	KRMessages* slowQueue ;
	KRMessages* tempQueue ;
	// This is the message that is currently being processed
	KRMessage* currentMessage ; 
	// Global jumpLinks table
	LinksJumpMap* /* char* */ fLinksJumpTable;
	int lastIndex;
public:
	DEFINE_NEW(KRContext);
	DEFINE_DELETE(KRContext);	
	KRContext() ;
	~KRContext() ;

	// Page manager
	KPage* loadPage(GContext* newGContext, char* filename, Layout* layout);		
	KPage* loadPage(GContext* newGContext, ObjectReader* reader, int version, Layout* layout);		
	//		void preloadPage(GContext* newGContext, char* filename);

	// Message queues.
	/* 
	* This bloc is implementing queue processing strategy.
	* It may be excluded from KR to fit special neeeds.
	*/
	void processQueues(GContext* gContext) ;
	KRMessage* getCurrentMessage() { return currentMessage; } ; 
	KALEIDO_TIME_TYPE getNextMsgScheduledTime(GContext* gContext, KALEIDO_TIME_TYPE *scheduledTime=NULL) ;
	void emptyQueues(GContext* gContext) ;
	KRMessages* getScheduledQueue() { return scheduledQueue ; }
	KRMessages* getQuickQueue() { return quickQueue ; }
	KRMessages* getSlowQueue() { return slowQueue ; }
	// Local KPage methods
	boolean doAction(GContext* gContext, long actionid, char* value) ;
	//		void aboutToNavigate(GContext* gContext) ;
	//		void navigate(GContext* gContext, char* url, char* accept, char* agent) ;
	void setJumpLink(long action, char* link) ;		 
	char* getJumpLink(long action) ;
	LinksJumpMap* getJumpLinks() ;
	int getNextIndex() { return ++lastIndex; }
} ;
#endif // ndef __KR_KRCONTEXT__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -