equal
deleted
inserted
replaced
1 /* |
|
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: This class is used to send direct content invalidate event |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include <logger.h> |
|
21 |
|
22 #include "cmmadcinvalidateevent.h" |
|
23 |
|
24 CMMADCInvalidateEvent::CMMADCInvalidateEvent(jobject aGUIObject, |
|
25 TSize aSize): |
|
26 CMMAEvent(EDisposableEvent) |
|
27 { |
|
28 iListenerObject = aGUIObject; |
|
29 iSize = aSize; |
|
30 } |
|
31 |
|
32 // from CJavaEvent |
|
33 void CMMADCInvalidateEvent::Dispatch(JNIEnv& aJni) |
|
34 { |
|
35 LOG2( EJavaMMAPI, EInfo, "MMA::CMMADCInvalidateEvent::Dispatch w=%d h=%d", |
|
36 iSize.iWidth, |
|
37 iSize.iHeight); |
|
38 |
|
39 iHandleEventMethod = aJni.GetMethodID(aJni.GetObjectClass(iListenerObject), |
|
40 "invalidate", |
|
41 "(II)V"); |
|
42 |
|
43 // IsSameObject method will return true if iListenerObject has disappeared |
|
44 if (iHandleEventMethod && |
|
45 aJni.IsSameObject(iListenerObject, 0) == JNI_FALSE) |
|
46 { |
|
47 aJni.CallVoidMethod(iListenerObject, |
|
48 iHandleEventMethod, |
|
49 iSize.iWidth, |
|
50 iSize.iHeight); |
|
51 } |
|
52 } |
|
53 |
|
54 // END OF FILE |
|