Commit Graph

113 Commits

Author SHA1 Message Date
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 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
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 e1c7b3b8f7 lcd-16bit: Remove {lss,lse,lst}_pattern fields from struct viewport.
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
2014-01-07 14:13:48 +01:00
Thomas Martitz 4978094480 lcd-common: Remove support for custom line heights from viewport.
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
2014-01-07 14:13:48 +01:00
Thomas Martitz 1c5d0b41ee scroll_engine: Rename scroll_stop* functions to be more consistent with the lcd api.
Change-Id: I8ada10b96bfb628cca0331689e8b936ae47c7e1c
2013-12-14 23:11:30 +01:00
Rafaël Carré b612263b1e apps: lcd-remote.h is not needed if HAVE_REMOTE_LCD is not defined
Fix a comment

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31608 a1c6a512-1295-4272-9138-f99709370657
2012-01-07 19:35:46 +00:00
Jonathan Gordon 1252d0d540 Get rid of a really annoying #ifdef line to check if backdrop support should be enabled
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31027 a1c6a512-1295-4272-9138-f99709370657
2011-11-19 13:46:25 +00:00
Jonathan Gordon f19f3efb07 Redo r30826 (and hopefully not reintroduce font issues) which cleans up the 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
2011-11-08 10:09:33 +00:00
Thomas Martitz 93c6c79e8d Better fix for FS#12337. Use 0 to make the line height calculated from the font height, as before r30773.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30850 a1c6a512-1295-4272-9138-f99709370657
2011-10-29 15:16:02 +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
Jonathan Gordon aa0f4a4bbe FS#12273 - use buflib for font storage. thanks to the testers :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30589 a1c6a512-1295-4272-9138-f99709370657
2011-09-24 13:19:34 +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 9928e3418f Another major skin backend update/hopefully bugfix:
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
2010-09-14 11:56:50 +00:00
Jonathan Gordon 2d31d77a8b FS#11470 - new skin code, finally svn uses the new parser from the theme 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
2010-07-29 12:37:48 +00:00
Bertrik Sikken 5565a28c7d Remove some redundant #include's
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27183 a1c6a512-1295-4272-9138-f99709370657
2010-06-29 20:13:22 +00:00
Jonathan Gordon a398c2846a Touchregion support for the Base Skin and FM Skins. display obviously needs 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
2010-06-21 06:04:19 +00:00
Jonathan Gordon 4f3fb96d34 bah
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26644 a1c6a512-1295-4272-9138-f99709370657
2010-06-07 04:11:49 +00:00
Jonathan Gordon 4e0b47cb4e this should be the last of the warnings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26643 a1c6a512-1295-4272-9138-f99709370657
2010-06-07 04:00:39 +00:00
Jonathan Gordon 32455131e7 fix errors
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26642 a1c6a512-1295-4272-9138-f99709370657
2010-06-07 03:55:40 +00:00
Jonathan Gordon 5b0521c9aa Changeover to the new skin format. SkinBreakingChange in the wiki has the 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
2010-06-07 03:44:11 +00:00
Jonathan Gordon 684b108666 fix red, but this might not be the best long term solution.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26278 a1c6a512-1295-4272-9138-f99709370657
2010-05-25 04:08:37 +00:00
Jonathan Gordon f557beac56 remove a stray printf
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26277 a1c6a512-1295-4272-9138-f99709370657
2010-05-25 04:06:18 +00:00
Jonathan Gordon 5c7be3e6cc fix FS#11321 - the x5 remote used the wrong colours
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26276 a1c6a512-1295-4272-9138-f99709370657
2010-05-25 04:02:09 +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
Jonathan Gordon 1759a299f1 fix FS#11100 - statusbar would show up on multiscreen targets if either screen had it enabled
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25159 a1c6a512-1295-4272-9138-f99709370657
2010-03-13 22:26:03 +00:00
Jonathan Gordon f1b209c057 fix yellow
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25039 a1c6a512-1295-4272-9138-f99709370657
2010-03-06 00:37:01 +00:00
Jonathan Gordon a9b5f4d810 cleanup statusbar+base skin relationship...
* 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
2010-03-06 00:29:46 +00:00
Teruaki Kawashima 38efc71615 set viewport to default one just for safe.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24969 a1c6a512-1295-4272-9138-f99709370657
2010-02-28 14:12:41 +00:00
Thomas Martitz 81ebf2be6f Fix dead parts of the wps when leaving it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24952 a1c6a512-1295-4272-9138-f99709370657
2010-02-27 21:19:34 +00:00
Jonathan Gordon 92f0aa85fc fix 64bit warning
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24923 a1c6a512-1295-4272-9138-f99709370657
2010-02-26 08:43:26 +00:00
Jonathan Gordon 4c6b3551b5 split the theme settings apply() sutff out of settings_apply(). this should 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
2010-02-26 08:01:41 +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
Jonathan Gordon f85103e8f2 remote multifont fixes. it shoud be working again (blame AlexP! he made me break it last week!)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24812 a1c6a512-1295-4272-9138-f99709370657
2010-02-21 19:10:09 +00:00
Jonathan Gordon 1c2aa35371 FS#10984 - multifont! 2 major additions:
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
2010-02-14 06:26:16 +00:00
Jonathan Gordon fd2fdc2d75 Fix FS#10983 - r24568 was just moronic. Sorry
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24578 a1c6a512-1295-4272-9138-f99709370657
2010-02-10 04:19:50 +00:00
Jonathan Gordon 9955e9a7df unconditioannly show the main/base skins backdrop when enabling the theme so plugins show the correct backdrop in menus
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24568 a1c6a512-1295-4272-9138-f99709370657
2010-02-08 17:19:15 +00:00
Jonathan Gordon 7e6f124d4e revert r24478 and make the backdrop behaviour the same as it used to be (so 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
2010-02-08 09:38:03 +00:00
Jonathan Gordon eee5423fe1 skin rework (FS#10922) notable changes:
- 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
2010-01-29 07:52:13 +00:00
Thomas Martitz e18e806930 Fix yellows
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24352 a1c6a512-1295-4272-9138-f99709370657
2010-01-27 20:45:42 +00:00
Thomas Martitz feb3a261c7 Fix multiscreen handling of the viewportmanager.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24351 a1c6a512-1295-4272-9138-f99709370657
2010-01-27 20:34:51 +00:00
Jonathan Gordon 2565389402 futile attempt to keep the ondioSP rombox working. This will almost 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
2010-01-27 06:47:56 +00:00
Thomas Martitz 5629d551d7 Accept the last patch FS#10797 with a few changes by me (fixing side effects 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
2010-01-26 20:14:42 +00:00
Bertrik Sikken 5c4ef78cc9 Simplify some expressions using the ? operator
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24136 a1c6a512-1295-4272-9138-f99709370657
2010-01-01 22:47:25 +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 0900b563f2 FS#10855 3 minor sbs bugs, spotted and fixed by Teruaki Kawashima
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24065 a1c6a512-1295-4272-9138-f99709370657
2009-12-18 06:51:36 +00:00
Jonathan Gordon dd9fbbf7c8 fix red checkwps
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23905 a1c6a512-1295-4272-9138-f99709370657
2009-12-09 07:44:08 +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
Thomas Martitz bdf2961ba3 Fix some drawing problems when displaying the WPS initially with sbs 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
2009-11-16 01:38:30 +00:00