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

📄 uianimat.h

📁 嵌入工linux开发的源码
💻 H
字号:
/***************************** ANIMATION *****************************/

#ifndef __GUIANIMATION_H
#define __GUIANIMATION_H

/*===========================《INCLUDE》=============================*/
#include <pr2k.h>
#include <uiwnd.h>

#include <typedefine.h>
#include <uiGui_cfg.h>
#include <uiUtility.h>
#include <uiGraph.h>
#include "uicontrol.h"

/**************************************************************
	CONSTANT - STYLE
**************************************************************/
//#define   BASE_CAP_TIME  120
#define   DRAWPIXEL_LAST_TIME   500

//SHOW STYLE
//multy pic
enum {MULT_PIC_ANIMAT = 0x00};//DEFAULT STYLE
//one pic STYLE
enum {NO_PIC=0xFF,STATIC_SHOW=0x10,LTOR_SHOW,RTOL_SHOW,TTOB_SHOW,BTOT_SHOW,CTOB_SHOW,BTOC_SHOW};

//#define MAXBMPNUM		10
/*============================《STRUCTS》=============================*/

/* the Animation */
typedef struct
{
	TGuiControl 			    base ;	//The property of common control
	WORD						Speed;		// Unit:  ms	
    HNDL 						pTimer;
	WORD						frmNum;
    WORD						frmCnt;		// Frame count
	WORD						rptNum;		// 0: infinite, 1:once, 2:twice,...
    WORD						rptCnt;		// Repeat count
    unsigned int			    *pBitmaps;
}TGuiAnimation;

/*============================《FUNCTION》==============================*/

/********************************************************************/
/*																	*/
/*	Function name	: HNDL guiAnimation_Create()					*/
/*	Purpose			: Create Animation								*/
/*	Input			:												*/
/*		hParent		: Handle of Animation's parent(not null)		*/
/*		   
/*	Output			:												*/
/*			SUCCESS :	HNDL									    */
/*			FAIL	:	NULL        								*/
/*  Remarks			: Please make sure this object is in its parent */
/*					  form.											*/
/*	Create			: 15/Dec/2001									*/
/*	Done			: 15/Dec/2001									*/
/*	Author			: Cangers										*/
/*	History			:												*/
/*																	*/
/********************************************************************/
/*
unsigned int pBitmaps[4];
pBitmaps[0] = (unsigned int)ppic1;
pBitmaps[1] = (unsigned int)ppic2;
pBitmaps[2] = (unsigned int)ppic3;
pBitmaps[3] = (unsigned int)ppic4;
hAni = guiAnimation_Create(148,3,157,12,10, 4, 0,pBitmap,0);
*/
DLL_EXP(HNDL) guiAnimation_Create(WORD left,WORD top,WORD right,WORD bottom,
                        WORD Speed, WORD frmNum, WORD rptNum,unsigned int* pBitmaps,WORD style);

/********************************************************************/
/*	Function name	: STATUS guiAnimation_Start()					*/
/*	Purpose			: Start Animation								*/
/*	Input			:												*/
/*		pAnimation	: Address of Animation							*/
/*	Output			:												*/
/*			SUCCESS :	HNDL									*/
/*			FAIL	:	ET_NULLHANDLE								*/
/*	Create			: 15/Dec/2001									*/
/*	Done			: 15/Dec/2001									*/
/*	Author			: Cangers										*/
/*	History			:												*/
/*																	*/
/********************************************************************/
DLL_EXP(STATUS) guiAnimation_Start(HNDL hAnimation);

/********************************************************************/
/*	Function name	: STATUS guiAnimation_Stop()						*/
/*	Purpose			: Stop Animation								*/
/*	Input			:												*/
/*		pAnimation	: Address of Animation							*/
/*	Output			:												*/
/*		void		:												*/
/*	Create			: 15/Dec/2001									*/
/*	Done			: 15/Dec/2001									*/
/*	Author			: Cangers										*/
/*	History			:												*/
/*																	*/
/********************************************************************/
DLL_EXP(STATUS) guiAnimation_Stop(HNDL hAnimation);

//放在message loop 中,TIMER_TIMEOUT下;
/*
case TIMER_TIMEOUT:
     guiAnimation_TimeOutProcess(hAni,message.handle);
     break;
*/
DLL_EXP(STATUS) guiAnimation_TimeOutProcess(HNDL hAnimation,HNDL hTimeOutTimer);
/*===================================================================*/

#endif /* __GUIANIMATION_H */
/******************************** <END> *********************************/

⌨️ 快捷键说明

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