2 * Multi-touch processing
4 * Copyright (C) 2011, 2012 Samsung Electronics Co., Ltd. All rights reserved.
7 * GiWoong Kim <giwoong.kim@samsung.com>
8 * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
31 #ifndef __MARU_FINGER_H__
32 #define __MARU_FINGER_H__
35 /* definitions relating to multi-touch */
36 #define MAX_FINGER_CNT 10
37 #define DEFAULT_FINGER_POINT_SIZE 32
38 #define DEFAULT_FINGER_POINT_COLOR 0x7E0F0F0F
39 #define DEFAULT_FINGER_POINT_OUTLINE_COLOR 0xDDDDDDDD
41 typedef struct FingerPoint {
49 typedef struct MultiTouchState {
50 int multitouch_enable;
53 FingerPoint *finger_slot;
55 int finger_point_size;
56 int finger_point_color;
57 int finger_point_outline_color;
58 void *finger_point_surface; //SDL_Surface
62 void init_multi_touch_state(void);
63 void set_multi_touch_enable(int enable);
64 int get_multi_touch_enable(void);
65 FingerPoint *get_finger_point_from_slot(int index);
66 FingerPoint *get_finger_point_search(int x, int y);
67 int add_finger_point(int origin_x, int origin_y, int x, int y);
69 void maru_finger_processing_1(int touch_type, int origin_x, int origin_y, int x, int y);
70 void maru_finger_processing_2(int touch_type, int origin_x, int origin_y, int x, int y);
71 int rearrange_finger_points(int lcd_w, int lcd_h, double scale_factor, int rotaton_type);
72 void clear_finger_slot(void);
73 void cleanup_multi_touch_state(void);
76 #endif /* __MARU_FINGER_H__ */