diff options
author | Soeren Moch <smoch@web.de> | 2021-02-13 14:03:29 +0100 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2021-02-16 11:31:28 +0100 |
commit | 05c188d3e03f41fcfdcb1e070a638c55d8cb491e (patch) | |
tree | 21f92f4a8a12c705d71842ce7169c0a40af5577d | |
parent | 404ed1b377c11c7c3a0bebac9b7f4b9f983af424 (diff) | |
download | skin-nopacity-05c188d3e03f41fcfdcb1e070a638c55d8cb491e.tar.gz skin-nopacity-05c188d3e03f41fcfdcb1e070a638c55d8cb491e.tar.bz2 |
Cleanup global declarations
Follow the usual pattern to implement global variables in source files
and declare these variables as extern in corresponding headers.
Signed-off-by: Soeren Moch <smoch@web.de>
-rw-r--r-- | config.c | 3 | ||||
-rw-r--r-- | config.h | 14 | ||||
-rw-r--r-- | fontmanager.c | 3 | ||||
-rw-r--r-- | fontmanager.h | 4 | ||||
-rw-r--r-- | geometrymanager.c | 2 | ||||
-rw-r--r-- | geometrymanager.h | 4 | ||||
-rw-r--r-- | skinnopacity.c | 2 |
7 files changed, 16 insertions, 16 deletions
@@ -5,6 +5,9 @@ #include "helpers.h" #include <vdr/skins.h> +cNopacityConfig config; +cTheme Theme; + cNopacityConfig::cNopacityConfig() { logoPathSet = false; epgImagePathSet = false; @@ -58,17 +58,9 @@ class cNopacityConfig { cString epgImagePath; bool mainMenuEntry; }; -#ifdef DEFINE_CONFIG - cNopacityConfig config; - cGeometryManager *geoManager; - cFontManager *fontManager; - cTheme Theme; -#else - extern cNopacityConfig config; - extern cGeometryManager *geoManager; - extern cFontManager *fontManager; - extern cTheme Theme; -#endif + +extern cNopacityConfig config; +extern cTheme Theme; //COMMON #define CLR_TRANSPARENT 0x00000000 diff --git a/fontmanager.c b/fontmanager.c index 0ef4bb1..86339df 100644 --- a/fontmanager.c +++ b/fontmanager.c @@ -2,6 +2,7 @@ #include "geometrymanager.h" #include "config.h" +cFontManager *fontManager; cFontManager::cFontManager() { } @@ -132,4 +133,4 @@ void cFontManager::SetFontsVolume(void) { void cFontManager::DeleteFontsVolume(void) { delete volumeText; -}
\ No newline at end of file +} diff --git a/fontmanager.h b/fontmanager.h index 28d2a45..7d3ef51 100644 --- a/fontmanager.h +++ b/fontmanager.h @@ -64,4 +64,6 @@ class cFontManager { cFont *volumeText; }; -#endif //__NOPACITY_FONTMANAGER_H
\ No newline at end of file +extern cFontManager *fontManager; + +#endif //__NOPACITY_FONTMANAGER_H diff --git a/geometrymanager.c b/geometrymanager.c index 59fd242..132686c 100644 --- a/geometrymanager.c +++ b/geometrymanager.c @@ -3,6 +3,8 @@ #include "helpers.h" #include <vdr/osd.h> +cGeometryManager *geoManager; + cGeometryManager::cGeometryManager() { SetOSDSize(); } diff --git a/geometrymanager.h b/geometrymanager.h index 9d0c387..7b28b52 100644 --- a/geometrymanager.h +++ b/geometrymanager.h @@ -112,4 +112,6 @@ class cGeometryManager { int volumeProgressBarHeight; }; -#endif //__NOPACITY_GEOMETRYMANAGER_H
\ No newline at end of file +extern cGeometryManager *geoManager; + +#endif //__NOPACITY_GEOMETRYMANAGER_H diff --git a/skinnopacity.c b/skinnopacity.c index 9a119e0..c8bbc74 100644 --- a/skinnopacity.c +++ b/skinnopacity.c @@ -7,8 +7,6 @@ */ #include <getopt.h> #include <vdr/plugin.h> - -#define DEFINE_CONFIG 1 #include "config.h" #include "nopacity.h" #include "setup.h" |