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

📄 wk_basefunc.h

📁 联通手机的宝典画面.用brew 平台编辑而成.
💻 H
字号:
#ifndef _WK_BASEFUNC_H_
#define _WK_BASEFUNC_H_

#include "start.h"

#define SAVEFILE_SUCCESS	1
#define SAVEFILE_EXIST		2
#define SAVEFILE_ERROR		3

//***********************************************************************
//	Load text message from resource file as AECHAR
boolean LoadTextMessage(IShell * pIShell, int16 iResourceID, AECHAR * * pBuf, char * szResFile);
//=======================================================================

//***********************************************************************
//	Load text message from resource file as char
boolean LoadTextMessageSingleByte(IShell * pIShell, int16 iResourceID, char * * pBuf, char * szResFile);
//=======================================================================

// 获取手机ID
boolean GetMobileID(IShell * pIShell, char * * pBuf);
// 获取手机型号
boolean GetMobileType(IShell * pIShell, char * * pBuf);

// 合并字符串
void PrependStr(char * * dest, char * src);

// 替换字符
void ReplaceChar( char * szSource, char cSrc, char cDes );

void ReleaseObj(void * * ppObj);

boolean  LoadWideText(IShell * pIShell, int16 iResourceID, AECHAR ** pBuf, char * szResFile);
boolean  LoadText(IShell * pIShell, int16 iResourceID, char * * pBuf, char * szResFile);

void PrintString(IStatic * pIStatic, AECHAR * szTitle, char * szText, boolean bAppend);
void PrintString2(IStatic * pIStatic, AECHAR * szTitle, AECHAR * szText, boolean bAppend);
void ShowResString(IShell * pIShell, IStatic ** ppIStatic, AEERect * rect, AECHAR * szTitle, int16 nResId);
// 增加菜单项目
boolean AddMenuItem(IMenuCtl * pMenu, uint16 wTextID, AECHAR * pText, uint16 wImageID, uint16 wItemID, uint32 dwData);

// 保存文件
boolean SaveFile(IShell * pIShell, IFileMgr **ppFile, char * szFile, char * szData, char * szTmpFile, long nLength);

// 删除指定文件
boolean DeleteFile(IShell * pIShell, IFileMgr **ppFile, char * szFile);

//保存内容
int SaveContent(IShell * pIShell, IFileMgr **ppFile, char * szTempFile, AECHAR* szName, long nType, long nID);

boolean GetNewFileName(IShell * pIShell, IFileMgr **ppFile, char * lpFile, char * lpExt);

// 检查文件名是否存在
boolean CheckFileName(IShell * pIShell, IFileMgr **ppFile, char * lpFile, char * lpExt, long nID);

boolean GetFavoriteByIndex(IShell* pIShell,IFileMgr **ppFile, long nIndex, char * szFile);

// 设置菜单样式
void SetMenuStyle(IMenuCtl * pMenu, AEERect * pRect);

//
boolean AddFavoriteIndex(IShell* pIShell,IFileMgr **ppFile, AECHAR * szName, long nType, char * szFile);

boolean DeleteFavoriteByIndex(IShell* pIShell,IFileMgr **ppFile, long nIndex);

//得到内存
int GetFreeMem(IShell* pIShell);
uint32 GetFileSpace(IShell* pIShell);
//检查空间
boolean CheckFileSpace(IShell* pIShell);
boolean	MemCheckAvail(IShell* pIShell,int blocksize);
// 获取图片的高度和宽度
int GetImageWidth(IImage * img);
int GetImageHeight(IImage * img);

int  _parseEscapeChars( char *sz );
int _parseEscapeAEChars( AECHAR *sz );

// 将char型的字符串转为AECHAR
boolean StrToWstr(char * szBuf, AECHAR ** ppDest);
// 将AECHAR型的字符串转为char
boolean WstrToStr(AECHAR * szBuf, char ** ppDest);

// 在指定矩形内画图形
void DrawPicRect(IImage *img, int xoff, int yoff, int cx, int cy);

#endif 

⌨️ 快捷键说明

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