Permalink
Browse files

cleanup: Got rid of a bunch of DWORD/WORD stuff in guilib primarily -…

… colors, alignment, fonts, labels, keys and actions all purged.

cleanup: Removed <windows.h> from StdString.h, and removed system.h from a bunch of headers in guilib.

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/linuxport/XBMC@23060 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
  • Loading branch information...
1 parent 7a769a1 commit 1a029e2387194c7b27591bdc35b8cbe4103e4dc5 jmarshallnz committed Sep 22, 2009
Showing with 1,302 additions and 1,269 deletions.
  1. +13 −13 guilib/GUIAudioManager.cpp
  2. +4 −4 guilib/GUIAudioManager.h
  3. +9 −9 guilib/GUIBaseContainer.cpp
  4. +12 −12 guilib/GUIButtonControl.cpp
  5. +4 −4 guilib/GUIButtonControl.h
  6. +11 −11 guilib/GUIButtonScroller.cpp
  7. +8 −8 guilib/GUICheckMarkControl.cpp
  8. +2 −2 guilib/GUICheckMarkControl.h
  9. +3 −3 guilib/GUIColorManager.cpp
  10. +4 −5 guilib/GUIColorManager.h
  11. +1 −1 guilib/GUIControl.cpp
  12. +1 −1 guilib/GUIControl.h
  13. +14 −18 guilib/GUIControlFactory.cpp
  14. +3 −3 guilib/GUIControlFactory.h
  15. +1 −1 guilib/GUIDialog.cpp
  16. +10 −10 guilib/GUIEditControl.cpp
  17. +1 −1 guilib/GUIFadeLabelControl.cpp
  18. +3 −3 guilib/GUIFixedListContainer.cpp
  19. +16 −16 guilib/GUIFont.cpp
  20. +22 −21 guilib/GUIFont.h
  21. +3 −3 guilib/GUIFontManager.cpp
  22. +1 −1 guilib/GUIFontManager.h
  23. +29 −29 guilib/GUIFontTTF.cpp
  24. +18 −14 guilib/GUIFontTTF.h
  25. +36 −36 guilib/GUIFontTTFDX.cpp
  26. +0 −2 guilib/GUIFontTTFDX.h
  27. +4 −4 guilib/GUIFontTTFGL.cpp
  28. +3 −3 guilib/GUIInfoColor.cpp
  29. +7 −8 guilib/GUIInfoColor.h
  30. +3 −3 guilib/GUILabelControl.cpp
  31. +2 −2 guilib/GUILabelControl.h
  32. +3 −3 guilib/GUIListContainer.cpp
  33. +2 −2 guilib/GUIListLabel.cpp
  34. +5 −5 guilib/GUIMoverControl.cpp
  35. +2 −2 guilib/GUIMultiSelectText.cpp
  36. +3 −3 guilib/GUIPanelContainer.cpp
  37. +3 −2 guilib/GUIRSSControl.cpp
  38. +17 −3 guilib/GUIRSSControl.h
  39. +1 −1 guilib/GUIRadioButtonControl.cpp
  40. +3 −3 guilib/GUIResizeControl.cpp
  41. +1 −1 guilib/GUIScrollBarControl.cpp
  42. +5 −5 guilib/GUISelectButtonControl.cpp
  43. +1 −1 guilib/GUISliderControl.cpp
  44. +4 −4 guilib/GUISpinControl.cpp
  45. +1 −1 guilib/GUISpinControl.h
  46. +2 −2 guilib/GUIStandardWindow.cpp
  47. +1 −1 guilib/GUITextBox.cpp
  48. +40 −40 guilib/GUITextLayout.cpp
  49. +25 −21 guilib/GUITextLayout.h
  50. +2 −2 guilib/GUITexture.cpp
  51. +6 −4 guilib/GUITexture.h
  52. +2 −2 guilib/GUITextureD3D.cpp
  53. +2 −2 guilib/GUITextureD3D.h
  54. +2 −2 guilib/GUITextureGL.cpp
  55. +2 −2 guilib/GUITextureGL.h
  56. +2 −2 guilib/GUITextureSDL.cpp
  57. +4 −4 guilib/GUITextureSDL.h
  58. +1 −1 guilib/GUIToggleButtonControl.cpp
  59. +1 −1 guilib/GUIVideoControl.cpp
  60. +7 −7 guilib/GUIVisualisationControl.cpp
  61. +2 −2 guilib/GUIWindow.cpp
  62. +1 −1 guilib/GUIWindowManager.cpp
  63. +3 −3 guilib/GUIWrappingListContainer.cpp
  64. +2 −2 guilib/GraphicContext.h
  65. +38 −38 guilib/Key.cpp
  66. +23 −23 guilib/Key.h
  67. +8 −8 guilib/LocalizeStrings.cpp
  68. +11 −12 guilib/LocalizeStrings.h
  69. +1 −2 guilib/StdString.h
  70. +5 −2 guilib/TransformMatrix.h
  71. +2 −2 guilib/VisibleEffect.cpp
  72. +2 −3 guilib/VisibleEffect.h
  73. +5 −5 guilib/XMLUtils.cpp
  74. +3 −4 guilib/XMLUtils.h
  75. +1 −1 guilib/common/IRServerSuite/IRServerSuite.cpp
  76. +0 −1 guilib/common/IRServerSuite/IrssMessage.h
  77. +1 −1 guilib/common/SDLJoystick.h
  78. +72 −72 xbmc/Application.cpp
  79. +1 −0 xbmc/ApplicationMessenger.cpp
  80. +1 −0 xbmc/ApplicationRenderer.cpp
  81. +495 −494 xbmc/ButtonTranslator.cpp
  82. +19 −19 xbmc/ButtonTranslator.h
  83. +1 −0 xbmc/FileSystem/SAPDirectory.cpp
  84. +2 −2 xbmc/GUIDialogFileBrowser.cpp
  85. +8 −8 xbmc/GUIDialogGamepad.cpp
  86. +1 −0 xbmc/GUIDialogKaiToast.cpp
  87. +18 −18 xbmc/GUIDialogKeyboard.cpp
  88. +1 −1 xbmc/GUIDialogMediaSource.cpp
  89. +3 −3 xbmc/GUIDialogMusicOSD.cpp
  90. +1 −0 xbmc/GUIDialogMusicScan.cpp
  91. +1 −1 xbmc/GUIDialogNetworkSetup.cpp
  92. +10 −10 xbmc/GUIDialogNumeric.cpp
  93. +1 −1 xbmc/GUIDialogPictureInfo.cpp
  94. +2 −1 xbmc/GUIDialogProgress.cpp
  95. +6 −6 xbmc/GUIDialogSeekBar.cpp
  96. +1 −1 xbmc/GUIDialogSettings.cpp
  97. +1 −1 xbmc/GUIDialogSlider.cpp
  98. +1 −1 xbmc/GUIDialogSmartPlaylistEditor.cpp
  99. +1 −1 xbmc/GUIDialogSmartPlaylistRule.cpp
  100. +3 −3 xbmc/GUIDialogSongInfo.cpp
  101. +1 −0 xbmc/GUIDialogVideoBookmarks.cpp
  102. +1 −1 xbmc/GUIDialogVolumeBar.cpp
  103. +1 −1 xbmc/GUIDialogYesNo.cpp
  104. +7 −7 xbmc/GUIMediaWindow.cpp
  105. +8 −8 xbmc/GUIWindowFileManager.cpp
  106. +12 −11 xbmc/GUIWindowFullScreen.cpp
  107. +1 −1 xbmc/GUIWindowLoginScreen.cpp
  108. +2 −2 xbmc/GUIWindowMusicBase.cpp
  109. +2 −2 xbmc/GUIWindowMusicNav.cpp
  110. +4 −4 xbmc/GUIWindowMusicPlaylist.cpp
  111. +2 −2 xbmc/GUIWindowMusicPlaylistEditor.cpp
  112. +1 −1 xbmc/GUIWindowMusicSongs.cpp
  113. +5 −5 xbmc/GUIWindowOSD.cpp
  114. +1 −0 xbmc/GUIWindowScreensaver.cpp
  115. +1 −1 xbmc/GUIWindowScripts.cpp
  116. +1 −1 xbmc/GUIWindowScriptsInfo.cpp
  117. +1 −1 xbmc/GUIWindowSettings.cpp
  118. +1 −1 xbmc/GUIWindowSettingsCategory.cpp
  119. +1 −1 xbmc/GUIWindowSettingsProfile.cpp
  120. +1 −1 xbmc/GUIWindowSettingsScreenCalibration.cpp
  121. +4 −3 xbmc/GUIWindowSlideShow.cpp
  122. +1 −1 xbmc/GUIWindowSystemInfo.cpp
  123. +1 −1 xbmc/GUIWindowTestPattern.cpp
  124. +2 −2 xbmc/GUIWindowVideoBase.cpp
  125. +2 −2 xbmc/GUIWindowVideoNav.cpp
  126. +4 −4 xbmc/GUIWindowVideoPlaylist.cpp
  127. +5 −5 xbmc/GUIWindowVisualisation.cpp
  128. +1 −1 xbmc/GUIWindowWeather.cpp
  129. +1 −0 xbmc/MediaManager.cpp
  130. +9 −9 xbmc/Util.cpp
  131. +2 −2 xbmc/WinEventsSDL.cpp
  132. +1 −1 xbmc/WinEventsWin32.cpp
  133. +1 −0 xbmc/cores/VideoRenderers/RenderManager.cpp
  134. +1 −0 xbmc/cores/dlgcache.cpp
  135. +14 −14 xbmc/cores/dvdplayer/DVDPlayer.cpp
  136. +1 −0 xbmc/karaoke/Cdg.cpp
  137. +3 −3 xbmc/karaoke/GUIDialogKaraokeSongSelector.cpp
  138. +3 −2 xbmc/karaoke/GUIWindowKaraokeLyrics.cpp
  139. +1 −0 xbmc/karaoke/karaokelyricsmanager.cpp
  140. +1 −1 xbmc/karaoke/karaokelyricstext.cpp
  141. +1 −0 xbmc/karaoke/karaokewindowbackground.cpp
  142. +11 −11 xbmc/lib/libGoAhead/XBMChttp.cpp
  143. +1 −1 xbmc/lib/libPython/xbmcmodule/GUIPythonWindow.cpp
  144. +1 −1 xbmc/lib/libPython/xbmcmodule/GUIPythonWindowXML.cpp
  145. +5 −5 xbmc/lib/libPython/xbmcmodule/action.cpp
  146. +1 −0 xbmc/utils/AlarmClock.cpp
  147. +4 −4 xbmc/utils/EventServer.cpp
  148. +4 −3 xbmc/utils/RssReader.cpp
  149. +6 −9 xbmc/utils/RssReader.h
