From 7c440bff3254250711e1768de2769dc68185fefd Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Wed, 11 Nov 2009 06:39:23 +0000 Subject: remove 3 bad viewport functions: * viewport_set_current_vp() because if a screen wants to not use the user setting it shouldn't be dealing with the viewport manager at all (other than to disable the bars) * viewport_ui_vp_get_state() is unused (and not needed) * viewport_get_current_vp() because you should be using set_defaults() instead. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23606 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/viewport.c | 21 --------------------- apps/gui/viewport.h | 17 ----------------- 2 files changed, 38 deletions(-) (limited to 'apps/gui') diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c index 8e00ea3a71..0a2630cc9e 100644 --- a/apps/gui/viewport.c +++ b/apps/gui/viewport.c @@ -242,27 +242,6 @@ static void viewportmanager_ui_vp_changed(void *param) screens[i].update(); } -void viewport_set_current_vp(struct viewport* vp) -{ - if (vp != NULL) - ui_vp_info.vp = vp; - else - ui_vp_info.vp = custom_vp; - - /* must be done after the assignment above or event handler get old vps */ - send_event(GUI_EVENT_THEME_CHANGED, NULL); -} - -struct viewport* viewport_get_current_vp(void) -{ - return ui_vp_info.vp; -} - -bool viewport_ui_vp_get_state(enum screen_type screen) -{ - return ui_vp_info.active[screen]; -} - /* * (re)parse the UI vp from the settings * - Returns diff --git a/apps/gui/viewport.h b/apps/gui/viewport.h index 0e5ad30f35..54424339ca 100644 --- a/apps/gui/viewport.h +++ b/apps/gui/viewport.h @@ -89,23 +89,6 @@ void viewport_set_fullscreen(struct viewport *vp, /* call this when a theme changed */ void viewportmanager_theme_changed(const int); -/* - * Returns a pointer to the current viewport - * - That could be the UI vp, or a viewport passed to do_menu() or the like - */ -struct viewport* viewport_get_current_vp(void); - -/* - * Set the UI vp pointer to a different one - NULL to reset to the UI vp - * - * This is needed since the UI viewport needs is kept in RAM. - */ -void viewport_set_current_vp(struct viewport* vp); - -/* - * returns true if the ui viewport is active on the screen - */ -bool viewport_ui_vp_get_state(const enum screen_type screen); #ifdef HAVE_TOUCHSCREEN bool viewport_point_within_vp(const struct viewport *vp, const int x, const int y); -- cgit v1.2.3