Wheel acceleration for e200. A general acceleration interface intended for use on...
[Rockbox.git] / firmware / export / button.h
blob8b8c966ddcf226cbbc612ba92797c9ea5334bbbd
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2002 by Daniel Stenberg
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
19 #ifndef _BUTTON_H_
20 #define _BUTTON_H_
22 #include <stdbool.h>
23 #include <inttypes.h>
24 #include "config.h"
25 #include "button-target.h"
27 extern struct event_queue button_queue;
29 void button_init (void);
30 long button_get (bool block);
31 long button_get_w_tmo(int ticks);
32 intptr_t button_get_data(void);
33 int button_status(void);
34 void button_clear_queue(void);
35 #ifdef HAVE_LCD_BITMAP
36 void button_set_flip(bool flip); /* turn 180 degrees */
37 #endif
38 #ifdef HAVE_BACKLIGHT
39 void set_backlight_filter_keypress(bool value);
40 #ifdef HAVE_REMOTE_LCD
41 void set_remote_backlight_filter_keypress(bool value);
42 #endif
43 #endif
45 #ifdef HAVE_HEADPHONE_DETECTION
46 bool headphones_inserted(void);
47 #endif
48 #ifdef HAVE_WHEEL_POSITION
49 int wheel_status(void);
50 void wheel_send_events(bool send);
51 #endif
53 #ifdef HAVE_SCROLLWHEEL
54 int button_apply_acceleration(unsigned int data, unsigned int factor);
55 #endif
57 #define BUTTON_NONE 0x00000000
59 /* Button modifiers */
60 #define BUTTON_REL 0x02000000
61 #define BUTTON_REPEAT 0x04000000
63 #endif /* _BUTTON_H_ */