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

📄 keyhandler.cpp

📁 series60 应用程序开发的源代码 series60 应用程序开发的源代码
💻 CPP
字号:
/**
 *
 * @brief Definition of TKeyHandler
 *
 * Copyright (c) EMCC Software Ltd 2003
 * @version 1.0
 */
// User includes
#include "KeyHandler.h"


/*
* C++ constructor
*/
TKeyHandler::TKeyHandler()
{
}

/*
* Key handler state accessor
* @return a bit pattern indicating which keys are currently pressed
*/
TInt TKeyHandler::State() const
{
    return iDirection;
}

/*
* Key handler state mutator
* @param aKey the key that's being set or unset
* @param aState a boolean flag to indicate whether the button is being pressed or released
*/
void TKeyHandler::SetState(TKeyHandler::TKeyState aKey, TBool aState)
{
    if (aState)
    {
        iDirection |= static_cast <TInt> (aKey);
    }
    else
    {
        iDirection &= static_cast <TInt> (~aKey);
    }
}

⌨️ 快捷键说明

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