Commit graph

31 commits

Author SHA1 Message Date
Thomas Martitz
28aef1f96a Consolidate code duplication in WPS volume changing handling.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23436 a1c6a512-1295-4272-9138-f99709370657
2009-10-31 14:55:13 +00:00
Thomas Martitz
804e3aadae Fix a few potential redraw problems with the custom statusbar and wps fighting for the same full redraw variable.
Instead, introduce a new skin struct holding data which is meant for all screens for a single skin (struct wps_state is currently used by both at the same time). Also clean up (classic) statusbar handling for skins using this new struct.
Also, implement deactivating updating of the custom statusbar when the LCD is deactivated, saving a bit battery life on some targets.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23304 a1c6a512-1295-4272-9138-f99709370657
2009-10-20 23:12:20 +00:00
Thomas Martitz
d85c3ec410 Convert lcd_activation callbacks to use the event system to allow for multiple parallel callbacks (for custom statusbar).
Increase maximum event count as we need more (I actually had a report about it during custom statusbar testing).
Removed corresponding functions from the core and plugin api. Bump min version and sort.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23302 a1c6a512-1295-4272-9138-f99709370657
2009-10-20 21:54:59 +00:00
Thomas Martitz
1016ee4e80 Initial custom statusbar commit.
The custom statusbar can be used as a WPS for the main UI, using .(r)sbs files. It's using the skin engine and knows all tags the WPS also knows.
The default folder for .sbs is the wps folder to reuse images used in the WPS.
As it can be shown in the WPS also, it's useful to move shared parts to the custom statusbar in order to save skin buffer space.
There are a few restrictions/TODOs:
*) Peak meter doesn't redraw nicely(not frequent enough), as very frequent updates would slow the UI down as hell (some targets fight with it in the WPS already: FS#10686)
*) No touchregion support as the statusbar doesn't have any action handling (it won't fail to parse though).
*) Drawing stuff into the default VP is forbidden (loading images in it is not). You *need* to use viewports for the displaying stuff (parsing fails if no viewport is used).
*) Themes that don't use a custom ui viewport can be fixed up using the new %Vi tag to avoid nasty redraw effectts (you must not draw into it as well, it's used to fix up the ui viewport). %Vi describes the viewport that the lists can use without getting in the way of the statusbar.

Otherwise, it behaves like the classic statusbar, it can be configured in the theme settings, and can be turned off in the wps using %wd.

Note to translaters: When translating LANG_STATUSBAR_CUSTOM, please consider using the same translation as for LANG_CHANNEL_CUSTOM if it's compatible. They could be combined later then.

Flyspray: FS#10566
Author: myself

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23258 a1c6a512-1295-4272-9138-f99709370657
2009-10-19 15:28:15 +00:00
Thomas Martitz
a7c888c48e Add a option to skip length which lets you skip 5s before the end of a song, which can be useful on gapless albums.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23229 a1c6a512-1295-4272-9138-f99709370657
2009-10-17 16:05:23 +00:00
Thomas Martitz
94f7651341 Revert r23212, I committed it accidentally.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23214 a1c6a512-1295-4272-9138-f99709370657
2009-10-16 20:34:04 +00:00
Thomas Martitz
8d032ae136 initial custom statusbar commit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23212 a1c6a512-1295-4272-9138-f99709370657
2009-10-16 20:30:09 +00:00
Thomas Martitz
e9c10189e9 Rework albumart buffering internally to allow for mutliple albumart sizes.
Playback now has a few albumart slots. Anything (most importantly: skins)  can obtain such a slot.
The slot has fields for the size which is passed to bufopen then to image_load to buffer the albumart with the proper size.
Currently there's 1 slot. We can increase it for remotes if we want. Custom statusbar will increase it.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23209 a1c6a512-1295-4272-9138-f99709370657
2009-10-16 19:14:41 +00:00
Thomas Martitz
bc063a3e1e Whoops, I had that warning turned off locally.
See http://www.rockbox.org/irc/log-20091014#08:40:11  gcc warns on that one (it's perfectly valid code). It doesn't warn if you do this on plain arrays and since I have had this warning disabled I thought it would not warn on arrays of structs also.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23172 a1c6a512-1295-4272-9138-f99709370657
2009-10-14 16:00:52 +00:00
Thomas Martitz
0f0d9064c5 Remove wps_reset(), and rename skin_data_init to skin_data_reset() and extend it to zero most of the wps_data members.
As these are called when parsing a skin it doesn't need to be called by the wps or settings, so make it local to skin_parser.c.
Reorder the members of struct wps_data for more effecient alignment.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23171 a1c6a512-1295-4272-9138-f99709370657
2009-10-14 15:49:11 +00:00
Thomas Martitz
ba8fbb0b9b Rename struct skin_albumart members to be consistent with similar members of other structs. the albumart_ prefix is redundant.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22836 a1c6a512-1295-4272-9138-f99709370657
2009-09-25 18:36:28 +00:00
Rob Purchase
5bd3b443ff Fix delay when seeking using the touchscreen by adding a pause/unpause.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22720 a1c6a512-1295-4272-9138-f99709370657
2009-09-17 20:49:34 +00:00
Jonathan Gordon
fe2f042670 rework AA load/display handling in the skins to get them working in viewports again
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22646 a1c6a512-1295-4272-9138-f99709370657
2009-09-07 02:36:56 +00:00
Thomas Martitz
c17037a802 Factor out/generalise the function that checks whether a point is within a viewport to, and use it in the wps' touchregion code. This corrects the check that was done there.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22638 a1c6a512-1295-4272-9138-f99709370657
2009-09-05 23:57:09 +00:00
Jonathan Gordon
f6025186fd stop a potential crash caused by r22438
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22614 a1c6a512-1295-4272-9138-f99709370657
2009-09-04 00:41:38 +00:00
Teruaki Kawashima
5b2a599d63 fix FS#10465 and return GO_TO_ROOT instead of SYS_USB_CONNECTED in gui_wps_show.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22538 a1c6a512-1295-4272-9138-f99709370657
2009-08-29 16:25:04 +00:00
Thomas Martitz
3598eb02d7 Do some #ifdef'ing to make the Player happy.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22520 a1c6a512-1295-4272-9138-f99709370657
2009-08-27 17:55:05 +00:00
Thomas Martitz
af967d77d3 Fix skin engine calling wps code to draw the statusbars (add a pointer to viewportmanager-suitable statusbar values, which are the same for all screens), and re-arrange statusbar related code slightly. No functional change.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22514 a1c6a512-1295-4272-9138-f99709370657
2009-08-26 00:06:27 +00:00
Thomas Martitz
e510de1b35 Move handling of "rockbox_default.[r]wps" into wps.c, out of the skin engine (which should be as generic as possible).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22438 a1c6a512-1295-4272-9138-f99709370657
2009-08-20 14:29:03 +00:00
Jonathan Gordon
5b349e3cfa update the display after getting a bit too close to the touchscreen instead of just asking it nicely to change volume!
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22436 a1c6a512-1295-4272-9138-f99709370657
2009-08-20 04:07:27 +00:00
Jonathan Gordon
36ca4967e0 move viewports into the skin buffer, no more viewport limit on the skin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22403 a1c6a512-1295-4272-9138-f99709370657
2009-08-18 05:30:59 +00:00
Thomas Martitz
4c48b59be8 User definable UI viewport, to be able to restrict the UI into a viewport for all bitmap displays.
Flyspray: FS#8799

