summaryrefslogtreecommitdiff
path: root/apps/action.c (follow)
Commit message (Collapse)AuthorAge
* action.c must desist in calling set_cpu_frequency from a tickMichael Sevakis2017-01-21
| | | | | | | | | | | | | The function is neither reentrant nor ISR callable. Instead of using a ticked-based timeout, have the button driver provide the unboost after a delay when waiting for a button. HAVE_GUI_BOOST gets immediate boost after dequeuing any message, otherwise the queue has to have at least three messages waiting for it to trigger a boost-- essentially the behavior that existed but now combined in one place. Change-Id: I1d924702840f56a1a65abe41fa92b4e753c4e75a
* Selective Backlight Softlock Fix misleading indentation.William Wilgus2017-01-17
| | | | Change-Id: Iffbdd3c5bd8d2d23f4f7e3af42e16ab0c1dc312b
* Selective Backlight/Advanced Softlock - Selective actions based on contextWilliam Wilgus2017-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* GUI boost for any buttonMihail Zenkov2016-03-18
| | | | | | It improve responsiveness for all targets with frequency scaling. Change-Id: I72c94daf58cee10c1772decbd0443856c111cc47
* iBasso DX50/DX90: Major code cleanup and reorganization.Udo Schläpfer2015-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reorganization - Separated iBasso devices from PLATFORM_ANDROID. These are now standlone hosted targets. Most device specific code is in the firmware/target/hosted/ibasso directory. - No dependency on Android SDK, only the Android NDK is needed. 32 bit Android NDK and Android API Level 16. - Separate implementation for each device where feasible. Code cleanup - Rewrite of existing code, from simple reformat to complete reimplementation. - New backlight interface, seperating backlight from touchscreen. - Rewrite of device button handler, removing unneeded code and fixing memory leaks. - New Debug messages interface logging to Android adb logcat (DEBUGF, panicf, logf). - Rewrite of lcd device handler, removing unneeded code and fixing memory leaks. - Rewrite of audiohw device handler/pcm interface, removing unneeded code and fixing memory leaks, enabling 44.1/48kHz pthreaded playback. - Rewrite of power and powermng, proper shutdown, using batterylog results (see http://gerrit.rockbox.org/r/#/c/1047/). - Rewrite of configure (Android NDK) and device specific config. - Rewrite of the Android NDK specific Makefile. Misc - All plugins/games/demos activated. - Update tinyalsa to latest from https://github.com/tinyalsa/tinyalsa. Includes - http://gerrit.rockbox.org/r/#/c/993/ - http://gerrit.rockbox.org/r/#/c/1010/ - http://gerrit.rockbox.org/r/#/c/1035/ Does not include http://gerrit.rockbox.org/r/#/c/1007/ due to new backlight interface and new option for hold switch, touchscreen, physical button interaction. Rockbox needs the iBasso DX50/DX90 loader for startup, see http://gerrit.rockbox.org/r/#/c/1099/ The loader expects Rockbox to be installed in /mnt/sdcard/.rockbox/. If /mnt/sdcard/ is accessed as USB mass storage device, Rockbox will exit gracefully and the loader will restart Rockbox on USB disconnect. Tested on iBasso DX50. Compiled (not tested) for iBasso DX90. Compiled (not tested) for PLATFORM_ANDROID. Change-Id: I5f5e22e68f5b4cf29c28e2b40b2c265f2beb7ab7
* touch devices: Disable touch on softlock.Jean-Louis Biasini2013-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | Target that have a touchpad/touchscreen should disable it while being locked (In order to avoid LCD to drain battery power due to "key locked" constant reporting messages. If they a have a keylock button this was already handled at driver level. If not (e.g. fuze+), they will have to implement a switch at driver level that action.c can operate on softlock. This patch does the following for any target having a touchpad or a touchscreen and no HAS_BUTTON_HOLD (ie any softlock target) 1) it implements the code to call button_enable_touch(bool en) in action.c. 2) button_enable_touch is implemented in button.c and call either touchpad_enable or touchscreen_enable 3) those two function are implemented respectively in touchscreen.c and a new touchpad.c file. They provide a generic way to silents touch's device and call a function at driver level where target specific code can be implemented if possible/needed (for power saving for instance). Those function name are touchpad_enable_device and touchscreen_enable_device 4) we implement an empty function at driver level of targets that need it to have them still being able to compiled. Change-Id: I9ead78a25bd33466a8533f5b9f259b395cb5ce49 Reviewed-on: http://gerrit.rockbox.org/569 Reviewed-by: Thomas Martitz <kugel@rockbox.org> Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* Fix missed buttons in action.c if action_wait_for_release() was calledThomas Martitz2012-08-15
| | | | | | | | | | | | | | with no button pressed. If e.g. two yesno screens directly follow each other the button release of the first one was incorrectly accepted in the second one. The fix exposed another problem in action.c if action_wait_for_release() is called when no button is actually pressed. The next press was silently eaten. This time re-introducing FS#12723 is avoided by leaving the offending hunk out in yesno.c. Change-Id: Icfe57375067f51f5c8177f3585cd47ceec9dcf0d
* Revert "fix erroneous button read in yesno screen and missed buttons in ↵Jonathan Gordon2012-08-14
| | | | | | action.c." This reverts commit 15775c8badac65ad9d7477a1706c019703c15b47.
* fix erroneous button read in yesno screen and missed buttons in action.c.Thomas Martitz2012-07-18
| | | | | | | | | If two yesno screens directly follow each other the button release of the first one was incorrectly accepted in the second one. The fix exposed another problem in action.c if action_wait_for_release() is called when no button is actually pressed. The next press was silently eaten. Change-Id: Iaa5f246f7ea1fd775606620a989cdaec74a9305e
* touchscreen: Fix kinetic scrolling when the statusbar is off.Thomas Martitz2012-04-05
| | | | | | | | | | | The scrolling code cannot differentiate between the BUTTON_TOUCHSCREEN post from normal touches and the one posted in the timeout callback. To fix introduce a global special button (BUTTON_REDRAW) that results in the desired redraw. This existed already as a local kludge for android and is now generalized. Change-Id: I6bfa6c66431c48f5042fcd8fce2ea72cd3457f58
* Correct actionable offense for misappropriation of action context.Michael Sevakis2012-03-03
| | | | | | | Just use a bool to indicate raw button instead of action code. No bother with plugin version yet again so soon. Change-Id: I4aa075c0c1fb5308c9d49bebb30ac76f671b2335
* Change keyclick_click so that it may accept raw buttons or actions.Michael Sevakis2012-03-03
| | | | | | | | Adds a new context, CONTEXT_RAWBUTTON, that I hope is out of the way of everything. Unfortunately have to increment min plugin API version for the second time today to accomodate additional parameter. Change-Id: Iaa46b926e57cf377fd4906f2d42bb98e87215033
* Use is_keys_locked when possibleWieland Hoffmann2012-01-28
| | | | | | Change-Id: Ib0ae0f31a8b040aba5dca4e11df934c89aaca232 Reviewed-on: http://gerrit.rockbox.org/73 Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
* keyclick: Add a callback so screens can cancel a click. Add a generic list ↵Jonathan Gordon2012-01-12
| | | | | | callback to stop clicks when we are at the end of the list Change-Id: Iabb44a861dd7506cd883c1bdb0241303fa646746
* Use the timeout api for the gui boost implementation. This ensures that the ↵Andree Buschmann2011-11-13
| | | | | | CPU will be unboosted after the defined timeout, the former implementation could stay boosted in several situations. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30975 a1c6a512-1295-4272-9138-f99709370657
* Finally submit GUI boost (FS#8668). With this change the CPU is boosted ↵Andree Buschmann2011-11-11
| | | | | | (with a 1 second timeout) on scrollwheel activity in the list, main menu, tree and std context. For now GUI boost is only enabled on scrollwheel targets. The code can easily be enhanced to work with other targets as well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30967 a1c6a512-1295-4272-9138-f99709370657
* Have mpegplayer use the mixer (the playback channel, since it's mutually ↵Michael Sevakis2011-07-08
| | | | | | exclusive to audio playback) so the clicks and skip beep can be used according to user settings. Introduce some system sound functions to make easier playing event sounds from various places and convert files calling 'beep_play' to use 'system_sound_play' and 'keyclick_click'. Event sound could be become themeable. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30130 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#12150 - Fully-functional audio mixer - and finally whip old ↵Michael Sevakis2011-06-29
| | | | | | limitations about playback of voice and other sounds when paused. Channels are independent in state and amplitude. Fade on stop/pause is handled by the channel's volume control rather than global volume which means it now works from anywhere. Opens up the possibility of plugin sounds during music playback by merely adding an additional channel enum. If any PCM drivers were not properly modified, see one of the last comments in the task for a description of the simple change that is expected. Some params are tunable in firmware/export/pcm-mixer.h as well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30097 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#12024. Scroll acceleration did not work -- at least reported for ↵Andree Buschmann2011-03-24
| | | | | | iRiver H10 -- caused by too short duration for button repeat recognition. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29642 a1c6a512-1295-4272-9138-f99709370657
* Redo r29168. Use similar but existing mechanism in the action system which ↵Thomas Martitz2011-02-02
| | | | | | | | seems to work better. Don't eat buttons on context change if it was waiting for button release (you did need another release). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29192 a1c6a512-1295-4272-9138-f99709370657
* Hopefully fix FS#11696: scrollwheel doesn't respond in some cases.Magnus Holmgren2010-11-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28584 a1c6a512-1295-4272-9138-f99709370657
* Add support multimedia keys/buttons to the core, and adapt Rockbox on ↵Thomas Martitz2010-10-31
| | | | | | android for it (multimedia buttons are found on wired headsets and the lock screen in cyanogenmod). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28421 a1c6a512-1295-4272-9138-f99709370657
* Touchregion support for the Base Skin and FM Skins. display obviously needs ↵Jonathan Gordon2010-06-21
| | | | | | | | | to be in stylus mode for this to work. Just about all screens should be mostly useable if your sbs has the next/prev/select/cancel/menu regions defined. Plenty of room to add new action abilities if they are wanted. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27004 a1c6a512-1295-4272-9138-f99709370657
* Fix typos in the comment (now in .c)Alexander Levin2010-05-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25814 a1c6a512-1295-4272-9138-f99709370657
* Fix typo in comment in the other file as wellAlexander Levin2010-04-19
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25682 a1c6a512-1295-4272-9138-f99709370657
* On RTL mode, flip + and - buttons (Cowon D2)Tomer Shalev2009-12-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23855 a1c6a512-1295-4272-9138-f99709370657
* Touchscreen targets: fix software hold not locking touchscreenMaurus Cuelenaere2009-10-28
| | | | | | | Flyspray: FS#10733 Author: Yann Muller git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23384 a1c6a512-1295-4272-9138-f99709370657
* Add a action helper for touchscreen targets to only receive the touchpress ↵Thomas Martitz2009-10-11
| | | | | | | | coordinates if they're in the passed viewport. Also, fixes the coordinates to be relaitve to the viewport. Use it in the color picker screen. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23116 a1c6a512-1295-4272-9138-f99709370657
* RTL: Fix context regarded as bit-field value, resulted in wrong contexts getTomer Shalev2009-10-08
| | | | | | | | | keys swapped - Also RTL swap keys for CONTEXT_LIST git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23019 a1c6a512-1295-4272-9138-f99709370657
* RTL: No need to swap *scrollwheel* in simulator, as it is being simulated by ↵Tomer Shalev2009-10-06
| | | | | | up/down *buttons* git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22988 a1c6a512-1295-4272-9138-f99709370657
* Fix red: Invert buttons in RTL modeTomer Shalev2009-10-05
| | | | | | | | | - Revert renaming of button_set_flip() - Moved rtl flipping logic to apps/actions.c as a static function - Joined rtl_button_flip_needed() and button_flip_horizontally() git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22962 a1c6a512-1295-4272-9138-f99709370657
* Invert buttons in RTL modeTomer Shalev2009-10-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22961 a1c6a512-1295-4272-9138-f99709370657
* Fix the bug where the short-long fwd/back action would ffwd/rewind the next ↵Jonathan Gordon2009-07-03
| | | | | | folder (consult the manual if that makes no sense) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21619 a1c6a512-1295-4272-9138-f99709370657
* call default_event_handler() in action_userabort() for events other than ↵Frank Gevaerts2009-06-11
| | | | | | ACTION_STD_CANCEL, so things like usb events work properly. This partly fixes FS#9957 (the database screen now works, WPS and recording don't) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21250 a1c6a512-1295-4272-9138-f99709370657
* Replace use of CONTEXT_CUSTOM by get_custom_action with new CONTEXT_PLUGIN, ↵Andrew Mahone2009-05-31
| | | | | | to prevent conflicts with core contexts using CONTEXT_CUSTOM, and use CONTEXT_TREE as the base context for PictureFlow's custom contexts. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21149 a1c6a512-1295-4272-9138-f99709370657
* Simplify some redundant boolean expressionsBertrik Sikken2009-05-21
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21013 a1c6a512-1295-4272-9138-f99709370657
* Gigabeat S: Get remote keymaps up to snuff and working. Do a couple tweaks ↵Michael Sevakis2009-02-03
| | | | | | on main unit ones. Cleanup keymap file a bit. Fix main button scanner to not clobber remote button. Fix a bug in actions.c where 'LAST_ITEM_IN_LIST' didn't really terminate scanning immediately. It would do an additional call into get_context_map and silently pick up ACTION_STD. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19909 a1c6a512-1295-4272-9138-f99709370657
* redo how the statusbar updates are done. send the EVENT_GUI_ACTIONUPDATE ↵Jonathan Gordon2009-01-05
| | | | | | | | | | event every time get_action() is called. The event wont be as realiable (timewise) as before, but seems to work better This also fixes FS#9761. Also set the lcd font back to the ui font from the debug screens which use sysfont git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19681 a1c6a512-1295-4272-9138-f99709370657
* More SYS_FOURHERTZ handling fixes.. (FS#9740 FS#9741)Jonathan Gordon2009-01-02
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19635 a1c6a512-1295-4272-9138-f99709370657
* Keyclick fixup take two. It is only 88 samples (2msec) long so keep a small ↵Michael Sevakis2008-12-13
| | | | | | static buffer around for beeps less than or equal to keyclick duration. This way it operates no matter the buffer state and still won't interfere with alternate PCM operations like recording or plugin playback. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19415 a1c6a512-1295-4272-9138-f99709370657
* Meg F/X can beep and click using a hardware timer so let us try it out. To ↵Michael Sevakis2008-12-07
| | | | | | match things up better, fix PCM beeping to give correct frequency (and get a pointer wrap bug too). Do some minor adjustments to compensate for corrections. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19355 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#9308: differentiate between TOUCHPAD & TOUCHSCREENMaurus Cuelenaere2008-08-23
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18338 a1c6a512-1295-4272-9138-f99709370657
* FS#9281 Rename of splash functions.Nils Wallménius2008-08-15
| | | | | | | | | | | | | | | | | | | | * Remove gui_splash() * Rename gui_syncsplash() to splashf() and remove its voice capabilities. * Rename the internal splash() to splash_internal() and introduce an externally visible splash() that handles simple splashing without printf functionality e.g. splash(HZ, ID2P(LANG_FOO)); or splash(HZ, "foo"); if a LANG_* id is passed it will be voiced. * Adjust all places that called gui_syncsplash() to use the correct variant from above. * Export both new functions to plugins and adjust places calling rb->splash() to use the correct variant so that we now have naming consistency between the core and plugins. * Fix one latent bug that would cause my sim to crash with the above changes and correct P2STR and P2ID macros, thanks to pondlife. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18282 a1c6a512-1295-4272-9138-f99709370657
* Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg2008-06-28
| | | | | | | | | later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
* 1) Make touchscreen interface more intuitiveMaurus Cuelenaere2008-06-02
| | | | | | | 2) Comment the code git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17676 a1c6a512-1295-4272-9138-f99709370657
* Even more touchscreen improvements.Maurus Cuelenaere2008-06-01
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17673 a1c6a512-1295-4272-9138-f99709370657
* (Simulator) Touchscreen improvements.Maurus Cuelenaere2008-05-30
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17662 a1c6a512-1295-4272-9138-f99709370657
* Keyclick option (FS#7307). Disabled by default, go into System settings to ↵Steve Bavin2008-01-21
| | | | | | enable it. WARNING: PortalPlayer targets reportedly have a problem with this, so don't enable it on those unless you want to risk burning your ears with horrible noise. This is probably a bug in pcmbuf_beep(), and I'm hoping that someone who has an affected target will look into it and fix it as a result of this commit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16132 a1c6a512-1295-4272-9138-f99709370657
* mrobe changes:Jonathan Gordon2007-10-23
| | | | | | | | | stop it thinking the battery is always flat and shutting down add keymap for time/date screen pressing a list item will highlight it before accepting it (looks better than it just entering the item without the selection changing first) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15280 a1c6a512-1295-4272-9138-f99709370657
* First go at getting the touchpad working in the ui. lists only for now.Jonathan Gordon2007-10-22
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15264 a1c6a512-1295-4272-9138-f99709370657