javauis/mmapi_akn/baseline/inc/mmmacontainer.h
branchRCL_3
changeset 19 04becd199f91
child 60 6c158198356e
equal deleted inserted replaced
16:f5050f1da672 19:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 2002-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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MMMACONTAINER_H
       
    20 #define MMMACONTAINER_H
       
    21 
       
    22 class MMMADirectContent;
       
    23 class MUiEventConsumer;
       
    24 
       
    25 /**
       
    26 A container on which content can be displayed.
       
    27 Content can be drawn to container using direct screen access or frame buffer
       
    28 mode.
       
    29 */
       
    30 class MMMAContainer
       
    31 {
       
    32 public:
       
    33     /**
       
    34     Remove the content. This will called when the Player is closed.
       
    35     */
       
    36     virtual void MdcRemoveContent() = 0;
       
    37 
       
    38     /**
       
    39     Get the visiblity of the container. The content must not be displayed
       
    40     when it's container is invisible.
       
    41     If this changes MdcContainerVisibilityChanged should be called.
       
    42     @returns "aVisible" ETrue if the container is visible, EFalse if it is invisible.
       
    43     */
       
    44     virtual TBool MdcContainerVisibility() const = 0;
       
    45 
       
    46     /**
       
    47     Repaint frame buffer to screen.
       
    48     */
       
    49     virtual void MdcRepaint() const = 0;
       
    50 
       
    51     /**
       
    52     Get the bounds of the area that the content can occupy.
       
    53     The content should be clipped to this area.
       
    54     @param aContentRect Maximum area the content can occupy in screen co-ordinates.
       
    55     @param aParentRect Visible part of the parent in screen co-ordinates.
       
    56     */
       
    57     virtual void MdcGetContentRect(TRect& aControlRect,
       
    58                                    TRect& aParentRect) const = 0;
       
    59 
       
    60     /**
       
    61     This method is called when content knows its preferred size. This method
       
    62     will be called for example when video content obtains its size. Container
       
    63     must inform new content rect using content's MdcContentBoundsChanged method.
       
    64     @param aPreferredSize preferred size for the content.
       
    65     */
       
    66     virtual void MdcInvalidate(const TSize& aPreferredSize) = 0;
       
    67 
       
    68     /**
       
    69     Set the size of the render region for the video clip to be fullscreen.
       
    70     After this call MESWTDirectContent must be informed about new draw area.
       
    71     @param aFullScreen Indicates whether or not to render in full screen mode
       
    72     */
       
    73     virtual void MdcSetDisplayFullScreen(TBool aFullScreen) = 0;
       
    74 
       
    75     /**
       
    76      * Invokes callback aConsumer->MdcDSAResourcesCallback in UI thread.
       
    77      * Used in case when MMAPI needs to start DSA within UI thread.
       
    78      *
       
    79      * @since  S60 v5.0
       
    80      * @param "aConsumer" A consumer of callback
       
    81      * @param "aIsInUiThread" Notifies that the method runs in UI thread
       
    82      */
       
    83     virtual void MdcGetDSAResources(
       
    84         MUiEventConsumer& aConsumer,
       
    85         TBool aIsInUiThread) = 0;
       
    86 
       
    87     /**
       
    88      * Invokes callback aConsumer->MdcUICallback in UI thread.
       
    89      * Used in case when MMAPI needs to run some operation within UI thread.
       
    90      *
       
    91      * @since  S60 v5.0
       
    92      * @param "aConsumer" A consumer of callback
       
    93      * @param "aCallbackId" A number identifying the callback
       
    94      */
       
    95     virtual void MdcGetUICallback(
       
    96         MUiEventConsumer& aConsumer,
       
    97         const TInt aCallbackId) = 0;
       
    98 
       
    99     /**
       
   100     * Get the bounds of the content window.
       
   101     *
       
   102     * @returns The rect of the content window in screen co-ordinates.
       
   103     */
       
   104     virtual TRect MdcContainerWindowRect() const = 0;
       
   105 };
       
   106 
       
   107 
       
   108 #endif // MMMACONTAINER_H