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

📄 uiutility.h

📁 嵌入工linux开发的源码
💻 H
字号:
/*************************************************************
File Name: utility.h ( CompactWin/include )
Usage:
	some useful functions for GUI

Other Information: None
**************************************************************/

#ifndef _PDA_UTILITY_H
#define _PDA_UTILITY_H

#include <pr2k.h>
#include <typedefine.h>
#include <uiGui_cfg.h>

#include <sys/syscall.h>

/*************************************************************
	Time Zone Data Structure
*************************************************************/
/*
struct pdaTimeZoneStruct{	
	char CountryName[20];
	char CityName[20];
	char GMTChar[8];
	int  GMTValue;
	int  ISHalfHour;
	int  ContinentValue;
	int  addnewtimezoneListValue;
} ;
*/

/*************************************************************
	Default Time Zone Table 
*************************************************************/
//extern struct pdaTimeZoneStruct pdaTimezoneOriginal[] ;


/*************************************************************
	FUNCTION: layoutTextFile
*************************************************************/
//
// 将文字档或字串转成一行n个字元的的格式     
//
//void layoutTextFile(char *srcFile, char *destFile, int width) ;


/*************************************************************
	Time Format Transfer	
*************************************************************/
DLL_EXP(void) pdaEncodeTime(sysTime tNow, unsigned long *dwTime);
DLL_EXP(void) pdaDecodeTime(unsigned long dwTime, sysTime *pNow);

/*************************************************************
	Alignment Tools
*************************************************************/
DLL_EXP(short) getAlignCenter(short left, short right, short width);
DLL_EXP(short) getAlignRight(short left, short right, short width);

#define guiAlign_Center getAlighCenter
#define guiAlign_Right getAlighRight


//---------------------------------------------------------//
//	Double Linked List
//---------------------------------------------------------//

typedef struct _DList {
	struct _DList *pPrev;
	struct _DList *pNext;
	void* pObj;
} DList;

DList* DList_Create( void ) ;
void DList_Delete( DList* pHead ) ;
STATUS DList_Insert( DList* pHead, int index, void* pObj ) ;
void* DList_Remove( DList* pHead, int index ) ;
STATUS DList_Append( DList* pHead, void* pObj ) ;
int DList_Length( DList* pHead ) ;
void* DList_GetObject( DList* pHead, int index ) ;

//---------------------------------------------------------//

/*************************************************************
	Coordinate transform
*************************************************************/

typedef struct tagControlBase
{	
	HNDL  handle; 	                     /* handle is the pointer which point to this structure */
	short type;
	short left, top;		                  /* left-top point */
	short right, bottom;	                  /* right-bottom point */
	short  checkFlag ; 	                  /* to check the handle available or not */
	WORD  style ;
}TControlBase;

//Convert control's related coordinate to physical	absolute coordinate
STATUS  _guiConvertXY(HNDL handle, int *x, int *y);

//get a region of handle that we can draw on it,the result is physical coordinate.  
STATUS _guiGetHandleView(HNDL handle, int *left, int *top, int *right, int *bottom);

//called by guiControl_SetLocation and guiWindow_SetLocation.
void _guiSetViewHandleInvalid(void);

/*************************************************************
	get window handle of the control
*************************************************************/
HNDL guiQueryWindowOfControl(HNDL hCtrl);

#ifdef _DEBUG
DLL_EXP(int) _debugDisplayMemInfo(char * szCaption);
#endif

#endif


⌨️ 快捷键说明

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