This will allow for pretty themes, for example those with nice glass effects on their backdrops (some might argue they're wasting screen space but it's upto them),
as well as allowing for future background WPS updates in the main UI.

Plugins are not converted yet, they simply use the full screen. Ideally, any plugin that does *not* want the UI viewport, should take care of that itself (i.e. plugins should normally use the UI viewport).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22365 a1c6a512-1295-4272-9138-f99709370657
2009-08-16 22:20:11 +00:00
Jonathan Gordon
271643c585 remove the limit of touch regions in touchscreen skins
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22361 a1c6a512-1295-4272-9138-f99709370657
2009-08-16 21:22:57 +00:00
Jonathan Gordon
1c0aeb18ca r22135 overwrote mcuelenaere's changes in r22068 to add slider-type regions for the touchscreen... so bring them back (spotted by kkurbjun)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22234 a1c6a512-1295-4272-9138-f99709370657
2009-08-10 03:48:27 +00:00
Bertrik Sikken
d767883a41 Various files: make functions static if they're local or make sure there is a proper #include if not
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22184 a1c6a512-1295-4272-9138-f99709370657
2009-08-06 09:28:25 +00:00
Thomas Martitz
857741419c Move this call a bit up so that wpses without backdrop show none properly (the main backdrop).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22179 a1c6a512-1295-4272-9138-f99709370657
2009-08-06 01:08:10 +00:00
Thomas Martitz
4764ee04c9 Add backdrop functions to the multiscreen api and add a enum backdrop_type parameter for different backdrops (main, wps), symplifying calls and removing dozens of #ifdefs (stubs added for non-backdrop displays that can't do backdrops).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22176 a1c6a512-1295-4272-9138-f99709370657
2009-08-06 00:14:40 +00:00
Thomas Martitz
218b31272e Remove the wrapper around the wrapper (wps_data_load) and handle loading hardcoded wps in case of a broken file directly in wps.c.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22146 a1c6a512-1295-4272-9138-f99709370657
2009-08-03 22:39:27 +00:00
Thomas Martitz
cc05424e44 Fix reds for IAP and a missing #include.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22141 a1c6a512-1295-4272-9138-f99709370657
2009-08-03 15:46:21 +00:00
Thomas Martitz
3b75c86d74 A bit mroe wps/skin engine cleanup so that the structs the wps uses can be static:
-add wrappers wps_data_load() and wps_data_init() so that other code doesn't need the structs for that
-change (and rename) gui_sync_wps_uses_albumart() to take points to be filled as parameter to get the AA size of a wps

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22139 a1c6a512-1295-4272-9138-f99709370657
2009-08-03 15:06:30 +00:00
Jonathan Gordon
b5442f8752 these didnt get renamed for some reason
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22136 a1c6a512-1295-4272-9138-f99709370657
2009-08-03 04:57:43 +00:00
Renamed from apps/gui/music_screen.c (Browse further)