merge 19488 back from the 3.1 branch
[kugel-rb.git] / firmware / export / backlight.h
blobcb081a53019e328d7717d34f49f2a51c023a46fd
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 BACKLIGHT_H
22 #define BACKLIGHT_H
24 #include "config.h"
26 bool is_backlight_on(bool ignore_always_off);
27 void backlight_on(void);
28 void backlight_off(void);
29 void backlight_set_timeout(int value);
31 #ifdef HAVE_BACKLIGHT
32 void backlight_init(void);
33 void backlight_close(void);
35 int backlight_get_current_timeout(void);
37 #if defined(HAVE_BACKLIGHT_PWM_FADING)
38 void backlight_set_fade_in(int value);
39 void backlight_set_fade_out(int value);
40 #endif
41 #if defined(USE_BACKLIGHT_SW_FADING) \
42 || defined(USE_BACKLIGHT_CUSTOM_FADING_BOOL)
43 void backlight_set_fade_in(bool value);
44 void backlight_set_fade_out(bool value);
45 #endif
47 void backlight_set_timeout_plugged(int value);
49 #ifdef HAS_BUTTON_HOLD
50 void backlight_hold_changed(bool hold_button);
51 void backlight_set_on_button_hold(int index);
52 #endif
54 #ifdef HAVE_LCD_SLEEP
55 void backlight_lcd_sleep_countdown(bool start);
56 #ifdef HAVE_LCD_SLEEP_SETTING
57 void lcd_set_sleep_after_backlight_off(int index);
58 #endif
59 #endif
61 #else /* !HAVE_BACKLIGHT */
62 #define backlight_init()
63 #endif /* !HAVE_BACKLIGHT */
65 #ifdef HAVE_REMOTE_LCD
66 void remote_backlight_on(void);
67 void remote_backlight_off(void);
68 void remote_backlight_set_timeout(int value);
69 void remote_backlight_set_timeout_plugged(int value);
70 bool is_remote_backlight_on(bool ignore_always_off);
72 #ifdef HAS_REMOTE_BUTTON_HOLD
73 void remote_backlight_hold_changed(bool rc_hold_button);
74 void remote_backlight_set_on_button_hold(int index);
75 #endif
76 #endif /* HAVE_REMOTE_LCD */
78 #ifdef SIMULATOR
79 void sim_backlight(int value);
80 void sim_remote_backlight(int value);
81 #endif
83 #ifdef HAVE_BACKLIGHT_BRIGHTNESS
84 extern int backlight_brightness;
85 void backlight_set_brightness(int val);
86 #endif /* HAVE_BACKLIGHT_BRIGHTNESS */
88 #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS
89 void buttonlight_set_brightness(int val);
90 #endif /* HAVE_BUTTONLIGHT_BRIGHTNESS */
92 #ifdef HAVE_BUTTON_LIGHT
93 void buttonlight_on(void);
94 void buttonlight_off(void);
95 void buttonlight_set_timeout(int value);
96 #endif
98 /* Private API for use in target tree backlight code only */
99 #ifdef HAVE_BUTTON_LIGHT
100 extern int _buttonlight_timeout;
101 #endif
103 #endif /* BACKLIGHT_H */