mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
text viewer: tv_window doesn't depend on the layout of the text viewer.
And display functions change the following. - some functions change to static functions. - fix the problem that font_changing flag is invalid value. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27165 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
31cf6d5013
commit
cf6554d891
3 changed files with 124 additions and 125 deletions
|
|
@ -44,75 +44,6 @@ bool tv_init_display(unsigned char **buf, size_t *size);
|
|||
/* finalize the display module */
|
||||
void tv_finalize_display(void);
|
||||
|
||||
|
||||
/* layout parts accessing functions */
|
||||
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
|
||||
/* show headaer */
|
||||
void tv_show_header(void);
|
||||
|
||||
/*
|
||||
* show footer
|
||||
*
|
||||
* [In] pos
|
||||
* the current position
|
||||
*/
|
||||
void tv_show_footer(const struct tv_screen_pos *pos);
|
||||
|
||||
/*
|
||||
* initialize the scrollbar
|
||||
*
|
||||
* [In] total
|
||||
* total text size
|
||||
*
|
||||
* [In] show_scrollbar
|
||||
* true: show the vertical scrollbar
|
||||
* false: does not show the vertical scrollbar
|
||||
*/
|
||||
void tv_init_scrollbar(off_t total, bool show_scrollbar);
|
||||
|
||||
/*
|
||||
* show horizontal/vertical scrollbar
|
||||
*
|
||||
* [In] window
|
||||
* the current window
|
||||
*
|
||||
* [In] col
|
||||
* the current column
|
||||
*
|
||||
* [In] cur_pos
|
||||
* the current text position
|
||||
*
|
||||
* [In] size
|
||||
* the size of text in displayed.
|
||||
*/
|
||||
void tv_show_scrollbar(int window, int col, off_t cur_pos, int size);
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* show bookmark
|
||||
*
|
||||
* [In] rows
|
||||
* the array of row where the bookmark
|
||||
*
|
||||
* [In] count
|
||||
* want to show bookmark count
|
||||
*/
|
||||
void tv_show_bookmarks(const int *rows, int count);
|
||||
|
||||
/* common display functons */
|
||||
|
||||
/* start the display processing */
|
||||
void tv_start_display(void);
|
||||
|
||||
/* end the display processing */
|
||||
void tv_end_display(void);
|
||||
|
||||
/*update the display */
|
||||
void tv_update_display(void);
|
||||
|
||||
/*
|
||||
* draw the text
|
||||
*
|
||||
|
|
@ -127,6 +58,52 @@ void tv_update_display(void);
|
|||
*/
|
||||
void tv_draw_text(int row, const unsigned char *text, int offset);
|
||||
|
||||
/*
|
||||
* show bookmark
|
||||
*
|
||||
* [In] rows
|
||||
* the array of row where the bookmark
|
||||
*
|
||||
* [In] count
|
||||
* want to show bookmark count
|
||||
*/
|
||||
void tv_show_bookmarks(const int *rows, int count);
|
||||
|
||||
/*
|
||||
* update extra parts (header, footer, scrollbar, etc.)
|
||||
*
|
||||
* [In] window
|
||||
* current window
|
||||
*
|
||||
* [In] col
|
||||
* current column
|
||||
*
|
||||
* [In] pos
|
||||
* current screen position (file position, page, line)
|
||||
*
|
||||
* [In] size
|
||||
* the size of text which is displayed.
|
||||
*/
|
||||
void tv_update_extra(int window, int col, const struct tv_screen_pos *pos, int size);
|
||||
|
||||
/*
|
||||
* initialize the scrollbar
|
||||
*
|
||||
* [In] total
|
||||
* total text size
|
||||
*
|
||||
* [In] show_scrollbar
|
||||
* true: show the vertical scrollbar
|
||||
* false: does not show the vertical scrollbar
|
||||
*/
|
||||
void tv_init_scrollbar(off_t total, bool show_scrollbar);
|
||||
|
||||
/* start the display processing */
|
||||
void tv_start_display(void);
|
||||
|
||||
/* end the display processing */
|
||||
void tv_end_display(void);
|
||||
|
||||
|
||||
/* layout functions */
|
||||
|
||||
|
|
@ -153,4 +130,13 @@ void tv_set_layout(bool show_scrollbar);
|
|||
*/
|
||||
void tv_get_drawarea_info(int *width, int *cols, int *rows);
|
||||
|
||||
/*
|
||||
* whether exist scrollbar
|
||||
*
|
||||
* return
|
||||
* true exist scrollbar
|
||||
* false does not exist scrollbar
|
||||
*/
|
||||
bool tv_exist_scrollbar(void);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue