MPEGPlayer quickie: add an option to set the backlight brightness to a plugin-specifi...
[kugel-rb.git] / firmware / export / backlight.h
blobb09c98e7d290d35a4a2d0e13982433052a84c36c
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 BACKLIGHT_H
20 #define BACKLIGHT_H
22 #include "config.h"
24 bool is_backlight_on(bool ignore_always_off);
25 void backlight_on(void);
26 void backlight_off(void);
27 void backlight_set_timeout(int value);
29 #ifdef HAVE_BACKLIGHT
30 void backlight_init(void);
31 void backlight_close(void);
33 int backlight_get_current_timeout(void);
35 #ifdef HAVE_BACKLIGHT_PWM_FADING
36 void backlight_set_fade_in(int value);
37 void backlight_set_fade_out(int value);
38 #endif
40 void backlight_set_timeout_plugged(int value);
42 #ifdef HAS_BUTTON_HOLD
43 void backlight_hold_changed(bool hold_button);
44 void backlight_set_on_button_hold(int index);
45 #endif
47 #ifdef HAVE_LCD_SLEEP
48 void backlight_lcd_sleep_countdown(bool start);
49 #ifdef HAVE_LCD_SLEEP_SETTING
50 void lcd_set_sleep_after_backlight_off(int index);
51 #endif
52 #endif
54 #else /* !HAVE_BACKLIGHT */
55 #define backlight_init()
56 #endif /* !HAVE_BACKLIGHT */
58 #ifdef HAVE_REMOTE_LCD
59 void remote_backlight_on(void);
60 void remote_backlight_off(void);
61 void remote_backlight_set_timeout(int value);
62 void remote_backlight_set_timeout_plugged(int value);
63 bool is_remote_backlight_on(bool ignore_always_off);
65 #ifdef HAS_REMOTE_BUTTON_HOLD
66 void remote_backlight_hold_changed(bool rc_hold_button);
67 void remote_backlight_set_on_button_hold(int index);
68 #endif
69 #endif /* HAVE_REMOTE_LCD */
71 #ifdef SIMULATOR
72 void sim_backlight(int value);
73 void sim_remote_backlight(int value);
74 #endif
76 #ifdef HAVE_BACKLIGHT_BRIGHTNESS
77 void backlight_set_brightness(int val);
78 #endif /* HAVE_BACKLIGHT_BRIGHTNESS */
80 #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS
81 void buttonlight_set_brightness(int val);
82 #endif /* HAVE_BUTTONLIGHT_BRIGHTNESS */
84 #ifdef HAVE_BUTTON_LIGHT
85 void buttonlight_on(void);
86 void buttonlight_off(void);
87 void buttonlight_set_timeout(int value);
88 #endif
90 /* Private API for use in target tree backlight code only */
91 #ifdef HAVE_BUTTON_LIGHT
92 extern int _buttonlight_timeout;
93 #endif
95 #endif /* BACKLIGHT_H */