Commit graph

152 commits

Author SHA1 Message Date
William Wilgus
3237ae4a4f LCD core move buf ptr and address look up function viewport struct
I'm currently running up against the limitations of the lcd_draw functions
I want these functions to be able to be used on any size buffer not
just buffers with a stride matching the underlying device

[DONE] allow the framebuffer to be decoupled from the device framebuffer
[DONE need examples] allow for some simple blit like transformations
[DONE] remove the device framebuffer from the plugin api
[DONE}ditto remote framebuffer
[DONE] remove _viewport_get_framebuffer you can call struct *vp = lcd_set_viewport(NULL) and vp->buffer->fb_ptr

while remote lcds may compile (and work in the sim) its not been tested on targets

[FIXED] backdrops need work to be screen agnostic

[FIXED] screen statusbar is not being combined into the main viewport correctly yet

[FIXED] screen elements are displayed incorrectly  after switch to void*

[FIXED] core didn't restore proper viewport on splash etc.

[NEEDS TESTING] remote lcd garbled data

[FIXED] osd lib garbled screen on bmp_part

[FIXED] grey_set_vp needs to return old viewport like lcd_set_viewport

[FIXED] Viewport update now handles viewports with differing buffers/strides by copying to the main buffer

[FIXED] splash on top of WPS leaves old framebuffer data (doesn't redraw)
[UPDATE] refined this a bit more to have clear_viewport set the clean bit and have skin_render do its own screen clear
scrolling viewports no longer trigger wps refresh
also fixed a bug where guisyncyesno was displaying and then disappearing

[ADDED!] New LCD macros that allow you to create properly size frame buffers in you desired size without wasting bytes
(LCD_ and LCD_REMOTE_)
LCD_STRIDE(w, h) same as STRIDE_MAIN
LCD_FBSTRIDE(w, h) returns target specific stride for a buffer W x H
LCD_NBELEMS(w, h) returns the number of fb_data sized elemenst needed for a buffer W x H
LCD_NATIVE_STRIDE(s) conversion between rockbox native vertical and lcd native stride (2bitH)
test_viewports.c has an example of usage

[FIXED!!] 2bit targets don't respect non-native strides
[FIXED] Few define snags

Change-Id: I0d04c3834e464eca84a5a715743a297a0cefd0af
2020-10-26 12:28:48 -04: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
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
William Wilgus
cb94b3ae2e keyboard add ability to specify temporary custom layouts
rb core allows you to load custom keyboard layouts

this patch adds the ability to load a keyboard layout in a buffer
the custom layout is temporary and does not overwrite the current layout

use like so:

    unsigned short kbd[64];
    unsigned short *kbd_p = kbd;
    if (!kbd_create_layout("ABCD1234\n", kbd, sizeof(kbd)))
        kbd_p = NULL;

    rb->kbd_input(buf,sizeof(buf), kbd_p);

Change-Id: I7be2bd4a1b4797a147fa70228a9749dc56ac052a
2020-07-22 06:48:28 -04:00
Amaury Pouly
d7871914ac Fix dangerous casts
On Windows 64-bit, the size of long is 32-bit, thus any pointer to long cast is
not valid. In any case, one should use intptr_t and ptrdiff_t when casting
to integers. This commit attempts to fix all instances reported by GCC.
When relevant, I replaced code by the macros PTR_ADD, ALIGN_UP from system.h

Change-Id: I2273b0e8465d3c4689824717ed5afa5ed238a2dc
2017-02-04 17:24:47 +01:00
Sebastian Leonhardt
e6cd53ad53 Replace SAMSUNG_YH920_PAD with YH92X
seems more logical to me, and is more consistent, since
"SAMSUNG_YH92X_PAD" is already used in the tex files.

Change-Id: Ie9a9d850ea86155a7dcf86c88a22a420a10a3837
2016-01-25 09:23:09 +01:00
Szymon Dziok
877bd982a7 YH820: Add a forgotten define in aa8ba60.
Change-Id: I89a0c21f2ca09f65a4d0b3e06b4b8fed3c07bef6
2014-10-08 16:47:16 +02:00
Szymon Dziok
aa8ba60fea YH820/YH92X: Properly enable morse input.
Change-Id: I6a35d64d0859b7ef429919c260a69974d6fdfafb
2014-10-08 16:31:39 +02:00
Roman
1fa3f5906e Swap over a position of cursor while reaching the end of filename in keyboard
In sansa clip + with virtual keyboard you can write/rename a stuff and move
your cursor in the filename field. But while your cursor reaches the end/start
of filename it just blocks the movement of cursor and beeps if you enabled the
"Voice Menu" feature. This patch swaps over cursor to the start/end of filename
instead of just blocking movement.

Change-Id: I37450df062df60ef4c0d747c13e448d0adbde05b
Reviewed-on: http://gerrit.rockbox.org/503
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2013-07-09 18:43:10 +02:00
Boris Gjenero
17ed3253fc Add const to global pointers to strings.
When a global pointer is not declared as constant, gcc will put it in
memory. Getting the address of the string it points to requires loading
the address of the pointer and then loading the pointer. When the pointer
is declared constant, the address of the string is loaded directly.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31345 a1c6a512-1295-4272-9138-f99709370657
2011-12-17 18:31:55 +00:00
Tomasz Moń
c40f5202a4 Sansa Connect: Add keymap for YesNo dialog and keyboard
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31090 a1c6a512-1295-4272-9138-f99709370657
2011-11-29 11:18:59 +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
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
Michael Sevakis
a2b6703a36 Commit FS#12150 - Fully-functional audio mixer - and finally whip old limitations about playback of voice and other sounds when paused. Channels are independent in state and amplitude. Fade on stop/pause is handled by the channel's volume control rather than global volume which means it now works from anywhere. Opens up the possibility of plugin sounds during music playback by merely adding an additional channel enum. If any PCM drivers were not properly modified, see one of the last comments in the task for a description of the simple change that is expected. Some params are tunable in firmware/export/pcm-mixer.h as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30097 a1c6a512-1295-4272-9138-f99709370657
2011-06-29 06:37:04 +00:00
Szymon Dziok
057806f67a HDD6330: Try to adapt the keys for the new touchpad code, remove the non existing buttons, enable morse input.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28306 a1c6a512-1295-4272-9138-f99709370657
2010-10-18 19:30:54 +00:00
Rafaël Carré
c78d55a311 kbd_input(): move sc assignement under #ifdef HAVE_TOUCHSCREEN
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28112 a1c6a512-1295-4272-9138-f99709370657
2010-09-19 08:17:02 +00:00
Nils Wallménius
f20c72a6f1 Remove old kluge that makes little difference with the new arm toolchain.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27761 a1c6a512-1295-4272-9138-f99709370657
2010-08-09 12:21:11 +00:00
Teruaki Kawashima
3d29faa011 keyboard: change how charactars are stored in the buffer.
* try to keep the layout when font is changed or when the buffer is fully used.
* don't waste the buffer by filling by spaces.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27370 a1c6a512-1295-4272-9138-f99709370657
2010-07-10 13:09:39 +00:00
Teruaki Kawashima
1a3b93cf7d FS#10925 by myself: add touchscreen support for virtual keyboard.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27156 a1c6a512-1295-4272-9138-f99709370657
2010-06-27 14:03:59 +00:00
Teruaki Kawashima
8903339444 keyboard: clean up. remove unneeded #ifdefs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26720 a1c6a512-1295-4272-9138-f99709370657
2010-06-09 12:08:25 +00:00
Marianne Arnold
e1a0e2cd7a Virtual keyboard: enable line edit mode as an alternative on all target. There were only a very few that didn't offer it yet. The KBD_MODES define could be removed too now but I leave that to someone else. ;)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26612 a1c6a512-1295-4272-9138-f99709370657
2010-06-06 08:43:02 +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
Teruaki Kawashima
62e6a2f9d8 keyboard: accept FS#11047 partially with some modifications. make some parts in switch() in kbd_input() to separate functions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24902 a1c6a512-1295-4272-9138-f99709370657
2010-02-25 06:40:36 +00:00
Teruaki Kawashima
ed21ab1c8c keyboard: check length of the last line. avoid dividing by 0.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24643 a1c6a512-1295-4272-9138-f99709370657
2010-02-14 05:00:41 +00:00
Teruaki Kawashima
4c658f74a7 keyboard: stretch dispalying of virtual keyboard to fit the screen width if possible.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24631 a1c6a512-1295-4272-9138-f99709370657
2010-02-13 13:10:32 +00:00
Szymon Dziok
9856f01d6a fix typo
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24601 a1c6a512-1295-4272-9138-f99709370657
2010-02-11 20:13:18 +00:00
Szymon Dziok
f8287b0e9f Packard Bell Vibe 500: correct main keymaps, enable full keyboard editing, enable morse input.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24600 a1c6a512-1295-4272-9138-f99709370657
2010-02-11 20:04:09 +00:00
Teruaki Kawashima
b1a6c9096d keyboard: make some parts of kbd_input into separate functions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24510 a1c6a512-1295-4272-9138-f99709370657
2010-02-04 14:53:45 +00:00
Teruaki Kawashima
e2359ac73b keyboard: a bit of rework in keyboard.
* remove hangul thing from struct keyboard_parameters.
* add new structure to hold state of edting and to be passed to functions.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24411 a1c6a512-1295-4272-9138-f99709370657
2010-01-31 13:38:47 +00:00
Teruaki Kawashima
b7f728d138 FS#10785: Add new context CONTEXT_MORSE_INPUT for keymaps which is used during morse input mode in virtual keyboard.
This will enable to use morse input on targets that doesn't have enough key for both the keyboard and morse input in one context.
Enable morse input on archosondio as an example.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24250 a1c6a512-1295-4272-9138-f99709370657
2010-01-16 13:54:10 +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
Teruaki Kawashima
7243fdcee3 keyboard: some random cleanup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23586 a1c6a512-1295-4272-9138-f99709370657
2009-11-09 14:26:20 +00:00
Teruaki Kawashima
40638bf2c7 Merge duplicating code to remove char in keyboard.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23569 a1c6a512-1295-4272-9138-f99709370657
2009-11-08 14:24:47 +00:00
Teruaki Kawashima
92fb1df03a FS#10338: Add "use morse input " entry to settings menu
* Remember last used text input mode (keyboard or morse input) in settings.
* Add setting "Use Morse Code Input" under Settings -> General Settings -> System.

Now it is possible for some of targets without button combo for changing input mode to use morse input by changing the setting. it's not possible for them to change input mode during in the keyboard screen of course.
There are still targets without morse input mode.

Flyspray: FS#10338
Author: myself, David Johnston

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23567 a1c6a512-1295-4272-9138-f99709370657
2009-11-08 13:14:50 +00:00
Teruaki Kawashima
b6cd045767 Merge duplicating code to move cursor left/right.
remove ACTION_KBD_SELECT_REM, use ACTION_KBD_SELECT instead as they seem to be equivalent.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23543 a1c6a512-1295-4272-9138-f99709370657
2009-11-06 12:53:02 +00:00
Teruaki Kawashima
145c679c7d Complete r22917. The icon still overlapped the text slightly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22982 a1c6a512-1295-4272-9138-f99709370657
2009-10-06 13:17:58 +00:00
Teruaki Kawashima
61dc1c507c Fix FS#7511, icon could overlap the line to edit.
clean up code a bit.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22917 a1c6a512-1295-4272-9138-f99709370657
2009-10-04 14:45:29 +00:00
Teruaki Kawashima
ccf2078150 Fix FS#10597: Loadable keyboard layout rendered incorrectly.
Also fix out of bounds access to kbd_buf.
Reset cursor position in keyboard when loading new virtual keyboard for the case size is different from previous one.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22892 a1c6a512-1295-4272-9138-f99709370657
2009-10-03 13:53:49 +00:00
Thomas Martitz
8301b69951 Samsung YH: Many keymap fixes for keyboard screen, wps, set time/date and quickscreen. Little kludge for quickscreen: Entering the quickscreen requires pressing 2 directional buttons (left and down), but that's really easy to do actually, much easier than messing with the side buttons (which don't even work reliably), accidental option changes shouldn't be possible due to use of precondition.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22551 a1c6a512-1295-4272-9138-f99709370657
2009-08-29 22:18:02 +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
Thomas Martitz
50d09bd84c Fix yellows.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22271 a1c6a512-1295-4272-9138-f99709370657
2009-08-12 14:51:16 +00:00
Thomas Martitz
3290f1f025 Both of this isn't needed anymore as it's done at the end of the function.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22270 a1c6a512-1295-4272-9138-f99709370657
2009-08-12 14:51:12 +00:00
Thomas Martitz
18e40e0f4c Make kbd_input() show a cancel splash to indicate user abort better and for better consistency all over the place. Change checking for its return value (style-wise) at some places too.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22269 a1c6a512-1295-4272-9138-f99709370657
2009-08-12 14:38:25 +00:00
Marianne Arnold
78c3f1c8b3 Forgot to commit the change to keyboard.c to make the line edit mode acctually work on the c200. (belongs to r21373)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21381 a1c6a512-1295-4272-9138-f99709370657
2009-06-20 11:03:52 +00:00
Bertrik Sikken
09085a30f6 Remove unneeded #include "backdrop.h"
Remove unneeded #include "statusbar.h"


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20891 a1c6a512-1295-4272-9138-f99709370657
2009-05-09 18:09:14 +00:00
Thomas Martitz
842d2bc1c3 Some Sansa Fuze keymap work, enable line editing for the keyboard, copy from the e200 keymap mostly, but use the home key for some jobs (stopping playback, exiting some screens,i.e. what REC+POWER do on the e200 is only home on the fuze)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20578 a1c6a512-1295-4272-9138-f99709370657
2009-03-30 15:45:15 +00:00
Nicolas Pennequin
396aeafa6c Correct Björn's name in various file headers.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20491 a1c6a512-1295-4272-9138-f99709370657
2009-03-23 17:08:46 +00:00
Bertrik Sikken
4a70a076ed Fix red.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20250 a1c6a512-1295-4272-9138-f99709370657
2009-03-08 20:57:37 +00:00
Jonathan Gordon
701a593c5d continuation of last nights statusbar cleanup.
accept FS#9858 and FS#9859
make the rec and fm screens force the statusbar the correct way now which doesnt need extra status variables


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19904 a1c6a512-1295-4272-9138-f99709370657
2009-02-02 03:14:51 +00:00