1 /***** 2 * Xnee's Not an Event Emulator 3 * 4 * Xnee enables recording and replaying of X protocol data 5 * 6 * Copyright (C) 1999, 2000, 2001, 2002, 2003 Henrik Sandklef 7 * 8 * This program is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU General Public License 10 * as published by the Free Software Foundation; either version 3 11 * of the License, or any later version. 12 * 13 * 14 * This program is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU General Public License for more details. 18 * 19 * You should have received a copy of the GNU General Public License 20 * along with this program; if not, write to the Free Software 21 * Foundation, Inc., 51 Franklin Street, Boston, 22 * MA 02110-1301, USA. 23 ****/ 24 25 26 27 #include "libxnee/xnee.h" 28 29 30 31 32 const int XNEE_MAX_DELAY = 3600; 33 34 35 const int XNEE_PRESS = True; 36 const int XNEE_RELEASE = False; 37 38 39 const int xnee_delay_timeout = 5000 ; 40 const int XNEE_DELAY = 10; 41 const int XNEE_MISSING_DATA_DELAY = (10*5); 42 43 const int XNEE_MAX_SYNCH = 100 /* buffer size */; 44 const int XNEE_MOTION_DELAY = 21 /* default value for delay during synch */; 45 46 const int MAX_NOT_IN_SYNC = 2 ; 47 const int MAX_OUT_OF_SYNC = 2 ; /* number of data allowed to be out of sync */ 48 const int MAX_UNSYNC_LOOPS = 10 ; /* number check-loops when out of sync 49 before exit */ 50 const int MAX_SKIPPED_UNSYNC = 10 ; /* number of times to ignore unsync state */ 51 const int XNEE_NOT_REPLAYABLE = 13 ; 52 53 const int XNEE_DEFAULT_MAX_THRESHOLD = 20; 54 const int XNEE_DEFAULT_MIN_THRESHOLD = 20; 55 const int XNEE_DEFAULT_TOT_THRESHOLD = 40; 56 57 const int XNEE_USEC_PER_SEC = 1000000; 58 const int XNEE_MSEC_PER_SEC = 1000; 59 60 const char XNEE_FROM_LAST_READ = 'l'; 61 const char XNEE_FROM_FIRST_READ = 'f'; 62 63 const int XNEE_TOO_FAST_ADJ_PERCENTAGE = 10; 64 65 const int XNEE_DELAY_RECORDING = 1000*500; 66 67 const int XNEE_RECEIVED = 1; 68 const int XNEE_REPLAYED = 2 ; 69 70 const int XNEE_TRUE = 1; 71 const int XNEE_FALSE = 0; 72 73 const int XNEE_GRAB_MODIFIER = 1; 74 const int XNEE_GRAB_KEY = 2; 75 76 const int XNEE_REPLAY_READ_META_DATA = 10; 77 const int XNEE_REPLAY_READ_REPLAY_DATA = 20; 78 const int XNEE_REPLAY_READ_ALL_DATA = 30; 79 80 const int REPLAY_CALLBACK = 1; 81 const int RECORD_CALLBACK = 2; 82 const int SYNC_CALLBACK = 3; 83 84 const int XNEE_NR_OF_GRABBED_MODIFIER = 8; 85