1
0
Fork 0
forked from len0rd/rockbox

reduce size of the instance of struct style_text in lib/display.h (thanks to Teruaki Kawashima)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21614 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Johannes Schwarz 2009-07-02 17:02:47 +00:00
parent 278f1f69bb
commit bff790d692
2 changed files with 17 additions and 11 deletions

View file

@ -24,9 +24,9 @@
* basic usage:
* #define WORDS (sizeof text / sizeof (char*))
* char *text[] = {"normal", "centering", "red,underline"};
* struct style_text formation[WORDS]={
* [1] = { TEXT_CENTER },
* [2] = { C_RED|TEXT_UNDERLINE },
* struct style_text formation[]={
* { 1, TEXT_CENTER },
* { 2, C_RED|TEXT_UNDERLINE },
* };
* if (display_text(WORDS, text, formation, NULL))
* return PLUGIN_USB_CONNECTED;
@ -38,10 +38,11 @@ enum ecolor { STANDARD, C_YELLOW, C_RED, C_BLUE, C_GREEN , C_ORANGE };
#define TEXT_UNDERLINE 0x0200
struct style_text {
unsigned short index;
unsigned short flags;
};
/* style and vp_text is optional.
/* style and vp_text are optional.
* return true if usb is connected. */
bool display_text(short words, char** text, struct style_text* style,
struct viewport* vp_text);