- 积分
- 384
- 实力分
- 点
- 金钱数
- 两
- 技术分
- 分
- 贡献分
- 分
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
写这个函数库的目的,就是为了相同功能的函数代码,放在一个文件中,以方便在写程序调用时使用!
使用:把sieapi.h复制到编译器中的inc目录下
在文件头中写上#include "..\inc\sieapi.h"
就可以使用文件里面的函数了!
目前的函数列表:
//获取手机内部对应的字体
 __INTRINSIC uint FontType(int index);
 //播放声音文件,支持手机内部所有声音文件
 __INTRINSIC int PlayMusic(const char *fname, uint VOLUME, uint RepeatNum);
 //动态菜单创建函数
 __INTRINSIC TMenu *BuildMenu(char *Title[]);
 __INTRINSIC void DrawMenu(void *gui, int cur_item, void *user_pointer);
 __INTRINSIC void FreeMenu(TMenu *Menu);
 __INTRINSIC int  MenuCount(TMenu *Menu);
 //文件菜单相关函数
 __INTRINSIC int  FileCount(TFile *File);
 __INTRINSIC void FreeFile(TFile *File);
 //媒体功能是否使用中-------------
 __INTRINSIC int IsMediaActive(void);
 //十六进制转换为十进制-----------
 __INTRINSIC ulong HexToInt(char *HEX);
 //数据转换
 __INTRINSIC void  Ascii2WS(uword *data,WSHDR *ws, const char *s, int maxlen);
 __INTRINSIC void  WS2Ascii(uword *data, WSHDR *ws, char *s, int maxlen);
 __INTRINSIC void  FreeFontLib(uword *data);//释放字库内存
 __INTRINSIC uword *LoadFontLib(void);//加载字库内存
 //二十四节气
 __INTRINSIC void  LunarHolDay(WSHDR* ws,int LunarId);//返回对应的二十四节气字串
 __INTRINSIC int   LunarHolId(TDate date);//返回对应的二十四节气ID(1..24)
 __INTRINSIC ubyte LunarYearId(ulong year);// 返回某公历是否闰年
 __INTRINSIC uword BetweenDaySum(TDate start,TDate end);//计算两日期之间的天数
 __INTRINSIC uword GetDayFromYearBegin(ulong AYear,ubyte AMonth,ubyte ADay);// 取某日期到年初的天数
 __INTRINSIC ubyte FileExists(char *FileName,int *Handle);//判断文件是否存在!
添加数据类型:
#define word  unsigned short
#define uint  unsigned int
#define ulong unsigned long
#define uchar unsigned char
#define TVoid typedef void
#define TStruct typedef struct
添加数据结构:
//定义区域属性
TStruct{
  int t;//top
  int l;//left
  int r;//Right;
  int b;//Bottom;
}TRect;
//定义字体属性
TStruct{
  char Pen[4];//文字颜色
  char Brush[4];//边框颜色
  word Size;//字体大小
}TFont;
函数下载地址(sieapi.h):
http://sieelf.googlecode.com/svn/SieELF/inc
[ 本帖最后由 comerose 于 2008-1-5 10:16 编辑 ] |
评分
-
查看全部评分
|