1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
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 ****************************************************************************/
26 #include "button-target.h"
29 extern struct event_queue button_queue
;
31 void button_init (void);
32 void button_close(void);
33 int button_queue_count(void);
34 long button_get (bool block
);
35 long button_get_w_tmo(int ticks
);
36 intptr_t button_get_data(void);
37 int button_status(void);
38 void button_clear_queue(void);
39 #ifdef HAVE_LCD_BITMAP
40 void button_set_flip(bool flip
); /* turn 180 degrees */
43 void set_backlight_filter_keypress(bool value
);
44 #ifdef HAVE_REMOTE_LCD
45 void set_remote_backlight_filter_keypress(bool value
);
49 #ifdef HAVE_HEADPHONE_DETECTION
50 bool headphones_inserted(void);
52 #ifdef HAVE_WHEEL_POSITION
53 int wheel_status(void);
54 void wheel_send_events(bool send
);
57 #ifdef HAVE_SCROLLWHEEL
58 int button_apply_acceleration(const unsigned int data
);
61 #define BUTTON_NONE 0x00000000
63 /* Button modifiers */
64 #define BUTTON_REL 0x02000000
65 #define BUTTON_REPEAT 0x04000000
66 #define BUTTON_TOUCHPAD 0x08000000
69 #if !defined(BUTTON_TOPLEFT) || !defined(BUTTON_TOPMIDDLE) \
70 || !defined(BUTTON_TOPRIGHT) || !defined(BUTTON_MIDLEFT) \
71 || !defined(BUTTON_CENTER) || !defined(BUTTON_MIDRIGHT) \
72 || !defined(BUTTON_BOTTOMLEFT) || !defined(BUTTON_BOTTOMMIDDLE) \
73 || !defined(BUTTON_BOTTOMRIGHT)
74 #error Touchpad button mode BUTTON_* defines not set up correctly
77 TOUCHPAD_POINT
= 0, /* touchpad returns pixel co-ords */
78 TOUCHPAD_BUTTON
, /* touchpad returns BUTTON_* area codes
79 actual pixel value will still be accessable
80 from button_get_data */
82 /* maybe define the number of buttons in button-target.h ? */
83 void touchpad_set_mode(enum touchpad_mode mode
);
84 enum touchpad_mode
touchpad_get_mode(void);
87 #endif /* _BUTTON_H_ */