2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://floralicense.org/license/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 #include <FAppUiApp.h>
19 #include <FAppIAppFrame.h>
20 #include <FBaseSysLog.h>
21 #include <FGrpCoordinateSystem.h>
22 #include <FGrpDimension.h>
23 #include <FUiCtrlFrame.h>
24 #include <FUiCtrlForm.h>
25 #include "FUi_AccessibilityGesture.h"
26 #include "FUi_AccessibilityManager.h"
27 #include "FUi_ControlManager.h"
29 using namespace Tizen::App;
30 using namespace Tizen::Graphics;
31 using namespace Tizen::Ui::Controls;
35 void ConvertTouchPosition(int &x, int&y)
37 Frame* pFrame = UiApp::GetInstance()->GetAppFrame()->GetFrame();
38 Form* pForm= pFrame->GetCurrentForm();
39 Dimension screen = Tizen::Ui::_ControlManager::GetInstance()->GetScreenSize();
42 switch(pForm->GetOrientationStatus())
44 case Tizen::Ui::ORIENTATION_STATUS_PORTRAIT:
46 case Tizen::Ui::ORIENTATION_STATUS_LANDSCAPE:
47 x = screen.height - _y;
50 case Tizen::Ui::ORIENTATION_STATUS_PORTRAIT_REVERSE:
51 y = screen.height - _y;
53 case Tizen::Ui::ORIENTATION_STATUS_LANDSCAPE_REVERSE:
55 y = screen.width - _x;
63 namespace Tizen { namespace Ui {
64 _AccessibilityGesture::_AccessibilityGesture(_AccessibilityManager& manager)
65 : __pManager(&manager)
69 _AccessibilityGesture::~_AccessibilityGesture(void)
74 _AccessibilityGesture::ProcessGesture(_AccessibilityGestureType type, int x, int y)
76 ConvertTouchPosition(x,y);
77 _AccessibilityManager::GetInstance()->ProcessGesture(type,Tizen::Graphics::Point(CoordinateSystem::ConvertToLogicalX(x),CoordinateSystem::ConvertToLogicalY(y)), null);