MPEGPlayer: Skip to next file when there is a problem with a video file in all-play...
[kugel-rb.git] / firmware / export / button.h
blob3847d2ac9f8dd0df9663eb61b3f1efaad98aa20f
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
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 ****************************************************************************/
21 #ifndef _BUTTON_H_
22 #define _BUTTON_H_
24 #include <stdbool.h>
25 #include <inttypes.h>
26 #include "config.h"
27 #ifndef __PCTOOL__
28 #include "button-target.h"
29 #endif
31 extern struct event_queue button_queue;
33 void button_init (void) INIT_ATTR;
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 #ifdef HAVE_BUTTON_DATA
41 int button_status_wdata(int *pdata);
42 #endif
43 void button_clear_queue(void);
44 #ifdef HAVE_LCD_BITMAP
45 void button_set_flip(bool flip); /* turn 180 degrees */
46 #endif
47 #ifdef HAVE_BACKLIGHT
48 void set_backlight_filter_keypress(bool value);
49 #ifdef HAVE_REMOTE_LCD
50 void set_remote_backlight_filter_keypress(bool value);
51 #endif
52 #endif
54 #ifdef HAVE_HEADPHONE_DETECTION
55 bool headphones_inserted(void);
56 #endif
57 #ifdef HAVE_WHEEL_POSITION
58 int wheel_status(void);
59 void wheel_send_events(bool send);
60 #endif
62 #ifdef HAVE_WHEEL_ACCELERATION
63 int button_apply_acceleration(const unsigned int data);
64 #endif
66 #define BUTTON_NONE 0x00000000
68 /* Button modifiers */
69 #define BUTTON_REL 0x02000000
70 #define BUTTON_REPEAT 0x04000000
71 #define BUTTON_TOUCHSCREEN 0x08000000
72 #define BUTTON_MULTIMEDIA 0x10000000
74 #define BUTTON_MULTIMEDIA_PLAYPAUSE (BUTTON_MULTIMEDIA|0x01)
75 #define BUTTON_MULTIMEDIA_STOP (BUTTON_MULTIMEDIA|0x02)
76 #define BUTTON_MULTIMEDIA_PREV (BUTTON_MULTIMEDIA|0x04)
77 #define BUTTON_MULTIMEDIA_NEXT (BUTTON_MULTIMEDIA|0x08)
78 #define BUTTON_MULTIMEDIA_REW (BUTTON_MULTIMEDIA|0x10)
79 #define BUTTON_MULTIMEDIA_FFWD (BUTTON_MULTIMEDIA|0x20)
81 #define BUTTON_MULTIMEDIA_ALL (BUTTON_MULTIMEDIA_PLAYPAUSE| \
82 BUTTON_MULTIMEDIA_STOP| \
83 BUTTON_MULTIMEDIA_PREV| \
84 BUTTON_MULTIMEDIA_NEXT| \
85 BUTTON_MULTIMEDIA_REW | \
86 BUTTON_MULTIMEDIA_FFWD)
88 #ifdef HAVE_TOUCHSCREEN
89 int touchscreen_last_touch(void);
91 #if (!defined(BUTTON_TOPLEFT) || !defined(BUTTON_TOPMIDDLE) \
92 || !defined(BUTTON_TOPRIGHT) || !defined(BUTTON_MIDLEFT) \
93 || !defined(BUTTON_CENTER) || !defined(BUTTON_MIDRIGHT) \
94 || !defined(BUTTON_BOTTOMLEFT) || !defined(BUTTON_BOTTOMMIDDLE) \
95 || !defined(BUTTON_BOTTOMRIGHT)) && !defined(__PCTOOL__)
96 #error Touchscreen button mode BUTTON_* defines not set up correctly
97 #endif
99 #include "touchscreen.h"
100 #endif
102 #endif /* _BUTTON_H_ */