Commit graph

211 commits

Author SHA1 Message Date
Aidan MacDonald
005c414e5f Document intentional fallthroughs + fix harmless unintended ones
Change-Id: I1ca5b1027ec30cbf61093bab35b980196ed14e6b
2021-08-04 18:59:46 +00:00
William Wilgus
43f90746d5 synclist add method for setting selection color
Change-Id: I8c8761d92f4fc99f65d45098ee6e97800d3fe002
2020-11-14 00:01:39 +00:00
Johannes Rauh
44023eb430 Volume adjustment in LISTS ignored AUDIOHW_SETTING values
AUDIOHW_SETTING() defines number of decimals and step size.
This is taken into account in sound menu but ignored in lists
(had been recently fixed in WPS).
This was not a problem so far since all drivers used 0 decimal
places and step size equal 1.

Change-Id: I8807d5b6f2f3d412a2bc5769905bd776553ece0b
2020-10-29 20:08:50 -04:00
Solomon Peachy
658026e626 [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.
Note:  I left behind lcd_bitmap in features.txt, because removing it
would require considerable work in the manual and the translations.

Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
2020-07-24 21:20:13 +00:00
Solomon Peachy
8cb555460f [3/4] Completely remove HWCODEC support
'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 21:20:13 +00:00
Solomon Peachy
0c4f89370d [2/4] get rid of HAVE_LCD_CHARCELLS
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 21:20:13 +00:00
Solomon Peachy
092c340a20 [1/4] Remove SH support and all archos targets
This removes all code specific to SH targets

Change-Id: I7980523785d2596e65c06430f4638eec74a06061
2020-07-24 21:20:13 +00:00
Solomon Peachy
4beafe16fa Show time, date, and recording directory in the info screen
Patch by Igor Poretsky

Change-Id: I5db0d018742c11dd9bf3ca4c9539cd91f94d4c2e
2019-07-28 14:57:14 +02:00
Solomon Peachy
39b64f7d4d FS#10311 -- Add beep when navigating to beginning or end of list.
Originally by Stephane Doyon.
Updated by Alex Wallis, Igor Poretsky, and myself.

Change-Id: I996f18043bd3377d5aeaf65f4290250ea2a6832b
2019-01-31 15:25:35 +01:00
Sebastian Leonhardt
a8758c953d Fix scrolling left button inadvertently cancels listtree
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
2015-11-10 20:40:36 +01:00
Thomas Martitz
470989bd70 events: Rework event subsystem (add_event, send_event) to be more versatile.
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-03-14 23:36:30 +01:00
Thomas Martitz
eec89a90ff lists: Adapt put_line().
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
2014-01-07 14:13:40 +01:00
Jonathan Gordon
83d3f1d3f6 simplelist: Fix simplelist_set_line_count() so it actually sets the count
(hopefully) Fixes FS#12838

Change-Id: I932184afaf7b65121a0c459cd03c8482e3bad22b
2013-03-28 22:32:57 +11:00
Jonathan Gordon
69228f92db simplelist: Make better use of the static buffer and simplify API
Change-Id: I1327fcd01d6f817be6c7018d30d33446c9b57287
2013-02-12 21:01:13 +11:00
Bertrik Sikken
f340768ad5 _lists_uiviewport_update_callback can be made static
Change-Id: I25dfaa1636811a0340d1730a5a8f44caa85b1771
2012-05-20 01:57:49 +02:00
Thomas Martitz
6e6f0c6ef3 Redraw simplelist if/when necessary-
Change-Id: I14a1cce8967af60a52d2d13e0b035b71fece8a63
2012-03-22 21:05:30 +01:00
Jonathan Gordon
94139ac0bd Fix FS#12606 - next track can cause the screen to be cleared
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-20 22:10:19 +11:00
Jonathan Gordon
f31e7a1225 Revert "Fix FS#12606 - next track can cause the screen to be cleared"
This reverts commit cb9bc3bbc8.
2012-03-15 11:31:18 +11:00
Jonathan Gordon
cb9bc3bbc8 Fix FS#12606 - next track can cause the screen to be cleared
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-03-14 22:52:24 +11:00
Jonathan Gordon
eb2ea7f9ad keyclick: Add a callback so screens can cancel a click. Add a generic list callback to stop clicks when we are at the end of the list
Change-Id: Iabb44a861dd7506cd883c1bdb0241303fa646746
2012-01-12 22:28:36 +11:00
Boris Gjenero
8e6030c822 FS#12378 : Remove various unused code, and comment out some unused code and data for reference or future use.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31256 a1c6a512-1295-4272-9138-f99709370657
2011-12-14 21:45:25 +00:00
Thomas Martitz
7352e72cb9 Fix charcell build
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30828 a1c6a512-1295-4272-9138-f99709370657
2011-10-23 11:12:52 +00:00
Thomas Martitz
155a9f8abd Fix FS#12337 properly. Also fixes FS#12345 which the previous commit introduced.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30827 a1c6a512-1295-4272-9138-f99709370657
2011-10-23 11:05:27 +00:00
Fred Bauer
e299eb3ea3 Add functions font_set_ui() and font_get_ui(). The font returned by FONT_UI 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-22 17:13:33 +00:00
Thomas Martitz
5c509d17db Fix buttonbar and line padding in time&date screen.
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-22 10:09:23 +00:00
Thomas Martitz
09d0b6fec4 Fix backwardly named variable.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30823 a1c6a512-1295-4272-9138-f99709370657
2011-10-22 10:06:48 +00:00
Thomas Martitz
3b12634e6b Commit FS#12321 - Touchscreen: List line padding, to more easily select lines
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-17 17:38:10 +00:00
Björn Stenberg
0942e2a0f7 Changed the FOR_NB_SCREENS macro to always be a for loop that declares its 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-15 19:35:02 +00:00
Thomas Martitz
42a33a7f70 Correct left-over assignment.
Also remove unnecessary NULL guard.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30723 a1c6a512-1295-4272-9138-f99709370657
2011-10-07 17:31:15 +00:00
Thomas Martitz
f86506675e Re-order things to fix red.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30722 a1c6a512-1295-4272-9138-f99709370657
2011-10-07 17:28:27 +00:00
Thomas Martitz
0acdc87df4 lists: Detect dirtyness (need to reinit) for each list, instead of once globally.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30721 a1c6a512-1295-4272-9138-f99709370657
2011-10-07 17:22:49 +00:00
Jonathan Gordon
9b6ac01c7b Lists can now be completly draw using the skin engine!
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-06 13:49:41 +00:00
Jonathan Gordon
573f2206c1 Add the list colour callback and a proper title icon to the simplelist api
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30419 a1c6a512-1295-4272-9138-f99709370657
2011-09-03 13:24:56 +00:00
Andree Buschmann
04bd51fbcb Scroll speed is increased every N seconds, not every N half seconds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29635 a1c6a512-1295-4272-9138-f99709370657
2011-03-22 21:29:05 +00:00
Thomas Martitz
b673ae2c46 FS#11686 - Kinetic list scrolling for touchscreen
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-31 11:11:46 +00:00
Teruaki Kawashima
2d86417c46 use CONTEXT_LIST in simplelist_show_list() so that button combinations for page down/page up work.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28216 a1c6a512-1295-4272-9138-f99709370657
2010-10-07 12:27:26 +00:00
Thomas Martitz
f060cd5428 Don't actually reimplement an existing feature for hiding the selection marker
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-23 00:37:33 +00:00
Thomas Martitz
e5d43300af Explicitly disable hiding the selection bar by default.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28146 a1c6a512-1295-4272-9138-f99709370657
2010-09-23 00:13:11 +00:00
Steve Bavin
dddd15746f FS#10336 - Simplify list redrawing to improve voicing when scrolling to top/bottom.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26853 a1c6a512-1295-4272-9138-f99709370657
2010-06-15 07:08:35 +00:00
Thomas Martitz
55e4fe73cc Fix the remaining reds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25858 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 22:33:57 +00:00
Thomas Martitz
50a6ca39ad Move c/h files implementing/defining standard library stuff into a new libc 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-05-06 21:04:40 +00:00
Alexander Levin
4702770933 Use the existing type instead of defining an ad hoc one
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25575 a1c6a512-1295-4272-9138-f99709370657
2010-04-10 21:11:19 +00:00
Alexander Levin
f23251999c Reset the number of lines to 0 when initializing the simple list
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25573 a1c6a512-1295-4272-9138-f99709370657
2010-04-10 20:25:23 +00:00
Jonathan Gordon
321148124a Fix the list showing an empty line at the bottom if the sbs is handling the title
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24919 a1c6a512-1295-4272-9138-f99709370657
2010-02-26 06:45:50 +00:00
Jonathan Gordon
466e5d9aa4 2 new tags for the base skin.
%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-26 03:45:41 +00:00
Teruaki Kawashima
dafcd1470a remove unused fields from struct gui_synclist.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24807 a1c6a512-1295-4272-9138-f99709370657
2010-02-21 13:32:52 +00:00
Teruaki Kawashima
67470c890a list: improvement to move and show selection in multi-line lists.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24195 a1c6a512-1295-4272-9138-f99709370657
2010-01-07 12:51:57 +00:00
Jonathan Gordon
9d1832cfba fix FS#10870 - slightly change the viewportmanager theme undo-er to be able 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-21 05:19:12 +00:00
Jonathan Gordon
b2eb44ce0e FS#10824 - viewport/statusbar API rework.
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-12-09 07:25:46 +00:00
Jonathan Gordon
db4cab0e66 fix build, ? buttonbar....
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23607 a1c6a512-1295-4272-9138-f99709370657
2009-11-11 06:48:56 +00:00