mmsharing/mmshengine/inc/musengdisplayhandler.h
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
child 35 6c57ef9392d2
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
     1 /*
       
     2 * Copyright (c) 2005 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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MUSHENGDISPLAYHANDLER_H
       
    20 #define MUSHENGDISPLAYHANDLER_H
       
    21 
       
    22 
       
    23 #include <e32std.h>
       
    24 
       
    25 // CLASS DECLARATION
       
    26 
       
    27 /**
       
    28 * An Interface for display services
       
    29 *
       
    30 * @lib museng.lib
       
    31 * @since S60 v3.2
       
    32 */
       
    33 class MMusEngDisplayHandler
       
    34     {
       
    35 
       
    36     public:
       
    37         
       
    38         /*
       
    39         * Defines possible rotations 
       
    40         */
       
    41         enum TDisplayOrientation
       
    42             {
       
    43             EPortrait, // Normal
       
    44             ELandscape // 90 degree's clockwise rotation
       
    45             };
       
    46 
       
    47         /**
       
    48         * Returns currently assigned drawing area
       
    49         *
       
    50         * @return TRect This session drawing area rectangle
       
    51         */
       
    52         virtual TRect Rect() const = 0;
       
    53 
       
    54         /**
       
    55         * Sets new drawing area
       
    56         *
       
    57         * @param TRect This session new drawing area rectangle
       
    58         */
       
    59         virtual void SetRectL( const TRect& aRect ) = 0;
       
    60         
       
    61         /**
       
    62         * Sets secondary rect (e.g. viewfinder in twoway session)
       
    63         * @param TRect This session new secondary drawing area rectangle
       
    64         */
       
    65         virtual void SetSecondaryRectL( const TRect& aSecondaryRect ) = 0;
       
    66         
       
    67         /**
       
    68         * Gets secondary rect.
       
    69         * @return TRect This session secondary drawing area rectangle
       
    70         */
       
    71         virtual TRect SecondaryRect() const = 0;
       
    72         
       
    73         /**
       
    74         * Enables or disables display. Call to this function is considered
       
    75         * as a permission or denial to draw to the display.
       
    76         */
       
    77         virtual void EnableDisplayL( TBool aEnable ) = 0;
       
    78         
       
    79         /**
       
    80         * Check whether display is enabled 
       
    81         */
       
    82         virtual TBool IsDisplayEnabled() = 0;
       
    83         
       
    84         /**
       
    85         * Returns current display orientation.
       
    86         *
       
    87         * @pre Session is ongoing
       
    88         * @return Current display orientation 
       
    89         * @leave KErrNotReady if precondition is not fullfilled
       
    90         */
       
    91         virtual TDisplayOrientation OrientationL() = 0;
       
    92         
       
    93         /**
       
    94         * Sets display orientation.
       
    95         *
       
    96         * @pre Session is ongoing
       
    97         * @return Sets display orientation 
       
    98         * @leave KErrNotReady if precondition is not fullfilled
       
    99         */
       
   100         virtual void SetOrientationL( TDisplayOrientation aOrientation ) = 0;
       
   101         
       
   102         /**
       
   103         * Check if display is actively displaying content
       
   104         * @return ETrue if is displaying content, otherwise EFalse
       
   105         */
       
   106         virtual TBool IsDisplayActive() = 0;
       
   107     };
       
   108 
       
   109 #endif