replace framebuffer.h include with forward declaration

instead of including framebuffer.h almost everywhere, replace it with
class CFrameBuffer forward declarations and/or generic system includes.
Add a hack to define fb_pixel_t to config.h (one reason for
framebuffer.h includes was the fb_pixel_t define)
This commit is contained in:
Stefan Seyfried
2017-02-05 13:05:07 +01:00
committed by M. Liebmann
parent aed22b3788
commit e490f84ea8
59 changed files with 59 additions and 63 deletions

View File

@@ -256,6 +256,9 @@ HWLIB_CFLAGS='-I$(top_srcdir)/lib/libcoolstream2 -I$(top_srcdir)/src/zapit/inclu
fi
fi
# hack, so that framebuffer.h does not need to be included everywhere...
AC_DEFINE(fb_pixel_t, uint32_t, [hack, so that framebuffer.h does not need to be included everywhere...])
# hack to define a short filename also for out-of-tree build
if test `dirname $0` = `pwd` || test "$0" = ./configure; then
HWLIB_CFLAGS="$HWLIB_CFLAGS "'-D__file__=__FILE__'

View File

@@ -23,8 +23,9 @@
#ifndef __CCOLORGRADIENT__
#define __CCOLORGRADIENT__
#include <driver/framebuffer.h>
#include <inttypes.h>
class CFrameBuffer;
class CColorGradient
{
private:

View File

@@ -26,6 +26,7 @@
#include <global.h>
#include <driver/rcinput.h>
#include <driver/fade.h>
#include <driver/framebuffer.h>
#include <unistd.h>
#if HAVE_COOL_HARDWARE

View File

@@ -22,8 +22,9 @@
#ifndef __fade_f__
#define __fade_f__
#include <driver/framebuffer.h>
#include <inttypes.h>
class CFrameBuffer;
class COSDFader
{
private:

View File

@@ -23,8 +23,8 @@
#define __fb_window_h__
#include <driver/fontrenderer.h>
#include <driver/framebuffer.h>
class CFrameBuffer;
class CFBWindow
{
public:

View File

@@ -33,6 +33,7 @@
#include <ft2build.h>
#include FT_FREETYPE_H
#include <driver/framebuffer.h>
#include <driver/fontrenderer.h>
#include <system/debug.h>

View File

@@ -28,6 +28,7 @@
#include <pthread.h>
#include <string>
#include <inttypes.h>
#include <ft2build.h>
#include FT_FREETYPE_H
@@ -36,9 +37,7 @@
#include FT_CACHE_IMAGE_H
#include FT_CACHE_SMALL_BITMAPS_H
#include "framebuffer.h"
class CFrameBuffer;
class FBFontRenderClass;
class Font
{

View File

@@ -22,8 +22,8 @@
#include <gui/movieinfo.h>
#include <gui/components/cc.h>
#include <driver/framebuffer.h>
class CFrameBuffer;
class CMovieCut
{
private:

View File

@@ -1,3 +1,4 @@
#include <config.h>
#include "pv_config.h"
#ifdef FBV_SUPPORT_BMP
#include "pictureviewer.h"

View File

@@ -1,3 +1,4 @@
#include <config.h>
#include "pv_config.h"
#include <cstring>
#include <cstdlib>

View File

@@ -1,3 +1,4 @@
#include <config.h>
#include "pv_config.h"
#include <cstring>

View File

@@ -30,7 +30,7 @@
#include <vector>
#include <stdio.h> /* printf */
#include <sys/time.h> /* gettimeofday */
#include <driver/framebuffer.h>
#include <inttypes.h>
class CPictureViewer
{
struct cformathandler
@@ -64,7 +64,7 @@ class CPictureViewer
void Cleanup();
void SetVisible(int startx, int endx, int starty, int endy);
static double m_aspect_ratio_correction;
bool DisplayImage (const std::string & name, int posx, int posy, int width, int height, int transp=CFrameBuffer::TM_EMPTY);
bool DisplayImage (const std::string & name, int posx, int posy, int width, int height, int transp=0 /*CFrameBuffer::TM_EMPTY*/);
// bool DisplayLogo (uint64_t channel_id, int posx, int posy, int width, int height);
bool GetLogoName(const uint64_t& channel_id, const std::string& ChanName, std::string & name, int *width = NULL, int *height = NULL);
fb_pixel_t * getImage (const std::string & name, int width, int height);

View File

@@ -1,3 +1,4 @@
#include <config.h>
#include "pv_config.h"
#ifdef FBV_SUPPORT_PNG

View File

@@ -46,7 +46,6 @@
#ifndef __RADIO_AUDIO_H
#define __RADIO_AUDIO_H
#include <driver/framebuffer.h>
#include <driver/fontrenderer.h>
#if 0

View File

@@ -26,9 +26,9 @@
#ifndef __CVOLUME__
#define __CVOLUME__
#include <driver/framebuffer.h>
#include <gui/volumebar.h>
class CFramebuffer;
class CVolume : public CChangeObserver
{
private:

View File

@@ -34,7 +34,6 @@
#define __audioplayergui__
#include <driver/framebuffer.h>
#include <driver/audiofile.h>
#include <gui/filebrowser.h>
#include <gui/components/cc.h>
@@ -53,6 +52,7 @@ typedef std::set<long> CPosList;
typedef std::map<unsigned char, CPosList> CTitle2Pos;
typedef std::pair<unsigned char, CPosList> CTitle2PosItem;
class CFrameBuffer;
class CAudiofileExt : public CAudiofile
{
public:

View File

@@ -32,7 +32,6 @@
#ifndef __bouqueteditor_bouquets__
#define __bouqueteditor_bouquets__
#include <driver/framebuffer.h>
#include <gui/widget/menue.h>
#include <zapit/client/zapitclient.h>
@@ -42,6 +41,7 @@
#include <gui/widget/listhelpers.h>
#include <string>
class CFrameBuffer;
/* class for handling when bouquets changed. */
/* This class should be a temporarily work around */
/* and should be replaced by standard neutrino event handlers */

View File

@@ -33,7 +33,6 @@
#ifndef __bouqueteditor_channels__
#define __bouqueteditor_channels__
#include <driver/framebuffer.h>
#include <gui/widget/menue.h>
#include <gui/widget/listhelpers.h>
#include <gui/components/cc.h>
@@ -43,6 +42,7 @@
#include <zapit/channel.h>
#include <zapit/bouquets.h>
class CFrameBuffer;
class CBEChannelWidget : public CMenuTarget, public CListHelpers
{

View File

@@ -32,7 +32,6 @@
#ifndef __bouqueteditor_chanselect__
#define __bouqueteditor_chanselect__
#include <driver/framebuffer.h>
#include <gui/widget/listbox.h>
#include <gui/components/cc.h>
#include <zapit/client/zapitclient.h>

View File

@@ -39,12 +39,12 @@
#include <string>
#include <vector>
#include <driver/framebuffer.h>
#include <gui/widget/menue.h>
#define MAXBOOKMARKS 10
#define BOOKMARKFILE CONFIGDIR "/bookmarks"
class CFramebuffer;
class CBookmark
{
private:

View File

@@ -36,12 +36,12 @@
#include <gui/channellist.h>
#include <gui/widget/listhelpers.h>
#include <driver/framebuffer.h>
#include <zapit/bouquets.h>
#include <string>
#include <vector>
class CFrameBuffer;
typedef enum bouquetSwitchMode
{

View File

@@ -33,7 +33,6 @@
Boston, MA 02110-1301, USA.
*/
#include <driver/framebuffer.h>
#include <gui/widget/menue.h>
#include <gui/widget/listhelpers.h>
#include <gui/components/cc.h>
@@ -65,6 +64,7 @@ enum {
CHANLIST_NO_RESTORE = -4
};
class CFrameBuffer;
class CBouquet;
class CChannelList : public CListHelpers

View File

@@ -37,6 +37,8 @@
#include <stdio.h>
#include <math.h>
#include <driver/framebuffer.h>
#ifndef FLT_EPSILON
#define FLT_EPSILON 1E-5
#endif

View File

@@ -29,6 +29,7 @@
#include "cc_signals.h"
#include "cc_timer.h"
#include <driver/colorgradient.h>
#include <driver/framebuffer.h>
#include <driver/fade.h>
#include <gui/color.h>

View File

@@ -26,12 +26,12 @@
#ifndef __CC_TYPES__
#define __CC_TYPES__
#include <driver/framebuffer.h>
#include <system/localize.h>
#include <driver/fontrenderer.h>
#include <driver/rcinput.h>
#include <gui/color_custom.h>
struct gradientData_t;
class CComponentsForm;
class CComponentsScrollBar;

View File

@@ -34,11 +34,11 @@
#define __dboxinfo__
#include <gui/widget/menue.h>
#include <driver/framebuffer.h>
#include <driver/fontrenderer.h>
#include <gui/components/cc.h>
#include <string>
class CFrameBuffer;
class CDBoxInfoWidget : public CMenuTarget
{
private:

View File

@@ -33,7 +33,6 @@
#ifndef __epgview__
#define __epgview__
#include <driver/framebuffer.h>
#include <driver/rcinput.h>
#include <driver/fontrenderer.h>
#include <system/settings.h>
@@ -50,6 +49,7 @@
#define BIG_FONT_FAKTOR 1.5
class CFrameBuffer;
class CEpgData
{
private:

View File

@@ -30,7 +30,6 @@
#include <timerdclient/timerdtypes.h>
#include <sectionsdclient/sectionsdclient.h>
#include <driver/framebuffer.h>
#include <driver/fontrenderer.h>
#include <driver/rcinput.h>
#include <system/settings.h>
@@ -44,7 +43,7 @@
#include <string>
class CFramebuffer;
class CEventList : public CListHelpers
{
// Eventfinder start

View File

@@ -38,7 +38,6 @@
#endif
#include <driver/file.h>
#include <driver/framebuffer.h>
#include <driver/fontrenderer.h>
#include <driver/rcinput.h>
@@ -58,6 +57,7 @@
bool chooserDir(std::string &setting_dir, bool test_dir, const char *action_str, bool allow_tmp = false);
bool chooserDir(char *setting_dir, bool test_dir, const char *action_str, size_t str_leng, bool allow_tmp = false);
class CFrameBuffer;
/**
* Converts input of numeric keys to SMS style char input.
*/

View File

@@ -36,7 +36,6 @@
#include <sectionsdclient/sectionsdclient.h>
#include <driver/rcinput.h>
#include <driver/framebuffer.h>
#include <driver/fontrenderer.h>
#include <driver/fade.h>
#include <system/settings.h>
@@ -44,6 +43,7 @@
#include <gui/components/cc.h>
#include <string>
class CFrameBuffer;
class CInfoViewerBB
{
public:

View File

@@ -21,6 +21,7 @@
#ifndef _LUAINSTANCEHELPERS_H
#define _LUAINSTANCEHELPERS_H
#include <map>
//#define LUA_DEBUG printf
#define LUA_DEBUG(...)

View File

@@ -35,7 +35,6 @@
#include <gui/widget/menue.h>
#include <gui/components/cc.h>
#include <driver/framebuffer.h>
#include <string>
#include <zapit/femanager.h>
@@ -44,6 +43,7 @@
#define STEP_MODE_ON 2
#define STEP_MODE_TIMED 3
class CFrameBuffer;
class CMotorControl : public CMenuTarget
{
private:

View File

@@ -34,7 +34,6 @@
#include <config.h>
#include <configfile.h>
#include <driver/framebuffer.h>
#include <gui/filebrowser.h>
#include <gui/bookmarkmanager.h>
#include <gui/widget/menue.h>
@@ -59,6 +58,7 @@ extern "C" {
#include <lualib.h>
}
class CFrameBuffer;
class CMoviePlayerGui : public CMenuTarget
{
public:

View File

@@ -33,7 +33,6 @@
#include <gui/widget/menue.h>
#include <gui/widget/shellwindow.h>
#include <driver/framebuffer.h>
#include <configfile.h>
#include <string>
#include <vector>

View File

@@ -34,13 +34,12 @@
#include <gui/components/cc.h>
#include <gui/widget/menue.h>
#include <driver/framebuffer.h>
#include <system/setting_helpers.h>
#include <system/settings.h>
#include <string>
class CFrameBuffer;
class COsdSetup : public CMenuTarget, public CChangeObserver
{
private:

View File

@@ -33,7 +33,6 @@
#define __pictureviewergui__
#include <driver/framebuffer.h>
#include <driver/pictureviewer/pictureviewer.h>
#include <gui/widget/menue.h>
#include <gui/filebrowser.h>
@@ -41,6 +40,7 @@
#include <string>
class CFrameBuffer;
class CPicture
{
public:

View File

@@ -33,9 +33,6 @@
#include <gui/widget/menue.h>
#include <driver/framebuffer.h>
#include <string>
class CPictureViewerSetup : public CMenuTarget

View File

@@ -2,9 +2,9 @@
#define __PIP_SETUP_H_
#include <gui/widget/menue.h>
#include <driver/framebuffer.h>
#include <string>
class CFrameBuffer;
class CPipSetup : public CMenuTarget
{
private:

View File

@@ -34,7 +34,6 @@
#include <gui/widget/menue.h>
#include <driver/framebuffer.h>
#include <system/localize.h>
#include <string>

View File

@@ -32,7 +32,6 @@
#ifndef __plugins__
#define __plugins__
#include <driver/framebuffer.h>
#include <system/localize.h>
#include <plugin.h>
@@ -40,6 +39,7 @@
#include <string>
#include <vector>
class CFrameBuffer;
class CPlugins
{

View File

@@ -34,11 +34,11 @@
#include <gui/widget/menue.h>
#include <gui/components/cc.h>
#include <driver/framebuffer.h>
#include <system/localize.h>
#include <string>
#include <system/settings.h>
class CFrameBuffer;
class CScanTs : public CMenuTarget
{
private:

View File

@@ -25,11 +25,11 @@
#ifndef __CSCREENSAVER_H__
#define __CSCREENSAVER_H__
#include <driver/framebuffer.h>
#include <vector>
#include <string>
#include <gui/components/cc.h>
class CFrameBuffer;
class CScreenSaver : public sigc::trackable
{
private:

View File

@@ -35,11 +35,9 @@
#include <gui/widget/menue.h>
#include <driver/framebuffer.h>
#include <string>
class CFrameBuffer;
class CScreenSetup : public CMenuTarget
{
private:

View File

@@ -25,12 +25,11 @@
#include <gui/widget/menue.h>
#include <driver/framebuffer.h>
#include <gui/components/cc.h>
#include <gui/movieplayer.h>
#include <zapit/femanager.h>
class CFrameBuffer;
class COSDFader;
class CStreamInfo2 : public CMenuTarget
{

View File

@@ -38,12 +38,10 @@
#include <gui/widget/menue.h>
#include <gui/widget/listhelpers.h>
#include <driver/framebuffer.h>
#include <string>
#include <vector>
class CFrameBuffer;
class CTimerdClient;
class CTimerList : public CMenuTarget, public CListHelpers
{

View File

@@ -38,7 +38,6 @@
#include <gui/widget/progresswindow.h>
#include <driver/framebuffer.h>
#ifdef BOXMODEL_APOLLO
#include <system/mtdutils/mkfs.jffs2.h>
#endif

View File

@@ -23,7 +23,6 @@
#ifndef __upnpplayergui__
#define __upnpplayergui__
#include <driver/framebuffer.h>
#include <driver/audiofile.h>
#include <driver/pictureviewer/pictureviewer.h>
#include <gui/filebrowser.h>
@@ -58,6 +57,7 @@ struct UPnPEntry
int type;
};
class CFrameBuffer;
class CUpnpBrowserGui : public CMenuTarget, public CListHelpers
{
public:

View File

@@ -31,10 +31,9 @@
#define __video_setup__
#include <gui/widget/menue.h>
#include <driver/framebuffer.h>
#include <string>
class CFrameBuffer;
class CVideoSettings : public CMenuWidget, CChangeObserver
{
private:

View File

@@ -23,7 +23,6 @@
*/
#include <driver/fontrenderer.h>
#include <driver/framebuffer.h>
#include <system/localize.h>
#include <gui/color.h>

View File

@@ -33,12 +33,12 @@
#ifndef __colorchooser__
#define __colorchooser__
#include <driver/framebuffer.h>
#include <system/localize.h>
#include <gui/widget/menue.h>
#include <string>
class CFrameBuffer;
class CColorChooser : public CMenuTarget
{
private:

View File

@@ -26,7 +26,6 @@
#include "menue.h"
#include <driver/framebuffer.h>
#include <system/localize.h>
#include <string>
@@ -41,6 +40,7 @@ struct keyboard_layout
std::string (*keys)[KEY_ROWS][KEY_COLUMNS];
};
class CFrameBuffer;
class CInputString
{
private:

View File

@@ -35,14 +35,13 @@
#include <string>
#include <driver/framebuffer.h>
#include <driver/fontrenderer.h>
#include <driver/rcinput.h>
#include <system/localize.h>
#include "menue.h"
class CFrameBuffer;
class CKeyChooserItem;
class CKeyChooserItemNoKey;
class CKeyChooser : public CMenuWidget

View File

@@ -28,10 +28,9 @@
#include "menue.h"
#include "listhelpers.h"
#include <driver/framebuffer.h>
#include <string>
class CFrameBuffer;
class CListBox : public CMenuTarget, public CListHelpers
{
protected:

View File

@@ -36,12 +36,10 @@
#ifndef __MENU__
#define __MENU__
#include <driver/framebuffer.h>
#include <driver/rcinput.h>
#include <system/localize.h>
#include <gui/widget/buttons.h>
#include <gui/widget/icons.h>
#include <gui/color.h>
#include <gui/plugins.h>
#include <gui/components/cc.h>
#include <string>
@@ -58,6 +56,8 @@ extern "C" {
typedef int mn_widget_id_t;
typedef int menu_item_disable_cond_t;
class CFrameBuffer;
class CMenuWidget;
struct menu_return
{

View File

@@ -33,7 +33,6 @@
#ifndef __mountchooser__
#define __mountchooser__
#include <driver/framebuffer.h>
#include <system/localize.h>
#include <gui/widget/menue.h>

View File

@@ -28,11 +28,11 @@
#include "menue.h"
#include <driver/framebuffer.h>
#include <system/localize.h>
#include <string>
class CFrameBuffer;
class CStringInput : public CMenuTarget
{
protected:

View File

@@ -35,12 +35,12 @@
#include "menue.h"
#include <driver/framebuffer.h>
#include <system/localize.h>
#include <string>
#include <vector>
class CFrameBuffer;
class CExtendedInput_Item;
class CExtendedInput : public CMenuTarget
{

View File

@@ -47,6 +47,7 @@
#include "debug.h"
#include <global.h>
#include <driver/fontrenderer.h>
#include <driver/framebuffer.h>
#include <system/helpers.h>
#include <gui/update_ext.h>
using namespace std;

View File

@@ -18,6 +18,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA
*/
#include <config.h>
#include <cstring>
#include <system/httptool.h>