2003-02-07 09:41:57 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2002 by Daniel Stenberg
|
|
|
|
*
|
2008-06-28 18:10:04 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2003-02-07 09:41:57 +00:00
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
#ifndef BACKLIGHT_H
|
|
|
|
#define BACKLIGHT_H
|
|
|
|
|
2005-05-30 00:00:22 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
2009-04-25 18:39:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
#if !defined(BOOTLOADER)
|
|
|
|
/* The whole driver should be built */
|
|
|
|
#define BACKLIGHT_FULL_INIT
|
|
|
|
#endif
|
|
|
|
|
2008-04-02 22:16:14 +00:00
|
|
|
bool is_backlight_on(bool ignore_always_off);
|
Selective Backlight/Advanced Softlock - Selective actions based on context
Selective backlight allows the user to choose actions that will not
enable the backlight when pressed.
Advanced softlock allows user to choose actions that will not be
blocked by screenlock on devices without a hold button.
Both only occur in FM and WPS Contexts.
Update:
Back from the dead
-Cleaned up code, removed unnecessary calls, re-arranged last filter action
timeout conditional to work in case last_filtered_action_tick was never set
-Added entries to the manual
-Fixed back button on some menus not activating backlight
-Made menus more intuitive, no actions selected now changes menu item to off.
-Added talk fuctionality.
-Added option to disable selective backlight while on external power.
-Rewrote backlight and softlock handling code to fix issue with scrollwheels
-Menu changed to have toggle(yes/no) and settings
-Optimized selective actions lookup
-Added option to disable notification of 'buttons locked' while softlocked
-Removed uneeded code, consolidated action lookup to single function
-Fixed incorrect name on selective softlock menu
-Added option to disable touch on touchscreen devices
-Fixed backlight on original screenlock without selective screenlock active
-Added text selection in mask_select for when show_icons is off
-Fixed voice in mask_select to speak if voice is defined instead of spelling
-Added more lang defines (play skip seek)
-Added option to disable unknown keys turning on backlight
-Fixed Conditional argument In wrong place causing players without
backlight to fail to build
-Fixed Disable Unknown blocking detection of context change
-Fixed canceling menu didn't update new settings
-Added Autolock on backlight off
-Removed backlight_on_force from backlight.c, Now sets ignore next to false
and uses backlight_on
-Cleaned up autolock code added strings to lang file
-Fixed issue where rapid presses would bypass softlock
-Removed old softlock code, Cleaned selective actions code
-Changed menu to match existing RB menus
-Fixed Backlight_on_Hold blocked by backlight_ignore_next
-Fixed ignore_next for ipod
-Fixed bug allowing context with softlock to bypass selective backlight
-Changed mask_select to no longer prompt for changes to be saved
-Changed menu names
-Added ignore timeout to allow ipod scroll wheel to work properly and other
players to still work properly, removed some previous code including
ignore_event
-Increased ignore timeout to prevent sd card accesses from interrupting action
code and turning on backlight
-Changed Unknown action to unmapped action in menu, changed handling code
-Removed unneeded logic and variables for handling unfiltered actions
-Reverted unmapped action code to previous functionality
-Added manual entries (thanks JohnB)
-Removed elusive unhandled unicode character from manual, changed formatting slightly
Actions:
Volume,Play,Seek,Skip
Extras:
Disable unmapped actions
Disable selective backlight on external power
Disable touch during softlock on touchscreen devices
Disable softlock notifications (power button still notifies)
Autolock on backlight off
Method:
Adds a function to ignore backlight on next call
If selected action occurs backlight is forced on,
Filter_first_keypress stays intact.
Selective softlock allows selected actions through, bypasses the normal
softlock routine.
ToDo:
DONE
previous commit (#1) has attribution for folder_select.c which mask_select
is based from.
Change-Id: I08132ddcfd64c81751ef23b720f3ec6d68695fe4
2016-11-22 05:21:31 +00:00
|
|
|
void backlight_on_ignore(bool value, int timeout);
|
2003-02-07 09:41:57 +00:00
|
|
|
void backlight_on(void);
|
|
|
|
void backlight_off(void);
|
2007-11-25 17:36:21 +00:00
|
|
|
void backlight_set_timeout(int value);
|
2006-09-10 02:00:40 +00:00
|
|
|
|
2007-04-12 22:12:13 +00:00
|
|
|
#ifdef HAVE_BACKLIGHT
|
2010-03-03 23:20:32 +00:00
|
|
|
void backlight_init(void) INIT_ATTR;
|
2008-05-10 18:00:11 +00:00
|
|
|
void backlight_close(void);
|
2005-11-23 20:12:33 +00:00
|
|
|
int backlight_get_current_timeout(void);
|
2006-09-10 02:00:40 +00:00
|
|
|
|
2009-01-26 23:21:49 +00:00
|
|
|
#if defined(HAVE_BACKLIGHT_FADING_INT_SETTING)
|
2007-11-26 23:10:20 +00:00
|
|
|
void backlight_set_fade_in(int value);
|
|
|
|
void backlight_set_fade_out(int value);
|
2009-01-26 23:21:49 +00:00
|
|
|
#elif defined(HAVE_BACKLIGHT_FADING_BOOL_SETTING)
|
2008-11-26 08:26:13 +00:00
|
|
|
void backlight_set_fade_in(bool value);
|
|
|
|
void backlight_set_fade_out(bool value);
|
|
|
|
#endif
|
|
|
|
|
2007-11-25 17:36:21 +00:00
|
|
|
void backlight_set_timeout_plugged(int value);
|
2006-09-10 02:00:40 +00:00
|
|
|
|
2006-08-08 22:03:56 +00:00
|
|
|
#ifdef HAS_BUTTON_HOLD
|
|
|
|
void backlight_hold_changed(bool hold_button);
|
2006-09-10 02:00:40 +00:00
|
|
|
void backlight_set_on_button_hold(int index);
|
2005-11-21 23:55:39 +00:00
|
|
|
#endif
|
2006-09-10 02:00:40 +00:00
|
|
|
|
2009-04-26 01:23:39 +00:00
|
|
|
#if defined(HAVE_LCD_SLEEP) && defined(HAVE_LCD_SLEEP_SETTING)
|
Auto-Ranging Time Formatting For Menus (hh:mm:ss:mss)
Unifies time formatting in settings_list.c allows time format to
display as HH:MM:SS.MSS or any consecutive combination thereof
(hh:mm:ss, mm:ss, mm:ss.mss, ss.mss, hh, mm, ss ,mss)
works in INT and TABLE settings with the addition of flag 'F_TIME_SETTING'
Time is auto-ranged dependent on value
Adds talk_time_intervals to allow time values to be spoken similar to
display format: x Hours, x Minutes, x Seconds, x Milliseconds
Table lookups merged or removed from recording, clip meter and lcd timeout
-String_Choice replaced with TABLE_SETTING or INT_SETTING for these
functions as well, cleaned-up cfg_vals that get saved to cfgfile
RTL Languages ARE supported
Negative values ARE supported
Backlight on/off are now Always and Never to share formatter with LCD
Timeout
Added flag to allow ranged units to be locked to a minimum index
Added flag to allow leading zero to be supressed from the largest unit
merged talk_time_unit() and talk_time_intervals()
optimized time_split()
optimized format_time_auto()
Backlight time-out list same as original
Change-Id: I59027c62d3f2956bd16fdcc1a48b2ac32c084abd
2018-12-18 04:27:55 +00:00
|
|
|
void lcd_set_sleep_after_backlight_off(int timeout_seconds);
|
2008-05-14 19:29:25 +00:00
|
|
|
#endif
|
2006-09-10 02:00:40 +00:00
|
|
|
|
2016-06-25 13:25:30 +00:00
|
|
|
#ifdef HAVE_LCD_SLEEP
|
|
|
|
void lcd_awake(void);
|
|
|
|
#endif
|
|
|
|
|
2007-04-12 22:12:13 +00:00
|
|
|
#else /* !HAVE_BACKLIGHT */
|
2006-08-08 22:03:56 +00:00
|
|
|
#define backlight_init()
|
2007-04-12 22:12:13 +00:00
|
|
|
#endif /* !HAVE_BACKLIGHT */
|
2003-02-07 09:41:57 +00:00
|
|
|
|
2005-05-30 00:00:22 +00:00
|
|
|
#ifdef HAVE_REMOTE_LCD
|
2015-01-08 23:22:40 +00:00
|
|
|
void remote_backlight_hw_on(void);
|
|
|
|
void remote_backlight_hw_off(void);
|
2005-11-21 23:55:39 +00:00
|
|
|
void remote_backlight_on(void);
|
|
|
|
void remote_backlight_off(void);
|
2007-11-25 17:36:21 +00:00
|
|
|
void remote_backlight_set_timeout(int value);
|
|
|
|
void remote_backlight_set_timeout_plugged(int value);
|
2008-04-02 22:16:14 +00:00
|
|
|
bool is_remote_backlight_on(bool ignore_always_off);
|
2009-04-25 21:11:16 +00:00
|
|
|
int remote_backlight_get_current_timeout(void);
|
2006-09-10 02:00:40 +00:00
|
|
|
|
|
|
|
#ifdef HAS_REMOTE_BUTTON_HOLD
|
|
|
|
void remote_backlight_hold_changed(bool rc_hold_button);
|
|
|
|
void remote_backlight_set_on_button_hold(int index);
|
2005-05-30 00:00:22 +00:00
|
|
|
#endif
|
2006-09-10 02:00:40 +00:00
|
|
|
#endif /* HAVE_REMOTE_LCD */
|
2005-05-30 00:00:22 +00:00
|
|
|
|
2005-11-21 23:55:39 +00:00
|
|
|
#ifdef SIMULATOR
|
|
|
|
void sim_backlight(int value);
|
|
|
|
void sim_remote_backlight(int value);
|
|
|
|
#endif
|
2005-12-22 10:43:36 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_BACKLIGHT_BRIGHTNESS
|
2009-04-25 18:39:05 +00:00
|
|
|
#ifdef BACKLIGHT_FULL_INIT
|
2008-11-26 10:21:03 +00:00
|
|
|
extern int backlight_brightness;
|
2009-04-25 18:39:05 +00:00
|
|
|
#else
|
|
|
|
#define backlight_brightness DEFAULT_BRIGHTNESS_SETTING
|
|
|
|
#endif
|
2005-12-22 10:43:36 +00:00
|
|
|
void backlight_set_brightness(int val);
|
2006-09-10 02:00:40 +00:00
|
|
|
#endif /* HAVE_BACKLIGHT_BRIGHTNESS */
|
|
|
|
|
2007-05-08 06:45:38 +00:00
|
|
|
void buttonlight_set_brightness(int val);
|
|
|
|
|
Selective Backlight/Advanced Softlock - Selective actions based on context
Selective backlight allows the user to choose actions that will not
enable the backlight when pressed.
Advanced softlock allows user to choose actions that will not be
blocked by screenlock on devices without a hold button.
Both only occur in FM and WPS Contexts.
Update:
Back from the dead
-Cleaned up code, removed unnecessary calls, re-arranged last filter action
timeout conditional to work in case last_filtered_action_tick was never set
-Added entries to the manual
-Fixed back button on some menus not activating backlight
-Made menus more intuitive, no actions selected now changes menu item to off.
-Added talk fuctionality.
-Added option to disable selective backlight while on external power.
-Rewrote backlight and softlock handling code to fix issue with scrollwheels
-Menu changed to have toggle(yes/no) and settings
-Optimized selective actions lookup
-Added option to disable notification of 'buttons locked' while softlocked
-Removed uneeded code, consolidated action lookup to single function
-Fixed incorrect name on selective softlock menu
-Added option to disable touch on touchscreen devices
-Fixed backlight on original screenlock without selective screenlock active
-Added text selection in mask_select for when show_icons is off
-Fixed voice in mask_select to speak if voice is defined instead of spelling
-Added more lang defines (play skip seek)
-Added option to disable unknown keys turning on backlight
-Fixed Conditional argument In wrong place causing players without
backlight to fail to build
-Fixed Disable Unknown blocking detection of context change
-Fixed canceling menu didn't update new settings
-Added Autolock on backlight off
-Removed backlight_on_force from backlight.c, Now sets ignore next to false
and uses backlight_on
-Cleaned up autolock code added strings to lang file
-Fixed issue where rapid presses would bypass softlock
-Removed old softlock code, Cleaned selective actions code
-Changed menu to match existing RB menus
-Fixed Backlight_on_Hold blocked by backlight_ignore_next
-Fixed ignore_next for ipod
-Fixed bug allowing context with softlock to bypass selective backlight
-Changed mask_select to no longer prompt for changes to be saved
-Changed menu names
-Added ignore timeout to allow ipod scroll wheel to work properly and other
players to still work properly, removed some previous code including
ignore_event
-Increased ignore timeout to prevent sd card accesses from interrupting action
code and turning on backlight
-Changed Unknown action to unmapped action in menu, changed handling code
-Removed unneeded logic and variables for handling unfiltered actions
-Reverted unmapped action code to previous functionality
-Added manual entries (thanks JohnB)
-Removed elusive unhandled unicode character from manual, changed formatting slightly
Actions:
Volume,Play,Seek,Skip
Extras:
Disable unmapped actions
Disable selective backlight on external power
Disable touch during softlock on touchscreen devices
Disable softlock notifications (power button still notifies)
Autolock on backlight off
Method:
Adds a function to ignore backlight on next call
If selected action occurs backlight is forced on,
Filter_first_keypress stays intact.
Selective softlock allows selected actions through, bypasses the normal
softlock routine.
ToDo:
DONE
previous commit (#1) has attribution for folder_select.c which mask_select
is based from.
Change-Id: I08132ddcfd64c81751ef23b720f3ec6d68695fe4
2016-11-22 05:21:31 +00:00
|
|
|
void buttonlight_on_ignore(bool value, int timeout);
|
2007-10-07 15:02:02 +00:00
|
|
|
void buttonlight_on(void);
|
|
|
|
void buttonlight_off(void);
|
2007-11-25 17:36:21 +00:00
|
|
|
void buttonlight_set_timeout(int value);
|
2007-04-22 13:02:24 +00:00
|
|
|
|
2007-11-12 18:49:53 +00:00
|
|
|
/* Private API for use in target tree backlight code only */
|
|
|
|
#ifdef HAVE_BUTTON_LIGHT
|
2009-04-25 18:15:50 +00:00
|
|
|
int buttonlight_get_current_timeout(void);
|
2007-11-12 18:49:53 +00:00
|
|
|
#endif
|
|
|
|
|
2006-09-10 02:00:40 +00:00
|
|
|
#endif /* BACKLIGHT_H */
|