windowing/windowserver/nga/CLIENT/RWINDOW.CPP
branchNewGraphicsArchitecture
changeset 27 525ea837ea6b
parent 8 6c0e9409e175
parent 26 15986eb6c500
child 84 de3e07519bb7
equal deleted inserted replaced
24:61720828305f 27:525ea837ea6b
   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. 
  1376 @publishedPartner To become publishedAll with WSERV NGA APIs
  1407 @publishedPartner To become publishedAll with WSERV NGA APIs
  1377 @prototype To become released with WSERV NGA APIs */
  1408 @prototype To become released with WSERV NGA APIs */
  1378 	{
  1409 	{
  1379 	Write(EWsWinOpEnableAdvancedPointers);
  1410 	Write(EWsWinOpEnableAdvancedPointers);
  1380 	}
  1411 	}
       
  1412 
       
  1413 /**
       
  1414 @internalAll
       
  1415 Disclaimer - this API is internal and is subject to change
       
  1416 @prototype */
       
  1417 EXPORT_C TInt RWindowBase::FixNativeOrientation()
       
  1418 #if !defined(SYMBIAN_GRAPHICS_FIXNATIVEORIENTATION) || defined (SYMBIAN_GRAPHICS_BUILD_OPENWF_WSERV) || defined (__WINS__) 
       
  1419     {
       
  1420     return KErrNotSupported;
       
  1421     }
       
  1422 #else
       
  1423 	{
       
  1424     TInt err = KErrNone;
       
  1425 	if (!WindowNativeSizeCacheEnabled())
       
  1426 		{
       
  1427 		TRAP(err, EnableWindowNativeSizeCacheL());
       
  1428 		if (err != KErrNone)
       
  1429 		    {
       
  1430             return err;
       
  1431 		    }
       
  1432 		}
       
  1433 	
       
  1434 	const CFbsBitGc::TGraphicsOrientation orientation = static_cast<CFbsBitGc::TGraphicsOrientation>(WriteReply(EWsWinOpFixNativeOrientation));
       
  1435 	switch (orientation)
       
  1436 		{
       
  1437 	case CFbsBitGc::EGraphicsOrientationNormal:
       
  1438     case CFbsBitGc::EGraphicsOrientationRotated180:
       
  1439 		err = SetWindowNativeSize(Size());
       
  1440         break;
       
  1441 	case CFbsBitGc::EGraphicsOrientationRotated90 :
       
  1442     case CFbsBitGc::EGraphicsOrientationRotated270:
       
  1443         {
       
  1444 	    TSize size = Size();
       
  1445 	    err = SetWindowNativeSize(TSize(size.iHeight, size.iWidth));
       
  1446         }
       
  1447 		break;
       
  1448 	default:
       
  1449 	    Assert(EW32AssertInvalidOrientation);
       
  1450 		}
       
  1451 	return err;
       
  1452 	}
       
  1453 #endif // SYMBIAN_GRAPHICS_FIXNATIVEORIENTATION
  1381 
  1454 
  1382 EXPORT_C TInt RWindowBase::AllocPointerMoveBuffer(TInt aMaxNumPoints, TUint aFlags)
  1455 EXPORT_C TInt RWindowBase::AllocPointerMoveBuffer(TInt aMaxNumPoints, TUint aFlags)
  1383 /** Allocates a buffer for storing pointer movements. 
  1456 /** Allocates a buffer for storing pointer movements. 
  1384 
  1457 
  1385 The pointer move buffer is used by applications that need to process every 
  1458 The pointer move buffer is used by applications that need to process every