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.
21 #include "mcferroradjustment.h"
23 #include "mcfresourcecache.h"
30 CMCFErrorAdjustment* CMCFErrorAdjustment::sInstance; /* For singleton */
32 CMCFErrorAdjustment* CMCFErrorAdjustment::get_instance()
35 sInstance = new CMCFErrorAdjustment();
37 return (CMCFErrorAdjustment*)sInstance;
40 CMCFErrorAdjustment::CMCFErrorAdjustment()
45 CMCFErrorAdjustment::~CMCFErrorAdjustment()
51 CMCFErrorAdjustment::apply_touch_offset(MCFTouchOffsetLevel level, mcfint *x, mcfint *y)
54 CMCFEvents* events = CMCFEvents::get_instance();
55 CMCFUtils *utils = CMCFUtils::get_instance();
57 pos = events->get_touch_event_offset();
58 if(level == TOUCH_OFFSET_LEVEL_1 ){
59 *x = *x + utils->get_scale_x(pos->x);
60 } else if(level == TOUCH_OFFSET_LEVEL_2) {
61 *x = *x + utils->get_scale_x(pos->x);
63 *y = *y + utils->get_scale_y(pos->y);