#include "app.h"
//#define ANCHOR_RIGHT                  8 
//#define ANCHOR_LEFT                   4 
//#define ANCHOR_TOP                    4
//#define map_id                 0x10cff290
UINT32 rdKeypress( EVENT_STACK_T *ev_st,  void *app );
UINT32 rKeypress( EVENT_STACK_T *ev_st,  void *app );
UINT32 rdTimer( EVENT_STACK_T *ev_st,  void *app );
UINT32 OpenFile(EVENT_STACK_T * ev_st, void * app);
UINT32 Background(void);
UINT32 show_c(void);
UINT32 show_file(WCHAR *uir);
UINT32 show_auto(UINT8 mode);
UINT32 show_Percent(UINT8 i);
UINT32 showTXT(EVENT_STACK_T * ev_st, void * app);
UINT32 PrintTXT(EVENT_STACK_T * ev_st, void * app);
//UINT16 GBtoU(char *str,UINT8 i);
//UINT16 UtoGB(WCHAR *str,char * dst);
//UINT16 GBKtoU(char *str,UINT8 i);
GRAPHIC_METRIC_T getfontsize(WCHAR *str,	UINT8 font_id);
int getCodeType(char* str);
UIS_DRAWING_BUFFER_T	bufd;
//UINT32			file_size;
//UINT8			r_type;

RD_T* SHOW;
int ROWNUM=0;//,tem_j=0;//当前块的总行数
//int offset;//偏移
WCHAR showtxt[LEN+1];
BOOL rowend=TRUE;
//UINT8 tem_x=0;

UINT16 Char16(UINT8 a,UINT8 b);
UINT16 Char16(UINT8 a,UINT8 b)
{	
      UINT16 tmp16[2];
      tmp16[0]=a;
      tmp16[1]=b;
      tmp16[0]=tmp16[0]<<8;
      tmp16[0]=tmp16[0]|tmp16[1];
      return tmp16[0];
}
//WCHAR tem_showtxt[2048];
int tem_bufpos[10];