tvout/tvoutengine/inc/glxwindowvisibilitymonitor.h
branchRCL_3
changeset 59 8e5f6eea9c9f
equal deleted inserted replaced
57:ea65f74e6de4 59:8e5f6eea9c9f
       
     1 /*
       
     2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:    Class definition that monitors tv window visibility
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __GLXWINVISIBILITYMONITOR_H__
       
    20 #define __GLXWINVISIBILITYMONITOR_H__
       
    21 
       
    22 // External Includes
       
    23 #include <e32base.h>                // for CBase
       
    24 #include <AknWsEventObserver.h>     // for MAknWsEventObserver
       
    25 
       
    26 
       
    27 // Forward Declarations
       
    28 class MGlxWindowVisibilityObserver;       
       
    29 
       
    30 
       
    31 /**
       
    32  * Class Description
       
    33  * An Active object derived class is used to monitor the visibility of the
       
    34  * TV out window.
       
    35  */        
       
    36 NONSHARABLE_CLASS(CGlxWindowVisibilityMonitor) : public CBase, 
       
    37                                                  public MAknWsEventObserver
       
    38     {
       
    39 public:
       
    40     /**
       
    41      * Static Symbian 2 stage constructor.
       
    42      */
       
    43     static CGlxWindowVisibilityMonitor* NewL(
       
    44                             MGlxWindowVisibilityObserver& aVisibilityObserver );
       
    45     
       
    46     /**
       
    47      * Destructor.
       
    48      */
       
    49     ~CGlxWindowVisibilityMonitor();
       
    50     
       
    51     
       
    52     /**
       
    53      * Close.
       
    54      */
       
    55     void Close();
       
    56     
       
    57 private:
       
    58 
       
    59     /**
       
    60      * Standard C++ constructor
       
    61      */
       
    62     CGlxWindowVisibilityMonitor( 
       
    63                         MGlxWindowVisibilityObserver& aVisibilityObserver );
       
    64     
       
    65     /*
       
    66      * Symbian second stage construction
       
    67      */
       
    68     void ConstructL(); 
       
    69 
       
    70 public: /// class member functions
       
    71 
       
    72     /**
       
    73      * Provides the caller with the current visible state
       
    74      * @return ETrue if the window is visible or false otherwise
       
    75      */
       
    76     TBool IsVisible() const;
       
    77 
       
    78 public: // from MAknWsEventObserver
       
    79 
       
    80     void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination );     
       
    81 
       
    82 private: /// class member data
       
    83     /// Not ownded: The Akn event monitor
       
    84     CAknWsEventMonitor* iAknEventMonitor;
       
    85     
       
    86     /// Not owned: Window visibility observer
       
    87     MGlxWindowVisibilityObserver& iVisibilityObserver;
       
    88 
       
    89     /// The visible state 
       
    90     TBool iIsVisible; 
       
    91     };
       
    92        
       
    93 
       
    94 
       
    95 #endif //  __GLXWINVISIBILITYMONITOR_H__