2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.tizenopensource.org/license
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
22 #include "mcferroradjustment.h"
24 #include "mcfresourcecache.h"
31 CMCFErrorAdjustment* CMCFErrorAdjustment::sInstance; /* For singleton */
33 CMCFErrorAdjustment* CMCFErrorAdjustment::get_instance()
36 sInstance = new CMCFErrorAdjustment();
38 return (CMCFErrorAdjustment*)sInstance;
41 CMCFErrorAdjustment::CMCFErrorAdjustment()
46 CMCFErrorAdjustment::~CMCFErrorAdjustment()
52 CMCFErrorAdjustment::apply_touch_offset(MCFTouchOffsetLevel level, mcfint *x, mcfint *y)
55 CMCFEvents* events = CMCFEvents::get_instance();
56 CMCFUtils *utils = CMCFUtils::get_instance();
58 pos = events->get_touch_event_offset();
59 if(level == TOUCH_OFFSET_LEVEL_1 ){
60 *x = *x + utils->get_scale_x(pos->x);
61 } else if(level == TOUCH_OFFSET_LEVEL_2) {
62 *x = *x + utils->get_scale_x(pos->x);
64 *y = *y + utils->get_scale_y(pos->y);