icons: Provide accessors to the icon format (mono or native).
This is needed by the upcoming put_line() api to apply different drawmodes depending on the format. Change-Id: I626a7369a6e75c9c46af1ca5e4f1a9d401899b68
This commit is contained in:
parent
bc9a45b05f
commit
5752d029fd
2 changed files with 22 additions and 0 deletions
|
@ -277,3 +277,17 @@ int get_icon_height(enum screen_type screen_type)
|
|||
{
|
||||
return ICON_HEIGHT(screen_type);
|
||||
}
|
||||
|
||||
#if (LCD_DEPTH > 1) || defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)
|
||||
int get_icon_format(enum screen_type screen)
|
||||
{
|
||||
const struct bitmap *iconset;
|
||||
|
||||
if (iconsets[Iconset_user][screen].loaded)
|
||||
iconset = &iconsets[Iconset_user][screen].bmp;
|
||||
else
|
||||
iconset = inbuilt_iconset[screen];
|
||||
|
||||
return iconset->format;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -113,6 +113,14 @@ void icons_init(void);
|
|||
#else
|
||||
int get_icon_width(enum screen_type screen_type);
|
||||
int get_icon_height(enum screen_type screen_type);
|
||||
int get_icon_format(enum screen_type screen_type);
|
||||
#endif
|
||||
|
||||
#if (LCD_DEPTH > 1) || defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1) \
|
||||
&& !defined(HAVE_LCD_CHARCELLS)
|
||||
int get_icon_format(enum screen_type screen_type);
|
||||
#else
|
||||
# define get_icon_format(a) FORMAT_MONO
|
||||
#endif
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue