diff options
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/Window.h')
| -rw-r--r-- | xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/Window.h | 40 |
1 files changed, 35 insertions, 5 deletions
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/Window.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/Window.h index e7a8a05..5011374 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/Window.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/Window.h | |||
| @@ -60,7 +60,7 @@ namespace gui | |||
| 60 | /// @brief <b>Library definition values</b> | 60 | /// @brief <b>Library definition values</b> |
| 61 | /// | 61 | /// |
| 62 | 62 | ||
| 63 | class CWindow : public CAddonGUIControlBase | 63 | class ATTRIBUTE_HIDDEN CWindow : public CAddonGUIControlBase |
| 64 | { | 64 | { |
| 65 | public: | 65 | public: |
| 66 | //========================================================================== | 66 | //========================================================================== |
| @@ -205,6 +205,36 @@ namespace gui | |||
| 205 | //========================================================================== | 205 | //========================================================================== |
| 206 | /// | 206 | /// |
| 207 | /// \ingroup cpp_kodi_gui_CWindow | 207 | /// \ingroup cpp_kodi_gui_CWindow |
| 208 | /// @brief To set the visibility on given control id | ||
| 209 | /// | ||
| 210 | /// @param[in] controlId Control id where visibility is changed | ||
| 211 | /// @param[in] visible Boolean value with `true` for visible, `false` for hidden | ||
| 212 | /// | ||
| 213 | /// | ||
| 214 | void SetControlVisible(int controlId, bool visible) | ||
| 215 | { | ||
| 216 | m_interface->kodi_gui->window->set_control_visible(m_interface->kodiBase, m_controlHandle, controlId, visible); | ||
| 217 | } | ||
| 218 | //-------------------------------------------------------------------------- | ||
| 219 | |||
| 220 | //========================================================================== | ||
| 221 | /// | ||
| 222 | /// \ingroup cpp_kodi_gui_CWindow | ||
| 223 | /// @brief To set the selection on given control id | ||
| 224 | /// | ||
| 225 | /// @param[in] controlId Control id where selection is changed | ||
| 226 | /// @param[in] selected Boolean value with `true` for selected, `false` for not | ||
| 227 | /// | ||
| 228 | /// | ||
| 229 | void SetControlSelected(int controlId, bool selected) | ||
| 230 | { | ||
| 231 | m_interface->kodi_gui->window->set_control_selected(m_interface->kodiBase, m_controlHandle, controlId, selected); | ||
| 232 | } | ||
| 233 | //-------------------------------------------------------------------------- | ||
| 234 | |||
| 235 | //========================================================================== | ||
| 236 | /// | ||
| 237 | /// \ingroup cpp_kodi_gui_CWindow | ||
| 208 | /// @brief Sets a window property, similar to an infolabel. | 238 | /// @brief Sets a window property, similar to an infolabel. |
| 209 | /// | 239 | /// |
| 210 | /// @param[in] key string - property name. | 240 | /// @param[in] key string - property name. |
| @@ -705,7 +735,7 @@ namespace gui | |||
| 705 | /// .. | 735 | /// .. |
| 706 | /// ~~~~~~~~~~~~~ | 736 | /// ~~~~~~~~~~~~~ |
| 707 | /// | 737 | /// |
| 708 | virtual bool OnAction(int actionId) | 738 | virtual bool OnAction(int actionId, uint32_t buttoncode, wchar_t unicode) |
| 709 | { | 739 | { |
| 710 | switch (actionId) | 740 | switch (actionId) |
| 711 | { | 741 | { |
| @@ -811,7 +841,7 @@ namespace gui | |||
| 811 | bool (*CBOnInit) (GUIHANDLE cbhdl), | 841 | bool (*CBOnInit) (GUIHANDLE cbhdl), |
| 812 | bool (*CBOnFocus) (GUIHANDLE cbhdl, int controlId), | 842 | bool (*CBOnFocus) (GUIHANDLE cbhdl, int controlId), |
| 813 | bool (*CBOnClick) (GUIHANDLE cbhdl, int controlId), | 843 | bool (*CBOnClick) (GUIHANDLE cbhdl, int controlId), |
| 814 | bool (*CBOnAction) (GUIHANDLE cbhdl, int actionId), | 844 | bool (*CBOnAction) (GUIHANDLE cbhdl, int actionId, uint32_t buttoncode, wchar_t unicode), |
| 815 | void (*CBGetContextButtons) (GUIHANDLE cbhdl, int itemNumber, gui_context_menu_pair* buttons, unsigned int* size) = nullptr, | 845 | void (*CBGetContextButtons) (GUIHANDLE cbhdl, int itemNumber, gui_context_menu_pair* buttons, unsigned int* size) = nullptr, |
| 816 | bool (*CBOnContextButton) (GUIHANDLE cbhdl, int itemNumber, unsigned int button) = nullptr) | 846 | bool (*CBOnContextButton) (GUIHANDLE cbhdl, int itemNumber, unsigned int button) = nullptr) |
| 817 | { | 847 | { |
| @@ -845,9 +875,9 @@ namespace gui | |||
| 845 | return static_cast<CWindow*>(cbhdl)->OnClick(controlId); | 875 | return static_cast<CWindow*>(cbhdl)->OnClick(controlId); |
| 846 | } | 876 | } |
| 847 | 877 | ||
| 848 | static bool CBOnAction(GUIHANDLE cbhdl, int actionId) | 878 | static bool CBOnAction(GUIHANDLE cbhdl, int actionId, uint32_t buttoncode, wchar_t unicode) |
| 849 | { | 879 | { |
| 850 | return static_cast<CWindow*>(cbhdl)->OnAction(actionId); | 880 | return static_cast<CWindow*>(cbhdl)->OnAction(actionId, buttoncode, unicode); |
| 851 | } | 881 | } |
| 852 | 882 | ||
| 853 | static void CBGetContextButtons(GUIHANDLE cbhdl, int itemNumber, gui_context_menu_pair* buttons, unsigned int* size) | 883 | static void CBGetContextButtons(GUIHANDLE cbhdl, int itemNumber, gui_context_menu_pair* buttons, unsigned int* size) |
