From 5752d029fd80e87fe522d7d5e952a56dc371d65e Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Sat, 28 Dec 2013 15:10:46 +0100 Subject: 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 --- apps/gui/icon.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'apps/gui/icon.c') diff --git a/apps/gui/icon.c b/apps/gui/icon.c index e943338af5..73f37e5140 100644 --- a/apps/gui/icon.c +++ b/apps/gui/icon.c @@ -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 -- cgit v1.2.3