4 * Copyright (C) 2005-2012 Team XBMC
7 * This Program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
12 * This Program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with XBMC; see the file COPYING. If not, see
19 * <http://www.gnu.org/licenses/>.
23 #include "threads/Thread.h"
24 #include "utils/XBMCTinyXML.h"
25 #include "guilib/GUILabelControl.h" // for CInfoPortion
31 class ILCD : public CThread
34 enum DISABLE_ON_PLAY { DISABLE_ON_PLAY_NONE = 0, DISABLE_ON_PLAY_VIDEO = 1, DISABLE_ON_PLAY_MUSIC = 2 };
49 CUSTOM_CHARSET_DEFAULT = 0,
50 CUSTOM_CHARSET_SMALLCHAR,
51 CUSTOM_CHARSET_MEDIUMCHAR,
52 CUSTOM_CHARSET_BIGCHAR,
55 virtual void Initialize();
56 virtual bool IsConnected();
57 virtual void Stop() = 0;
58 virtual void Suspend() = 0;
59 virtual void Resume() = 0;
60 virtual void SetBackLight(int iLight) = 0;
61 virtual void SetContrast(int iContrast) = 0;
62 virtual int GetColumns() = 0;
63 virtual int GetRows() = 0;
64 virtual void SetLine(int iLine, const CStdString& strLine) = 0;
65 virtual void DisableOnPlayback(bool playingVideo, bool playingMusic);
66 CStdString GetProgressBar(double tCurrent, double tTotal);
67 void SetCharset( UINT nCharset );
68 CStdString GetBigDigit( UINT _nCharset, int _nDigit, UINT _nLine, UINT _nMinSize, UINT _nMaxSize, bool _bSpacePadding );
69 void LoadSkin(const CStdString &xmlFile);
71 void Render(LCD_MODE mode);
72 ILCD() : CThread("ILCD"),
73 m_disableOnPlay(DISABLE_ON_PLAY_NONE),
74 m_eCurrentCharset(CUSTOM_CHARSET_DEFAULT) {}
76 virtual void Process() = 0;
77 void StringToLCDCharSet(CStdString& strText);
78 unsigned char GetLCDCharsetCharacter( UINT _nCharacter, int _nCharset=-1);
79 void LoadMode(TiXmlNode *node, LCD_MODE mode);
84 std::vector<CGUIInfoLabel> m_lcdMode[LCD_MODE_MAX];
85 UINT m_eCurrentCharset;