photosgallery/viewframework/tvout/inc/glxwindowvisibilitymonitor.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 02 Feb 2010 00:10:37 +0200
changeset 4 57d388cc48c1
parent 0 4e91876724a2
permissions -rw-r--r--
Revision: 201003 Kit: 201005

/*
* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:    Class definition that monitors tv window visibility
*
*/



/**
 * @internal reviewed 24/08/2007 by D Holland
 */

#ifndef __GLXWINVISIBILITYMONITOR_H__
#define __GLXWINVISIBILITYMONITOR_H__

// External Includes
#include <e32base.h>                // for CBase
#include <AknWsEventObserver.h>     // for MAknWsEventObserver


// Forward Declarations
class MGlxWindowVisibilityObserver;       



/**
 * Class Description
 * An Active object derived class is used to monitor the visibility of the
 * TV out window.
 * @author Loughlin
 */        
NONSHARABLE_CLASS(CGlxWindowVisibilityMonitor) : public CBase, 
                                                 public MAknWsEventObserver
    {
public:
    /**
     * Static Symbian 2 stage constructor.
     */
    static CGlxWindowVisibilityMonitor* NewL(
                            MGlxWindowVisibilityObserver& aVisibilityObserver );
    
    /**
     * Destructor.
     */
    ~CGlxWindowVisibilityMonitor();
    
    
    /**
     * Close.
     */
    void Close();
    
private:

    /**
     * Standard C++ constructor
     */
    CGlxWindowVisibilityMonitor( 
                        MGlxWindowVisibilityObserver& aVisibilityObserver );
    
    /*
     * Symbian second stage construction
     */
    void ConstructL(); 

public: // class member functions

    /*
     * Provides the caller with the current visible state
     * @return ETrue if the window is visible or false otherwise
     */
    TBool IsVisible() const;

public: // from MAknWsEventObserver

    void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination );     

private: // class member data
    // Not ownded: The Akn event monitor
    CAknWsEventMonitor* iAknEventMonitor;
    
    // Not owned: Window visibility observer
    MGlxWindowVisibilityObserver& iVisibilityObserver;

    // The visible state 
    TBool iIsVisible; 
    };
       


#endif //  __GLXWINVISIBILITYMONITOR_H__