summaryrefslogtreecommitdiffstats
path: root/apps/gui
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-07-15 19:40:55 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-07-24 21:20:13 +0000
commit092c340a2062fa98b7387fc5fd63578ddae7d0b6 (patch)
tree98ec96946eeb2ae709cb0528cc6998e21bb9b290 /apps/gui
parent17f7cc92c258bc456a27c3e7c5a19c9409851879 (diff)
downloadrockbox-092c340a2062fa98b7387fc5fd63578ddae7d0b6.tar.gz
rockbox-092c340a2062fa98b7387fc5fd63578ddae7d0b6.tar.bz2
rockbox-092c340a2062fa98b7387fc5fd63578ddae7d0b6.zip
[1/4] Remove SH support and all archos targets
This removes all code specific to SH targets Change-Id: I7980523785d2596e65c06430f4638eec74a06061
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/buttonbar.c131
-rw-r--r--apps/gui/buttonbar.h85
-rw-r--r--apps/gui/list.c4
-rw-r--r--apps/gui/option_select.h5
-rw-r--r--apps/gui/skin_engine/skin_tokens.c4
-rw-r--r--apps/gui/viewport.c7
-rw-r--r--apps/gui/wps.c4
7 files changed, 4 insertions, 236 deletions
diff --git a/apps/gui/buttonbar.c b/apps/gui/buttonbar.c
deleted file mode 100644
index 48ef6d0994..0000000000
--- a/apps/gui/buttonbar.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id$
- *
- * Copyright (C) Linus Nielsen Feltzing (2002)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-/*
-2005 Kevin Ferrare :
- - Multi screen support
- - Rewrote a lot of code to avoid global vars and make it accept eventually
- more that 3 buttons on the bar (just the prototype of gui_buttonbar_set
- and the constant BUTTONBAR_MAX_BUTTONS to modify)
-2008 Jonathan Gordon
- - redone to use viewports, items will NOT scroll in their vp.
- Bar is always drawn at the bottom of the screen. This may be changed later.
- Callers need to remember to adjust their viewports to not be overwitten
-*/
-#include "config.h"
-#include "buttonbar.h"
-#include "viewport.h"
-#include "lcd.h"
-#include "font.h"
-#include "string-extra.h"
-#include "settings.h"
-
-static struct viewport bb_vp[NB_SCREENS];
-void gui_buttonbar_init(struct gui_buttonbar * buttonbar)
-{
- gui_buttonbar_unset(buttonbar);
- FOR_NB_SCREENS(i)
- {
- viewport_set_defaults(&bb_vp[i], i);
- bb_vp[i].font = FONT_SYSFIXED;
- bb_vp[i].y = screens[i].lcdheight - BUTTONBAR_HEIGHT;
- bb_vp[i].height = BUTTONBAR_HEIGHT;
- bb_vp[i].drawmode = DRMODE_COMPLEMENT;
- }
-}
-
-void gui_buttonbar_set_display(struct gui_buttonbar * buttonbar,
- struct screen * display)
-{
- buttonbar->display = display;
-}
-
-static void gui_buttonbar_draw_button(struct gui_buttonbar * buttonbar, int num)
-{
- int button_width;
- int fh, fw;
- struct screen * display = buttonbar->display;
- struct viewport vp = bb_vp[display->screen_type];
-
- button_width = display->lcdwidth/BUTTONBAR_MAX_BUTTONS;
- vp.width = button_width-1;
- vp.x = button_width * num;
- display->set_viewport(&vp);
- display->fill_viewport();
- if(buttonbar->caption[num][0] != 0)
- {
- display->getstringsize(buttonbar->caption[num], &fw, &fh);
- display->putsxy((button_width - fw)/2,
- (vp.height-fh)/2, buttonbar->caption[num]);
- }
- display->set_viewport(NULL);
-}
-
-void gui_buttonbar_set(struct gui_buttonbar * buttonbar,
- const char *caption1,
- const char *caption2,
- const char *caption3)
-{
- gui_buttonbar_unset(buttonbar);
- if(caption1)
- {
- strlcpy(buttonbar->caption[0], caption1, BUTTONBAR_CAPTION_LENGTH);
- }
- if(caption2)
- {
- strlcpy(buttonbar->caption[1], caption2, BUTTONBAR_CAPTION_LENGTH);
- }
- if(caption3)
- {
- strlcpy(buttonbar->caption[2], caption3, BUTTONBAR_CAPTION_LENGTH);
- }
-}
-
-void gui_buttonbar_unset(struct gui_buttonbar * buttonbar)
-{
- int i;
- for(i = 0;i < BUTTONBAR_MAX_BUTTONS;i++)
- buttonbar->caption[i][0] = 0;
-}
-
-void gui_buttonbar_draw(struct gui_buttonbar * buttonbar)
-{
- struct screen * display = buttonbar->display;
- if(!global_settings.buttonbar || !gui_buttonbar_isset(buttonbar))
- return;
- int i;
- display->set_viewport(&bb_vp[display->screen_type]);
- display->clear_viewport();
- for(i = 0;i < BUTTONBAR_MAX_BUTTONS;i++)
- gui_buttonbar_draw_button(buttonbar, i);
- display->set_viewport(&bb_vp[display->screen_type]);
- display->update_viewport();
- display->set_viewport(NULL);
-}
-
-bool gui_buttonbar_isset(struct gui_buttonbar * buttonbar)
-{
- /* If all buttons are unset, the button bar is considered disabled */
- int i;
- for(i = 0;i < BUTTONBAR_MAX_BUTTONS;i++)
- if(buttonbar->caption[i][0] != 0)
- return true;
- return false;
-}
diff --git a/apps/gui/buttonbar.h b/apps/gui/buttonbar.h
deleted file mode 100644
index 884e3132bf..0000000000
--- a/apps/gui/buttonbar.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id$
- *
- * Copyright (C) 2005 by Kevin Ferrare
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
-#ifndef _GUI_BUTTONBAR_H_
-#define _GUI_BUTTONBAR_H_
-#include "config.h"
-#include "button.h"
-#include "screen_access.h"
-
-
-#ifdef HAVE_BUTTONBAR
-#define BUTTONBAR_HEIGHT 8
-#define BUTTONBAR_MAX_BUTTONS 3
-#define BUTTONBAR_CAPTION_LENGTH 8
-
-
-struct gui_buttonbar
-{
- char caption[BUTTONBAR_MAX_BUTTONS][BUTTONBAR_CAPTION_LENGTH];
- struct screen * display;
-};
-
-/*
- * Initializes the buttonbar
- * - buttonbar : the buttonbar
- */
-extern void gui_buttonbar_init(struct gui_buttonbar * buttonbar);
-
-/*
- * Attach the buttonbar to a screen
- * - buttonbar : the buttonbar
- * - display : the display to attach the buttonbar
- */
-extern void gui_buttonbar_set_display(struct gui_buttonbar * buttonbar,
- struct screen * display);
-
-/*
- * Set the caption of the items of the buttonbar
- * - buttonbar : the buttonbar
- * - caption1,2,3 : the first, second and thirds items of the bar
- */
-extern void gui_buttonbar_set(struct gui_buttonbar * buttonbar,
- const char *caption1,
- const char *caption2,
- const char *caption3);
-
-/*
- * Disable the buttonbar
- * - buttonbar : the buttonbar
- */
-extern void gui_buttonbar_unset(struct gui_buttonbar * buttonbar);
-
-/*
- * Draw the buttonbar on it's attached screen
- * - buttonbar : the buttonbar
- */
-extern void gui_buttonbar_draw(struct gui_buttonbar * buttonbar);
-
-/*
- * Returns true if the buttonbar has something to display, false otherwise
- * - buttonbar : the buttonbar
- */
-extern bool gui_buttonbar_isset(struct gui_buttonbar * buttonbar);
-#else
-#define BUTTONBAR_HEIGHT 0
-#endif
-#endif /* _GUI_BUTTONBAR_H_ */
diff --git a/apps/gui/list.c b/apps/gui/list.c
index 425cab9a0f..8533f93275 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -553,10 +553,6 @@ void gui_synclist_set_viewport_defaults(struct viewport *vp,
enum screen_type screen)
{
viewport_set_defaults(vp, screen);
-#ifdef HAVE_BUTTONBAR
- if (screens[screen].has_buttonbar)
- vp->height -= BUTTONBAR_HEIGHT;
-#endif
}
#ifdef HAVE_LCD_COLOR
diff --git a/apps/gui/option_select.h b/apps/gui/option_select.h
index 4ccc15a14e..7ca9a4ebbb 100644
--- a/apps/gui/option_select.h
+++ b/apps/gui/option_select.h
@@ -25,9 +25,8 @@
#include "screen_access.h"
#include "settings.h"
-#if defined (HAVE_SCROLLWHEEL) || \
- (CONFIG_KEYPAD == PLAYER_PAD)
-/* Define this if your target makes sense to have
+#if defined (HAVE_SCROLLWHEEL)
+/* Define this if your target makes sense to have
smaller values at the top of the list increasing down the list */
#define ASCENDING_INT_SETTINGS
#endif
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c
index 1cff83eb9a..75c3203066 100644
--- a/apps/gui/skin_engine/skin_tokens.c
+++ b/apps/gui/skin_engine/skin_tokens.c
@@ -126,7 +126,7 @@ char* get_dir(char* buf, int buf_size, const char* path, int level)
return buf;
}
-#if (CONFIG_CODEC != MAS3507D) && defined (HAVE_PITCHCONTROL)
+#if defined (HAVE_PITCHCONTROL)
/* A helper to determine the enum value for pitch/speed.
When there are two choices (i.e. boolean), return 1 if the value is
@@ -1452,7 +1452,7 @@ const char *get_token_value(struct gui_wps *gwps,
}
#endif /* (CONFIG_CODEC == SWCODEC) */
-#if (CONFIG_CODEC != MAS3507D) && defined (HAVE_PITCHCONTROL)
+#if defined (HAVE_PITCHCONTROL)
case SKIN_TOKEN_SOUND_PITCH:
{
int32_t pitch = sound_get_pitch();
diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c
index 194954c1d2..fad3255cdb 100644
--- a/apps/gui/viewport.c
+++ b/apps/gui/viewport.c
@@ -262,13 +262,6 @@ void viewportmanager_init()
#ifdef HAVE_LCD_BITMAP
void viewportmanager_theme_changed(const int which)
{
-#ifdef HAVE_BUTTONBAR
- if (which & THEME_BUTTONBAR)
- { /* don't handle further, the custom ui viewport ignores the buttonbar,
- * as does viewport_set_defaults(), since only lists use it*/
- screens[SCREEN_MAIN].has_buttonbar = global_settings.buttonbar;
- }
-#endif
if (which & THEME_LANGUAGE)
{
}
diff --git a/apps/gui/wps.c b/apps/gui/wps.c
index c27c434d12..a930edaded 100644
--- a/apps/gui/wps.c
+++ b/apps/gui/wps.c
@@ -355,10 +355,6 @@ bool ffwd_rew(int button)
if (!skin_get_global_state()->paused)
audio_pause();
#endif
-#if CONFIG_KEYPAD == PLAYER_PAD
- FOR_NB_SCREENS(i)
- skin_get_gwps(WPS, i)->display->scroll_stop();
-#endif
if (direction > 0)
status_set_ffmode(STATUS_FASTFORWARD);
else