javauis/mmapi_qt/baseline/src/cmmadisplay.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 18 Aug 2010 09:43:15 +0300
changeset 61 bf7ee68962da
parent 47 f40128debb5d
permissions -rw-r--r--
Revision: v2.2.9 Kit: 201033
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     1
/*
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     8
*
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    11
*
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    12
* Contributors:
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    13
*
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    14
* Description:  This class implements MMMADisplay
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    15
*
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    16
*/
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    18
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    19
//  Include Files
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    20
#include "logger.h"
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    21
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    22
#include "cmmadisplay.h"
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    23
#include "mmmadisplaywindow.h"
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    24
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    25
// temporary
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    26
#include <w32std.h>
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    27
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    28
// Destructor (virtual by CBase)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    29
CMMADisplay::~CMMADisplay()
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    30
{
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    31
    /*
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    32
        if (iDirectContainer)
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    33
        {
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    34
            // Remove clip rect if set
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    35
            if (!iClipRect.IsEmpty())
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    36
            {
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    37
                LOG(EJavaMMAPI,EInfo,"CMMADisplay::~CMMADisplay(): Removing clip rect");
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    38
                iDirectContainer->MdcRemoveContentBounds(iClipRect);
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    39
            }
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    40
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    41
            // Remove this object from MDirectContainer
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    42
            iDirectContainer->MdcRemoveContent(this);
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    43
        }
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    44
        */
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    45
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    46
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    47
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    48
CMMADisplay::CMMADisplay():
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    49
        iVisible(ETrue),
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    50
        iFullScreen(EFalse),
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    51
        iContainerVisible(ETrue),
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    52
        iIsForeground(ETrue),
47
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    53
        iResetDrawRect(EFalse),
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    54
        iIseSWT(EFalse)
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    55
{
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    56
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    57
47
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    58
void CMMADisplay::Construct(MMAFunctionServer* eventSource ,JNIEnv* aJni, jobject javadisplayref)
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    59
{
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    60
    iEventSource = eventSource;
47
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    61
    iJavadisplayref = javadisplayref;
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
    62
    LOG1(EJavaMMAPI,EInfo,"CMMADisplay::Construct=%d",iIseSWT);
47
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    63
    if (iIseSWT)
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    64
    {
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    65
        iJni = aJni;
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    66
    }
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    67
    else
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    68
    {
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    69
        iJni = iEventSource->getValidJniEnv();
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    70
    }
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    71
    iJavaDisplayObject = iJni->NewGlobalRef(javadisplayref);
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    72
    iJavaDisplayClass = iJni->GetObjectClass(iJavaDisplayObject);
47
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    73
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    74
    setRectID = iJni->GetMethodID(iJavaDisplayClass,
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    75
                                  "setRect",
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    76
                                  "()V");
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    77
    iRectDimensionField = iJni->GetFieldID(iJavaDisplayClass, "rectDimension", "[I");
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    78
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    79
    redrawControlID = iJni->GetMethodID(
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    80
                          iJavaDisplayClass,
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    81
                          "redrawControl",
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    82
                          "()V");
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    83
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    84
    removeContentBoundID = iJni->GetMethodID(
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    85
                               iJavaDisplayClass,
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    86
                               "removeContentBound",
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    87
                               "()V");
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    88
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    89
    setContentBoundID = iJni->GetMethodID(
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    90
                            iJavaDisplayClass,
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    91
                            "setContentBound",
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    92
                            "()V");
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    93
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    94
    getCallBackMethodID = iJni->GetMethodID(
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    95
                              iJavaDisplayClass,
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    96
                              "GetCallbackInUiThread",
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    97
                              "(I)V");
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    98
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
    99
    getBoundRectID = iJni->GetMethodID(
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   100
                         iJavaDisplayClass,
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   101
                         "getBoundRect",
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   102
                         "()V");
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   103
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   104
    iDisplayboundarrField = iJni->GetFieldID(iJavaDisplayClass, "displayboundarr", "[I");
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   105
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   106
    // Components must have direct content.
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   107
    /* __ASSERT_LOG(EJavaMMAPI,EInfo,"aDirectContainer, User::Invariant());
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   108
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   109
     // Not owned
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   110
     iDirectContainer = aDirectContainer;
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   111
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   112
     // Get component visibility. Later visibility changes will
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   113
     // be informed through MDirectContent observer.
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   114
     iContainerVisible = iDirectContainer->MdcContainerVisibility();
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   115
     LOG1(EJavaMMAPI,EInfo,"CMMADisplay::Construct iContainerVisible = %d", iContainerVisible);
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   116
     LOG1(EJavaMMAPI,EInfo,"CMMADisplay::Construct iVisible = %d", iVisible);
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   117
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   118
     // Add this MDirectContent to the MDirectContainer. Cannot fail.
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   119
     iDirectContainer->MdcAddContent(this);
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   120
     */
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   121
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   122
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   123
TRect CMMADisplay::ScaleToFullScreen(const TSize& aFullScreenSize,
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   124
                                     const TSize& aSourceSize)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   125
{
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   126
    LOG(EJavaMMAPI,EInfo,"CMMADisplay::ScaleToFullScreen() +");
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   127
    if ((aSourceSize.iWidth == 0) &&
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   128
            (aSourceSize.iHeight == 0))
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   129
    {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   130
        // Avoid divide by zero.
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   131
        return TRect();
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   132
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   133
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   134
    // Width or height will be full size.
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   135
    TRect drawRect(TPoint(0, 0),
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   136
                   aFullScreenSize);
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   137
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   138
    // Smaller dimension scale ratio will be scaled.
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   139
    // Changed to area calculation to avoid reals and dimension
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   140
    // with smaller area will be scaled.
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   141
    TInt vDif((aFullScreenSize.iWidth - aSourceSize.iWidth)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   142
              * aFullScreenSize.iHeight);
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   143
    TInt hDif((aFullScreenSize.iHeight - aSourceSize.iHeight)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   144
              * aFullScreenSize.iWidth);
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   145
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   146
    TPoint position(0, 0);
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   147
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   148
    // Check which side to scale to fullscreen size.
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   149
    if (hDif > vDif)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   150
    {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   151
        // Width is full screen width.
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   152
        // Scale height with aspect ratio.
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   153
        drawRect.iBr.iY = aFullScreenSize.iWidth * aSourceSize.iHeight
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   154
                          / aSourceSize.iWidth;
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   155
        // move rect middle of the screen
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   156
        position.iY = (aFullScreenSize.iHeight - drawRect.iBr.iY) / 2;
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   157
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   158
    else
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   159
    {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   160
        // Height is full screen height.
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   161
        // Scale width with aspect ratio.
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   162
        drawRect.iBr.iX = aFullScreenSize.iHeight * aSourceSize.iWidth
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   163
                          / aSourceSize.iHeight;
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   164
        // move rect middle of the screen
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   165
        position.iX = (aFullScreenSize.iWidth - drawRect.iBr.iX) / 2;
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   166
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   167
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   168
    drawRect.Move(position);
47
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   169
    LOG2(EJavaMMAPI, EInfo, "CMMADisplay::ScaleToFullScreen::drawRect.Width=%d, drawRect.Height=%d",drawRect.Width(), drawRect.Height());
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   170
    LOG(EJavaMMAPI,EInfo,"CMMADisplay::ScaleToFullScreen() -");
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   171
    return drawRect;
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   172
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   173
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   174
// from MMMADisplay
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   175
void CMMADisplay::DrawFrameL(const CFbsBitmap* aBitmap)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   176
{
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   177
    // This method is called only if bitmap is used.
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   178
    // Runs in mmapi thread
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   179
    if (iVisible && iWindow /*&& iDirectContainer*/)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   180
    {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   181
        iWindow->DrawFrameL(aBitmap);
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   182
        //iDirectContainer->MdcFlushContainer(iWindow->WindowRect());
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   183
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   184
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   185
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   186
void CMMADisplay::SetClippingRegion()
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   187
{
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   188
    LOG(EJavaMMAPI,EInfo,"CMMADisplay::SetClippingRegion");
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   189
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   190
    if (!iWindow ||
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   191
            (iWindow->GetDisplayWindowType() == MMMADisplayWindow::EDisplayWindowTypeIsBitmap) ||
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   192
            iClipRect == iWindow->DrawRect() && iContainerVisible && iVisible)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   193
    {
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   194
        LOG(EJavaMMAPI,EInfo,"CMMADisplay::SetClippingRegion before return");
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   195
        return;
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   196
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   197
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   198
    TBool refreshScreen(EFalse);
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   199
    // Remove first the current clip rect if set
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   200
    LOG2(EJavaMMAPI,EInfo,"CMMADisplay::SetClippingRegion: iClipRect = %d X %d",iClipRect.Width(),iClipRect.Height());
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   201
    if (!iClipRect.IsEmpty())
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   202
    {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   203
        LOG(EJavaMMAPI,EInfo,"CMMADisplay::SetClippingRegion: Removing old rect");
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   204
        //iDirectContainer->MdcRemoveContentBounds(iClipRect);
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   205
        RemoveContentBoundFromJavaControl(iClipRect);
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   206
        iClipRect.SetRect(0, 0, 0, 0);
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   207
        refreshScreen = ETrue;
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   208
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   209
    // If visible then set a new clip rect
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   210
    if (iVisible && iContainerVisible)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   211
    {
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   212
        LOG(EJavaMMAPI,EInfo,"CMMADisplay::SetClippingRegion: inside if (iVisible && iContainerVisible)");
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   213
        iClipRect = iWindow->DrawRect();
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   214
        LOG2(EJavaMMAPI,EInfo,"CMMADisplay::SetClippingRegion: inside if (iVisible && iContainerVisible)iClipRect = %d X %d",iClipRect.Width(),iClipRect.Height());
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   215
        if (!iClipRect.IsEmpty())
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   216
        {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   217
            LOG(EJavaMMAPI,EInfo,"CMMADisplay::SetClippingRegion: Adding new rect");
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   218
            // Add new clipping rect
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   219
            //   iDirectContainer->MdcAddContentBounds(iClipRect);
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   220
            SetContentBoundToJavaControl(iClipRect);
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   221
            refreshScreen = ETrue;
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   222
        }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   223
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   224
    if (refreshScreen)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   225
    {
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   226
        LOG(EJavaMMAPI,EInfo,"CMMADisplay::SetClippingRegion: inside if(refreshScreen)");
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   227
        // refresh screen
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   228
        // iDirectContainer->MdcFlushContainer(iWindow->WindowRect());
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   229
        RefreshJavaControl();
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   230
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   231
    LOG(EJavaMMAPI,EInfo,"CMMADisplay::SetClippingRegion -");
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   232
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   233
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   234
void CMMADisplay::RemoveClippingRegion()
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   235
{
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   236
    // Called in mmapi thread
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   237
    LOG(EJavaMMAPI,EInfo,"CMMADisplay::RemoveClippingRegion");
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   238
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   239
    if (!iWindow ||
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   240
            (iWindow->GetDisplayWindowType() == MMMADisplayWindow::EDisplayWindowTypeIsBitmap))
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   241
    {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   242
        return;
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   243
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   244
    // Remove first the current clip rect if set
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   245
    if (!iClipRect.IsEmpty())
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   246
    {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   247
        LOG(EJavaMMAPI,EInfo,"CMMADisplay::RemoveClippingRegion: Removing old rect");
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   248
        //iDirectContainer->MdcRemoveContentBounds(iClipRect);
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   249
        RemoveContentBoundFromJavaControl(iClipRect);
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   250
        iClipRect.SetRect(0, 0, 0, 0);
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   251
        // refresh screen
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   252
        //iDirectContainer->MdcFlushContainer(iWindow->WindowRect());
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   253
        RefreshJavaControl();
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   254
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   255
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   256
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   257
void CMMADisplay::AddClippingRegion()
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   258
{
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   259
    // Called in mmapi thread
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   260
    LOG(EJavaMMAPI,EInfo,"CMMADisplay::AddClippingRegion");
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   261
    LOG2(EJavaMMAPI,EInfo,"CMMADisplay::AddClippingRegion iClipRect width = %d height = %d", iClipRect.Width() , iClipRect.Height());
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   262
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   263
    if (!iWindow ||
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   264
            (iWindow->GetDisplayWindowType() ==
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   265
             MMMADisplayWindow::EDisplayWindowTypeIsBitmap) ||
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   266
            iClipRect == iWindow->DrawRect())
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   267
    {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   268
        return;
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   269
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   270
    // If visible then set a new clip rect
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   271
    if (iVisible)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   272
    {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   273
        iClipRect = iWindow->DrawRect();
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   274
        if (!iClipRect.IsEmpty())
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   275
        {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   276
            LOG(EJavaMMAPI,EInfo,"CMMADisplay::AddClippingRegion: Adding new rect");
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   277
            // Add new clipping rect
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   278
            // iDirectContainer->MdcAddContentBounds(iClipRect);
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   279
            SetContentBoundToJavaControl(iClipRect);
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   280
            // refresh screen
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   281
            // iDirectContainer->MdcFlushContainer(
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   282
            //     iWindow->WindowRect());
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   283
            RefreshJavaControl();
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   284
        }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   285
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   286
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   287
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   288
// from MMMADisplay
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   289
TSize CMMADisplay::DisplaySize()
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   290
{
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   291
    LOG(EJavaMMAPI,EInfo,"CMMADisplay::DisplaySize +");
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   292
    if (iWindow && iFullScreen)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   293
    {
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   294
        LOG(EJavaMMAPI,EInfo,"CMMADisplay::DisplaySize if loop ");
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   295
        return iWindow->DrawRect().Size();
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   296
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   297
    else
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   298
    {
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   299
        LOG1(EJavaMMAPI,EInfo,"CMMADisplay::DisplaySize else loop %d",iUserRect.Size().iHeight);
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   300
        return iUserRect.Size();
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   301
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   302
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   303
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   304
// from MMMADisplay
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   305
void CMMADisplay::SetDisplaySizeL(const TSize& aSize)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   306
{
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   307
    // user rect contains size set from java.
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   308
    iUserRect.SetSize(aSize);
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   309
    LOG2(EJavaMMAPI,EInfo,"CMMADisplay::SetDisplaySizeL iUserRect = %d X %d", iUserRect.Width() ,iUserRect.Height());
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   310
    // Size change has no effect if fullscreen mode is on.
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   311
    // New size could be used when fullscreen is turned off.
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   312
    if (iContainerVisible && !iFullScreen && iWindow)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   313
    {
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   314
        LOG1(EJavaMMAPI,EInfo,"CMMADisplay::SetVisible + iContainerVisible = %d", iContainerVisible);
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   315
        RemoveClippingRegion();
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   316
        LOG2(EJavaMMAPI,EInfo,"CMMADisplay::SetDisplaySizeL iUserRect after removingClipRegion = %d X %d", iUserRect.Width() ,iUserRect.Height());
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   317
        iWindow->SetDrawRect(iUserRect);
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   318
        AddClippingRegion();
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   319
        LOG2(EJavaMMAPI,EInfo,"CMMADisplay::SetDisplaySizeL iUserRect after AddingClipRegion = %d X %d", iUserRect.Width() ,iUserRect.Height());
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   320
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   321
    else
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   322
    {
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   323
        LOG1(EJavaMMAPI,EInfo,"CMMADisplay::SetVisible + iContainerVisible = %d", iContainerVisible);
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   324
        iResetDrawRect = ETrue;
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   325
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   326
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   327
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   328
// from MMMADisplay
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   329
void CMMADisplay::SetVisible(TBool aValue)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   330
{
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   331
    iVisible = aValue;
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   332
    // Window may be set visible only if container is on screen,
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   333
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   334
    LOG1(EJavaMMAPI,EInfo,"CMMADisplay::SetVisible + iContainerVisible = %d", iContainerVisible);
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   335
    LOG1(EJavaMMAPI,EInfo,"CMMADisplay::SetVisible iVisible = %d", iVisible);
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   336
    if (!iIsForeground)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   337
    {
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   338
        LOG(EJavaMMAPI,EInfo,"CMMADisplay::SetVisible - iIsForeground = 0");
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   339
        return;
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   340
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   341
    // if not it can not be set visible.
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   342
    if (iWindow && iContainerVisible)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   343
    {
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   344
        // iWindow->SetVisible(aValue, EFalse);
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   345
        //MMAPI UI 3.x req. (had to comment above line and add below line which excutes in FS thread)
47
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   346
        if (iIseSWT == true)
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   347
        {
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   348
            iWindow->SetVisible(aValue, ETrue);
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   349
        }
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   350
        else
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   351
        {
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   352
            iWindow->SetVisible(aValue, EFalse);
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   353
        }
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   354
        LOG(EJavaMMAPI,EInfo,"CMMADisplay::SetVisible after iWindow->SetVisible()");
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   355
        SetClippingRegion();
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   356
        LOG(EJavaMMAPI,EInfo,"CMMADisplay::SetVisible -");
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   357
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   358
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   359
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   360
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   361
void CMMADisplay::SetContainerVisibility(TBool aValue)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   362
{
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   363
    iContainerVisible = aValue;
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   364
    // TODO : delete the below check once implementation is done as it is used only for testing purpose
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   365
    if (iContainerVisible)
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   366
        LOG(EJavaMMAPI,EInfo,"CMMADisplay:SetContainerVisibility(): Container is visible ");
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   367
    else
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   368
        LOG(EJavaMMAPI,EInfo,"CMMADisplay:SetContainerVisibility(): Container is not visible ");
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   369
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   370
    HandleContainerVisibilityChanged(aValue);
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   371
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   372
// from MMMADisplay
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   373
void CMMADisplay::SetWindowL(MMMADisplayWindow* aWindow)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   374
{
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   375
    // Sets new window. Ownership is not transferred.
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   376
    iWindow = aWindow;
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   377
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   378
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   379
// from MMMADisplay
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   380
MMMADisplayWindow* CMMADisplay::Window()
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   381
{
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   382
    return iWindow;
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   383
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   384
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   385
TBool CMMADisplay::IsVisible()
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   386
{
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   387
    LOG1(EJavaMMAPI,EInfo,"CMMADisplay::IsVisible iContainerVisible = %d", iContainerVisible);
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   388
    LOG1(EJavaMMAPI,EInfo,"CMMADisplay::IsVisible iVisible = %d", iVisible);
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   389
    // display is visible if container is on screen and
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   390
    // java side has set it visible
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   391
    return iVisible && iContainerVisible;
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   392
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   393
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   394
TBool CMMADisplay::IsFullScreen()
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   395
{
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   396
    return iFullScreen;
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   397
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   398
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   399
TBool CMMADisplay::HasContainer()
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   400
{
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   401
    // return iDirectContainer != NULL;
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   402
    return EFalse;   // temporary
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   403
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   404
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   405
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   406
void CMMADisplay::HandleContainerVisibilityChanged(TBool aVisible)
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   407
{
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   408
    LOG1(EJavaMMAPI,EInfo, "CMMADisplay::HandleContainerVisibilityChanged aVisible = %d",
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   409
         aVisible);
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   410
    if (!iIsForeground && aVisible)
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   411
    {
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   412
        LOG(EJavaMMAPI,EInfo," CMMADisplay::HandleContainerVisibilityChanged Condition 1 ");
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   413
        return;
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   414
    }
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   415
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   416
    LOG(EJavaMMAPI,EInfo," CMMADisplay::HandleContainerVisibilityChanged After condition1");
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   417
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   418
    if (iWindow)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   419
    {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   420
        // midlet comes to foreground (0 to 1 transition),
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   421
        // Allow turn on or turn off based on aVisible
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   422
        if (aVisible != iWindow->IsVisible())
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   423
        {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   424
            // Allow
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   425
            LOG(EJavaMMAPI,EInfo,"CMMADisplay::MdcContainerVisibilityChanged Allow ");
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   426
        }
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   427
        else if (iContainerVisible == aVisible)
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   428
        {
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   429
            LOG(EJavaMMAPI,EInfo,"CMMADisplay::MdcContainerVisibilityChanged iContainerVisible == aVisible ");
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   430
            // if state is not changed, we do not need to do it again
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   431
            return;
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   432
        }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   433
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   434
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   435
    LOG(EJavaMMAPI,EInfo,"CMMADisplay::MdcContainerVisibilityChanged After condition2");
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   436
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   437
    if (iWindow)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   438
    {
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   439
        LOG(EJavaMMAPI,EInfo,"CMMADisplay::MdcContainerVisibilityChanged iWindow is valid ");
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   440
        // change is only needed if java side has set display visible or
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   441
        // if container loses focus
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   442
        if (!iContainerVisible || iVisible)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   443
        {
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   444
            LOG(EJavaMMAPI,EInfo,"CMMADisplay::MdcContainerVisibilityChanged container is invisible and window is visible");
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   445
            if (iResetDrawRect && aVisible && !iFullScreen)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   446
            {
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   447
                LOG(EJavaMMAPI,EInfo,"CMMADisplay::MdcContainerVisibilityChanged resetdrawrect is true");
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   448
                iWindow->SetDrawRectThread(iUserRect);
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   449
                iResetDrawRect = EFalse;
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   450
            }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   451
            if (iIsForeground)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   452
            {
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   453
                LOG(EJavaMMAPI,EInfo,"CMMADisplay::MdcContainerVisibilityChanged container foreground is true");
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   454
                iWindow->SetVisible(aVisible,false);
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   455
            }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   456
            SetClippingRegion();
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   457
        }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   458
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   459
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   460
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   461
/*
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   462
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   463
void CMMADisplay::MdcItemContentRectChanged(const TRect& aContentRect,
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   464
        const TRect& aScreenRect)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   465
{
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   466
    // To be overwritten if used
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   467
    __ASSERT_LOG(EJavaMMAPI,EInfo,"EFalse, User::Invariant());
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   468
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   469
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   470
void CMMADisplay::MdcContainerWindowRectChanged(const TRect&
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   471
                                                  #ifdef RD_JAVA_NGA_ENABLED
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   472
                                                   aRect
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   473
                                                  #endif
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   474
                                                  )
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   475
    {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   476
    LOG(EJavaMMAPI,EInfo,"CMMADisplay::MdcContainerWindowRectChanged +");
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   477
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   478
    #ifdef RD_JAVA_NGA_ENABLED
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   479
    if( iWindow )
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   480
        {
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   481
        LOG(EJavaMMAPI,EInfo,"CMMADisplay::MdcContainerWindowRectChanged, SetRWindowRect");
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   482
        iWindow->SetRWindowRect(aRect, MMMADisplay::EUiThread);
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   483
        }
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   484
    #endif
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   485
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   486
void CMMADisplay::MdcContainerDestroyed()
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   487
{
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   488
    LOG(EJavaMMAPI,EInfo,"MMA::CMMADisplay::MdcContainerDestroyed");
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   489
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   490
    if (iWindow)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   491
    {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   492
        iWindow->ContainerDestroyed();
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   493
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   494
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   495
    iDirectContainer = NULL;
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   496
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   497
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   498
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   499
void CMMADisplay::MdcAbortDSA()
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   500
{
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   501
    if (iWindow)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   502
    {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   503
        iWindow->AbortDSA();
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   504
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   505
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   506
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   507
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   508
void CMMADisplay::MdcResumeDSA()
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   509
{
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   510
    if (iWindow)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   511
    {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   512
        iWindow->ResumeDSA();
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   513
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   514
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   515
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   516
void CMMADisplay::UIGetCallback(
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   517
    MUiEventConsumer& aConsumer,
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   518
    TInt aCallbackId)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   519
{
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   520
    if (iDirectContainer)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   521
    {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   522
        iDirectContainer->MdcGetUICallback(aConsumer, aCallbackId);
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   523
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   524
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   525
*/
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   526
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   527
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   528
void CMMADisplay::GetCallbackInUiThread(TInt placeholder)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   529
{
47
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   530
    JNIEnv* validJni = iEventSource->getValidJniEnv();
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   531
    jobject javaDisplayObject;
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   532
    jclass javaDisplayClass;
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   533
    LOG(EJavaMMAPI,EInfo,"CMMADisplay::GetCallbackInUiThread +");
47
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   534
    /**
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   535
     * In case of eSWT iJavaDisplayClass and iJavaDisplayObject were initialized with JNI
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   536
     * in UI Thread. Since this function is called from FunctionServer Thread so we need to get
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   537
     * valid JNI for FunctionServer Thread and need to initialize iJavaDisplayClass and iJavaDisplayObject
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   538
     * again for FunctionServer Thread rather than using the one that was created in Constructor(UI Thread).
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   539
     */
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   540
    if (iIseSWT)
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   541
    {
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   542
        javaDisplayObject = validJni->NewGlobalRef(iJavadisplayref);
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   543
        javaDisplayClass =  validJni->GetObjectClass(iJavaDisplayObject);
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   544
    }
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   545
    else
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   546
    {
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   547
        javaDisplayObject = iJavaDisplayObject;
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   548
        javaDisplayClass = iJavaDisplayClass;
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   549
    }
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   550
    getCallBackMethodID = validJni->GetMethodID(javaDisplayClass,
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   551
                          "GetCallbackInUiThread",
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   552
                          "(I)V");
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   553
    LOG1(EJavaMMAPI,EInfo,"CMMADisplay::GetCallbackInUiThread getCallBackMethodID = %d",getCallBackMethodID);
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   554
    validJni->CallVoidMethod(javaDisplayObject,getCallBackMethodID,placeholder);
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   555
    LOG(EJavaMMAPI,EInfo,"CMMADisplay::GetCallbackInUiThread -");
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   556
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   557
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   558
void CMMADisplay::CalledBackInUiThread(TInt placeholder)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   559
{
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   560
    LOG(EJavaMMAPI,EInfo,"CMMADisplay::CalledBackInUiThread +");
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   561
    iWindow->UICallback(placeholder);
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   562
    LOG(EJavaMMAPI,EInfo,"CMMADisplay::CalledBackInUiThread -");
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   563
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   564
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   565
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   566
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   567
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   568
void CMMADisplay::SetWindowResources(QWidget* qtWidget)
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   569
{
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   570
    LOG(EJavaMMAPI,EInfo,"CMMADisplay::SetWindowResources +");
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   571
    CCoeControl* control = 0;
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   572
    if (qtWidget && qtWidget ->winId())
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   573
    {
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   574
        control = reinterpret_cast<CCoeControl*>(qtWidget->winId());
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   575
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   576
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   577
    CCoeEnv *coeEnv = control->ControlEnv();
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   578
    RWsSession * iWs = &(coeEnv->WsSession());
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   579
    CWsScreenDevice* iScreenDevice = coeEnv->ScreenDevice();
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   580
    RWindowBase* window = static_cast<RWindowBase*>(control->DrawableWindow());
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   581
    if (!iWindow)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   582
    {
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   583
        return;
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   584
    }
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   585
    iWindow->ProcureWindowResourcesFromQWidget(iWs,iScreenDevice,window);
47
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   586
    iWindow->SetVisible(ETrue,ETrue);
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   587
    LOG(EJavaMMAPI,EInfo,"CMMADisplay::SetWindowResources -");
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   588
}
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   589
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   590
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   591
void CMMADisplay::SetForeground(TBool aForeground, TBool aUseEventServer)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   592
{
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   593
    LOG1(EJavaMMAPI,EInfo,"MMA::CMMADisplay::SetForeground %d", aForeground);
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   594
    iIsForeground = aForeground;
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   595
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   596
    if (aForeground)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   597
    {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   598
        if (iContainerVisible && !iWindow->IsVisible())
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   599
        {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   600
            iWindow->SetVisible(ETrue, aUseEventServer);
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   601
        }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   602
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   603
    else
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   604
    {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   605
        if (iWindow->IsVisible())
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   606
        {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   607
            iWindow->SetVisible(EFalse, aUseEventServer);
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   608
        }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   609
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   610
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   611
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   612
TSize CMMADisplay::SourceSize()
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   613
{
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   614
    LOG(EJavaMMAPI,EInfo,"CMMADisplay::SetSourceSizeToDisplay ");
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   615
    return iUiPlayer->SourceSize();
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   616
}
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   617
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   618
void CMMADisplay::SetUIPlayer(MMMAGuiPlayer* player)
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   619
{
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   620
    iUiPlayer = player;
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   621
}
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   622
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   623
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   624
void CMMADisplay::SourceSizeChanged(const TSize& aSourceSize)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   625
{
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   626
    LOG(EJavaMMAPI,EInfo,"CMMADisplay::SourceSizeChanged");
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   627
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   628
#ifdef RD_JAVA_NGA_ENABLED
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   629
    if (iWindow)
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   630
    {
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   631
        iWindow->SetVideoCropRegion(TRect(iUserRect.iTl, aSourceSize));
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   632
    }
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   633
#endif
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   634
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   635
    iSourceSize = aSourceSize;
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   636
    LOG1(EJavaMMAPI,EInfo,"MMA::CMMADisplay::SourceSizeChanged %d",
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   637
         aSourceSize.iWidth);
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   638
    LOG1(EJavaMMAPI,EInfo,"MMA::CMMADisplay::SourceSizeChanged %d",
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   639
         aSourceSize.iHeight);
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   640
    jmethodID getDisplayWidthID = iJni->GetMethodID(
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   641
                                      iJavaDisplayClass,
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   642
                                      "getDisplayWidth",
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   643
                                      "()I");
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   644
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   645
    jmethodID getDisplayHeightID = iJni->GetMethodID(
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   646
                                       iJavaDisplayClass,
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   647
                                       "getDisplayHeight",
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   648
                                       "()I");
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   649
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   650
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   651
    TInt x =  iJni->CallIntMethod(iJavaDisplayObject,getDisplayWidthID);
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   652
    TInt y = iJni->CallIntMethod(iJavaDisplayObject,getDisplayHeightID);
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   653
    LOG2(EJavaMMAPI,EInfo,"CMMADisplay.cpp : SourceSizeChanged () iFullScreenSize is x = %d ,y = %d ",x,y);
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   654
    // get the ScreenSize from canvas in java
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   655
    TSize canvasSize(x, y);
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   656
    iFullScreenSize = canvasSize;
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   657
    TBool sourceIsBigger = (aSourceSize.iWidth > iFullScreenSize.iWidth ||
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   658
                            aSourceSize.iHeight > iFullScreenSize.iHeight);
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   659
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   660
    if (sourceIsBigger)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   661
    {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   662
        // Source is larger than display area.
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   663
        // Shrink draw are to fit in display.
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   664
        iWindow->SetDrawRect(ScaleToFullScreen(iFullScreenSize, iSourceSize));
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   665
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   666
    else
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   667
    {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   668
        // source is smaller than display area
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   669
        iWindow->SetDrawRect(TRect(iUserRect.iTl, iSourceSize));
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   670
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   671
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   672
    SetClippingRegion();
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   673
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   674
    if (iUserRect.IsEmpty())
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   675
    {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   676
        // Java side hasn't set size.
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   677
        iUserRect = iWindow->DrawRect();
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   678
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   679
        if (!sourceIsBigger)
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   680
        {
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   681
            // Addjusting rect to top left corner.
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   682
            iUserRect = TRect(iUserRect.Size());
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   683
        }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   684
    }
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   685
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   686
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   687
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   688
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   689
void CMMADisplay::SetDisplayPosition(TInt /*uiControlLocationX*/,TInt /*uiControlLocationY*/,TInt   videoControlLocationX,TInt videoControlLocationY)
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   690
{
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   691
    LOG(EJavaMMAPI,EInfo,"CMMADisplay::SourceSizeChanged + ");
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   692
    TPoint point(videoControlLocationX ,videoControlLocationY);
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   693
    //calling derived class fuction
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   694
    TRAP_IGNORE(SetDisplayLocationL(point));
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   695
    LOG(EJavaMMAPI,EInfo,"CMMADisplay::SourceSizeChanged - ");
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   696
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   697
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   698
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   699
void CMMADisplay::ResetJavaRectObject(const TRect& aRect)
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   700
{
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   701
    LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::ResetJavaRectObject +");
47
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   702
    //TRect rect = aRect;
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   703
    JNIEnv* validJni = iJni;//iEventSource->getValidJniEnv();//iJni;
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   704
    /*jmethodID setRectID = validJni->GetMethodID(
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   705
                                                 iJavaDisplayClass,
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   706
                                                 "setRect",
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   707
                                             "()V");
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   708
    */
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   709
    LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::ResetJavaRectObject --1");
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   710
    // set the value to java,so that we can access those from array
47
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   711
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   712
    //jfieldID iRectDimensionField = validJni->GetFieldID(iJavaDisplayClass, "rectDimension", "[I");
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   713
    if (iRectDimensionField == NULL)
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   714
    {
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   715
        // handle error
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   716
    }
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   717
    /* Write to the instance fields */
47
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   718
    jintArray javaDimensionarr = (jintArray)validJni->GetObjectField(iJavaDisplayObject, iRectDimensionField);
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   719
    LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::ResetJavaRectObject --2");
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   720
    jint* nativeRectDimensionArr = validJni->GetIntArrayElements(javaDimensionarr, NULL);
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   721
    LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::ResetJavaRectObject --3");
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   722
    if (!nativeRectDimensionArr)
47
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   723
    {    // inputBuffer was already allocated
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   724
        validJni->ReleaseIntArrayElements(javaDimensionarr, nativeRectDimensionArr, JNI_ABORT);
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   725
        LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::ResetJavaRectObject Error in resetting rect dimension to java");
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   726
        return;
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   727
    }
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   728
    nativeRectDimensionArr[0] = aRect.iTl.iX;
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   729
    nativeRectDimensionArr[1] = aRect.iTl.iY;;
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   730
    nativeRectDimensionArr[2] = aRect.Width();
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   731
    nativeRectDimensionArr[3] = aRect.Height();
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   732
    // Now the dimension array in java is updated hence reset the java rect
47
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   733
61
bf7ee68962da Revision: v2.2.9
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 47
diff changeset
   734
    validJni->ReleaseIntArrayElements(javaDimensionarr, nativeRectDimensionArr, 0);
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   735
    validJni->CallVoidMethod(iJavaDisplayObject,setRectID);
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   736
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   737
    LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::ResetJavaRectObject -");
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   738
}
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   739
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   740
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   741
void CMMADisplay::SetContentBoundToJavaControl(const TRect& aRect)
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   742
{
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   743
    LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::SetContentBoundToJavaControl +");
47
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   744
    JNIEnv* validJni = iJni;//iEventSource->getValidJniEnv();//iJni;
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   745
    // Reset the java rect
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   746
    ResetJavaRectObject(aRect);
47
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   747
    /*jmethodID setContentBoundID = validJni->GetMethodID(
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   748
                                         iJavaDisplayClass,
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   749
                                         "setContentBound",
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   750
                                     "()V");
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   751
    */
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   752
    // call java function
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   753
    validJni->CallVoidMethod(iJavaDisplayObject,setContentBoundID);
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   754
    LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::SetContentBoundToJavaControl -");
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   755
}
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   756
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   757
void CMMADisplay::RemoveContentBoundFromJavaControl(const TRect& aRect)
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   758
{
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   759
    LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::RemoveContentBoundFromJavaControl +");
47
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   760
    JNIEnv* validJni = iJni;//iEventSource->getValidJniEnv();
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   761
    // Reset the java rect
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   762
    ResetJavaRectObject(aRect);
47
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   763
    /*jmethodID removeContentBoundID = validJni->GetMethodID(
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   764
                                         iJavaDisplayClass,
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   765
                                         "removeContentBound",
47
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   766
                                     "()V");
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   767
    */
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   768
    // call java function
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   769
    validJni->CallVoidMethod(iJavaDisplayObject,removeContentBoundID);
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   770
    LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::RemoveContentBoundFromJavaControl -");
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   771
}
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   772
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   773
void CMMADisplay::RefreshJavaControl()
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   774
{
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   775
    LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::RefreshJavaControl +");
47
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   776
    JNIEnv* validJni = iJni;//iEventSource->getValidJniEnv();//iJni;
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   777
    // Reset the java rect
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   778
    //ResetJavaRectObject(aRect);
47
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   779
    /*jmethodID redrawControlID = validJni->GetMethodID(
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   780
                                         iJavaDisplayClass,
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   781
                                         "redrawControl",
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   782
                                     "()V");
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   783
    */
26
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   784
    // call java function
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   785
    validJni->CallVoidMethod(iJavaDisplayObject,redrawControlID);
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   786
    LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::RefreshJavaControl -");
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   787
}
dc7c549001d5 Revision: v2.1.26
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   788
47
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   789
TBool CMMADisplay::iseSWT()
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   790
{
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   791
    return iIseSWT;
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   792
}
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   793
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   794
void CMMADisplay::SetFullscreenSize(TSize &aFullscreenSize)
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   795
{
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   796
    iFullScreenSize = aFullscreenSize;
f40128debb5d Revision: v2.2.2
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 26
diff changeset
   797
}
23
98ccebc37403 Revision: v2.1.24
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   798
//  END OF FILE