00001 /* 00002 * File Name: ts.h 00003 */ 00004 00005 /* 00006 * This file is part of gtktscal. 00007 * 00008 * gtktscal is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation, either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * gtktscal is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00020 */ 00021 00022 /* 00023 * This code is originally from xtscal: 00024 * 00025 * Copyright (C) 2003, 2004 Philip Blundell <philb@gnu.org> 00026 * 00027 * Modifications: 00028 * 00029 * Copyright (C) 2008 iRex Technologies B.V. 00030 */ 00031 00032 #ifndef TS_H 00033 #define TS_H 00034 00035 struct point 00036 { 00037 int x; 00038 int y; 00039 }; 00040 00041 #define TS_CALIBRATION_IN_PROGRESS 0 00042 #define TS_CALIBRATION_DONE 1 00043 00044 void ts_init(int width, int height, int rotation); 00045 void ts_get_target(int nth, int *x, int *y); 00046 void ts_get_current_target(int *x, int *y); 00047 int ts_handle_event(int x, int y, int pressure); 00048 void ts_set_calibration(char **args); 00049 void ts_show_calibration(void); 00050 void ts_read_current_settings(char *filename); 00051 void ts_write_calibration(char *filename); 00052 00053 #endif