rockbox/apps/plugins/text_viewer
Simon Rothen 0b5ad60c26 Introducing Targets iBasso DX50 & iBasso DX90
The port to for this two targets has been entirely developped by Ilia Sergachev (alias Il or xzcc). His source
can be found at https://bitbucket.org/isergachev/rockbox . The few necesary modifications for the DX90 port
was done by headwhacker form head-fi.org. Unfortunately i could not try out the final state of the DX90 port.
The port is hosted on android (without java) as standalone app. The official Firmware is required to run this port.
Ilia did modify the source files for the "android" target in the rockbox source to make the DX port work. The work I did
was to separate the code for DX50 (&DX90) from the android target.
On this Target Ilia used source from tinyalsa from AOSP. I did not touch that part of the code because I do not understand it.
What else I changed from Ilias sources besides the separation from the target "android":
* removed a dirty hack to keep backlight off
* changed value battery meter to voltage battery meter
* made all plugins compile (named target as "standalone") and added keymaps
* i added the graphics for the manual but did not do anything else for the manual yet
* minor optimizations

known bugs:
* timers are slowed donw when playback is active (tinyalsa related?)
* some minor bugs

Things to do:
* The main prolem will be how to install the app correctly. A guy called DOC2008 added a CWM (by androtab.info) to the
  official firmware and Ilia made a CWM installation script and a dualboot selector (rbutils/ibassoboot, build with
  ndk-build). We will have to find a way to install rockbox in a proper way without breaking any copyrights.
  Maybe ADB is an option but it is not enable with OF by default. Patching the OF is probably the way to go.
* All the wiki and manual

to build:
needed: android ndk installed, android sdk installed with additional build-tools 19.1.0 installed

./tools/configure
select iBasso DX50 or iBasso DX90
make -j apk

the content of rockbox.zip/.rockbox needs to be copied to /system/rockbox/app_rockbox/rockbox/ (rockbox app not needed)
the content of libs/armeabi to /system/rockbox/lib/ (rockbox app needed)

The boot selector is needed as /system/bin/MangoPlayer and the iBasso app as /system/bin/MangoPlayer_original. There
is also the "vold" file. The one from OF does not work with DX50 rockbox (DX90 works!?), the one from Ilia is necessary.

Until we have found a proper way to install it, it can only be installed following the instructions of Ilia on his
bitbucket page, using the CWM-OF and his installation script package.