@@ -174,7 +174,7 @@ void CGUIAudioManager::PlayActionSound(const CAction& action)
CSingleLock lock(m_cs);
- actionSoundMap::iterator it=m_actionSoundMap.find(action.wID);
+ actionSoundMap::iterator it=m_actionSoundMap.find(action.id);
if (it==m_actionSoundMap.end())
return;
@@ -197,15 +197,15 @@ void CGUIAudioManager::PlayActionSound(const CAction& action)
// \brief Play a sound associated with a window and its event
// Events: SOUND_INIT, SOUND_DEINIT
-void CGUIAudioManager::PlayWindowSound(DWORD dwID, WINDOW_SOUND event)
+void CGUIAudioManager::PlayWindowSound(int id, WINDOW_SOUND event)
{
// it's not possible to play gui sounds when passthrough is active
if (!m_bInitialized || !m_bEnabled || g_audioContext.IsPassthroughActive())
return;
CSingleLock lock(m_cs);
- windowSoundMap::iterator it=m_windowSoundMap.find((WORD)(dwID & 0xffff));
+ windowSoundMap::iterator it=m_windowSoundMap.find(id);
if (it==m_windowSoundMap.end())
return;
@@ -225,7 +225,7 @@ void CGUIAudioManager::PlayWindowSound(DWORD dwID, WINDOW_SOUND event)
return;
// One sound buffer for each window
- windowSoundsMap::iterator itsb=m_windowSounds.find(dwID);
+ windowSoundsMap::iterator itsb=m_windowSounds.find(id);
if (itsb!=m_windowSounds.end())
{
CGUISound* sound=itsb->second;
@@ -242,7 +242,7 @@ void CGUIAudioManager::PlayWindowSound(DWORD dwID, WINDOW_SOUND event)
return;
}
- m_windowSounds.insert(pair<DWORD, CGUISound*>(dwID, sound));
+ m_windowSounds.insert(pair<int, CGUISound*>(id, sound));
sound->Play();
}
@@ -336,19 +336,19 @@ bool CGUIAudioManager::Load()
while (pAction)
{
TiXmlNode* pIdNode = pAction->FirstChild("name");
- WORD wID = 0; // action identity
+ int id = 0; // action identity
if (pIdNode && pIdNode->FirstChild())
{
- CButtonTranslator::TranslateActionString(pIdNode->FirstChild()->Value(), wID);
+ CButtonTranslator::TranslateActionString(pIdNode->FirstChild()->Value(), id);
}
TiXmlNode* pFileNode = pAction->FirstChild("file");
CStdString strFile;
if (pFileNode && pFileNode->FirstChild())
strFile+=pFileNode->FirstChild()->Value();
- if (wID > 0 && !strFile.IsEmpty())
- m_actionSoundMap.insert(pair<WORD, CStdString>(wID, strFile));
+ if (id > 0 && !strFile.IsEmpty())
+ m_actionSoundMap.insert(pair<int, CStdString>(id, strFile));
pAction = pAction->NextSibling();
}
@@ -362,21 +362,21 @@ bool CGUIAudioManager::Load()
while (pWindow)
{
- WORD wID = 0;
+ int id = 0;
TiXmlNode* pIdNode = pWindow->FirstChild("name");
if (pIdNode)
{
if (pIdNode->FirstChild())
- wID = CButtonTranslator::TranslateWindowString(pIdNode->FirstChild()->Value());
+ id = CButtonTranslator::TranslateWindowString(pIdNode->FirstChild()->Value());
}
CWindowSounds sounds;
LoadWindowSound(pWindow, "activate", sounds.strInitFile);
LoadWindowSound(pWindow, "deactivate", sounds.strDeInitFile);
- if (wID > 0)
- m_windowSoundMap.insert(pair<WORD, CWindowSounds>(wID, sounds));
+ if (id > 0)
+ m_windowSoundMap.insert(pair<int, CWindowSounds>(id, sounds));
pWindow = pWindow->NextSibling();
}
@@ -54,7 +54,7 @@ class CGUIAudioManager : public IAudioDeviceChangedCallback
bool Load();
void PlayActionSound(const CAction& action);
- void PlayWindowSound(DWORD dwID, WINDOW_SOUND event);
+ void PlayWindowSound(int id, WINDOW_SOUND event);
void PlayPythonSound(const CStdString& strFileName);
void FreeUnused();
@@ -65,11 +65,11 @@ class CGUIAudioManager : public IAudioDeviceChangedCallback
private:
bool LoadWindowSound(TiXmlNode* pWindowNode, const CStdString& strIdentifier, CStdString& strFile);
- typedef std::map<WORD, CStdString> actionSoundMap;
- typedef std::map<WORD, CWindowSounds> windowSoundMap;
+ typedef std::map<int, CStdString> actionSoundMap;
+ typedef std::map<int, CWindowSounds> windowSoundMap;
typedef std::map<CStdString, CGUISound*> pythonSoundsMap;
- typedef std::map<DWORD, CGUISound*> windowSoundsMap;
+ typedef std::map<int, CGUISound*> windowSoundsMap;
actionSoundMap m_actionSoundMap;
windowSoundMap m_windowSoundMap;
@@ -197,13 +197,13 @@ void CGUIBaseContainer::RenderItem(float posX, float posY, CGUIListItem *item, b
bool CGUIBaseContainer::OnAction(const CAction &action)
{
- if (action.wID >= KEY_ASCII)
+ if (action.id >= KEY_ASCII)
{
- OnJumpLetter((char)(action.wID & 0xff));
+ OnJumpLetter((char)(action.id & 0xff));
return true;
}
- switch (action.wID)
+ switch (action.id)
{
case ACTION_MOVE_LEFT:
case ACTION_MOVE_RIGHT:
@@ -212,15 +212,15 @@ bool CGUIBaseContainer::OnAction(const CAction &action)
{
if (!HasFocus()) return false;
if (action.holdTime > HOLD_TIME_START &&
- ((m_orientation == VERTICAL && (action.wID == ACTION_MOVE_UP || action.wID == ACTION_MOVE_DOWN)) ||
- (m_orientation == HORIZONTAL && (action.wID == ACTION_MOVE_LEFT || action.wID == ACTION_MOVE_RIGHT))))
+ ((m_orientation == VERTICAL && (action.id == ACTION_MOVE_UP || action.id == ACTION_MOVE_DOWN)) ||
+ (m_orientation == HORIZONTAL && (action.id == ACTION_MOVE_LEFT || action.id == ACTION_MOVE_RIGHT))))
{ // action is held down - repeat a number of times
float speed = std::min(1.0f, (float)(action.holdTime - HOLD_TIME_START) / (HOLD_TIME_END - HOLD_TIME_START));
unsigned int itemsPerFrame = 1;
if (m_lastHoldTime) // number of rows/10 items/second max speed
itemsPerFrame = std::max((unsigned int)1, (unsigned int)(speed * 0.0001f * GetRows() * (timeGetTime() - m_lastHoldTime)));
m_lastHoldTime = timeGetTime();
- if (action.wID == ACTION_MOVE_LEFT || action.wID == ACTION_MOVE_UP)
+ if (action.id == ACTION_MOVE_LEFT || action.id == ACTION_MOVE_UP)
while (itemsPerFrame--) MoveUp(false);
else
while (itemsPerFrame--) MoveDown(false);
@@ -264,15 +264,15 @@ bool CGUIBaseContainer::OnAction(const CAction &action)
case ACTION_JUMP_SMS8:
case ACTION_JUMP_SMS9:
{
- OnJumpSMS(action.wID - ACTION_JUMP_SMS2 + 2);
+ OnJumpSMS(action.id - ACTION_JUMP_SMS2 + 2);
return true;
}
break;
default:
- if (action.wID)
+ if (action.id)
{
- return OnClick(action.wID);
+ return OnClick(action.id);
}
}
return false;
@@ -135,7 +135,7 @@ void CGUIButtonControl::RenderText()
bool CGUIButtonControl::OnAction(const CAction &action)
{
- if (action.wID == ACTION_SELECT_ITEM)
+ if (action.id == ACTION_SELECT_ITEM)
{
OnClick();
return true;
@@ -237,7 +237,7 @@ bool CGUIButtonControl::OnMouseClick(DWORD dwButton, const CPoint &point)
{
g_Mouse.SetState(MOUSE_STATE_CLICK);
CAction action;
- action.wID = ACTION_SELECT_ITEM;
+ action.id = ACTION_SELECT_ITEM;
OnAction(action);
return true;
}
@@ -256,28 +256,28 @@ CStdString CGUIButtonControl::GetLabel2() const
return strLabel;
}
-void CGUIButtonControl::PythonSetLabel(const CStdString &strFont, const string &strText, DWORD dwTextColor, DWORD dwShadowColor, DWORD dwFocusedColor)
+void CGUIButtonControl::PythonSetLabel(const CStdString &strFont, const string &strText, color_t textColor, color_t shadowColor, color_t focusedColor)
{
m_label.font = g_fontManager.GetFont(strFont);
- m_label.textColor = dwTextColor;
- m_label.focusedColor = dwFocusedColor;
- m_label.shadowColor = dwShadowColor;
+ m_label.textColor = textColor;
+ m_label.focusedColor = focusedColor;
+ m_label.shadowColor = shadowColor;
SetLabel(strText);
}
-void CGUIButtonControl::PythonSetDisabledColor(DWORD dwDisabledColor)
+void CGUIButtonControl::PythonSetDisabledColor(color_t disabledColor)
{
- m_label.disabledColor = dwDisabledColor;
+ m_label.disabledColor = disabledColor;
}
-void CGUIButtonControl::RAMSetTextColor(DWORD dwTextColor)
+void CGUIButtonControl::RAMSetTextColor(color_t textColor)
{
- m_label.textColor = dwTextColor;
+ m_label.textColor = textColor;
}
-void CGUIButtonControl::SettingsCategorySetTextAlign(DWORD dwAlign)
+void CGUIButtonControl::SettingsCategorySetTextAlign(uint32_t align)
{
- m_label.align = dwAlign;
+ m_label.align = align;
}
void CGUIButtonControl::OnClick()
@@ -68,11 +68,11 @@ class CGUIButtonControl : public CGUIControl
virtual CStdString GetDescription() const;
void SetAlpha(unsigned char alpha);
- void PythonSetLabel(const CStdString &strFont, const std::string &strText, DWORD dwTextColor, DWORD dwShadowColor, DWORD dwFocusedColor);
- void PythonSetDisabledColor(DWORD dwDisabledColor);
+ void PythonSetLabel(const CStdString &strFont, const std::string &strText, color_t textColor, color_t shadowColor, color_t focusedColor);
+ void PythonSetDisabledColor(color_t disabledColor);
- void RAMSetTextColor(DWORD dwTextColor);
- void SettingsCategorySetTextAlign(DWORD dwAlign);
+ void RAMSetTextColor(color_t textColor);
+ void SettingsCategorySetTextAlign(uint32_t align);
virtual void OnClick();
bool HasClickActions() { return m_clickActions.size() > 0; };
@@ -115,7 +115,7 @@ CGUIButtonScroller::~CGUIButtonScroller(void)
bool CGUIButtonScroller::OnAction(const CAction &action)
{
- if (action.wID == ACTION_SELECT_ITEM)
+ if (action.id == ACTION_SELECT_ITEM)
{
// send the appropriate message to the parent window
vector<CGUIActionDescriptor> actions = m_vecButtons[GetActiveButton()]->clickActions;
@@ -128,15 +128,15 @@ bool CGUIButtonScroller::OnAction(const CAction &action)
}
return true;
}
- if (action.wID == ACTION_CONTEXT_MENU)
+ if (action.id == ACTION_CONTEXT_MENU)
{ // send a click message to our parent
- SEND_CLICK_MESSAGE(GetID(), GetParentID(), action.wID);
+ SEND_CLICK_MESSAGE(GetID(), GetParentID(), action.id);
return true;
}
// smooth scrolling (for analog controls)
- if (action.wID == ACTION_SCROLL_UP)
+ if (action.id == ACTION_SCROLL_UP)
{
- m_fAnalogScrollSpeed += action.fAmount1 * action.fAmount1;
+ m_fAnalogScrollSpeed += action.amount1 * action.amount1;
bool handled = false;
while (m_fAnalogScrollSpeed > ANALOG_SCROLL_START)
{
@@ -148,9 +148,9 @@ bool CGUIButtonScroller::OnAction(const CAction &action)
}
return handled;
}
- if (action.wID == ACTION_SCROLL_DOWN)
+ if (action.id == ACTION_SCROLL_DOWN)
{
- m_fAnalogScrollSpeed += action.fAmount1 * action.fAmount1;
+ m_fAnalogScrollSpeed += action.amount1 * action.amount1;
bool handled = false;
while (m_fAnalogScrollSpeed > ANALOG_SCROLL_START)
{
@@ -893,9 +893,9 @@ bool CGUIButtonScroller::OnMouseClick(DWORD dwButton, const CPoint &point)
m_iCurrentSlot = (int)((point.x - m_posX) / (m_imgFocus.GetWidth() + m_buttonGap));
CAction action;
if (dwButton == MOUSE_LEFT_BUTTON)
- action.wID = ACTION_SELECT_ITEM;
+ action.id = ACTION_SELECT_ITEM;
if (dwButton == MOUSE_RIGHT_BUTTON)
- action.wID = ACTION_CONTEXT_MENU;
+ action.id = ACTION_CONTEXT_MENU;
OnAction(action);
return true;
}
@@ -907,9 +907,9 @@ bool CGUIButtonScroller::OnMouseClick(DWORD dwButton, const CPoint &point)
m_iCurrentSlot = (int)((point.y - m_posY) / (m_imgFocus.GetHeight() + m_buttonGap));
CAction action;
if (dwButton == MOUSE_LEFT_BUTTON)
- action.wID = ACTION_SELECT_ITEM;
+ action.id = ACTION_SELECT_ITEM;
if (dwButton == MOUSE_RIGHT_BUTTON)
- action.wID = ACTION_CONTEXT_MENU;
+ action.id = ACTION_CONTEXT_MENU;
OnAction(action);
return true;
}
@@ -82,10 +82,10 @@ void CGUICheckMarkControl::Render()
bool CGUICheckMarkControl::OnAction(const CAction &action)
{
- if (action.wID == ACTION_SELECT_ITEM)
+ if (action.id == ACTION_SELECT_ITEM)
{
m_bSelected = !m_bSelected;
- CGUIMessage msg(GUI_MSG_CLICKED, GetID(), GetParentID(), action.wID);
+ CGUIMessage msg(GUI_MSG_CLICKED, GetID(), GetParentID(), action.id);
SendWindowMessage(msg);
return true;
}
@@ -142,7 +142,7 @@ bool CGUICheckMarkControl::OnMouseClick(DWORD dwButton, const CPoint &point)
if (dwButton != MOUSE_LEFT_BUTTON) return false;
g_Mouse.SetState(MOUSE_STATE_CLICK);
CAction action;
- action.wID = ACTION_SELECT_ITEM;
+ action.id = ACTION_SELECT_ITEM;
OnAction(action);
return true;
}
@@ -152,17 +152,17 @@ void CGUICheckMarkControl::SetLabel(const string &label)
m_strLabel = label;
}
-void CGUICheckMarkControl::PythonSetLabel(const CStdString &strFont, const string &strText, DWORD dwTextColor)
+void CGUICheckMarkControl::PythonSetLabel(const CStdString &strFont, const string &strText, color_t textColor)
{
m_label.font = g_fontManager.GetFont(strFont);
- m_label.textColor = dwTextColor;
- m_label.focusedColor = dwTextColor;
+ m_label.textColor = textColor;
+ m_label.focusedColor = textColor;
m_strLabel = strText;
}
-void CGUICheckMarkControl::PythonSetDisabledColor(DWORD dwDisabledColor)
+void CGUICheckMarkControl::PythonSetDisabledColor(color_t disabledColor)
{
- m_label.disabledColor = dwDisabledColor;
+ m_label.disabledColor = disabledColor;
}
void CGUICheckMarkControl::UpdateColors()
@@ -58,8 +58,8 @@ class CGUICheckMarkControl: public CGUIControl
bool GetSelected() const;
bool OnMouseClick(DWORD dwButton, const CPoint &point);
- void PythonSetLabel(const CStdString &strFont, const std::string &strText, DWORD dwTextColor);
- void PythonSetDisabledColor(DWORD dwDisabledColor);
+ void PythonSetLabel(const CStdString &strFont, const std::string &strText, color_t textColor);
+ void PythonSetDisabledColor(color_t disabledColor);
protected:
virtual void UpdateColors();
@@ -84,7 +84,7 @@ bool CGUIColorManager::LoadXML(TiXmlDocument &xmlDoc)
{
if (color->FirstChild() && color->Attribute("name"))
{
- DWORD value = 0xffffffff;
+ color_t value = 0xffffffff;
sscanf(color->FirstChild()->Value(), "%x", (unsigned int*) &value);
CStdString name = color->Attribute("name");
iColor it = m_colors.find(name);
@@ -99,7 +99,7 @@ bool CGUIColorManager::LoadXML(TiXmlDocument &xmlDoc)
}
// lookup a color and return it's hex value
-DWORD CGUIColorManager::GetColor(const CStdString &color) const
+uint32_t CGUIColorManager::GetColor(const CStdString &color) const
{
// look in our color map
CStdString trimmed(color);
@@ -109,7 +109,7 @@ DWORD CGUIColorManager::GetColor(const CStdString &color) const
return (*it).second;
// try converting hex directly
- DWORD value = 0;
+ uint32_t value = 0;
sscanf(trimmed.c_str(), "%x", &value);
return value;
}
Oops, something went wrong.

0 comments on commit 1a029e2

Please sign in to comment.