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

📄 backlightswitch.h

📁 基于Symbian平台下随心所欲控制屏幕的灯亮熄.在观看视频和发短信时这一点非常重要.
💻 H
字号:
// CLASS DECLARATION
/**
*
* CBacklightSwitch BackLightSwitch.h
* This is a class to control the switching on and off of the backlight.
*
* Copyright (c) 2004 Nokia Corporation
* version 2.0
*/

#ifndef __BACKLIGHTSWITCH_H__
#define __BACKLIGHTSWITCH_H__

// INCLUDES

// System includes
#include <e32base.h>


class CBackLightSwitch : public CActive
	{
public:	// Construction and destruction.
    /**
     * Function:    NewL
     *
     * Description: Creates instance of CBackLight object
     *
     */
	static CBackLightSwitch* NewL();

    /**
     * Function:    ~CBackLightSwitch
     *
     * Description: Destroys the object
     *
     */	
	~CBackLightSwitch();

public:	// Methods.
    /**
     * Function:    ChangeState
     *
     * Description: This method will switch the requirement to keep the backlight on.
     *
     */	
	void ChangeStateL();
	void ChangeTolongLight();
	void ChangeToNormal();

private:	// Construction.
    /**
     * Function:    CBackLightSwitch
     *
     * Description: Constructor
     *
     */	
	CBackLightSwitch();

    /**
     * Function:    ConstructL
     *
     * Description: 2nd Phase Constructor
     *
     */	
	void ConstructL();

private:	// From CActive.
    /**
     * Function:    RunL
     *
     * Description: Handles request completion - called by the Active Scheduler
	 *              If it is required that the backlight should be kept on, this method
	 *              will reset the inactivity time of the device and set another timer
	 *				to expire before the light would be de-activated again
     *
     */	
	void RunL();

    /**
     * Function:    DoCancel
     *
     * Description: Cancels any outstanding timer request - called by Cancel
     *
     */	
	void DoCancel();

private:	// Data.
	RTimer	iTimer;
	TBool	iBackLightOn;
	};

#endif	// __BACKLIGHTSWITCH_H__

// End of File

⌨️ 快捷键说明

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