1 /* X11::GUITest ($Id: main.h 231 2014-01-11 14:26:57Z ctrondlp $)
2  *
3  * Copyright (c) 2003-2014 Dennis K. Paulsen, All Rights Reserved.
4  * Email: ctrondlp@cpan.org
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, see <http://www.gnu.org/licenses>.
18  *
19  */
20 #ifndef MAIN_H
21 #define MAIN_H
22 
23 #define APP_NAME "x11guirecord"
24 
25 #define DEFAULT_WAIT_SECS 1
26 #define DEFAULT_DELAY_MS 50
27 #define MIN_DELAY_MS 0
28 #define MAX_DELAY_MS 1000
29 #define MAX_KEY_NAME 35
30 #define MAX_KEYDELAY_BEFOREFLUSH_MS 1000
31 #define MOUSE_DBLCLICK_THRESHOLD 300
32 #define MAX_MBUTTON_NAME 25
33 #define MAX_KEY_BUFFER 128
34 #define KEY_BUFFER_THRESHOLD 60
35 #define MIN_WAIT_SECONDS 1
36 #define MAX_WAIT_SECONDS 240
37 #define MIN_GRANULARITY 1
38 #define MAX_GRANULARITY 10
39 
40 static void PrintAppInfo(void);
41 static BOOL GetMouseButtonFromIndex(int index, char *button);
42 static void HandleDelay(unsigned long delay);
43 static void HandleKeyBuffer(BOOL forceKeyFlush);
44 static void ProcessEvent(struct record_event ev);
45 static BOOL IsMouseMoveTooGranular(struct record_event ev);
46 
47 
48 #endif /* #ifndef MAIN_H */
49 
50