windowing/windowserver/nga/CLIENT/RWINDOW.CPP
branchRCL_3
changeset 26 15986eb6c500
parent 0 5d03bc08d59c
child 27 525ea837ea6b
child 163 bbf46f59e123
equal deleted inserted replaced
19:ac96196b945c 26:15986eb6c500
   168 	    {
   168 	    {
   169 	    if (WindowSizeCacheEnabled())
   169 	    if (WindowSizeCacheEnabled())
   170 	         {
   170 	         {
   171 	         DestroyWindowSizeCacheEntry();
   171 	         DestroyWindowSizeCacheEntry();
   172 	         }
   172 	         }
       
   173 #ifdef SYMBIAN_GRAPHICS_FIXNATIVEORIENTATION
       
   174 	    if (WindowNativeSizeCacheEnabled())
       
   175 	         {
       
   176 	         DestroyWindowNativeSizeCacheEntry();
       
   177 	         }
       
   178 #endif // SYMBIAN_GRAPHICS_FIXNATIVEORIENTATION
   173         Write(EWsWinOpFree);
   179         Write(EWsWinOpFree);
   174 	    }
   180 	    }
   175 	iWsHandle=NULL;
   181 	iWsHandle=NULL;
   176 	}
   182 	}
   177 
   183 
   838             return size;
   844             return size;
   839             }
   845             }
   840         }
   846         }
   841 	}
   847 	}
   842 
   848 
       
   849 EXPORT_C TSize RWindowBase::SizeForEgl() const
       
   850 #ifdef SYMBIAN_GRAPHICS_FIXNATIVEORIENTATION
       
   851 /**
       
   852 @internalAll
       
   853 Disclaimer - this API is internal and is subject to change
       
   854 @prototype */
       
   855 	{
       
   856 	TSize size;
       
   857 	if (WindowNativeSizeCacheEnabled() && WindowNativeSize(size) == KErrNone)
       
   858 		{
       
   859 		return size;
       
   860 		}
       
   861 	else
       
   862 		{
       
   863 		return Size();
       
   864 		}
       
   865 	}
       
   866 #else
       
   867     {
       
   868     // API should not be used if macro undefined.
       
   869     ASSERT(0);
       
   870     return TSize();
       
   871     }
       
   872 #endif // SYMBIAN_GRAPHICS_FIXNATIVEORIENTATION
       
   873 
   843 EXPORT_C void RWindowBase::SetPosition(const TPoint &aPos)
   874 EXPORT_C void RWindowBase::SetPosition(const TPoint &aPos)
   844 /** Sets the position of a window relative to its parent. 
   875 /** Sets the position of a window relative to its parent. 
   845 
   876 
   846 The co-ordinates given in aPos specify the position of the top left-hand 
   877 The co-ordinates given in aPos specify the position of the top left-hand 
   847 corner of the window, relative to the top left-hand corner of its parent. 
   878 corner of the window, relative to the top left-hand corner of its parent. 
  1374 @publishedPartner To become publishedAll with WSERV NGA APIs
  1405 @publishedPartner To become publishedAll with WSERV NGA APIs
  1375 @prototype To become released with WSERV NGA APIs */
  1406 @prototype To become released with WSERV NGA APIs */
  1376 	{
  1407 	{
  1377 	Write(EWsWinOpEnableAdvancedPointers);
  1408 	Write(EWsWinOpEnableAdvancedPointers);
  1378 	}
  1409 	}
       
  1410 
       
  1411 /**
       
  1412 @internalAll
       
  1413 Disclaimer - this API is internal and is subject to change
       
  1414 @prototype */
       
  1415 EXPORT_C TInt RWindowBase::FixNativeOrientation()
       
  1416 #if !defined(SYMBIAN_GRAPHICS_FIXNATIVEORIENTATION) || defined (SYMBIAN_GRAPHICS_BUILD_OPENWF_WSERV) || defined (__WINS__) 
       
  1417     {
       
  1418     return KErrNotSupported;
       
  1419     }
       
  1420 #else
       
  1421 	{
       
  1422     TInt err = KErrNone;
       
  1423 	if (!WindowNativeSizeCacheEnabled())
       
  1424 		{
       
  1425 		TRAP(err, EnableWindowNativeSizeCacheL());
       
  1426 		if (err != KErrNone)
       
  1427 		    {
       
  1428             return err;
       
  1429 		    }
       
  1430 		}
       
  1431 	
       
  1432 	const CFbsBitGc::TGraphicsOrientation orientation = static_cast<CFbsBitGc::TGraphicsOrientation>(WriteReply(EWsWinOpFixNativeOrientation));
       
  1433 	switch (orientation)
       
  1434 		{
       
  1435 	case CFbsBitGc::EGraphicsOrientationNormal:
       
  1436     case CFbsBitGc::EGraphicsOrientationRotated180:
       
  1437 		err = SetWindowNativeSize(Size());
       
  1438         break;
       
  1439 	case CFbsBitGc::EGraphicsOrientationRotated90 :
       
  1440     case CFbsBitGc::EGraphicsOrientationRotated270:
       
  1441         {
       
  1442 	    TSize size = Size();
       
  1443 	    err = SetWindowNativeSize(TSize(size.iHeight, size.iWidth));
       
  1444         }
       
  1445 		break;
       
  1446 	default:
       
  1447 	    Assert(EW32AssertInvalidOrientation);
       
  1448 		}
       
  1449 	return err;
       
  1450 	}
       
  1451 #endif // SYMBIAN_GRAPHICS_FIXNATIVEORIENTATION
  1379 
  1452 
  1380 EXPORT_C TInt RWindowBase::AllocPointerMoveBuffer(TInt aMaxNumPoints, TUint aFlags)
  1453 EXPORT_C TInt RWindowBase::AllocPointerMoveBuffer(TInt aMaxNumPoints, TUint aFlags)
  1381 /** Allocates a buffer for storing pointer movements. 
  1454 /** Allocates a buffer for storing pointer movements. 
  1382 
  1455 
  1383 The pointer move buffer is used by applications that need to process every 
  1456 The pointer move buffer is used by applications that need to process every