rockbox/apps/plugins/text_viewer
Aidan MacDonald 3a57f2f721 Add "rbfs" prefix to native filesystem functions
Most of the churn here occurs because 'filesize' is one of
the redefined filesystem functions, but some of the structs
used by the native FS code also include a 'filesize' member
variable which gets renamed by the macro in some but not all
source files.

It's easier to rename 'filesize()' to 'ffilesize()' rather
than try to clean up the macro mess or renaming the struct
members.

There is weirdness with root_realpath() which now breaks on
native builds because it was assumed to be unprefixed there.
dir_get_info() was unprefixed everywhere but this just seems
inconsistent; make it follow the FS_PREFIX() convention too.

Change-Id: Ic3700c6234ea45f32679c1a8429d70fdb8f4088a
2026-09-17 16:22:31 -04:00
..
readme.txt Remove some SWCODEC artifacts 2020-11-14 19:20:33 -05:00
SOURCES text viewer: reworks screen access logics and some bugs fix. 2010-06-26 09:14:53 +00:00
text_viewer.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
text_viewer.make chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tv_action.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tv_action.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tv_bookmark.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tv_bookmark.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tv_button.h 3ds: Port refactor. 2026-09-01 08:39:07 -04:00
tv_display.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tv_display.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tv_menu.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tv_menu.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tv_pager.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tv_pager.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tv_preferences.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tv_preferences.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tv_reader.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
tv_reader.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tv_screen_pos.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tv_screen_pos.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tv_settings.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tv_settings.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tv_text_processor.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tv_text_processor.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tv_text_reader.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tv_text_reader.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tv_window.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tv_window.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00

About the text viewer plugin.

Limitation
    for targets where PLUGIN_BUFFER_SIZE < 0x13000,
    Only 999 pages can be read.
    


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).

    [word 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).

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


TODO list
  - for the target which PLUGIN_BUFFER_SIZE < 0x13000,   
    support 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.)