Change-Id: Ic4faaf84824c162aabcc08e492cee6e0068719d0
Reviewed-on: http://gerrit.rockbox.org/941
Tested: Chiwen Chang <rock1104.tw@yahoo.com.tw>
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2014-09-18 18:19:01 +02:00
..
readme.txt text viewer: can select the indent spaces when the line mode is reflow. 2010-06-11 11:13:02 +00:00
SOURCES text viewer: reworks screen access logics and some bugs fix. 2010-06-26 09:14:53 +00:00
text_viewer.c Fix nearly all residual 'variable set but not used' warnings reported from GCC 4.6.0. 2011-05-01 14:44:20 +00:00
text_viewer.make reworks text viewer plugin. (FS#11209) 2010-06-05 10:30:08 +00:00
tv_action.c Boost CPU before loading operations in textviewer 2014-04-01 02:37:32 +02:00
tv_action.h Second try: Introduce plugin_crt0.c that every plugin links. 2010-08-24 14:30:46 +00:00
tv_bookmark.c Boost CPU before loading operations in textviewer 2014-04-01 02:37:32 +02:00
tv_bookmark.h Commit FS#11799 by Alexander Meshcheryakov. Improves the text viewer plugin to write to the disk less often, and correct several minor bugs. 2010-12-14 21:33:45 +00:00
tv_button.h Introducing Targets iBasso DX50 & iBasso DX90 2014-09-18 18:19:01 +02:00
tv_display.c Text viewer plugin: Fix info viewport font not being set to user selected font 2011-11-30 03:06:41 +00:00
tv_display.h text viewer: move and delete #include. 2010-06-29 11:37:58 +00:00
tv_menu.c FS#11822: use rockbox_browse() in plugins to select file. 2011-01-17 12:40:21 +00:00
tv_menu.h text_viewer: callback functions are changed to the function that returns int value. 2010-06-29 11:05:36 +00:00
tv_pager.c text viewer: 2010-10-06 12:35:37 +00:00
tv_pager.h FS#11399 by me: fix r26998 for text_viewer 2010-06-23 13:56:08 +00:00
tv_preferences.c FS#12273 - use buflib for font storage. thanks to the testers :) 2011-09-24 13:19:34 +00:00
tv_preferences.h FS#12273 - use buflib for font storage. thanks to the testers :) 2011-09-24 13:19:34 +00:00
tv_reader.c text viewer: 2010-10-06 12:35:37 +00:00
tv_reader.h FS#11399 by me: fix r26998 for text_viewer 2010-06-23 13:56:08 +00:00
tv_screen_pos.c reworks text viewer plugin. (FS#11209) 2010-06-05 10:30:08 +00:00
tv_screen_pos.h reworks text viewer plugin. (FS#11209) 2010-06-05 10:30:08 +00:00
tv_settings.c FS#12273 - use buflib for font storage. thanks to the testers :) 2011-09-24 13:19:34 +00:00
tv_settings.h Commit FS#11799 by Alexander Meshcheryakov. Improves the text viewer plugin to write to the disk less often, and correct several minor bugs. 2010-12-14 21:33:45 +00:00
tv_text_processor.c FS#12273 - use buflib for font storage. thanks to the testers :) 2011-09-24 13:19:34 +00:00
tv_text_processor.h FS#11399 by me: fix r26998 for text_viewer 2010-06-23 13:56:08 +00:00
tv_text_reader.c FS#11399 by me: fix r26998 for text_viewer 2010-06-23 13:56:08 +00:00
tv_text_reader.h FS#11399 by me: fix r26998 for text_viewer 2010-06-23 13:56:08 +00:00
tv_window.c text viewer: 2010-07-01 11:31:28 +00:00
tv_window.h FS#11399 by me: fix r26998 for text_viewer 2010-06-23 13:56:08 +00:00

about the text viewer plugin.

Limitation
    for the target which PLUGIN_BUFFER_SIZE < 0x13000 (i.e., archos series),
    can only be read up to 999 pages.


Difference between viewer.rock
    [settings file]
       - the global setting, 'tv_global.dat' is stored.
       - Settings and bookmarks for each file, 'tv_file.dat' is stored.

      Note: when viewer.dat(viewer_file.dat) exists, tv_global.dat(tv_file.dat) is created by
            using viewer.dat(viewer_file.dat).

    [wod wrap]
          - add the following characters which can be split the line.
                '!', ',', '.', ':', ';', '?', 
                U+00b7, U+2010, U+3000, U+3001, U+3002, U+30fb, U+30fc, 
                U+ff01, U+ff0c, U+ff0d, U+ff0e, U+ff1a, U+ff1b, U+ff1f.

          - when the line split, if the line length is short ( < 0.75 * display width), 
            split the line in display width. (thus, maybe split a word)

    [line mode]
       [join]
           - break line condition has changed.
               - If the next line is a blank line or spaces only line, this line breaks.

       [reflow]
           - indent changes is two spaces (changable in the settings).
           - supports the player which does not define HAVE_LCD_BITMAP.

    [alignment]
           - the right alignment supports the player which does not define HAVE_LCD_BITMAP.

    [bookmark]
           - increased to 16 the number of bookmarks that can be registered.


TODO list
  - for the target which PLUGIN_BUFFER_SIZE < 0x13000 (i.e., archos series),   
    supports more than 999 pages of text.

  - add History feature.

  - draw images that are linked to the text. (<img src="...">)

  - play audios that are linked to the text. (<audio src="...">)

  - more treatments of line breaking, word wrappings.
    (for example, period does not appear the top of line.)