1
0
Fork 0
forked from len0rd/rockbox
foxbox/apps/plugins/text_viewer
Thomas Martitz abdc5935be Introduce plugin_crt0.c that every plugin links.
It handles exit() properly, calling the handler also when the plugin returns
normally (also it makes exit() more standard compliant while at it).
It also holds PLUGIN_HEADER, so that it doesn't need to be in each plugin anymore.

To work better together with callbacks passed to rb->default_event_handler_ex introduce exit_on_usb() which will call the exit handler before showing the usb screen and exit() after it.
In most cases it was passed a callback which was manually called at all other return points. This can now be done via atexit().

In future plugin_crt0.c could also handle clearing bss, initializing iram and more.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27862 a1c6a512-1295-4272-9138-f99709370657
2010-08-23 16:56:49 +00: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 Introduce plugin_crt0.c that every plugin links. 2010-08-23 16:56:49 +00:00
text_viewer.make reworks text viewer plugin. (FS#11209) 2010-06-05 10:30:08 +00:00
tv_action.c Introduce plugin_crt0.c that every plugin links. 2010-08-23 16:56:49 +00:00
tv_action.h Introduce plugin_crt0.c that every plugin links. 2010-08-23 16:56:49 +00:00
tv_bookmark.c text viewer: for tv_action and tv_bookmark, the prototype of the initializer is the same arguments as other modules. 2010-07-02 12:16:47 +00:00
tv_bookmark.h text viewer: for tv_action and tv_bookmark, the prototype of the initializer is the same arguments as other modules. 2010-07-02 12:16:47 +00:00
tv_button.h text viewer: gigabeat f: add buttons to do one line up/down, and one column left/right. 2010-06-07 13:01:15 +00:00
tv_display.c text_viewer: remove unneeded code. 2010-07-12 13:38:40 +00:00
tv_display.h text viewer: move and delete #include. 2010-06-29 11:37:58 +00:00
tv_menu.c text viewer: some members of preferences change to bool. And simplify menu setting functions. 2010-06-29 12:23:41 +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: callback functions are changed to the function that returns int value. 2010-06-29 11:05:36 +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 text viewer: some members of preferences change to bool. And simplify menu setting functions. 2010-06-29 12:23:41 +00:00
tv_preferences.h text viewer: some members of preferences change to bool. And simplify menu setting functions. 2010-06-29 12:23:41 +00:00
tv_reader.c text viewer: 2010-07-01 11:31:28 +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 text viewer: fixed the following bugs. 2010-07-07 12:07:23 +00:00
tv_settings.h text_viewer: callback functions are changed to the function that returns int value. 2010-06-29 11:05:36 +00:00
tv_text_processor.c text viewer: reworks screen access logics and some bugs fix. 2010-06-26 09:14:53 +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.)