summaryrefslogtreecommitdiffstats
path: root/apps/gui
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-07-17 10:31:31 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-07-24 21:20:13 +0000
commit658026e6267277b27d297c481728f74d160a8481 (patch)
tree915a9d2bb48469bdd5b9127dc19a61f230721a6c /apps/gui
parent8cb555460ff79e636a7907fb2589e16db98c8600 (diff)
downloadrockbox-658026e6267277b27d297c481728f74d160a8481.tar.gz
rockbox-658026e6267277b27d297c481728f74d160a8481.zip
[4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.
Note: I left behind lcd_bitmap in features.txt, because removing it would require considerable work in the manual and the translations. Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/bitmap/list-skinned.c6
-rw-r--r--apps/gui/icon.c4
-rw-r--r--apps/gui/icon.h4
-rw-r--r--apps/gui/line.c2
-rw-r--r--apps/gui/list.c44
-rw-r--r--apps/gui/list.h8
-rw-r--r--apps/gui/scrollbar.c3
-rw-r--r--apps/gui/scrollbar.h3
-rw-r--r--apps/gui/skin_engine/skin_display.c19
-rw-r--r--apps/gui/skin_engine/skin_display.h2
-rw-r--r--apps/gui/skin_engine/skin_engine.c10
-rw-r--r--apps/gui/skin_engine/skin_engine.h5
-rw-r--r--apps/gui/skin_engine/skin_parser.c53
-rw-r--r--apps/gui/skin_engine/skin_render.c38
-rw-r--r--apps/gui/skin_engine/skin_tokens.c6
-rw-r--r--apps/gui/skin_engine/wps_internals.h14
-rw-r--r--apps/gui/splash.c22
-rw-r--r--apps/gui/statusbar-skinned.h11
-rw-r--r--apps/gui/statusbar.c12
-rw-r--r--apps/gui/usb_screen.c27
-rw-r--r--apps/gui/viewport.c30
-rw-r--r--apps/gui/viewport.h3
-rw-r--r--apps/gui/wps.c7
-rw-r--r--apps/gui/yesno.c2
24 files changed, 15 insertions, 320 deletions
diff --git a/apps/gui/bitmap/list-skinned.c b/apps/gui/bitmap/list-skinned.c
index d6b868ae26..f0396263f3 100644
--- a/apps/gui/bitmap/list-skinned.c
+++ b/apps/gui/bitmap/list-skinned.c
@@ -236,7 +236,7 @@ bool skinlist_draw(struct screen *display, struct gui_synclist *list)
int cols = (parent->width / listcfg[screen]->width);
current_column = (cur_line)%cols;
current_row = (cur_line)/cols;
-
+
skin_viewport->vp.x = parent->x + listcfg[screen]->width*current_column + original_x;
skin_viewport->vp.y = parent->y + listcfg[screen]->height*current_row + original_y;
}
@@ -249,7 +249,6 @@ bool skinlist_draw(struct screen *display, struct gui_synclist *list)
(listcfg[screen]->height*cur_line);
}
display->set_viewport(&skin_viewport->vp);
-#ifdef HAVE_LCD_BITMAP
/* Set images to not to be displayed */
struct skin_token_list *imglist = SKINOFFSETTOPTR(get_skin_buffer(wps.data), wps.data->images);
while (imglist)
@@ -259,13 +258,10 @@ bool skinlist_draw(struct screen *display, struct gui_synclist *list)
img->display = -1;
imglist = SKINOFFSETTOPTR(get_skin_buffer(wps.data), imglist->next);
}
-#endif
struct skin_element** children = SKINOFFSETTOPTR(get_skin_buffer(wps.data), viewport->children);
skin_render_viewport(SKINOFFSETTOPTR(get_skin_buffer(wps.data), (intptr_t)children[0]),
&wps, skin_viewport, SKIN_REFRESH_ALL);
-#ifdef HAVE_LCD_BITMAP
wps_display_images(&wps, &skin_viewport->vp);
-#endif
/* force disableing scroll because it breaks later */
if (!is_selected)
{
diff --git a/apps/gui/icon.c b/apps/gui/icon.c
index db3ae2c96b..5190c54ea5 100644
--- a/apps/gui/icon.c
+++ b/apps/gui/icon.c
@@ -144,11 +144,7 @@ void screen_put_iconxy(struct screen * display,
void screen_put_cursorxy(struct screen * display, int x, int y, bool on)
{
-#ifdef HAVE_LCD_BITMAP
screen_put_icon(display, x, y, on?Icon_Cursor:0);
-#else
- screen_put_icon(display, x, y, on?CURSOR_CHAR:-1);
-#endif
}
static int buflib_move_callback(int handle, void* current, void* new)
diff --git a/apps/gui/icon.h b/apps/gui/icon.h
index 88449c61ca..4165391316 100644
--- a/apps/gui/icon.h
+++ b/apps/gui/icon.h
@@ -24,11 +24,7 @@
#include "screen_access.h"
/* Defines a type for the icons since it's not the same thing on
* char-based displays and bitmap displays */
-#ifdef HAVE_LCD_BITMAP
typedef const unsigned char * ICON;
-#else
-typedef long ICON;
-#endif
/* Don't #ifdef icon values, or we wont be able to use the same
bmp for every target. */
diff --git a/apps/gui/line.c b/apps/gui/line.c
index ea6bcea93b..d319ff3c51 100644
--- a/apps/gui/line.c
+++ b/apps/gui/line.c
@@ -294,7 +294,6 @@ next:
}
}
-#ifdef HAVE_LCD_BITMAP
static void style_line(struct screen *display,
int x, int y, struct line_desc *line)
{
@@ -380,7 +379,6 @@ static void style_line(struct screen *display,
}
#endif
}
-#endif /* HAVE_LCD_BITMAP */
void vput_line(struct screen *display,
int x, int y, struct line_desc *line,
diff --git a/apps/gui/list.c b/apps/gui/list.c
index b1120aa794..ee4684233f 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -47,17 +47,14 @@
*/
#define FRAMEDROP_TRIGGER 6
-#ifdef HAVE_LCD_BITMAP
static int offset_step = 16; /* pixels per screen scroll step */
/* should lines scroll out of the screen */
static bool offset_out_of_view = false;
-#endif
static void gui_list_select_at_offset(struct gui_synclist * gui_list,
int offset);
void list_draw(struct screen *display, struct gui_synclist *list);
-#ifdef HAVE_LCD_BITMAP
static long last_dirty_tick;
static struct viewport parent[NB_SCREENS];
@@ -92,23 +89,7 @@ static void list_init_viewports(struct gui_synclist *list)
}
list->dirty_tick = current_tick;
}
-#else
-static struct viewport parent[NB_SCREENS] =
-{
- [SCREEN_MAIN] =
- {
- .x = 0,
- .y = 0,
- .width = LCD_WIDTH,
- .height = LCD_HEIGHT
- },
-};
-
-#define list_init_viewports(a)
-#define list_is_dirty(a) false
-#endif
-#ifdef HAVE_LCD_BITMAP
static int list_nb_lines(struct gui_synclist *list, enum screen_type screen)
{
struct viewport *vp = list->parent[screen];
@@ -148,13 +129,6 @@ void list_init_item_height(struct gui_synclist *list, enum screen_type screen)
#endif
}
-#else
-#define list_display_title(l, i) false
-#define list_get_nb_lines(list, screen) \
- viewport_get_nb_lines((list)->parent[(screen)]);
-#define list_init_item_height(l, i)
-#endif
-
/*
* Initializes a scrolling list
* - gui_list : the list structure to initialize
@@ -181,9 +155,7 @@ void gui_synclist_init(struct gui_synclist * gui_list,
FOR_NB_SCREENS(i)
{
gui_list->start_item[i] = 0;
-#ifdef HAVE_LCD_BITMAP
gui_list->offset_position[i] = 0;
-#endif
if (list_parent)
gui_list->parent[i] = &list_parent[i];
else
@@ -216,7 +188,6 @@ void gui_synclist_hide_selection_marker(struct gui_synclist * lists, bool hide)
}
-#ifdef HAVE_LCD_BITMAP
int gui_list_get_item_offset(struct gui_synclist * gui_list,
int item_width,
int text_pos,
@@ -248,7 +219,6 @@ int gui_list_get_item_offset(struct gui_synclist * gui_list,
return item_offset;
}
-#endif
/*
* Force a full screen update.
@@ -264,9 +234,7 @@ void gui_synclist_draw(struct gui_synclist *gui_list)
}
FOR_NB_SCREENS(i)
{
-#ifdef HAVE_LCD_BITMAP
if (!skinlist_draw(&screens[i], gui_list))
-#endif
list_draw(&screens[i], gui_list);
}
}
@@ -481,7 +449,6 @@ void gui_synclist_del_item(struct gui_synclist * gui_list)
}
}
-#ifdef HAVE_LCD_BITMAP
void gui_list_screen_scroll_step(int ofs)
{
offset_step = ofs;
@@ -491,7 +458,6 @@ void gui_list_screen_scroll_out_of_view(bool enable)
{
offset_out_of_view = enable;
}
-#endif /* HAVE_LCD_BITMAP */
/*
* Set the title and title icon of the list. Setting title to NULL disables
@@ -502,22 +468,18 @@ void gui_synclist_set_title(struct gui_synclist * gui_list,
{
gui_list->title = title;
gui_list->title_icon = icon;
-#ifdef HAVE_LCD_BITMAP
FOR_NB_SCREENS(i)
sb_set_title_text(title, icon, i);
-#endif
send_event(GUI_EVENT_ACTIONUPDATE, (void*)1);
}
void gui_synclist_set_nb_items(struct gui_synclist * lists, int nb_items)
{
lists->nb_items = nb_items;
-#ifdef HAVE_LCD_BITMAP
FOR_NB_SCREENS(i)
{
lists->offset_position[i] = 0;
}
-#endif
}
int gui_synclist_get_nb_items(struct gui_synclist * lists)
{
@@ -576,7 +538,6 @@ void gui_synclist_limit_scroll(struct gui_synclist * lists, bool scroll)
lists->limit_scroll = scroll;
}
-#ifdef HAVE_LCD_BITMAP
/*
* Makes all the item in the list scroll by one step to the right.
* Should stop increasing the value when reaching the widest item value
@@ -608,7 +569,6 @@ static void gui_synclist_scroll_left(struct gui_synclist * lists)
lists->offset_position[i] = 0;
}
}
-#endif /* HAVE_LCD_BITMAP */
bool gui_synclist_keyclick_callback(int action, void* data)
{
@@ -652,9 +612,7 @@ bool gui_synclist_do_button(struct gui_synclist * lists,
int *actionptr, enum list_wrap wrap)
{
int action = *actionptr;
-#ifdef HAVE_LCD_BITMAP
static bool pgleft_allow_cancel = false;
-#endif
#ifdef HAVE_WHEEL_ACCELERATION
int next_item_modifier = button_apply_acceleration(get_action_data());
@@ -753,7 +711,6 @@ bool gui_synclist_do_button(struct gui_synclist * lists,
*actionptr = ACTION_STD_NEXT;
return true;
-#ifdef HAVE_LCD_BITMAP
case ACTION_TREE_PGRIGHT:
gui_synclist_scroll_right(lists);
gui_synclist_draw(lists);
@@ -784,7 +741,6 @@ bool gui_synclist_do_button(struct gui_synclist * lists,
pgleft_allow_cancel = false; /* stop ACTION_TREE_PAGE_LEFT
skipping to root */
return true;
-#endif
/* for pgup / pgdown, we are obliged to have a different behaviour depending
* on the screen for which the user pressed the key since for example, remote
* and main screen doesn't have the same number of lines */
diff --git a/apps/gui/list.h b/apps/gui/list.h
index 9107bf0591..f860e27bf9 100644
--- a/apps/gui/list.h
+++ b/apps/gui/list.h
@@ -102,9 +102,7 @@ struct gui_synclist
int selected_size;
/* the number of pixels each line occupies (including optional padding on touchscreen */
int line_height[NB_SCREENS];
-#ifdef HAVE_LCD_BITMAP
int offset_position[NB_SCREENS]; /* the list's screen scroll placement in pixels */
-#endif
long scheduled_talk_tick, last_talked_tick, dirty_tick;
list_get_icon *callback_get_item_icon;
@@ -127,14 +125,12 @@ struct gui_synclist
};
-#ifdef HAVE_LCD_BITMAP
extern void list_init(void);
/* parse global setting to static int */
extern void gui_list_screen_scroll_step(int ofs);
/* parse global setting to static bool */
extern void gui_list_screen_scroll_out_of_view(bool enable);
-#endif /* HAVE_LCD_BITMAP */
extern void gui_synclist_init(
struct gui_synclist * lists,
@@ -179,7 +175,7 @@ extern bool gui_synclist_keyclick_callback(int action, void* data);
extern bool gui_synclist_do_button(struct gui_synclist * lists,
int *action,
enum list_wrap);
-#if defined(HAVE_LCD_BITMAP) && !defined(PLUGIN)
+#if !defined(PLUGIN)
struct listitem_viewport_cfg {
struct wps_data *data;
OFFSETTYPE(char *) label;
@@ -204,7 +200,7 @@ enum themable_icons skinlist_get_item_icon(int offset, bool wrap);
bool skinlist_needs_scrollbar(enum screen_type screen);
void skinlist_get_scrollbar(int* nb_item, int* first_shown, int* last_shown);
int skinlist_get_line_count(enum screen_type screen, struct gui_synclist *list);
-#endif
+#endif /* !PLUGIN) */
#if defined(HAVE_TOUCHSCREEN)
/* this needs to be fixed if we ever get more than 1 touchscreen on a target */
diff --git a/apps/gui/scrollbar.c b/apps/gui/scrollbar.c
index 2e4bd8580c..532659e580 100644
--- a/apps/gui/scrollbar.c
+++ b/apps/gui/scrollbar.c
@@ -20,7 +20,6 @@
****************************************************************************/
#include "scrollbar.h"
-#ifdef HAVE_LCD_BITMAP
#include "config.h"
#include "limits.h"
#include "bmp.h"
@@ -264,5 +263,3 @@ void show_busy_slider(struct screen *s, int x, int y, int width, int height)
dir = 1;
}
}
-
-#endif /* HAVE_LCD_BITMAP */
diff --git a/apps/gui/scrollbar.h b/apps/gui/scrollbar.h
index dcaef5721d..fa0907c686 100644
--- a/apps/gui/scrollbar.h
+++ b/apps/gui/scrollbar.h
@@ -23,8 +23,6 @@
#define _GUI_SCROLLBAR_H_
#include "screen_access.h"
-#ifdef HAVE_LCD_BITMAP
-
enum orientation {
VERTICAL = 0x0000, /* Vertical orientation */
HORIZONTAL = 0x0001, /* Horizontal orientation */
@@ -64,5 +62,4 @@ extern void gui_bitmap_scrollbar_draw(struct screen * screen, struct bitmap *bm,
unsigned flags);
extern void show_busy_slider(struct screen *s, int x, int y,
int width, int height);
-#endif /* HAVE_LCD_BITMAP */
#endif /* _GUI_SCROLLBAR_H_ */
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c
index 345d74b65c..bd3a2b40aa 100644
--- a/apps/gui/skin_engine/skin_display.c
+++ b/apps/gui/skin_engine/skin_display.c
@@ -47,14 +47,12 @@
#include "list.h"
#include "option_select.h"
-#ifdef HAVE_LCD_BITMAP
#include "peakmeter.h"
/* Image stuff */
#include "bmp.h"
#ifdef HAVE_ALBUMART
#include "albumart.h"
#endif
-#endif
#include "cuesheet.h"
#include "playback.h"
@@ -93,9 +91,6 @@ void skin_update(enum skinnable_screens skin, enum screen_type screen,
SKIN_REFRESH_ALL : update_type);
}
-#ifdef HAVE_LCD_BITMAP
-
-
#ifdef AB_REPEAT_ENABLE
#define DIRECTION_RIGHT 1
@@ -171,7 +166,7 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb)
int x = pb->x, y = pb->y, width = pb->width, height = pb->height;
unsigned long length, end;
int flags = HORIZONTAL;
-
+
if (height < 0)
height = font_get(vp->font)->height;
@@ -423,8 +418,6 @@ void wps_display_images(struct gui_wps *gwps, struct viewport* vp)
display->set_drawmode(DRMODE_SOLID);
}
-#endif /* HAVE_LCD_BITMAP */
-
/* Evaluate the conditional that is at *token_index and return whether a skip
has ocurred. *token_index is updated with the new position.
*/
@@ -587,21 +580,17 @@ void write_line(struct screen *display, struct align_pos *format_align,
else
{
linedes->scroll = false;
-#ifdef HAVE_LCD_BITMAP
/* clear the line first */
display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
display->fillrect(0, line*string_height, viewport_width, string_height);
display->set_drawmode(DRMODE_SOLID);
-#endif
/* Nasty hack: we output an empty scrolling string,
which will reset the scroller for that line */
display->puts_scroll(0, line, (unsigned char *)"");
-#ifdef HAVE_LCD_BITMAP
line *= string_height;
center_xpos = (viewport_width-center_width)/2;
right_xpos = viewport_width-right_width;
-#endif
/* print aligned strings. print whole line at once so that %Vs works
* across the full viewport width */
char *left = format_align->left ?: "";
@@ -614,7 +603,6 @@ void write_line(struct screen *display, struct align_pos *format_align,
}
}
-#ifdef HAVE_LCD_BITMAP
void draw_peakmeters(struct gui_wps *gwps, int line_number,
struct viewport *viewport)
{
@@ -645,15 +633,12 @@ bool skin_has_sbs(enum screen_type screen, struct wps_data *data)
(void)screen;
(void)data;
bool draw = false;
-#ifdef HAVE_LCD_BITMAP
if (data->wps_sb_tag)
draw = data->show_sb_on_wps;
else if (statusbar_position(screen) != STATUSBAR_OFF)
draw = true;
-#endif
return draw;
}
-#endif
/* do the button loop as often as required for the peak meters to update
* with a good refresh rate.
@@ -661,7 +646,6 @@ bool skin_has_sbs(enum screen_type screen, struct wps_data *data)
int skin_wait_for_action(enum skinnable_screens skin, int context, int timeout)
{
int button = ACTION_NONE;
-#ifdef HAVE_LCD_BITMAP
/* when the peak meter is enabled we want to have a
few extra updates to make it look smooth. On the
other hand we don't want to waste energy if it
@@ -700,7 +684,6 @@ int skin_wait_for_action(enum skinnable_screens skin, int context, int timeout)
/* The peak meter is disabled
-> no additional screen updates needed */
else
-#endif
{
button = get_action(context, timeout);
}
diff --git a/apps/gui/skin_engine/skin_display.h b/apps/gui/skin_engine/skin_display.h
index 01a2169952..de1b0b20b5 100644
--- a/apps/gui/skin_engine/skin_display.h
+++ b/apps/gui/skin_engine/skin_display.h
@@ -29,7 +29,6 @@
#define _SKIN_DISPLAY_H_
-#ifdef HAVE_LCD_BITMAP
void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb);
void draw_playlist_viewer_list(struct gui_wps *gwps, struct playlistviewer *viewer);
/* clears the area where the image was shown */
@@ -40,7 +39,6 @@ void wps_display_images(struct gui_wps *gwps, struct viewport* vp);
void skin_render_viewport(struct skin_element* viewport, struct gui_wps *gwps,
struct skin_viewport* skin_viewport, unsigned long refresh_type);
-#endif
/* Evaluate the conditional that is at *token_index and return whether a skip
has ocurred. *token_index is updated with the new position.
diff --git a/apps/gui/skin_engine/skin_engine.c b/apps/gui/skin_engine/skin_engine.c
index ec4e1fd073..cd763def1c 100644
--- a/apps/gui/skin_engine/skin_engine.c
+++ b/apps/gui/skin_engine/skin_engine.c
@@ -56,9 +56,7 @@ static struct gui_skin_helper {
char* (*default_skin)(enum screen_type screen);
bool load_on_boot;
} skin_helpers[SKINNABLE_SCREENS_COUNT] = {
-#ifdef HAVE_LCD_BITMAP
[CUSTOM_STATUSBAR] = { sb_preproccess, sb_postproccess, sb_create_from_settings, true },
-#endif
[WPS] = { NULL, NULL, wps_default_skin, true },
#if CONFIG_TUNER
[FM_SCREEN] = { NULL, NULL, default_radio_skin, false }
@@ -115,10 +113,8 @@ static void gui_skin_reset(struct gui_skin *skin)
#ifdef HAVE_SKIN_VARIABLES
skin->data.skinvars = -1;
#endif
-#ifdef HAVE_LCD_BITMAP
skin->data.font_ids = -1;
skin->data.images = -1;
-#endif
#ifdef HAVE_ALBUMART
skin->data.albumart = -1;
skin->data.playback_aa_slot = -1;
@@ -157,9 +153,7 @@ void settings_apply_skins(void)
char filename[MAX_PATH];
static bool first_run = true;
-#ifdef HAVE_LCD_BITMAP
skin_backdrop_init();
-#endif
skins_initialised = true;
/* Make sure each skin is loaded */
@@ -236,7 +230,6 @@ static char* get_skin_filename(char *buf, size_t buf_size,
char *setting = NULL, *ext = NULL;
switch (skin)
{
-#ifdef HAVE_LCD_BITMAP
case CUSTOM_STATUSBAR:
#if defined(HAVE_REMOTE_LCD) && NB_SCREENS > 1
if (screen == SCREEN_REMOTE)
@@ -251,7 +244,6 @@ static char* get_skin_filename(char *buf, size_t buf_size,
ext = "sbs";
}
break;
-#endif
case WPS:
#if defined(HAVE_REMOTE_LCD) && NB_SCREENS > 1
if (screen == SCREEN_REMOTE)
@@ -296,10 +288,8 @@ static char* get_skin_filename(char *buf, size_t buf_size,
struct gui_wps *skin_get_gwps(enum skinnable_screens skin, enum screen_type screen)
{
-#ifdef HAVE_LCD_BITMAP
if (skin == CUSTOM_STATUSBAR && !skins_initialised)
return &skins[skin][screen].gui_wps;
-#endif
if (skins[skin][screen].data.wps_loaded == false)
{
diff --git a/apps/gui/skin_engine/skin_engine.h b/apps/gui/skin_engine/skin_engine.h
index 59e00b5176..55839608be 100644
--- a/apps/gui/skin_engine/skin_engine.h
+++ b/apps/gui/skin_engine/skin_engine.h
@@ -30,15 +30,12 @@
#include "wps_internals.h" /* TODO: remove this line.. shoudlnt be needed */
enum skinnable_screens {
-#ifdef HAVE_LCD_BITMAP
CUSTOM_STATUSBAR,
-#endif
WPS,
#if CONFIG_TUNER
FM_SCREEN,
#endif
-
-
+
SKINNABLE_SCREENS_COUNT
};
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index de7c1db372..f3a23377ef 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -66,9 +66,7 @@
#include "tuner.h"
#endif
-#ifdef HAVE_LCD_BITMAP
#include "bmp.h"
-#endif
#ifdef HAVE_ALBUMART
#include "playback.h"
@@ -127,7 +125,6 @@ typedef int (*parse_function)(struct skin_element *element,
struct wps_token *token,
struct wps_data *wps_data);
-#ifdef HAVE_LCD_BITMAP
/* add a skin_token_list item to the list chain. ALWAYS appended because some of the
* chains require the order to be kept.
*/
@@ -147,9 +144,6 @@ static void add_to_ll_chain(OFFSETTYPE(struct skin_token_list *) *listoffset,
}
}
-#endif
-
-
void *skin_find_item(const char *label, enum skin_find_what what,
struct wps_data *data)
{
@@ -170,11 +164,9 @@ void *skin_find_item(const char *label, enum skin_find_what what,
list.vplist = SKINOFFSETTOPTR(databuf, data->tree);
isvplist = true;
break;
-#ifdef HAVE_LCD_BITMAP
case SKIN_FIND_IMAGE:
list.linkedlist = SKINOFFSETTOPTR(databuf, data->images);
break;
-#endif
#ifdef HAVE_TOUCHSCREEN
case SKIN_FIND_TOUCHREGION:
list.linkedlist = SKINOFFSETTOPTR(databuf, data->touchregions);
@@ -190,11 +182,9 @@ void *skin_find_item(const char *label, enum skin_find_what what,
while (list.linkedlist)
{
bool skip = false;
-#ifdef HAVE_LCD_BITMAP
struct wps_token *token = NULL;
if (!isvplist)
token = SKINOFFSETTOPTR(databuf, list.linkedlist->token);
-#endif
switch (what)
{
case SKIN_FIND_UIVP:
@@ -207,12 +197,10 @@ void *skin_find_item(const char *label, enum skin_find_what what,
skip = !(((struct skin_viewport *)ret)->is_infovp ==
(what==SKIN_FIND_UIVP));
break;
-#ifdef HAVE_LCD_BITMAP
case SKIN_FIND_IMAGE:
ret = SKINOFFSETTOPTR(databuf, token->value.data);
itemlabel = SKINOFFSETTOPTR(databuf, ((struct gui_img *)ret)->label);
break;
-#endif
#ifdef HAVE_TOUCHSCREEN
case SKIN_FIND_TOUCHREGION:
ret = SKINOFFSETTOPTR(databuf, token->value.data);
@@ -240,8 +228,6 @@ void *skin_find_item(const char *label, enum skin_find_what what,
return NULL;
}
-#ifdef HAVE_LCD_BITMAP
-
/* create and init a new wpsll item.
* passing NULL to token will alloc a new one.
* You should only pass NULL for the token when the token type (table above)
@@ -493,9 +479,6 @@ static int parse_font_load(struct skin_element *element,
return 0;
}
-
-#ifdef HAVE_LCD_BITMAP
-
static int parse_playlistview(struct skin_element *element,
struct wps_token *token,
struct wps_data *wps_data)
@@ -513,7 +496,7 @@ static int parse_playlistview(struct skin_element *element,
return 0;
}
-#endif
+
#ifdef HAVE_LCD_COLOR
static int parse_viewport_gradient_setup(struct skin_element *element,
struct wps_token *token,
@@ -756,8 +739,6 @@ static int parse_image_special(struct skin_element *element,
}
#endif
-#endif /* HAVE_LCD_BITMAP */
-
static int parse_progressbar_tag(struct skin_element* element,
struct wps_token *token,
struct wps_data *wps_data);
@@ -898,7 +879,6 @@ static int parse_progressbar_tag(struct skin_element* element,
struct wps_token *token,
struct wps_data *wps_data)
{
-#ifdef HAVE_LCD_BITMAP
struct progressbar *pb;
struct viewport *vp = &curr_vp->vp;
struct skin_tag_parameter *param = get_param(element, 0);
@@ -1211,20 +1191,7 @@ static int parse_progressbar_tag(struct skin_element* element,
add_to_ll_chain(&wps_data->touchregions, item);
}
#endif
-
- return 0;
-
-#else
- (void)element;
- if (token->type == SKIN_TOKEN_PROGRESSBAR ||
- token->type == SKIN_TOKEN_PLAYER_PROGRESSBAR)
- {
- wps_data->full_line_progressbar =
- token->type == SKIN_TOKEN_PLAYER_PROGRESSBAR;
- }
return 0;
-
-#endif
}
#ifdef HAVE_ALBUMART
@@ -1741,7 +1708,6 @@ void skin_data_free_buflib_allocs(struct wps_data *wps_data)
{
if (wps_data->wps_loaded)
skin_buffer = get_skin_buffer(wps_data);
-#ifdef HAVE_LCD_BITMAP
#ifndef __PCTOOL__
struct skin_token_list *list = SKINOFFSETTOPTR(skin_buffer, wps_data->images);
int *font_ids = SKINOFFSETTOPTR(skin_buffer, wps_data->font_ids);
@@ -1776,7 +1742,6 @@ void skin_data_free_buflib_allocs(struct wps_data *wps_data)
core_free(wps_data->buflib_handle);
wps_data->buflib_handle = -1;
#endif
-#endif
}
/*
@@ -1787,9 +1752,7 @@ void skin_data_free_buflib_allocs(struct wps_data *wps_data)
static void skin_data_reset(struct wps_data *wps_data)
{
skin_data_free_buflib_allocs(wps_data);
-#ifdef HAVE_LCD_BITMAP
wps_data->images = INVALID_OFFSET;
-#endif
wps_data->tree = INVALID_OFFSET;
#ifdef HAVE_BACKDROP_IMAGE
if (wps_data->backdrop_id >= 0)
@@ -1811,15 +1774,12 @@ static void skin_data_reset(struct wps_data *wps_data)
}
#endif
-#ifdef HAVE_LCD_BITMAP
wps_data->peak_meter_enabled = false;
wps_data->wps_sb_tag = false;
wps_data->show_sb_on_wps = false;
-#endif
wps_data->wps_loaded = false;
}
-#ifdef HAVE_LCD_BITMAP
#ifndef __PCTOOL__
static int currently_loading_handle = -1;
static int buflib_move_callback(int handle, void* current, void* new)
@@ -2065,7 +2025,6 @@ static bool skin_load_fonts(struct wps_data *data)
return success;
}
-#endif /* HAVE_LCD_BITMAP */
static int convert_viewport(struct wps_data *data, struct skin_element* element)
{
struct skin_viewport *skin_vp = skin_buffer_alloc(sizeof(*skin_vp));
@@ -2176,11 +2135,9 @@ static int convert_viewport(struct wps_data *data, struct skin_element* element)
skin_vp->vp.height = display->lcdheight - skin_vp->vp.y;
}
param++;
-#ifdef HAVE_LCD_BITMAP
/* font */
if (!isdefault(param))
skin_vp->parsed_fontid = param->data.number;
-#endif
if ((unsigned) skin_vp->vp.x >= (unsigned) display->lcdwidth ||
skin_vp->vp.width + skin_vp->vp.x > display->lcdwidth ||
(unsigned) skin_vp->vp.y >= (unsigned) display->lcdheight ||
@@ -2259,7 +2216,6 @@ static int skin_element_callback(struct skin_element* element, void* data)
case SKIN_TOKEN_TRACK_ENDING:
function = parse_timeout_tag;
break;
-#ifdef HAVE_LCD_BITMAP
case SKIN_TOKEN_LIST_ITEM_TEXT:
case SKIN_TOKEN_LIST_ITEM_ICON:
function = parse_listitem;
@@ -2274,7 +2230,6 @@ static int skin_element_callback(struct skin_element* element, void* data)
sb_skin_has_title(curr_screen);
#endif
break;
-#endif
#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
case SKIN_TOKEN_DRAWRECTANGLE:
function = parse_drawrectangle;
@@ -2309,7 +2264,6 @@ static int skin_element_callback(struct skin_element* element, void* data)
case SKIN_TOKEN_SETTING:
function = parse_setting_and_lang;
break;
-#ifdef HAVE_LCD_BITMAP
case SKIN_TOKEN_VIEWPORT_CUSTOMLIST:
function = parse_playlistview;
break;
@@ -2331,7 +2285,6 @@ static int skin_element_callback(struct skin_element* element, void* data)
case SKIN_TOKEN_LIST_ITEM_CFG:
function = parse_listitemviewport;
break;
-#endif
#ifdef HAVE_TOUCHSCREEN
case SKIN_TOKEN_TOUCHREGION:
function = parse_touchregion;
@@ -2423,14 +2376,12 @@ bool skin_data_load(enum screen_type screen, struct wps_data *wps_data,
char *wps_buffer = NULL;
if (!wps_data || !buf)
return false;
-#ifdef HAVE_LCD_BITMAP
int i;
for (i=0;i<MAXUSERFONTS;i++)
{
skinfonts[i].id = -1;
skinfonts[i].name = NULL;
}
-#endif
#ifdef DEBUG_SKIN_ENGINE
if (isfile && debug_wps)
{
@@ -2504,7 +2455,6 @@ bool skin_data_load(enum screen_type screen, struct wps_data *wps_data,
return false;
}
-#ifdef HAVE_LCD_BITMAP
char bmpdir[MAX_PATH];
if (isfile)
{
@@ -2523,7 +2473,6 @@ bool skin_data_load(enum screen_type screen, struct wps_data *wps_data,
skin_data_reset(wps_data);
return false;
}
-#endif
#if defined(HAVE_ALBUMART) && !defined(__PCTOOL__)
/* last_albumart_{width,height} is either both 0 or valid AA dimensions */
struct skin_albumart *aa = SKINOFFSETTOPTR(skin_buffer, wps_data->albumart);
diff --git a/apps/gui/skin_engine/skin_render.c b/apps/gui/skin_engine/skin_render.c
index e14c882dd9..51c58fc196 100644
--- a/apps/gui/skin_engine/skin_render.c
+++ b/apps/gui/skin_engine/skin_render.c
@@ -77,12 +77,10 @@ struct skin_draw_info {
typedef bool (*skin_render_func)(struct skin_element* alternator, struct skin_draw_info *info);
bool skin_render_alternator(struct skin_element* alternator, struct skin_draw_info *info);
-#ifdef HAVE_LCD_BITMAP
static void skin_render_playlistviewer(struct playlistviewer* viewer,
struct gui_wps *gwps,
struct skin_viewport* skin_viewport,
unsigned long refresh_type);
-#endif
static char* skin_buffer;
@@ -99,11 +97,10 @@ static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info,
{
struct wps_token *token = (struct wps_token *)SKINOFFSETTOPTR(skin_buffer, element->data);
-#ifdef HAVE_LCD_BITMAP
struct viewport *vp = &skin_vp->vp;
struct wps_data *data = gwps->data;
bool do_refresh = (element->tag->flags & info->refresh_type) > 0;
-#endif
+
switch (token->type)
{
#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
@@ -181,7 +178,6 @@ static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info,
}
}
break;
-#ifdef HAVE_LCD_BITMAP
case SKIN_TOKEN_LIST_ITEM_CFG:
skinlist_set_cfg(gwps->display->screen_type,
SKINOFFSETTOPTR(skin_buffer, token->value.data));
@@ -225,11 +221,9 @@ static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info,
case SKIN_TOKEN_PEAKMETER_RIGHTBAR:
data->peak_meter_enabled = true;
/* fall through to the progressbar code */
-#endif
case SKIN_TOKEN_VOLUMEBAR:
case SKIN_TOKEN_BATTERY_PERCENTBAR:
case SKIN_TOKEN_SETTINGBAR:
-#ifdef HAVE_LCD_BITMAP
case SKIN_TOKEN_PROGRESSBAR:
case SKIN_TOKEN_TUNER_RSSI_BAR:
case SKIN_TOKEN_LIST_SCROLLBAR:
@@ -238,9 +232,7 @@ static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info,
if (do_refresh)
draw_progressbar(gwps, info->line_number, bar);
}
-#endif
break;
-#ifdef HAVE_LCD_BITMAP
case SKIN_TOKEN_IMAGE_DISPLAY:
{
struct gui_img *img = SKINOFFSETTOPTR(skin_buffer, token->value.data);
@@ -321,8 +313,7 @@ static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info,
skin_render_playlistviewer(SKINOFFSETTOPTR(skin_buffer, token->value.data), gwps,
info->skin_vp, info->refresh_type);
break;
-
-#endif /* HAVE_LCD_BITMAP */
+
#ifdef HAVE_SKIN_VARIABLES
case SKIN_TOKEN_VAR_SET:
{
@@ -352,16 +343,12 @@ static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info,
}
return true;
}
-
-
static void do_tags_in_hidden_conditional(struct skin_element* branch,
struct skin_draw_info *info)
{
-#ifdef HAVE_LCD_BITMAP
struct gui_wps *gwps = info->gwps;
struct wps_data *data = gwps->data;
-#endif
/* Tags here are ones which need to be "turned off" or cleared
* if they are in a conditional branch which isnt being used */
if (branch->type == LINE_ALTERNATOR)
@@ -375,9 +362,7 @@ static void do_tags_in_hidden_conditional(struct skin_element* branch,
else if (branch->type == LINE && branch->children_count)
{
struct skin_element *child = get_child(branch->children, 0);
-#if defined(HAVE_LCD_BITMAP) || defined(HAVE_ALBUMART)
struct wps_token *token;
-#endif
while (child)
{
if (child->type == CONDITIONAL)
@@ -395,10 +380,7 @@ static void do_tags_in_hidden_conditional(struct skin_element* branch,
child = SKINOFFSETTOPTR(skin_buffer, child->next);
continue;
}
-#if defined(HAVE_LCD_BITMAP) || defined(HAVE_ALBUMART)
token = (struct wps_token *)SKINOFFSETTOPTR(skin_buffer, child->data);
-#endif
-#ifdef HAVE_LCD_BITMAP
/* clear all pictures in the conditional and nested ones */
if (token->type == SKIN_TOKEN_IMAGE_PRELOAD_DISPLAY)
{
@@ -420,7 +402,6 @@ static void do_tags_in_hidden_conditional(struct skin_element* branch,
viewport = SKINOFFSETTOPTR(skin_buffer, viewport->next))
{
struct skin_viewport *skin_viewport = SKINOFFSETTOPTR(skin_buffer, viewport->data);
-
char *vplabel = SKINOFFSETTOPTR(skin_buffer, skin_viewport->label);
if (skin_viewport->label == VP_DEFAULT_LABEL)
vplabel = VP_DEFAULT_LABEL_STRING;
@@ -460,7 +441,6 @@ static void do_tags_in_hidden_conditional(struct skin_element* branch,
}
}
}
-#endif
#ifdef HAVE_ALBUMART
else if (data->albumart && token->type == SKIN_TOKEN_ALBUMART_DISPLAY)
{
@@ -734,11 +714,10 @@ void skin_render_viewport(struct skin_element* viewport, struct gui_wps *gwps,
.offset = 0,
.line_desc = LINE_DESC_DEFINIT,
};
-
+
struct align_pos * align = &info.align;
bool needs_update, update_all = false;
skin_buffer = get_skin_buffer(gwps->data);
-#ifdef HAVE_LCD_BITMAP
/* Set images to not to be displayed */
struct skin_token_list *imglist = SKINOFFSETTOPTR(skin_buffer, gwps->data->images);
while (imglist)
@@ -752,10 +731,7 @@ void skin_render_viewport(struct skin_element* viewport, struct gui_wps *gwps,
/* fix font ID's */
if (skin_viewport->parsed_fontid == 1)
skin_viewport->vp.font = display->getuifont();
-#endif
-
-
while (line)
{
linebuf[0] = '\0';
@@ -811,9 +787,7 @@ void skin_render_viewport(struct skin_element* viewport, struct gui_wps *gwps,
info.line_number++;
line = SKINOFFSETTOPTR(skin_buffer, line->next);
}
-#ifdef HAVE_LCD_BITMAP
wps_display_images(gwps, &skin_viewport->vp);
-#endif
}
void skin_render(struct gui_wps *gwps, unsigned refresh_mode)
@@ -903,8 +877,7 @@ void skin_render(struct gui_wps *gwps, unsigned refresh_mode)
display->update();
}
-#ifdef HAVE_LCD_BITMAP
-static __attribute__((noinline))
+static __attribute__((noinline))
void skin_render_playlistviewer(struct playlistviewer* viewer,
struct gui_wps *gwps,
struct skin_viewport* skin_viewport,
@@ -926,7 +899,7 @@ void skin_render_playlistviewer(struct playlistviewer* viewer,
.offset = viewer->start_offset,
.line_desc = LINE_DESC_DEFINIT,
};
-
+
struct align_pos * align = &info.align;
bool needs_update;
int cur_pos, start_item, max;
@@ -989,4 +962,3 @@ void skin_render_playlistviewer(struct playlistviewer* viewer,
start_item++;
}
}
-#endif
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c
index 2528a0af55..db9a9e694b 100644
--- a/apps/gui/skin_engine/skin_tokens.c
+++ b/apps/gui/skin_engine/skin_tokens.c
@@ -41,11 +41,9 @@
#include "lang.h"
#include "misc.h"
#include "led.h"
-#ifdef HAVE_LCD_BITMAP
#include "peakmeter.h"
/* Image stuff */
#include "albumart.h"
-#endif
#include "playlist.h"
#include "playback.h"
#include "tdspeed.h"
@@ -813,7 +811,6 @@ const char *get_token_value(struct gui_wps *gwps,
if (intval)
*intval = playlist_amount();
return buf;
-#ifdef HAVE_LCD_BITMAP
case SKIN_TOKEN_LIST_TITLE_TEXT:
return sb_get_title(gwps->display->screen_type);
case SKIN_TOKEN_LIST_TITLE_ICON:
@@ -854,7 +851,6 @@ const char *get_token_value(struct gui_wps *gwps,
}
case SKIN_TOKEN_LIST_NEEDS_SCROLLBAR:
return skinlist_needs_scrollbar(gwps->display->screen_type) ? "s" : "";
-#endif
case SKIN_TOKEN_PLAYLIST_NAME:
return playlist_name(NULL, buf, buf_size);
@@ -1202,7 +1198,6 @@ const char *get_token_value(struct gui_wps *gwps,
return "-";
#endif
-#ifdef HAVE_LCD_BITMAP
/* peakmeter */
case SKIN_TOKEN_PEAKMETER_LEFT:
case SKIN_TOKEN_PEAKMETER_RIGHT:
@@ -1218,7 +1213,6 @@ const char *get_token_value(struct gui_wps *gwps,
data->peak_meter_enabled = true;
return buf;
}
-#endif
case SKIN_TOKEN_CROSSFADE:
#ifdef HAVE_CROSSFADE
diff --git a/apps/gui/skin_engine/wps_internals.h b/apps/gui/skin_engine/wps_internals.h
index caf43b21cb..b7d7ff35d0 100644
--- a/apps/gui/skin_engine/wps_internals.h
+++ b/apps/gui/skin_engine/wps_internals.h
@@ -80,7 +80,6 @@ struct skin_token_list {
OFFSETTYPE(struct skin_token_list *) next;
};
-#ifdef HAVE_LCD_BITMAP
struct gui_img {
OFFSETTYPE(struct viewport*) vp; /* The viewport to display this image in */
short int x; /* x-pos */
@@ -137,9 +136,6 @@ struct draw_rectangle {
unsigned start_colour;
unsigned end_colour;
};
-#endif
-
-
struct align_pos {
char* left;
@@ -147,11 +143,7 @@ struct align_pos {
char* right;
};
-#ifdef HAVE_LCD_BITMAP
#define WPS_MAX_TOKENS 1150
-#else
-#define WPS_MAX_TOKENS 64
-#endif
enum wps_parse_error {
PARSE_OK,
@@ -344,11 +336,9 @@ struct wps_data
int buflib_handle;
OFFSETTYPE(struct skin_element *) tree;
-#ifdef HAVE_LCD_BITMAP
OFFSETTYPE(struct skin_token_list *) images;
OFFSETTYPE(int *) font_ids;
int font_count;
-#endif
#ifdef HAVE_BACKDROP_IMAGE
int backdrop_id;
bool use_extra_framebuffer;
@@ -370,11 +360,9 @@ struct wps_data
OFFSETTYPE(struct skin_token_list *) skinvars;
#endif
-#ifdef HAVE_LCD_BITMAP
bool peak_meter_enabled;
bool wps_sb_tag;
bool show_sb_on_wps;
-#endif
bool wps_loaded;
};
@@ -448,9 +436,7 @@ const char *get_radio_token(struct wps_token *token, int preset_offset,
enum skin_find_what {
SKIN_FIND_VP = 0,
SKIN_FIND_UIVP,
-#ifdef HAVE_LCD_BITMAP
SKIN_FIND_IMAGE,
-#endif
#ifdef HAVE_TOUCHSCREEN
SKIN_FIND_TOUCHREGION,
#endif
diff --git a/apps/gui/splash.c b/apps/gui/splash.c
index fa2c21768a..5bcac80169 100644
--- a/apps/gui/splash.c
+++ b/apps/gui/splash.c
@@ -31,16 +31,11 @@
#include "viewport.h"
#include "strtok_r.h"
-#ifdef HAVE_LCD_BITMAP
-
#define MAXLINES (LCD_HEIGHT/6)
#define MAXBUFFER 512
#define RECT_SPACING 2
#define SPLASH_MEMORY_INTERVAL (HZ)
-#endif
-
-
static void splash_internal(struct screen * screen, const char *fmt, va_list ap)
{
char splash_buf[MAXBUFFER];
@@ -54,15 +49,13 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap)
int y, i;
int space_w, w, h;
struct viewport vp;
-#ifdef HAVE_LCD_BITMAP
int width, height;
int maxw = 0;
viewport_set_defaults(&vp, screen->screen_type);
screen->set_viewport(&vp);
-
+
screen->getstringsize(" ", &space_w, &h);
-#endif
y = h;
vsnprintf(splash_buf, sizeof(splash_buf), fmt, ap);
@@ -77,20 +70,14 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap)
lines[0] = next;
while (true)
{
-#ifdef HAVE_LCD_BITMAP
screen->getstringsize(next, &w, NULL);
-#else
- w = utf8length(next);
-#endif
if (lastbreak)
{
if (x + (next - lastbreak) * space_w + w
> vp.width - RECT_SPACING*2)
{ /* too wide, wrap */
-#ifdef HAVE_LCD_BITMAP
if (x > maxw)
maxw = x;
-#endif
if ((y + h > vp.height) || (line >= (MAXLINES-1)))
break; /* screen full or out of lines */
x = 0;
@@ -109,10 +96,8 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap)
next = strtok_r(NULL, " ", &store);
if (!next)
{ /* no more words */
-#ifdef HAVE_LCD_BITMAP
if (x > maxw)
maxw = x;
-#endif
break;
}
}
@@ -123,8 +108,6 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap)
screen->scroll_stop();
-#ifdef HAVE_LCD_BITMAP
-
width = maxw + 2*RECT_SPACING;
height = y + 2*RECT_SPACING;
@@ -166,14 +149,11 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap)
/* prepare putting the text */
y = RECT_SPACING;
-#endif
/* print the message to screen */
for (i = 0; i <= line; i++, y+=h)
{
-#ifdef HAVE_LCD_BITMAP
screen->putsxy(0, y, lines[i]);
-#endif
}
screen->update_viewport();
end:
diff --git a/apps/gui/statusbar-skinned.h b/apps/gui/statusbar-skinned.h
index 237ec45c82..ad102bef47 100644
--- a/apps/gui/statusbar-skinned.h
+++ b/apps/gui/statusbar-skinned.h
@@ -23,8 +23,6 @@
#define DEFAULT_UPDATE_DELAY (HZ/7)
-#ifdef HAVE_LCD_BITMAP
-
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -57,14 +55,5 @@ int sb_get_backdrop(enum screen_type screen);
int sb_preproccess(enum screen_type screen, struct wps_data *data);
int sb_postproccess(enum screen_type screen, struct wps_data *data);
-#else /* CHARCELL */
-#define sb_skin_init()
-#define sb_skin_data_load(a,b,c)
-#define sb_skin_set_update_delay(a)
-#define sb_skin_set_state(a,b)
-#define sb_create_from_settings NULL
-#define sb_preproccess NULL
-#define sb_postproccess NULL
-#endif
void do_sbs_update_callback(unsigned short id, void *param);
#endif /* __STATUSBAR_SKINNED_H__ */
diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c
index 0c8f54f749..a43828b268 100644
--- a/apps/gui/statusbar.c
+++ b/apps/gui/statusbar.c
@@ -132,7 +132,6 @@
struct gui_syncstatusbar statusbars;
/* Prototypes */
-#ifdef HAVE_LCD_BITMAP
static void gui_statusbar_icon_battery(struct screen * display, int percent,
int batt_charge_step);
static bool gui_statusbar_icon_volume(struct gui_statusbar * bar, int volume);
@@ -152,7 +151,6 @@ static void gui_statusbar_icon_recording_info(struct screen * display);
#if CONFIG_RTC
static void gui_statusbar_time(struct screen * display, struct tm *time);
#endif
-#endif
/* End prototypes */
@@ -242,7 +240,6 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw, struct vi
}
bar->info.volume = global_settings.volume;
-#ifdef HAVE_LCD_BITMAP
bar->info.shuffle = global_settings.playlist_shuffle;
#ifdef HAS_BUTTON_HOLD
bar->info.keylock = button_hold();
@@ -349,11 +346,8 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw, struct vi
display->set_viewport(NULL);
bar->lastinfo = bar->info;
}
-#endif /* HAVE_LCD_BITMAP */
-
}
-#ifdef HAVE_LCD_BITMAP
/* from icon.c */
/*
* Print battery icon to status bar
@@ -717,8 +711,6 @@ static void gui_statusbar_icon_recording_info(struct screen * display)
}
#endif /* HAVE_RECORDING */
-#endif /* HAVE_LCD_BITMAP */
-
void gui_syncstatusbar_init(struct gui_syncstatusbar * bars)
{
FOR_NB_SCREENS(i) {
@@ -730,7 +722,6 @@ void gui_syncstatusbar_init(struct gui_syncstatusbar * bars)
void gui_syncstatusbar_draw(struct gui_syncstatusbar * bars,
bool force_redraw)
{
-#ifdef HAVE_LCD_BITMAP
if(!global_settings.statusbar)
return;
struct viewport viewport;
@@ -738,9 +729,6 @@ void gui_syncstatusbar_draw(struct gui_syncstatusbar * bars,
GET_RECT(viewport,statusbar_position(i),&screens[i]);
gui_statusbar_draw( &(bars->statusbars[i]), force_redraw, &viewport );
}
-#else
- gui_statusbar_draw( &(bars->statusbars[0]), force_redraw, NULL );
-#endif /* HAVE_LCD_BITMAP */
}
diff --git a/apps/gui/usb_screen.c b/apps/gui/usb_screen.c
index dd1d97df3c..3169831322 100644
--- a/apps/gui/usb_screen.c
+++ b/apps/gui/usb_screen.c
@@ -42,9 +42,7 @@
#include "playlist.h"
#include "misc.h"
-#ifdef HAVE_LCD_BITMAP
#include "bitmaps/usblogo.h"
-#endif
#ifdef HAVE_REMOTE_LCD
#include "bitmaps/remote_usblogo.h"
@@ -122,15 +120,12 @@ static int handle_usb_events(void)
struct usb_screen_vps_t
{
struct viewport parent;
-#ifdef HAVE_LCD_BITMAP
struct viewport logo;
#ifdef USB_ENABLE_HID
struct viewport title;
#endif
-#endif
};
-#ifdef HAVE_LCD_BITMAP
static void usb_screen_fix_viewports(struct screen *screen,
struct usb_screen_vps_t *usb_screen_vps)
{
@@ -181,18 +176,15 @@ static void usb_screen_fix_viewports(struct screen *screen,
}
#endif
}
-#endif
static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar)
{
-#ifdef HAVE_LCD_BITMAP
static const struct bitmap* logos[NB_SCREENS] = {
&bm_usblogo,
#ifdef HAVE_REMOTE_LCD
&bm_remote_usblogo,
#endif
};
-#endif
FOR_NB_SCREENS(i)
{
@@ -200,15 +192,12 @@ static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar)
struct usb_screen_vps_t *usb_screen_vps = &usb_screen_vps_ar[i];
struct viewport *parent = &usb_screen_vps->parent;
-#ifdef HAVE_LCD_BITMAP
struct viewport *logo = &usb_screen_vps->logo;
-#endif
screen->set_viewport(parent);
screen->clear_viewport();
screen->backlight_on();
-#ifdef HAVE_LCD_BITMAP
screen->set_viewport(logo);
screen->bmp(logos[i], 0, 0);
if (i == SCREEN_MAIN)
@@ -228,14 +217,6 @@ static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar)
}
screen->set_viewport(parent);
-#else /* !HAVE_LCD_BITMAP */
- screen->double_height(false);
- screen->puts_scroll(0, 0, "[USB Mode]");
- status_set_param(false);
- status_set_audio(false);
- status_set_usb(true);
-#endif /* HAVE_LCD_BITMAP */
-
screen->set_viewport(NULL);
screen->update_viewport();
}
@@ -275,13 +256,11 @@ void gui_usb_screen_run(bool early_usb)
/* update the UI before disabling fonts, this maximizes the propability
* that font cache lookups succeed during USB */
send_event(GUI_EVENT_ACTIONUPDATE, NULL);
-#ifdef HAVE_LCD_BITMAP
if(!early_usb)
{
/* The font system leaves the .fnt fd's open, so we need for force close them all */
font_disable_all();
}
-#endif
usb_acknowledge(SYS_USB_CONNECTED_ACK);
@@ -302,10 +281,8 @@ void gui_usb_screen_run(bool early_usb)
{
const struct viewport* vp = NULL;
-#if defined(HAVE_LCD_BITMAP) && defined(USB_ENABLE_HID)
+#if defined(USB_ENABLE_HID)
vp = usb_hid ? &usb_screen_vps_ar[i].title : NULL;
-#elif !defined(HAVE_LCD_BITMAP)
- vp = &usb_screen_vps_ar[i].parent;
#endif
if (vp)
screens[i].scroll_stop_viewport(vp);
@@ -322,7 +299,6 @@ void gui_usb_screen_run(bool early_usb)
touchscreen_set_mode(old_mode);
#endif
-#ifdef HAVE_LCD_BITMAP
if(!early_usb)
{
font_enable_all();
@@ -331,7 +307,6 @@ void gui_usb_screen_run(bool early_usb)
/* Reload playlist */
playlist_resume();
}
-#endif
FOR_NB_SCREENS(i)
{
diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c
index fad3255cdb..db58b5d72d 100644
--- a/apps/gui/viewport.c
+++ b/apps/gui/viewport.c
@@ -54,9 +54,7 @@
#include "statusbar.h"
#include "appevents.h"
#include "panic.h"
-#ifdef HAVE_LCD_BITMAP
#include "language.h"
-#endif
#include "statusbar-skinned.h"
#include "skin_engine/skin_engine.h"
#include "debug.h"
@@ -68,7 +66,6 @@ struct viewport_stack_item
bool enabled;
};
-#ifdef HAVE_LCD_BITMAP
static void viewportmanager_redraw(unsigned short id, void* data);
static int theme_stack_top[NB_SCREENS]; /* the last item added */
@@ -218,16 +215,10 @@ static bool is_theme_enabled(enum screen_type screen)
int top = theme_stack_top[screen];
return theme_stack[screen][top].enabled;
}
-#endif /* HAVE_LCD_BITMAP */
int viewport_get_nb_lines(const struct viewport *vp)
{
-#ifdef HAVE_LCD_BITMAP
return vp->height/font_get(vp->font)->height;
-#else
- (void)vp;
- return 2;
-#endif
}
static void viewportmanager_redraw(unsigned short id, void* data)
@@ -235,31 +226,21 @@ static void viewportmanager_redraw(unsigned short id, void* data)
(void)id;
FOR_NB_SCREENS(i)
{
-#ifdef HAVE_LCD_BITMAP
if (is_theme_enabled(i))
sb_skin_update(i, NULL != data);
-#else
- (void)data;
- gui_statusbar_draw(&statusbars.statusbars[i], NULL, NULL);
-#endif
}
}
void viewportmanager_init()
{
-#ifdef HAVE_LCD_BITMAP
FOR_NB_SCREENS(i)
{
theme_stack_top[i] = -1; /* the next call fixes this to 0 */
/* We always want the theme enabled by default... */
viewportmanager_theme_enable(i, true, NULL);
}
-#else
- add_event(GUI_EVENT_ACTIONUPDATE, viewportmanager_redraw);
-#endif
}
-#ifdef HAVE_LCD_BITMAP
void viewportmanager_theme_changed(const int which)
{
if (which & THEME_LANGUAGE)
@@ -296,7 +277,6 @@ static void set_default_align_flags(struct viewport *vp)
vp->flags |= VP_FLAG_ALIGN_RIGHT;
}
-#endif /* HAVE_LCD_BITMAP */
#endif /* __PCTOOL__ */
void viewport_set_fullscreen(struct viewport *vp,
@@ -307,7 +287,6 @@ void viewport_set_fullscreen(struct viewport *vp,
vp->width = screens[screen].lcdwidth;
vp->height = screens[screen].lcdheight;
-#ifdef HAVE_LCD_BITMAP
#ifndef __PCTOOL__
set_default_align_flags(vp);
#endif
@@ -331,13 +310,12 @@ void viewport_set_fullscreen(struct viewport *vp,
vp->bg_pattern = LCD_REMOTE_DEFAULT_BG;
}
#endif
-#endif
}
void viewport_set_defaults(struct viewport *vp,
const enum screen_type screen)
{
-#if defined(HAVE_LCD_BITMAP) && !defined(__PCTOOL__)
+#if !defined(__PCTOOL__)
struct viewport *sbs_area = NULL;
if (!is_theme_enabled(screen))
{
@@ -349,13 +327,11 @@ void viewport_set_defaults(struct viewport *vp,
if (sbs_area)
*vp = *sbs_area;
else
-#endif /* HAVE_LCD_BITMAP */
+#endif /* !__PCTOOL__ */
viewport_set_fullscreen(vp, screen);
}
-#ifdef HAVE_LCD_BITMAP
-
int get_viewport_default_colour(enum screen_type screen, bool fgcolour)
{
(void)screen; (void)fgcolour;
@@ -392,5 +368,3 @@ int get_viewport_default_colour(enum screen_type screen, bool fgcolour)
return 0;
#endif /* LCD_DEPTH > 1 || LCD_REMOTE_DEPTH > 1 */
}
-
-#endif
diff --git a/apps/gui/viewport.h b/apps/gui/viewport.h
index c4b90aa64c..683c36fe76 100644
--- a/apps/gui/viewport.h
+++ b/apps/gui/viewport.h
@@ -53,7 +53,6 @@ int get_viewport_default_colour(enum screen_type screen, bool fgcolour);
*/
void viewportmanager_init(void) INIT_ATTR;
-#ifdef HAVE_LCD_BITMAP
void viewportmanager_theme_enable(enum screen_type screen, bool enable,
struct viewport *viewport);
/* Force will cause a redraw even if the theme was previously and
@@ -69,8 +68,6 @@ bool viewport_point_within_vp(const struct viewport *vp,
const int x, const int y);
#endif
-#endif
-
#endif /* __PCTOOL__ */
#endif /* __VIEWPORT_H__ */
diff --git a/apps/gui/wps.c b/apps/gui/wps.c
index 82321ff945..8d0453385b 100644
--- a/apps/gui/wps.c
+++ b/apps/gui/wps.c
@@ -39,9 +39,7 @@
#include "storage.h"
#include "screens.h"
#include "playlist.h"
-#ifdef HAVE_LCD_BITMAP
#include "icons.h"
-#endif
#include "lang.h"
#include "bookmark.h"
#include "misc.h"
@@ -87,7 +85,6 @@ static void track_info_callback(unsigned short id, void *param);
char* wps_default_skin(enum screen_type screen)
{
static char *skin_buf[NB_SCREENS] = {
-#ifdef HAVE_LCD_BITMAP
#if LCD_DEPTH > 1
"%X(d)\n"
#endif
@@ -97,10 +94,6 @@ char* wps_default_skin(enum screen_type screen)
"%al%pc/%pt%ar[%pp:%pe]\n"
"%fbkBit %?fv<avg|> %?iv<%(id3v%iv%)|%(no id3%)>\n"
"%pb\n%pm\n",
-#else
- "%s%pp/%pe: %?it<%it|%fn> - %?ia<%ia|%d(2)> - %?id<%id|%d(1)>\n"
- "%pc%?ps<*|/>%pt\n",
-#endif
#ifdef HAVE_REMOTE_LCD
#if LCD_REMOTE_DEPTH > 1
"%X(d)\n"
diff --git a/apps/gui/yesno.c b/apps/gui/yesno.c
index 45638b7076..1a1645047a 100644
--- a/apps/gui/yesno.c
+++ b/apps/gui/yesno.c
@@ -112,9 +112,7 @@ static void gui_yesno_draw(struct gui_yesno * yn)
if(line_shift+3 <= vp_lines)
line_shift++;
display->puts(0, line_shift, str(LANG_CONFIRM_WITH_BUTTON));
-#ifdef HAVE_LCD_BITMAP
display->puts(0, line_shift+1, str(LANG_CANCEL_WITH_ANY));
-#endif
}
#endif
display->update_viewport();