1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2002 by Daniel Stenberg
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
28 #include "button-target.h"
31 extern struct event_queue button_queue
;
33 void button_init (void);
34 void button_close(void);
35 int button_queue_count(void);
36 long button_get (bool block
);
37 long button_get_w_tmo(int ticks
);
38 intptr_t button_get_data(void);
39 int button_status(void);
40 void button_clear_queue(void);
41 #ifdef HAVE_LCD_BITMAP
42 void button_set_flip(bool flip
); /* turn 180 degrees */
45 void set_backlight_filter_keypress(bool value
);
46 #ifdef HAVE_REMOTE_LCD
47 void set_remote_backlight_filter_keypress(bool value
);
51 #ifdef HAVE_HEADPHONE_DETECTION
52 bool headphones_inserted(void);
54 #ifdef HAVE_WHEEL_POSITION
55 int wheel_status(void);
56 void wheel_send_events(bool send
);
59 #ifdef HAVE_WHEEL_ACCELERATION
60 int button_apply_acceleration(const unsigned int data
);
63 #define BUTTON_NONE 0x00000000
65 /* Button modifiers */
66 #define BUTTON_REL 0x02000000
67 #define BUTTON_REPEAT 0x04000000
68 #define BUTTON_TOUCHSCREEN 0x08000000
70 #ifdef HAVE_TOUCHSCREEN
71 int touchscreen_last_touch(void);
73 #if (!defined(BUTTON_TOPLEFT) || !defined(BUTTON_TOPMIDDLE) \
74 || !defined(BUTTON_TOPRIGHT) || !defined(BUTTON_MIDLEFT) \
75 || !defined(BUTTON_CENTER) || !defined(BUTTON_MIDRIGHT) \
76 || !defined(BUTTON_BOTTOMLEFT) || !defined(BUTTON_BOTTOMMIDDLE) \
77 || !defined(BUTTON_BOTTOMRIGHT)) && !defined(__PCTOOL__)
78 #error Touchscreen button mode BUTTON_* defines not set up correctly
81 #include "touchscreen.h"
84 #endif /* _BUTTON_H_ */