summaryrefslogtreecommitdiff
path: root/apps/gui/viewport.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
* lcd-16bit: Remove {lss,lse,lst}_pattern fields from struct viewport.Thomas Martitz2014-01-07
| | | | | | | These where used for line styling during scrolling, which is now done in apps/, The viewport struct doesn't need to record these anymore. Change-Id: I810d9dcb2644b00a798c6e75acab69c74a78e77f
* lcd-common: Remove support for custom line heights from viewport.Thomas Martitz2014-01-07
| | | | | | | | Since scrolling is now pixel-based this is not necessary anymore. custom line height is handled by put_line() but can also possible to implement with lcd_puts_scroll_func(). Change-Id: Iee9b12bf99afac93d95d2a1a6f5d5b4db237b21c
* scroll_engine: Rename scroll_stop* functions to be more consistent with the ↵Thomas Martitz2013-12-14
| | | | | | lcd api. Change-Id: I8ada10b96bfb628cca0331689e8b936ae47c7e1c
* apps: lcd-remote.h is not needed if HAVE_REMOTE_LCD is not definedRafaël Carré2012-01-07
| | | | | | Fix a comment git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31608 a1c6a512-1295-4272-9138-f99709370657
* Get rid of a really annoying #ifdef line to check if backdrop support should ↵Jonathan Gordon2011-11-19
| | | | | | be enabled git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31027 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
* Better fix for FS#12337. Use 0 to make the line height calculated from the ↵Thomas Martitz2011-10-29
| | | | | | font height, as before r30773. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30850 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#12321 - Touchscreen: List line padding, to more easily select linesThomas Martitz2011-10-17
| | | | | | | | | | | | | | 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
* 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
* 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
* 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
* Remove some redundant #include'sBertrik Sikken2010-06-29
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27183 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
* bahJonathan Gordon2010-06-07
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26644 a1c6a512-1295-4272-9138-f99709370657
* this should be the last of the warningsJonathan Gordon2010-06-07
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26643 a1c6a512-1295-4272-9138-f99709370657
* fix errorsJonathan Gordon2010-06-07
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26642 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 red, but this might not be the best long term solution.Jonathan Gordon2010-05-25
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26278 a1c6a512-1295-4272-9138-f99709370657
* remove a stray printfJonathan Gordon2010-05-25
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26277 a1c6a512-1295-4272-9138-f99709370657
* fix FS#11321 - the x5 remote used the wrong coloursJonathan Gordon2010-05-25
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26276 a1c6a512-1295-4272-9138-f99709370657
* Move c/h files implementing/defining standard library stuff into a new libc ↵Thomas Martitz2010-05-06
| | | | | | | | 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
* fix FS#11100 - statusbar would show up on multiscreen targets if either ↵Jonathan Gordon2010-03-13
| | | | | | screen had it enabled git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25159 a1c6a512-1295-4272-9138-f99709370657
* fix yellowJonathan Gordon2010-03-06
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25039 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
* set viewport to default one just for safe.Teruaki Kawashima2010-02-28
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24969 a1c6a512-1295-4272-9138-f99709370657
* Fix dead parts of the wps when leaving it.Thomas Martitz2010-02-27
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24952 a1c6a512-1295-4272-9138-f99709370657
* fix 64bit warningJonathan Gordon2010-02-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24923 a1c6a512-1295-4272-9138-f99709370657
* split the theme settings apply() sutff out of settings_apply(). this should ↵Jonathan Gordon2010-02-26
| | | | | | | | | fix splashes not being loc'ed, statusbar over the splash (fixed in sim, not on my mini2g though), and the supposed boot time slowdown. What this also does is remove a bunch of unnecessary settings_Apply()'s from the ipod accessory code, and causes all non-skin settings to get applied each time (this includes font and langs which we wernt doing to stop disk access) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24922 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
* Fix FS#10983 - r24568 was just moronic. SorryJonathan Gordon2010-02-10
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24578 a1c6a512-1295-4272-9138-f99709370657
* unconditioannly show the main/base skins backdrop when enabling the theme so ↵Jonathan Gordon2010-02-08
| | | | | | plugins show the correct backdrop in menus git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24568 a1c6a512-1295-4272-9138-f99709370657
* revert r24478 and make the backdrop behaviour the same as it used to be (so ↵Jonathan Gordon2010-02-08
| | | | | | when in the wps the sbs' backdrop will be fully disabled). Also changes the API back to having to manually set the current backdrop. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24565 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
* Fix yellowsThomas Martitz2010-01-27
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24352 a1c6a512-1295-4272-9138-f99709370657
* Fix multiscreen handling of the viewportmanager.Thomas Martitz2010-01-27
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24351 a1c6a512-1295-4272-9138-f99709370657
* futile attempt to keep the ondioSP rombox working. This will almost ↵Jonathan Gordon2010-01-27
| | | | | | certainly be the last release with it. (The backdrop API is chaning very soon after release so this is no big deal) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24340 a1c6a512-1295-4272-9138-f99709370657
* Accept the last patch FS#10797 with a few changes by me (fixing side effects ↵Thomas Martitz2010-01-26
| | | | | | | | and adding the new backdrop_hide() to the multi screen api). It changes the hide_bars parameter to mean hide_theme. This makes plugins show the menu backdrop in their backdrop so that they don't look like crap if you have an sbs and look more integrated. I've test about all plugins and all work fine. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24335 a1c6a512-1295-4272-9138-f99709370657
* Simplify some expressions using the ? operatorBertrik Sikken2010-01-01
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24136 a1c6a512-1295-4272-9138-f99709370657
* fix FS#10870 - slightly change the viewportmanager theme undo-er to be able ↵Jonathan Gordon2009-12-21
| | | | | | 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
* 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
* fix red checkwpsJonathan Gordon2009-12-09
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23905 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
* Fix some drawing problems when displaying the WPS initially with sbs ↵Thomas Martitz2009-11-16
| | | | | | | | enabled. Move initial display of the wps to wps.c too. Should fix bug 3 of FS#10771. Also change GUI_EVENT_REFRESH event handling so that the passed drawing function is always called, not only when sbs or custom ui vp are used. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23644 a1c6a512-1295-4272-9138-f99709370657
* remove 3 bad viewport functions:Jonathan Gordon2009-11-11
| | | | | | | | | * viewport_set_current_vp() because if a screen wants to not use the user setting it shouldn't be dealing with the viewport manager at all (other than to disable the bars) * viewport_ui_vp_get_state() is unused (and not needed) * viewport_get_current_vp() because you should be using set_defaults() instead. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23606 a1c6a512-1295-4272-9138-f99709370657
* Fall back to info vp from sbs when intersection fails (again, r23575 changed ↵Thomas Martitz2009-11-10
| | | | | | it despite it was agreed on info vp beforehand). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23604 a1c6a512-1295-4272-9138-f99709370657