reduce dependencies on driver/rcinput.h

* add new header that only contains neutrino_msg_t and friends, often this
  is all that's needed instead of full rcinput.h
* directly include rcinput.h in some cpp files instead of relying on
  accidental inclusion in some header
* add class forward declarations to avoid dragging in rcinput indirectly
This could use more work to further reduce the impact; maybe separating
the CRCinput::key_* constants from the rcinput class would be good.
This commit is contained in:
Stefan Seyfried
2018-01-07 15:29:10 +01:00
committed by Thilo Graf
parent 10ad29afb7
commit b982458d2d
16 changed files with 61 additions and 42 deletions

View File

@@ -34,7 +34,7 @@
#include <gui/widget/icons.h>
#include <string>
#include <driver/neutrinofonts.h>
#include <driver/rcinput.h>
#include <driver/neutrino_msg_t.h>
#define COL_BUTTON_BODY COL_MENUFOOT_PLUS_0
#define COL_BUTTON_TEXT_ENABLED COL_MENUCONTENTSELECTED_PLUS_0

View File

@@ -96,7 +96,7 @@ class CComponentsFooter : public CComponentsHeader, public CCButtonSelect
const std::string& text,
const int& chain_width = 0,
const int& label_width = 0,
const neutrino_msg_t& msg = CRCInput::RC_nokey,
const neutrino_msg_t& msg = RC_NOKEY /*CRCInput::RC_nokey*/,
const int& result_value = -1,
const int& alias_value = -1);
///add single button label with locale label type as content, chain_width as int, label width as int
@@ -104,7 +104,7 @@ class CComponentsFooter : public CComponentsHeader, public CCButtonSelect
const neutrino_locale_t& locale,
const int& chain_width = 0,
const int& label_width = 0,
const neutrino_msg_t& msg = CRCInput::RC_nokey,
const neutrino_msg_t& msg = RC_NOKEY /*CRCInput::RC_nokey*/,
const int& result_value = -1,
const int& alias_value = -1);

View File

@@ -89,7 +89,7 @@ class CYourClass : sigc::trackable //<- not forget, requierd by destructor!
#include <sigc++/signal.h>
#include <sigc++/bind.h>
#include <driver/rcinput.h>
#include <driver/neutrino_msg_t.h>
class CComponentsSignals : public sigc::trackable
{

View File

@@ -27,8 +27,9 @@
#define __CC_TYPES__
#include <system/localize.h>
#include <driver/rcinput.h>
#include <driver/neutrino_msg_t.h>
#include <gui/color_custom.h>
#include <vector>
struct gradientData_t;
class Font;
@@ -202,7 +203,7 @@ typedef struct button_label_cc
button_label_cc(): button(NULL),
text(std::string()),
locale(NONEXISTANT_LOCALE),
directKeys(1, CRCInput::RC_nokey){}
directKeys(1, RC_NOKEY /*CRCInput::RC_nokey*/){}
} button_label_cc_struct;
#define CC_WIDTH_MIN CFrameBuffer::getInstance()->scale2Res(16)