animationappview.cpp

来自「symbian,使用dll服务捕获按键,比设置优先级更能提高按键响应.」· C++ 代码 · 共 87 行

CPP
87
字号
/* Copyright (c) 2004, Nokia. All rights reserved */


// INCLUDE FILES
#include <coemain.h>
#include <eikenv.h>

#include "animationappview.h"

// ============================ MEMBER FUNCTIONS ===============================

// -----------------------------------------------------------------------------
// CAnimationAppView::CAnimationAppView()
// C++ default constructor can NOT contain any code, that might leave.
// -----------------------------------------------------------------------------
//
CAnimationAppView::CAnimationAppView()
    {
    // No implementation required
    }

// -----------------------------------------------------------------------------
// CAnimationAppView::NewL()
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
CAnimationAppView* CAnimationAppView::NewL( const TRect& aRect )
    {
    CAnimationAppView* self = CAnimationAppView::NewLC( aRect );
    CleanupStack::Pop();
    return self;
    }

// -----------------------------------------------------------------------------
// CAnimationAppView::NewLC()
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
CAnimationAppView* CAnimationAppView::NewLC( const TRect& aRect )
    {
    CAnimationAppView* self = new ( ELeave ) CAnimationAppView();
    CleanupStack::PushL( self );
    self->ConstructL( aRect );
    return self;
    }

// -----------------------------------------------------------------------------
// CAnimationAppView::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CAnimationAppView::ConstructL( const TRect& aRect )
    {
    // Create a window for this application view
    CreateWindowL();

    // Set the windows size
    SetRect( aRect );

    // Activate the window, which makes it ready to be drawn
    ActivateL();
    }

// -----------------------------------------------------------------------------
// CAnimationAppView::~CAnimationAppView()
// Destructor.
// -----------------------------------------------------------------------------
//
CAnimationAppView::~CAnimationAppView()
    {
    // No implementation required
    }

// -----------------------------------------------------------------------------
// CAnimationAppView::Draw()
// Draws the display.
// -----------------------------------------------------------------------------
//
void CAnimationAppView::Draw( const TRect& /*aRect*/ ) const
    {
    // Clear the screen
    CWindowGc& gc = SystemGc();
    TRect drawRect( Rect() );
    gc.Clear( drawRect );
    }

// End of File

⌨️ 快捷键说明

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