#include <Elementary.h>
#include <FBaseDataType.h>
#include <FBaseSysLog.h>
+#include <FGrp_CoordinateSystem.h>
#include <FUiInputConnection.h>
#include <new>
#include "FUi_BidiUtils.h"
SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use.");
- int x = 0;
- int y = 0;
- int w = 0;
- int h = 0;
+ Rectangle inputPanelPhysicalRect;
+ Rectangle inputPanelLogicalRect;
- ecore_imf_context_input_panel_geometry_get(__pContext, &x, &y, &w, &h);
- return Rectangle(x, y, w, h);
+ ecore_imf_context_input_panel_geometry_get(__pContext, &inputPanelPhysicalRect.x, &inputPanelPhysicalRect.y, &inputPanelPhysicalRect.width, &inputPanelPhysicalRect.height);
+
+ _CoordinateSystem* pCoordSystem = _CoordinateSystem::GetInstance();
+ SysTryReturn(NID_UI, pCoordSystem != null, Rectangle(0,0,0,0), E_SYSTEM, "Coordinate system load failed.");
+
+ _ICoordinateSystemTransformer* pXformer = pCoordSystem->GetInverseTransformer();
+ SysTryReturn(NID_UI, pXformer, Rectangle(0,0,0,0), E_SYSTEM, "Coordinate system load failed.");
+
+ inputPanelLogicalRect = pXformer->Transform(inputPanelPhysicalRect);
+
+ return inputPanelLogicalRect;
}
FloatRectangle
int h = 0;
ecore_imf_context_input_panel_geometry_get(__pContext, &x, &y, &w, &h);
- FloatRectangle inputPanelFloatRect;
- inputPanelFloatRect.x = _CoordinateSystemUtils::ConvertToFloat(x);
- inputPanelFloatRect.y = _CoordinateSystemUtils::ConvertToFloat(y);
- inputPanelFloatRect.width = _CoordinateSystemUtils::ConvertToFloat(w);
- inputPanelFloatRect.height = _CoordinateSystemUtils::ConvertToFloat(h);
- return inputPanelFloatRect;
+ FloatRectangle inputPanelPhysicalFloatRect;
+ FloatRectangle inputPanelLogicalFloatRect;
+
+ inputPanelPhysicalFloatRect.x = _CoordinateSystemUtils::ConvertToFloat(x);
+ inputPanelPhysicalFloatRect.y = _CoordinateSystemUtils::ConvertToFloat(y);
+ inputPanelPhysicalFloatRect.width = _CoordinateSystemUtils::ConvertToFloat(w);
+ inputPanelPhysicalFloatRect.height = _CoordinateSystemUtils::ConvertToFloat(h);
+
+ _CoordinateSystem* pCoordSystem = _CoordinateSystem::GetInstance();
+ SysTryReturn(NID_UI, pCoordSystem != null, FloatRectangle(0.0f,0.0f,0.0f,0.0f), E_SYSTEM, "Coordinate system load failed.");
+
+ _ICoordinateSystemTransformer* pXformer = pCoordSystem->GetInverseTransformer();
+ SysTryReturn(NID_UI, pXformer, FloatRectangle(0.0f,0.0f,0.0f,0.0f), E_SYSTEM, "Coordinate system load failed.");
+
+ inputPanelLogicalFloatRect = pXformer->Transform(inputPanelPhysicalFloatRect);
+
+ return inputPanelLogicalFloatRect;
}
Rectangle
SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use.");
- int x = 0;
- int y = 0;
- int w = 0;
- int h = 0;
+ Rectangle predictionPhysicalRect;
+ Rectangle predictionLogicalRect;
- ecore_imf_context_candidate_panel_geometry_get(__pContext, &x, &y, &w, &h);
- return Rectangle(x, y, w, h);
+ ecore_imf_context_candidate_panel_geometry_get(__pContext, &predictionPhysicalRect.x, &predictionPhysicalRect.y, &predictionPhysicalRect.width, &predictionPhysicalRect.height);
+
+ _CoordinateSystem* pCoordSystem = _CoordinateSystem::GetInstance();
+ SysTryReturn(NID_UI, pCoordSystem != null, Rectangle(0,0,0,0), E_SYSTEM, "Coordinate system load failed.");
+
+ _ICoordinateSystemTransformer* pXformer = pCoordSystem->GetInverseTransformer();
+ SysTryReturn(NID_UI, pXformer, Rectangle(0,0,0,0), E_SYSTEM, "Coordinate system load failed.");
+
+ predictionLogicalRect = pXformer->Transform(predictionPhysicalRect);
+
+ return predictionLogicalRect;
}
FloatRectangle
int h = 0;
ecore_imf_context_candidate_panel_geometry_get(__pContext, &x, &y, &w, &h);
- FloatRectangle inputPredictionFloatRect;
- inputPredictionFloatRect.x = _CoordinateSystemUtils::ConvertToFloat(x);
- inputPredictionFloatRect.y = _CoordinateSystemUtils::ConvertToFloat(y);
- inputPredictionFloatRect.width = _CoordinateSystemUtils::ConvertToFloat(w);
- inputPredictionFloatRect.height = _CoordinateSystemUtils::ConvertToFloat(h);
- return inputPredictionFloatRect;
+ FloatRectangle predictionPhysicalFloatRect;
+ FloatRectangle predictionLogicalFloatRect;
+
+ predictionPhysicalFloatRect.x = _CoordinateSystemUtils::ConvertToFloat(x);
+ predictionPhysicalFloatRect.y = _CoordinateSystemUtils::ConvertToFloat(y);
+ predictionPhysicalFloatRect.width = _CoordinateSystemUtils::ConvertToFloat(w);
+ predictionPhysicalFloatRect.height = _CoordinateSystemUtils::ConvertToFloat(h);
+
+ _CoordinateSystem* pCoordSystem = _CoordinateSystem::GetInstance();
+ SysTryReturn(NID_UI, pCoordSystem != null, FloatRectangle(0.0f,0.0f,0.0f,0.0f), E_SYSTEM, "Coordinate system load failed.");
+
+ _ICoordinateSystemTransformer* pXformer = pCoordSystem->GetInverseTransformer();
+ SysTryReturn(NID_UI, pXformer, FloatRectangle(0.0f,0.0f,0.0f,0.0f), E_SYSTEM, "Coordinate system load failed.");
+
+ predictionLogicalFloatRect = pXformer->Transform(predictionPhysicalFloatRect);
+
+ return predictionLogicalFloatRect;
}
result