summaryrefslogtreecommitdiffstats
path: root/apps/gui/list.c
AgeCommit message (Collapse)AuthorFilesLines
2020-07-24[3/4] Completely remove HWCODEC supportSolomon Peachy1-9/+0
'swcodec' is now always set (and recording_swcodec for recording-capable units) in feature.txt so the manual and language strings don't need to all be fixed up. Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
2020-07-24[2/4] get rid of HAVE_LCD_CHARCELLSSolomon Peachy1-5/+0
HAVE_LCD_BITMAP is now redundant. lcd_bitmap is always-on in features.txt so manual and lang strings don't have to change Change-Id: I08eeb20de48099ffc2dc23782711af368c2ec794
2020-07-24[1/4] Remove SH support and all archos targetsSolomon Peachy1-4/+0
This removes all code specific to SH targets Change-Id: I7980523785d2596e65c06430f4638eec74a06061
2019-07-28Show time, date, and recording directory in the info screenSolomon Peachy1-0/+7
Patch by Igor Poretsky Change-Id: I5db0d018742c11dd9bf3ca4c9539cd91f94d4c2e
2019-01-31FS#10311 -- Add beep when navigating to beginning or end of list.Solomon Peachy1-15/+59
Originally by Stephane Doyon. Updated by Alex Wallis, Igor Poretsky, and myself. Change-Id: I996f18043bd3377d5aeaf65f4290250ea2a6832b
2015-11-10Fix scrolling left button inadvertently cancels listtreeSebastian Leonhardt1-6/+8
Depending on the actual keymap, canceling a listtree with the "scroll left" button may not be intended, especially if the list is entered from a completely different focus (think of leaving a plugin with "long left") Note: initializing "scrolling_left" with true without anything actually scrolling sounds odd to me... maybe this variable should be renamed? "pgleft_allow_cancel" comes to my mind (with opposite boolean states) Change-Id: I58a747fc90e91ae96e75932febb462f1f1a1b4ca
2014-03-14events: Rework event subsystem (add_event, send_event) to be more versatile.Thomas Martitz1-6/+7
add_event_ex is added that takes an extra user_data pointer. This pointer is passed to the callback (add_event and add_event_ex have slightly different callbacks types). All callbacks also get the event id passed. Events added with add_event_ex must be removed with remove_event_ex because the user_data pointer must match in addition to the callback pointer. On the other add_event is simplified to omit the oneshort parameter which was almost always false (still there with add_event_ex). As a side effect the ata_idle_notify callbacks are changed as well, they do not take a data parameter anymore which was always NULL anyway. This commit also adds some documentation to events.h Change-Id: I13e29a0f88ef908f175b376d83550f9e0231f772
2014-01-07lists: Adapt put_line().Thomas Martitz1-26/+29
This enables removing large portions of code, simplifiyng the drawing routine. All of the removed code is functionaltiy now available through put_line(). Change-Id: Ib8e61772134189a8c3c6d22345c0b45e912bea76
2013-03-28simplelist: Fix simplelist_set_line_count() so it actually sets the countJonathan Gordon1-2/+6
(hopefully) Fixes FS#12838 Change-Id: I932184afaf7b65121a0c459cd03c8482e3bad22b
2013-02-12simplelist: Make better use of the static buffer and simplify APIJonathan Gordon1-14/+16
Change-Id: I1327fcd01d6f817be6c7018d30d33446c9b57287
2012-05-20_lists_uiviewport_update_callback can be made staticBertrik Sikken1-1/+1
Change-Id: I25dfaa1636811a0340d1730a5a8f44caa85b1771
2012-03-22Redraw simplelist if/when necessary-Thomas Martitz1-0/+1
Change-Id: I14a1cce8967af60a52d2d13e0b035b71fece8a63
2012-03-20Fix FS#12606 - next track can cause the screen to be clearedJonathan Gordon1-0/+30
This is a bit of a hack. We now trigger an event when the skin engine is doing a full redraw (which means fullscreen clear) before the lcd_update() to give the current screen a chance to redraw to avoid the screen flicker. This commit fixes the issue for screens which are entirely the list widget (i.e browser and menus), other screens will need aditional fixes (i.e quickscreen, time&date screen) Change-Id: I3725c51518be724ce7aacee9877663c2de6866fa
2012-03-15Revert "Fix FS#12606 - next track can cause the screen to be cleared"Jonathan Gordon1-22/+0
This reverts commit cb9bc3bbc8a66c3d5296bfbc68f4487c39c6ac68.
2012-03-14Fix FS#12606 - next track can cause the screen to be clearedJonathan Gordon1-0/+22
This is a bit of a hack. We now trigger an event when the skin engine is doing a full redraw (which means fullscreen clear) before the lcd_update() to give the current screen a chance to redraw to avoid the screen flicker. This commit fixes the issue for screens which are entirely the list widget (i.e browser and menus), other screens will need aditional fixes (i.e quickscreen, time&date screen) Change-Id: I3ffdcd8ccad2c663732f8d5983049c837de00fe5
2012-01-12keyclick: Add a callback so screens can cancel a click. Add a generic list ↵Jonathan Gordon1-0/+22
callback to stop clicks when we are at the end of the list Change-Id: Iabb44a861dd7506cd883c1bdb0241303fa646746
2011-12-14FS#12378 : Remove various unused code, and comment out some unused code and ↵Boris Gjenero1-7/+0
data for reference or future use. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31256 a1c6a512-1295-4272-9138-f99709370657
2011-10-23Fix charcell buildThomas Martitz1-0/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30828 a1c6a512-1295-4272-9138-f99709370657
2011-10-23Fix FS#12337 properly. Also fixes FS#12345 which the previous commit introduced.Thomas Martitz1-5/+6
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30827 a1c6a512-1295-4272-9138-f99709370657
2011-10-22Add functions font_set_ui() and font_get_ui(). The font returned by FONT_UI ↵Fred Bauer1-0/+1
used to be fixed at zero but since buflib-fonts (r30589) can be different, depending on the order of loads and unloads. Fixes broken behavoir in virtual keyboard (FS#12336), lyrics player (FS#12306), and hopefully, FS#12337 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30826 a1c6a512-1295-4272-9138-f99709370657
2011-10-22Fix buttonbar and line padding in time&date screen.Thomas Martitz1-9/+14
The time&date screen uses a custom parent for do_menu(), and doesn't account for the buttonbar and list line height. Introduce gui_synclist_set_viewport_defaults() to set those for viewports that are going to be list parents and use that so that time&date screen doesn't need to know about buttonbar/line padding. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30824 a1c6a512-1295-4272-9138-f99709370657
2011-10-22Fix backwardly named variable.Thomas Martitz1-4/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30823 a1c6a512-1295-4272-9138-f99709370657
2011-10-17Commit FS#12321 - Touchscreen: List line padding, to more easily select linesThomas Martitz1-7/+27
This adds line padding to lists on touchscreens, in order to make lists reasonably useful without huge fonts. It's configurable: * Automatic (default, line height calculated using a lcd dpi aware function) * Off (status quo, line height = font height) * X pixels (from 2 to 50 in even steps) The automatic setting should/aims to Just Work Out Of The Box on all targets git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30773 a1c6a512-1295-4272-9138-f99709370657
2011-10-15Changed the FOR_NB_SCREENS macro to always be a for loop that declares its ↵Björn Stenberg1-14/+4
own loop variable. This removes the need to declare this variable in the outer scope. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30756 a1c6a512-1295-4272-9138-f99709370657
2011-10-07Correct left-over assignment.Thomas Martitz1-4/+1
Also remove unnecessary NULL guard. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30723 a1c6a512-1295-4272-9138-f99709370657
2011-10-07Re-order things to fix red.Thomas Martitz1-8/+7
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30722 a1c6a512-1295-4272-9138-f99709370657
2011-10-07lists: Detect dirtyness (need to reinit) for each list, instead of once ↵Thomas Martitz1-4/+11
globally. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30721 a1c6a512-1295-4272-9138-f99709370657
2011-09-06Lists can now be completly draw using the skin engine!Jonathan Gordon1-1/+7
due to lack of user feedback the actual tags may change, hopefully not though. The way it works is the skin specifies a rectangle and a viewport label. For each item in the list that is being displayed all viewports with the specified label are drawn. However, instead of the viewport x/y position being offset from the top left corner like normal they are offset from the rectangle position in the list (so think of them as child-viewports of the rectangle which moves). Normally the rectangle will move down the screen to show a normal list, this can be changed to move across the screen in a grid pattern. The UI viewport is used to bound the items (i.e %Vi() ) Scrolling is completly disabled in all items except the currently selected item. This works well in combination with the %cs tag to show differently styled lists based on the current screen :) New tags: %LT - Get the current items text %LI - Get the current items icon number %Lc - Use as a conditional to determine if the current item is the selected item %LB - BAR TAG to show the scroll bar, params/options like other bar types. It still needs a bit of work though. Use as a conditional to find out if the bar is actually needed %Lb(viewport, width, height [,tile]) - specify the viewport label to draw for each item and the size of each item. if the last param is 'tile' it will form a grid instead of a list example.sbs: %?cs<%Lb(a,100,20)|> %V(0,0,10,-,1)%Vf(aabbcc) %?LB<%LB(0,0,10,185, invert)> %Vi(-,10,0,-,-35,1) %Vl(a,5,5,160,12,1) %s%?Lc<%Vg(00ffaa, ff0000, 000000)%Vs(gradient)%>%>%>%ac>zzzzzzz %LT zzzzz%s%?Lc<%ar%<%<%<> %V(0,185,-,-,1) %s%LT git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30461 a1c6a512-1295-4272-9138-f99709370657
2011-09-03Add the list colour callback and a proper title icon to the simplelist apiJonathan Gordon1-1/+9
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30419 a1c6a512-1295-4272-9138-f99709370657
2011-03-22Scroll speed is increased every N seconds, not every N half seconds.Andree Buschmann1-2/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29635 a1c6a512-1295-4272-9138-f99709370657
2010-10-31FS#11686 - Kinetic list scrolling for touchscreenThomas Martitz1-16/+23
This adds kinetic scrolling to to lists on touchscreen targets and RaaA, like all other OSes on touchscreens have. It's only enabled in the absolute point mode, so for non-touchscreen and in grid mode nothing changes. Kinetic scrolling means that the list keeps scrolling (but is decelerating) after you leave the touchscreen with the finger. Redraw interval and deceleration is hardcoded for now but could be made configurable if desired. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28408 a1c6a512-1295-4272-9138-f99709370657
2010-10-07use CONTEXT_LIST in simplelist_show_list() so that button combinations for ↵Teruaki Kawashima1-1/+1
page down/page up work. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28216 a1c6a512-1295-4272-9138-f99709370657
2010-09-23Don't actually reimplement an existing feature for hiding the selection markerThomas Martitz1-1/+0
during scrolling. However, the existing one is part of the list api, so it shouldn't be overridden blindly internally, so do the decision in a different but equivalent way. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28147 a1c6a512-1295-4272-9138-f99709370657
2010-09-23Explicitly disable hiding the selection bar by default.Thomas Martitz1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28146 a1c6a512-1295-4272-9138-f99709370657
2010-06-15FS#10336 - Simplify list redrawing to improve voicing when scrolling to ↵Steve Bavin1-50/+46
top/bottom. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26853 a1c6a512-1295-4272-9138-f99709370657
2010-05-06Fix the remaining reds.Thomas Martitz1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25858 a1c6a512-1295-4272-9138-f99709370657
2010-05-06Move c/h files implementing/defining standard library stuff into a new libc ↵Thomas Martitz1-1/+1
directory, also standard'ify some parts of the code base (almost entirely #include fixes). This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
2010-04-10Use the existing type instead of defining an ad hoc oneAlexander Levin1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25575 a1c6a512-1295-4272-9138-f99709370657
2010-04-10Reset the number of lines to 0 when initializing the simple listAlexander Levin1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25573 a1c6a512-1295-4272-9138-f99709370657
2010-02-26Fix the list showing an empty line at the bottom if the sbs is handling the ↵Jonathan Gordon1-1/+2
title git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24919 a1c6a512-1295-4272-9138-f99709370657
2010-02-262 new tags for the base skin.Jonathan Gordon1-1/+7
%Lt - the title text for the current list %Li - the icon number. Same order as the CustomIcons list, except the first icon is the "no icon" icon. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24917 a1c6a512-1295-4272-9138-f99709370657
2010-02-21remove unused fields from struct gui_synclist.Teruaki Kawashima1-17/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24807 a1c6a512-1295-4272-9138-f99709370657
2010-01-07list: improvement to move and show selection in multi-line lists.Teruaki Kawashima1-51/+43
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24195 a1c6a512-1295-4272-9138-f99709370657
2009-12-21fix FS#10870 - slightly change the viewportmanager theme undo-er to be able ↵Jonathan Gordon1-1/+1
to force an update even if the theme isnt being toggled from off to on which caused WPS artifacts when leaving the WPS if the theme was enabled git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24087 a1c6a512-1295-4272-9138-f99709370657
2009-12-09FS#10824 - viewport/statusbar API rework.Jonathan Gordon1-3/+7
Hopefully the only user visible changes are: - fm and recording screens go by the statusbar setting (sbs or inbuilt) - plugins go back to using the theme as they should for menus and lists - splash screens might get cut a bit... entirely theme and splash dependant.. if there is a problematic one we can look at it later. - hopefully nothing more than very minor screen flickerings... let me know exactly where they are so they can be fixed New GUI screen rules: * Screens assume that the theme (sbs+ui viewport+ maybe background image) are always enabled. They may be disabled on a per display basis, but MUST be re-enabled on exit * Screens must not be coded in a way that requires a statusbar of any type.. the inbuilt bar will be removed shortly. ALWAYS RESPECT THE USERS SETTINGS unless the screen requires the full display to fit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23904 a1c6a512-1295-4272-9138-f99709370657
2009-11-11fix build, ? buttonbar.... Jonathan Gordon1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23607 a1c6a512-1295-4272-9138-f99709370657
2009-10-27FS#10722: some improvements for gui/list.cTeruaki Kawashima1-105/+89
* Add function list_get_nb_lines and replace duplicated codes to calculate number of lines by it. * Refine calculation of start_item in function gui_list_put_selection_on_screen. - displays as many items as possible. hopefully fix FS#10054. * Fix checking bounds in function gui_synclist_item_is_onscreen. * Remove trailing spaces and fix indents. Flyspray: FS#10722 Author: myself git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23367 a1c6a512-1295-4272-9138-f99709370657
2009-10-18Use wrap-safe TIME_BEFORE/TIME_AFTER macros to compare times with ↵Bertrik Sikken1-2/+1
current_time, instead of comparing them directly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23246 a1c6a512-1295-4272-9138-f99709370657
2009-10-16Revert r23212, I committed it accidentally.Thomas Martitz1-1/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23214 a1c6a512-1295-4272-9138-f99709370657
2009-10-16initial custom statusbar commitThomas Martitz1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23212 a1c6a512-1295-4272-9138-f99709370657