summaryrefslogtreecommitdiff
path: root/apps/gui/statusbar-skinned.c (follow)
Commit message (Collapse)AuthorAge
* events: Rework event subsystem (add_event, send_event) to be more versatile.Thomas Martitz2014-03-14
| | | | | | | | | | | | | | | | | | 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
* skins: Update SBS when changing activities.Thomas Martitz2014-01-15
| | | | | | | | | | When changing activities (those that are indicated via %cs skin tag), the sbs needs to be updated, so that the UI viewport can be applied before that activity draws its UI. Fixes FS#12804. I hope this commit doesn't have bad side effects. Change-Id: If45654e356749f5f27991430dbd1da6f23e6f802
* skinengine: Rework skin loading so skins can be un/loaded individually. This ↵Jonathan Gordon2011-11-21
| | | | | | also means that loading a .cfg which doesnt change themes shouldnt have them reloaded git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31037 a1c6a512-1295-4272-9138-f99709370657
* Use buflib for all skin engine allocations.Jonathan Gordon2011-11-15
| | | | | | | | Massive thanks to Michael Chicoine and other testers for finding the early bugs. This removes all skin memory limitations git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30991 a1c6a512-1295-4272-9138-f99709370657
* Redo r30826 (and hopefully not reintroduce font issues) which cleans up the ↵Jonathan Gordon2011-11-08
| | | | | | font API. FONT_UI is deprecated, use screens[screen].getuifont() instead (and .setuifont() to set it after a font has been loaded) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30932 a1c6a512-1295-4272-9138-f99709370657
* Changed the FOR_NB_SCREENS macro to always be a for loop that declares its ↵Björn Stenberg2011-10-15
| | | | | | 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
* FS#12273 - use buflib for font storage. thanks to the testers :)Jonathan Gordon2011-09-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30589 a1c6a512-1295-4272-9138-f99709370657
* Lists can now be completly draw using the skin engine!Jonathan Gordon2011-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge a bunch of code which is 99% identical so it makes it easier to add ↵Jonathan Gordon2011-03-07
| | | | | | more of these later git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29535 a1c6a512-1295-4272-9138-f99709370657
* Remove code duplication in some generic skin touch action handling.Jonathan Gordon2011-03-01
| | | | | | | fix a bug which stopped the setting_inc/dec touch actions from parsing git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29477 a1c6a512-1295-4272-9138-f99709370657
* fix FS#11835: %Lt tag doesn't work on targets with more than 1 screen.Teruaki Kawashima2011-01-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29058 a1c6a512-1295-4272-9138-f99709370657
* New Touchscreen region type... 'mute' which un/mutes volume without pausing ↵Jonathan Gordon2011-01-13
| | | | | | playback git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29046 a1c6a512-1295-4272-9138-f99709370657
* skin engine: completly rework the sbs title handing codeJonathan Gordon2010-09-16
| | | | | | This hopefully fixes the remaining data aborts and freezes when loading skins caused by the somewhat nasty list/sbs title handling code. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28093 a1c6a512-1295-4272-9138-f99709370657
* Another major skin backend update/hopefully bugfix:Jonathan Gordon2010-09-14
| | | | | | | | | | | Skins are now more self contained in the skin manager which in the future might allow on demand skin loading (i.e smaller skin buffers) Skin backdrops are also managed more intelegently (fixes a bug where you can get a crazy backdrop loaded if a .sbs fails to load) the rockbox_default rescue theme is now called rockbox_failsafe to better express what it actually is. This commit hopefully/maybe fixes the heavily reported data aborts, so please check if you are getting them git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28073 a1c6a512-1295-4272-9138-f99709370657
* 2 new touch region options... "settings_inc" and "settings_dec" which will ↵Jonathan Gordon2010-09-06
| | | | | | increase or decrease most of the available settings. To use it put the config name of the setting as the next param after settings_inc... i.e %T(0, 0, 32, 32, settings_inc, repeat) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28009 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#11524 - a sbs could crash on loadJonathan Gordon2010-08-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27829 a1c6a512-1295-4272-9138-f99709370657
* New feature for the %xl (image load) tag. If you give it the filename ↵Jonathan Gordon2010-08-12
| | | | | | | | | | | | | __list_icons__ it will use the list icon strip instead of loading a different bmp. example: %xl(I, __list_icons__, 0, 0) %xd(I, %Li) ^ display the list icon at position 0,0 in that viewport. (you can of course %xd(Ia) if you really wanted also.) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27787 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#11527 - remote wps/sbs doesnt update correctlyJonathan Gordon2010-08-10
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27767 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#10926 - h300 wps wouldnt be updated correctly when the backlight ↵Jonathan Gordon2010-08-02
| | | | | | turns off because the remote is being naughty git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27666 a1c6a512-1295-4272-9138-f99709370657
* Allow viewport labels to be mostly free text instead of only one character. ↵Jonathan Gordon2010-08-02
| | | | | | If this is useful the same will be done for images git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27665 a1c6a512-1295-4272-9138-f99709370657
* remove an unused variableJonathan Gordon2010-07-31
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27632 a1c6a512-1295-4272-9138-f99709370657
* Make some global function/variables local (by making them static)Bertrik Sikken2010-07-30
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27631 a1c6a512-1295-4272-9138-f99709370657
* FS#11470 - new skin code, finally svn uses the new parser from the theme ↵Jonathan Gordon2010-07-29
| | | | | | editor. This means that a skin that passes the editor WILL pass svn and checkwps (unless the target runs out of skin buffer or something. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27613 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
* Changeover to the new skin format. SkinBreakingChange in the wiki has the ↵Jonathan Gordon2010-06-07
| | | | | | | | | | | | | | runown of the changes. Major changes are paramerterised tags now use %tag(param,param), colours are removed from the %V() tag, %Vi gets a required (but can be -) label as its first param). utils/skinupdater/ has a program to update individual skins, and a perl script to update a whole zip. Themesite will be unusable for the time being (you should be able to upload new themes once it updates checkwps though). I obviously havnt tested every updated wps in this change so let me know if one doesnt load git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26641 a1c6a512-1295-4272-9138-f99709370657
* fix remote statusbar not being updated if it is enabled on both displaysJonathan Gordon2010-05-25
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26275 a1c6a512-1295-4272-9138-f99709370657
* Make it possible to move the UI viewport using conditional viewports.Jonathan Gordon2010-05-05
| | | | | | | | %Vi|<label>|<Usual %Vi params>| <- specify the possible viewports to use %VI<label> <- make the UI viewport use the %Vi definition with the <label> label. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25826 a1c6a512-1295-4272-9138-f99709370657
* revert r25271 which caused more problems than it tried to fixJonathan Gordon2010-03-23
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25296 a1c6a512-1295-4272-9138-f99709370657
* there is a difference between viewports which shouldnt be cleared (the ↵Jonathan Gordon2010-03-21
| | | | | | default viewport in the sbs) and viewports which should never be shown (%Vi viewport). so do this properly git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25271 a1c6a512-1295-4272-9138-f99709370657
* revert r25054 - tags which have an off and a list of option should have off ↵Jonathan Gordon2010-03-07
| | | | | | | | | as the first not last option. also fix it so the no icon position actually works. you can use %?Li<no|yes> if you want to. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25063 a1c6a512-1295-4272-9138-f99709370657
* cleanup statusbar+base skin relationship...Jonathan Gordon2010-03-06
| | | | | | | | * remove the "custom" option from the statusbar setting. if a sbs file is set then statusbar setting is ignored, no other user visible change there. * new tag, %wi - use to draw the inbuilt statusbar in the current viewport git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25038 a1c6a512-1295-4272-9138-f99709370657
* 2 new tags for the base skin.Jonathan Gordon2010-02-26
| | | | | | | | %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
* remote multifont fixes. it shoud be working again (blame AlexP! he made me ↵Jonathan Gordon2010-02-21
| | | | | | break it last week!) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24812 a1c6a512-1295-4272-9138-f99709370657
* FS#10984 - multifont! 2 major additions:Jonathan Gordon2010-02-14
| | | | | | | | | | 1) seperate UI font for the remote and main displays 2) allow individual skins to load additional fonts for use in the skin (Uo to 7 extra in this first version) see CustomWPS for info on how to load a font in the skins. Code should always use FONT_UI+screen_number to get the correct user font git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24644 a1c6a512-1295-4272-9138-f99709370657
* OK, this is hopefully the last sbs related fix. This one will fix the ↵Jonathan Gordon2010-02-10
| | | | | | backdrop going garbage, and add a missing else which kugel spotted git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24579 a1c6a512-1295-4272-9138-f99709370657
* Fix RTL list handing when not loading a custom base skin.Jonathan Gordon2010-01-31
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24401 a1c6a512-1295-4272-9138-f99709370657
* really the last of the red this timeJonathan Gordon2010-01-29
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24370 a1c6a512-1295-4272-9138-f99709370657
* skin rework (FS#10922) notable changes:Jonathan Gordon2010-01-29
| | | | | | | | | | - simplify the setting/skin relationship. settings are used as the fallback if it's not specified in the skin - backdrop buffers are now in the skin buffer (which has also increased slightly to accomodate 1 backdrop for each skin and 2 full colour screens for bmps (up for 1.5)) - if no %X is specified in a skin then the backdrop setting will be used. use %Xd to explicitly disable a skin from displaying a backdrop - the base skin can now specify a backdrop. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24366 a1c6a512-1295-4272-9138-f99709370657
* FS#10855 3 minor sbs bugs, spotted and fixed by Teruaki KawashimaJonathan Gordon2009-12-18
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24065 a1c6a512-1295-4272-9138-f99709370657
* FS#10824 - viewport/statusbar API rework.Jonathan Gordon2009-12-09
| | | | | | | | | | | | | | | | 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
* Consolidate some #ifdef code.Thomas Martitz2009-11-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23636 a1c6a512-1295-4272-9138-f99709370657
* Fix crash when selecting statusbar: custom in the menus without having a ↵Thomas Martitz2009-11-15
| | | | | | valid sbs loaded. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23635 a1c6a512-1295-4272-9138-f99709370657
* try that previous commit again... Jonathan Gordon2009-11-09
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23581 a1c6a512-1295-4272-9138-f99709370657
* fix segfault on remote targets where no sbs is loaded for the remoteJonathan Gordon2009-11-09
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23580 a1c6a512-1295-4272-9138-f99709370657
* Remove wps_data.remote_wps. It's redundant with the new global curr_screen.Thomas Martitz2009-11-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23512 a1c6a512-1295-4272-9138-f99709370657
* Fix the WPS to work properly with the statusbar for the previous change.. ↵Jonathan Gordon2009-11-04
| | | | | | Side effect is it fixes FS#10721 where %pb didnt work git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23508 a1c6a512-1295-4272-9138-f99709370657
* Fix viewport "UI area" to work based on what was agreed on last week in the ↵Jonathan Gordon2009-11-04
| | | | | | | | | | | | mailing lists and IRC: * viewport_set_defaults() will always set the viewport to the intersection of the user setting and any sbs set user viewport * viewport_set_fullscreen() will always set the viewport to the full display, take care to disable the statusbars if you use this! This patch is from FS#10709 and contains code which will be removed once the current inbuilt statusbar is finally removed. This *may* break themes which dont use the %we or %wd token.. follow up commit to fix this coming... git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23507 a1c6a512-1295-4272-9138-f99709370657
* Remove all update event callbacks if the custom statusbar is unused.Thomas Martitz2009-10-20
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23306 a1c6a512-1295-4272-9138-f99709370657
* No need to have this variable global anymore.Thomas Martitz2009-10-20
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23305 a1c6a512-1295-4272-9138-f99709370657
* Fix a few potential redraw problems with the custom statusbar and wps ↵Thomas Martitz2009-10-20
| | | | | | | | | 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