fix yellow and some house cleaning
[Rockbox.git] / firmware / export / button.h
bloba38385c4cf8966afbd8d7ce67dc6d260770f63ab
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 int button_queue_count(void);
31 long button_get (bool block);
32 long button_get_w_tmo(int ticks);
33 intptr_t button_get_data(void);
34 int button_status(void);
35 void button_clear_queue(void);
36 #ifdef HAVE_LCD_BITMAP
37 void button_set_flip(bool flip); /* turn 180 degrees */
38 #endif
39 #ifdef HAVE_BACKLIGHT
40 void set_backlight_filter_keypress(bool value);
41 #ifdef HAVE_REMOTE_LCD
42 void set_remote_backlight_filter_keypress(bool value);
43 #endif
44 #endif
46 #ifdef HAVE_HEADPHONE_DETECTION
47 bool headphones_inserted(void);
48 #endif
49 #ifdef HAVE_WHEEL_POSITION
50 int wheel_status(void);
51 void wheel_send_events(bool send);
52 #endif
54 #ifdef HAVE_SCROLLWHEEL
55 int button_apply_acceleration(unsigned int data, unsigned int factor);
56 #endif
58 #define BUTTON_NONE 0x00000000
60 /* Button modifiers */
61 #define BUTTON_REL 0x02000000
62 #define BUTTON_REPEAT 0x04000000
63 #define BUTTON_TOUCHPAD 0x08000000
65 #endif /* _BUTTON_H_ */