31 #include "xnnode.h" |
31 #include "xnnode.h" |
32 #include "xnoomsyshandler.h" |
32 #include "xnoomsyshandler.h" |
33 #include "ainativeuiplugins.h" |
33 #include "ainativeuiplugins.h" |
34 #include "xnpanic.h" |
34 #include "xnpanic.h" |
35 |
35 |
|
36 |
36 #include "debug.h" |
37 #include "debug.h" |
37 |
38 |
38 // Constants |
39 // Constants |
39 _LIT8( KNs, "namespace" ); |
40 _LIT8( KNs, "namespace" ); |
40 |
41 |
|
42 // ============================ LOCAL FUNCTIONS ================================ |
|
43 |
41 // ============================ MEMBER FUNCTIONS =============================== |
44 // ============================ MEMBER FUNCTIONS =============================== |
42 // ----------------------------------------------------------------------------- |
45 // ----------------------------------------------------------------------------- |
43 // CXnViewData::NewL() |
46 // CXnViewData::NewL() |
44 // Two-phased constructor. |
47 // Two-phased constructor. |
45 // ----------------------------------------------------------------------------- |
48 // ----------------------------------------------------------------------------- |
319 // Returns this view data's view node |
317 // Returns this view data's view node |
320 // ----------------------------------------------------------------------------- |
318 // ----------------------------------------------------------------------------- |
321 // |
319 // |
322 CXnNode* CXnViewData::ViewNode() const |
320 CXnNode* CXnViewData::ViewNode() const |
323 { |
321 { |
324 if( iNode ) |
322 return iNode->LayoutNode(); |
325 { |
|
326 return iNode->LayoutNode(); |
|
327 } |
|
328 return NULL; |
|
329 } |
323 } |
330 |
324 |
331 // ----------------------------------------------------------------------------- |
325 // ----------------------------------------------------------------------------- |
332 // CXnViewData::SetWallpaperImage |
326 // CXnViewData::SetWallpaperImage |
333 // Store background image. Ownership is transferred. |
327 // Store background image. Ownership is transferred. |
622 CXnPluginData::DestroyPublishers( aReason ); |
616 CXnPluginData::DestroyPublishers( aReason ); |
623 |
617 |
624 __PRINTS( "*** CXnViewData::DestroyPublishers - done" ); |
618 __PRINTS( "*** CXnViewData::DestroyPublishers - done" ); |
625 } |
619 } |
626 |
620 |
627 // ----------------------------------------------------------------------------- |
|
628 // ----------------------------------------------------------------------------- |
|
629 // |
|
630 TXnDirtyRegion* CXnViewData::DirtyRegionL( CXnNode& aNode ) |
|
631 { |
|
632 // First make sure that the given node is "window owning" |
|
633 CCoeControl* control( aNode.Control() ); |
|
634 if( !control || !control->OwnsWindow() ) |
|
635 { |
|
636 return NULL; |
|
637 } |
|
638 |
|
639 if( iDirtyRegion && iDirtyRegion->iControl == control ) |
|
640 { |
|
641 return iDirtyRegion; |
|
642 } |
|
643 |
|
644 // in case of widget extension / popup, a widget may own window |
|
645 for( TInt i = 0; i < iPluginsData.Count(); i++ ) |
|
646 { |
|
647 TXnDirtyRegion* region( iPluginsData[i]->DirtyRegion() ); |
|
648 if( region && region->iControl == control ) |
|
649 { |
|
650 return region; |
|
651 } |
|
652 } |
|
653 |
|
654 // Region not found, create a new one |
|
655 CXnPluginData* pluginData( Plugin( &aNode ) ); |
|
656 if( pluginData ) |
|
657 { |
|
658 return pluginData->CreateDirtyRegionL( aNode, *control ); |
|
659 } |
|
660 |
|
661 return NULL; |
|
662 } |
|
663 |
|
664 // ----------------------------------------------------------------------------- |
|
665 // ----------------------------------------------------------------------------- |
|
666 // |
|
667 void CXnViewData::GetDirtyRegions( RPointerArray<TXnDirtyRegion>& aList ) |
|
668 { |
|
669 if( iDirtyRegion ) |
|
670 { |
|
671 aList.Append( iDirtyRegion ); |
|
672 } |
|
673 for( TInt i = 0; i < iPluginsData.Count(); i++ ) |
|
674 { |
|
675 TXnDirtyRegion* region( iPluginsData[i]->DirtyRegion() ); |
|
676 if( region ) |
|
677 { |
|
678 aList.Append( region ); |
|
679 } |
|
680 } |
|
681 } |
|
682 |
|
683 // End of file |
621 // End of file |