mobilemessaging/smilui/playerinc/SmilPlayerPresentationController.inl
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2003-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: SmilPlayerPresentationController.inl*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 #include "SmilPlayerPresentationControl.h"
       
    20 #include "SmilPlayerMediaFactory.h"
       
    21 #include <smiltransitionfactory.h>
       
    22 
       
    23 // ----------------------------------------------------------------------------
       
    24 // CSmilPlayerPresentationController::BufferBitmap
       
    25 // ----------------------------------------------------------------------------
       
    26 inline CFbsBitmap* CSmilPlayerPresentationController::BufferBitmap()
       
    27     {
       
    28     return iBufferBitmap;
       
    29     }
       
    30 
       
    31 // ----------------------------------------------------------------------------
       
    32 // CSmilPlayerPresentationController::BufferContext
       
    33 // ----------------------------------------------------------------------------
       
    34 inline CFbsBitGc* CSmilPlayerPresentationController::BufferContext()
       
    35     {
       
    36     return iBufferContext;
       
    37     }
       
    38 
       
    39 // ----------------------------------------------------------------------------
       
    40 // CSmilPlayerPresentationController::Presentation
       
    41 // ----------------------------------------------------------------------------
       
    42 inline CSmilPresentation* CSmilPlayerPresentationController::Presentation()
       
    43     {
       
    44     return iPresentation;
       
    45     }
       
    46 
       
    47 // ----------------------------------------------------------------------------
       
    48 // CSmilPlayerPresentationController::ScrollingDeactivationEnabled
       
    49 // ----------------------------------------------------------------------------
       
    50 inline TBool CSmilPlayerPresentationController::ScrollingDeactivationEnabled() const
       
    51     {
       
    52     #ifdef RD_SCALABLE_UI_V2
       
    53     if ( AknLayoutUtils::PenEnabled() )
       
    54     return EFalse;
       
    55     #endif
       
    56     return iPresentation->MediaSelected();
       
    57     }
       
    58 
       
    59 // ----------------------------------------------------------------------------
       
    60 // CSmilPlayerPresentationController::OpenLinkL
       
    61 // ----------------------------------------------------------------------------
       
    62 inline void CSmilPlayerPresentationController::OpenLinkL()
       
    63     {
       
    64     iPresentation->ActivateFocusedL();
       
    65     }
       
    66     
       
    67 // ----------------------------------------------------------------------------
       
    68 // CSmilPlayerPresentationController::GetMediaFactory
       
    69 // Returns media factory (implementation from SMIL Engine).
       
    70 // ----------------------------------------------------------------------------
       
    71 inline MSmilMediaFactory* CSmilPlayerPresentationController::GetMediaFactory(
       
    72                             const CSmilPresentation* /*aPres*/) const
       
    73     {
       
    74     return iMediaFactory;
       
    75     }
       
    76 
       
    77 // ----------------------------------------------------------------------------
       
    78 // CSmilPlayerPresentationController::GetTransitionFactory
       
    79 // Returns transition effect factory (implementation from SMIL Engine).
       
    80 // ----------------------------------------------------------------------------
       
    81 //
       
    82 inline MSmilTransitionFactory* CSmilPlayerPresentationController::GetTransitionFactory( 
       
    83                              const CSmilPresentation* /*aPres*/ ) const
       
    84     {
       
    85     return iTransitionFactory;
       
    86     }
       
    87 
       
    88 // ----------------------------------------------------------------------------
       
    89 // CSmilPlayerPresentationController::EvaluateContentControlAttribute
       
    90 // ----------------------------------------------------------------------------
       
    91 inline TBool CSmilPlayerPresentationController::EvaluateContentControlAttribute(
       
    92                             const TDesC& /*aName*/, const TDesC& /*aValue*/)
       
    93     {
       
    94     return EFalse;
       
    95     }
       
    96 
       
    97 // ----------------------------------------------------------------------------
       
    98 // CSmilPlayerPresentationController::GetDimensions
       
    99 // ----------------------------------------------------------------------------
       
   100 inline TRect CSmilPlayerPresentationController::GetDimensions(
       
   101                             const CSmilPresentation* /*aPres*/ )
       
   102     {
       
   103     return iPresentationControl->Rect();
       
   104     }
       
   105 
       
   106 // ----------------------------------------------------------------------------
       
   107 // CSmilPlayerPresentationController::GetControl
       
   108 // ----------------------------------------------------------------------------
       
   109 inline CCoeControl* CSmilPlayerPresentationController::GetControl(
       
   110                             const CSmilPresentation* /*aPres*/ )
       
   111     {
       
   112     return iPresentationControl;
       
   113     }
       
   114 
       
   115 // ----------------------------------------------------------------------------
       
   116 // CSmilPlayerPresentationController::Redraw
       
   117 // ----------------------------------------------------------------------------
       
   118 inline void CSmilPlayerPresentationController::Redraw(
       
   119                             TRect aArea, CSmilPresentation* /*aPres*/ )
       
   120     {
       
   121     RedrawArea(aArea);
       
   122     }
       
   123 
       
   124 // ----------------------------------------------------------------------------
       
   125 // CSmilPlayerPresentationController::ObjectFocused
       
   126 // ----------------------------------------------------------------------------
       
   127 inline TBool CSmilPlayerPresentationController::ObjectFocused() const
       
   128     {
       
   129     return ( iPresentation->FocusedObject() != NULL );
       
   130     }