### CWindow OnInit Method Definition in C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__gui__windows__window__callbacks.html This snippet defines the virtual `OnInit` method within the `kodi::gui::CWindow` class. This method is a callback that gets invoked when the window is initialized. It allows derived window classes to perform setup operations upon creation. ```C++ virtual bool OnInit() ``` -------------------------------- ### Example Usage of Mid String Function in C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__tools___string_utils___edit_control.html This example demonstrates various uses of the 'kodi::tools::StringUtils::Mid' function. It shows how to extract substrings with different start positions and lengths, including cases where the length is zero, exceeds the string bounds, or is omitted (to get the rest of the string). It uses 'EXPECT_STREQ' for assertion, implying a testing context. ```C++ #include std::string refstr, varstr; std::string origstr = "test"; refstr = ""; varstr = kodi::tools::StringUtils::Mid(origstr, 0, 0); EXPECT_STREQ(refstr.c_str(), varstr.c_str()); refstr = "te"; varstr = kodi::tools::StringUtils::Mid(origstr, 0, 2); EXPECT_STREQ(refstr.c_str(), varstr.c_str()); refstr = "test"; varstr = kodi::tools::StringUtils::Mid(origstr, 0, 10); EXPECT_STREQ(refstr.c_str(), varstr.c_str()); refstr = "st"; varstr = kodi::tools::StringUtils::Mid(origstr, 2); EXPECT_STREQ(refstr.c_str(), varstr.c_str()); refstr = "st"; varstr = kodi::tools::StringUtils::Mid(origstr, 2, 2); EXPECT_STREQ(refstr.c_str(), varstr.c_str()); refstr = "es"; varstr = kodi::tools::StringUtils::Mid(origstr, 1, 2); EXPECT_STREQ(refstr.c_str(), varstr.c_str()); ``` -------------------------------- ### Example OnInit Callback for Kodi GUI Window in C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__gui__windows__window__callbacks.html This is an example implementation of the `OnInit` callback function, which is invoked when a Kodi GUI window is initialized. It receives a `kodi::gui::ClientHandle` and should contain the logic for setting up the window's initial state, returning `true` upon successful initialization. ```C++ bool OnInit(kodi::gui::ClientHandle cbhdl) { ... return true; } ``` -------------------------------- ### Getting Start Time in Kodi Inputstream (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/addon-instance_2_inputstream_8h_source.html Retrieves the start time of the stream in milliseconds, typically after it has been modified by SetStartTime. This function provides the current start time value. ```C++ time_t GetStartTime() const ``` -------------------------------- ### Initialize Doxygen Navigation and Resizable Elements (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/addon-instance_2_p_v_r_8h_source.html This JavaScript snippet, executed on document readiness, initializes the Doxygen navigation tree (`initNavTree`) to highlight the current page and sets up resizable panels (`initResizable`) for improved user interface interaction in the generated documentation. ```JavaScript $(document).ready(function(){initNavTree('addon-instance_2_p_v_r_8h_source.html',''); initResizable(); }); ``` -------------------------------- ### Getting Start Time in PVR Timer (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/classkodi_1_1addon_1_1_p_v_r_timer.html Retrieves the start time of the PVR timer, which can be modified using SetStartTime. ```C++ time_t GetStartTime() const ``` -------------------------------- ### Initialize Navigation and Resizable Elements (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/class_x_b_m_c_addon_1_1xbmcaddon_1_1_settings.html This JavaScript snippet executes on document readiness, initializing the navigation tree for the `Settings` class documentation and enabling resizable elements on the page. It ensures proper layout and interactive features are set up for an optimal viewing experience. ```JavaScript $(document).ready(function(){initNavTree('class_x_b_m_c_addon_1_1xbmcaddon_1_1_settings.html',''); initResizable(); }); ``` -------------------------------- ### Initializing Doxygen Navigation Tree and Resizing (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/dir_44b6518f27217ee162d812fc83f29085.html This JavaScript snippet uses jQuery's `$(document).ready()` to initialize the Doxygen navigation tree (`initNavTree`) and enable resizable elements (`initResizable`) once the DOM is ready. This ensures the documentation's navigation and layout features are properly set up. ```JavaScript $(document).ready(function(){initNavTree('dir_44b6518f27217ee162d812fc83f29085.html',''); initResizable(); }); ``` -------------------------------- ### Getting Start Time for PVR Timer (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__addon__pvr___defs___timer___p_v_r_timer.html This function retrieves the recording's start time, which was previously configured using SetStartTime. The returned value represents the start time in UTC. ```C++ time_t GetStartTime( ) ``` -------------------------------- ### Getting Event Start Time in C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__addon__pvr___defs__epg___p_v_r_e_p_g_tag.html Retrieves the start time of the EPG event in UTC, which was previously set using 'SetStartTime'. ```C++ time_t GetStartTime() const inline ``` -------------------------------- ### Start Method for CInstanceVisualization in C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/addon-instance_2_visualization_8h_source.html This virtual method is part of the `CInstanceVisualization` class, designed to be overridden by derived classes to implement the start logic for a visualization. It currently returns `true`, indicating successful initialization. ```C++ virtual bool Start(int channels, int samplesPerSec, int bitsPerSample, std::string songName) { return true; } ``` -------------------------------- ### Getting Start Any Time from Kodi PVRTimer (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/_timers_8h_source.html Retrieves whether the start time applies for EPG-based timers. This method returns the value previously set using `SetStartAnyTime`, indicating if the recording can start at any time. ```cpp bool GetStartAnyTime() const ``` -------------------------------- ### Implementing Start Method with Dynamic Library Loading (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__tools___c_dll_helper.html This C++ snippet implements the `Start` method for `CMyInstance`, demonstrating the core usage of `CDllHelper`. It retrieves the path to a shared library (`myLib.so`), loads it using `LoadDll()`, and then registers specific functions (`Init`, `Cleanup`, `GetLength`) from the loaded library using the `REGISTER_DLL_SYMBOL` macro. Finally, it calls the `Init` function, returning `true` on success. ```C++ bool CMyInstance::Start() { std::string lib = kodi::GetAddonPath("myLib.so"); if (!LoadDll(lib)) return false; if (!REGISTER_DLL_SYMBOL(Init)) return false; if (!REGISTER_DLL_SYMBOL(Cleanup)) return false; if (!REGISTER_DLL_SYMBOL(GetLength)) return false; Init(); return true; } ``` -------------------------------- ### Initializing Navigation and Resizable Elements (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/dir_726c3e97bb7ce1b0cced8dcef60872f1.html This JavaScript snippet initializes the navigation tree and resizable elements for the Doxygen documentation, ensuring they are set up after the document is ready. It links to a specific directory reference. ```JavaScript $(document).ready(function(){initNavTree('dir_726c3e97bb7ce1b0cced8dcef60872f1.html',''); initResizable(); }); ``` -------------------------------- ### Getting Margin Start Value in PVRTimer (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/_timers_8h_source.html Retrieves the start margin value that was previously set using `SetMarginStart` for the PVR timer. ```C++ unsigned int GetMarginStart() const ``` -------------------------------- ### Initialize Doxygen Navigation Tree and Resizable Panels (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/class_x_b_m_c_addon_1_1xbmcdrm_1_1_crypto_session.html Initializes the navigation tree and resizable panels for Doxygen-generated documentation, linking to the specific `CryptoSession` class page. ```JavaScript $(document).ready(function(){initNavTree('class_x_b_m_c_addon_1_1xbmcdrm_1_1_crypto_session.html',''); initResizable(); }); ``` -------------------------------- ### Getting Start Time from PVREDLEntry in C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/_e_d_l_8h_source.html The `GetStart` method of the `PVREDLEntry` class retrieves the start time of an EDL segment. It returns a `int64_t` value, which is the `start` member from the encapsulated `PVR_EDL_ENTRY` C structure. This const method provides read-only access to the segment's starting timestamp. ```C++ int64_t GetStart() const { return m_cStructure->start; } ``` -------------------------------- ### Getting Stream Start Time from PVRStreamTimes - C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__addon__pvr___defs___stream___p_v_r_stream_times.html This C++ method retrieves the start time previously set using `SetStartTime()` from the `PVRStreamTimes` class. It returns a `time_t` value representing the stream's reference start time. ```C++ time_t GetStartTime() ``` -------------------------------- ### Initializing Doxygen Navigation Tree and Resizable Panels (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/addon-instance_2_visualization_8h_source.html This JavaScript snippet initializes the Doxygen navigation tree to point to the current source file and activates the resizable panels, enhancing user navigation and layout flexibility within the documentation. ```JavaScript $(document).ready(function(){initNavTree('addon-instance_2_visualization_8h_source.html',''); initResizable(); }); ``` -------------------------------- ### Get Start Time of EDL Entry (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/classkodi_1_1addon_1_1_p_v_r_e_d_l_entry.html Retrieves the start time of an Edit Decision List (EDL) entry. This method returns the `int64_t` value representing the start time in milliseconds, as previously set by `SetStart()`. ```C++ int64_t GetStart () const ``` -------------------------------- ### Getting Start Time from Kodi PVR EPG Tag (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/_e_p_g_8h_source.html Retrieves the start time of the program that was previously set using the `SetStartTime` method. This method returns a `time_t` value, typically representing the start time as a Unix timestamp. ```C++ time_t GetStartTime() const ``` -------------------------------- ### Initializing Doxygen Navigation Tree (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/c-api_2addon-instance_2_p_v_r_8h_source.html This JavaScript snippet uses jQuery to initialize the Doxygen navigation tree (`initNavTree`) and resizable panels (`initResizable`) once the document is ready. This sets up the interactive navigation and layout for the documentation. ```JavaScript $(document).ready(function(){initNavTree('c-api_2addon-instance_2_p_v_r_8h_source.html',''); initResizable(); }); ``` -------------------------------- ### Initializing Navigation Tree and Resizable Elements (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/dir_0fee8d151f14b0cbd7c3d21a51612201.html This JavaScript snippet executes functions to initialize the navigation tree (initNavTree) with a specific directory reference and to enable resizable elements (initResizable) once the document is ready, common in Doxygen-generated documentation for dynamic layout. ```JavaScript $(document).ready(function(){initNavTree('dir_0fee8d151f14b0cbd7c3d21a51612201.html',''); initResizable(); }); ``` -------------------------------- ### Getting Addon Installation Path in Kodi Addon API (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/_addon_base_8h_source.html Retrieves the system installation folder for the addon. An optional string can be appended to the path. ```C++ std::string ATTRIBUTE_HIDDEN GetAddonPath(const std::string &append="") ``` -------------------------------- ### Handling Addon Start Event - Kodi Visualization - C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/addon-instance_2_visualization_8h_source.html This static inline function serves as a callback for the Kodi addon's start event. It casts the generic `addon` instance to `CInstanceVisualization` and then calls the class's `Start` method, passing audio parameters and song name. It also initializes the `m_renderHelper` for rendering operations. ```C++ inline static bool ADDON_Start(const AddonInstance_Visualization* addon, int channels, int samplesPerSec, int bitsPerSample, const char* songName) { CInstanceVisualization* thisClass = static_cast(addon->toAddon->addonInstance); thisClass->m_renderHelper = kodi::gui::GetRenderHelper(); return thisClass->Start(channels, samplesPerSec, bitsPerSample, songName); } ``` -------------------------------- ### Initializing Kodi Window - Python Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__python__xbmcgui__window__cb.html This snippet illustrates the implementation of the onInit method, which Kodi calls to initialize a window. It prints a confirmation message to the console, signifying that the window's initialization routine has been executed. ```Python def onInit(self): print("Window.onInit method called from Kodi") ``` -------------------------------- ### Getting Start Margin in Kodi PVR Timer - C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/_timers_8h_source.html Retrieves the configured start margin for the PVR timer. This method provides read-only access to the `iMarginStart` member of the internal `m_cStructure`, indicating how many minutes before the scheduled start recording should begin. ```C++ unsigned int GetMarginStart() const { return m_cStructure->iMarginStart; } ``` -------------------------------- ### Getting Inputstream PTS Start (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__addon__inputstream___defs___interface___inputstream_times.html This C++ function `GetPtsStart` retrieves the Presentation Timestamp (PTS) start value previously set for an input stream. It returns a `double` value. This method is used to access the PTS start property managed by the `InputstreamTimes` class. ```C++ double GetPtsStart() const inline ``` -------------------------------- ### Initialize Navigation Tree and Resizable Elements (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/c-api_2addon-instance_2_v_f_s_8h_source.html This JavaScript snippet initializes the navigation tree and resizable elements of the documentation page once the DOM is ready. It links the navigation to the `vfs.h` source file. ```JavaScript $(document).ready(function(){initNavTree('c-api_2addon-instance_2_v_f_s_8h_source.html',''); initResizable(); }); ``` -------------------------------- ### Initializing Navigation Tree and Resizable Elements - JavaScript Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__addon__peripheral___defs.html This snippet initializes the navigation tree and resizable elements for the documentation page once the document is ready. It links to a specific HTML group for C++ Kodi add-on peripheral definitions, enhancing user navigation and layout flexibility. ```JavaScript $(document).ready(function(){initNavTree('group__cpp__kodi__addon__peripheral___defs.html',''); initResizable(); }); ``` -------------------------------- ### Getting Inputstream Start Time (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__addon__inputstream___defs___interface___inputstream_times.html This C++ function `GetStartTime` retrieves the start time previously set for an input stream. It returns a `time_t` value, which represents time in milliseconds. This method is used to access the start time property managed by the `InputstreamTimes` class. ```C++ time_t GetStartTime() const inline ``` -------------------------------- ### Initialize Navigation and Resizable Elements (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/classkodi_1_1addon_1_1_p_v_r_channel.html This JavaScript snippet executes on document readiness, initializing the navigation tree for the PVRChannel class documentation and enabling resizable elements on the page. This is common for interactive documentation interfaces. ```JavaScript $(document).ready(function(){initNavTree('classkodi_1_1addon_1_1_p_v_r_channel.html',''); initResizable(); }); ``` -------------------------------- ### Getting Add-on Installation Path in Kodi Visualization C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/classkodi_1_1addon_1_1_c_instance_visualization.html Returns the full file system path where the visualization add-on is currently installed. This can be used for accessing add-on specific resources or configurations. ```C++ std::string Presets () ``` -------------------------------- ### Initializing Navigation and Resizable Elements on Document Ready (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__addon__inputstream___defs___info___stream_crypto_session___help.html This JavaScript snippet initializes the navigation tree (`initNavTree`) and enables resizable elements (`initResizable`) after the document is fully loaded. This setup is typical for interactive documentation pages, allowing users to navigate content and adjust layout. ```JavaScript $(document).ready(function(){initNavTree('group__cpp__kodi__addon__inputstream___defs___info__stream_crypto_session___help.html',''); initResizable(); }); ``` -------------------------------- ### Getting Timer Start Time in C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/_end_time_8h_source.html This function returns the start time of the timer as a `uint64_t` representing milliseconds. It casts the internal `m_startTime` duration to milliseconds and returns its count. ```C++ inline uint64_t GetStartTime(void) const { auto value = std::chrono::duration_cast(m_startTime); return value.count(); } ``` -------------------------------- ### Getting CEndTime Start Time (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__tools___c_end_time.html The `GetStartTime` method returns the timestamp, in milliseconds since epoch, when the timer was started or last reset. This provides a reference point for time calculations. ```C++ uint64_t GetStartTime(void) ``` -------------------------------- ### Initializing Navigation and Resizable Elements (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__addon__peripheral___defs___general.html This JavaScript snippet executes functions to initialize the navigation tree (`initNavTree`) and resizable elements (`initResizable`) once the document is ready, enhancing the user interface for browsing the documentation. ```JavaScript $(document).ready(function(){initNavTree('group__cpp__kodi__addon__peripheral___defs___general.html',''); initResizable(); }); ``` -------------------------------- ### Initialize Navigation Tree and Resizable Elements - JavaScript Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/class_x_b_m_c_addon_1_1xbmcaddon_1_1_addon.html This JavaScript snippet initializes the navigation tree and resizable elements for the documentation, ensuring proper layout and interactive navigation once the document is ready. It's typical for Doxygen-generated sites. ```JavaScript $(document).ready(function(){initNavTree('class_x_b_m_c_addon_1_1xbmcaddon_1_1_addon.html',''); initResizable(); }); ``` -------------------------------- ### Getting Start Any Time in Kodi PVR Timer C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/classkodi_1_1addon_1_1_p_v_r_timer.html Retrieves the boolean value indicating if the recording can start at any time for the PVR timer. This value is typically set using the `SetStartAnyTime` method. ```C++ bool GetStartAnyTime() const ``` -------------------------------- ### Handling Window Initialization in XBMC GUI (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/interfaces_2legacy_2_window_8h_source.html This callback method is invoked when an XBMC GUI window is initialized. It provides a hook for custom setup logic and resource allocation when the window is created, allowing for dynamic content loading or initial state configuration. ```C++ onInit(...) ``` -------------------------------- ### Getting Recording Start Margin in Kodi PVR Timer C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/classkodi_1_1addon_1_1_p_v_r_timer.html Retrieves the start margin value for recordings associated with the PVR timer. This value is typically set using the `SetMarginStart` method. ```C++ unsigned int GetMarginStart() const ``` -------------------------------- ### Getting Stream Start Time in Kodi PVR C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/_stream_8h_source.html Retrieves the start time of the stream, which was previously set using SetStartTime(). This method returns the current reference time for the stream. ```C++ time_t GetStartTime() const ``` -------------------------------- ### Initialize Navigation Tree and Resizable Elements (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/gui_2_general_8h_source.html This JavaScript snippet executes functions to initialize a navigation tree (`initNavTree`) and enable resizable elements (`initResizable`) once the document is ready, common in Doxygen-generated documentation for interactive UI components. ```JavaScript $(document).ready(function(){initNavTree('gui_2_general_8h_source.html',''); initResizable(); }); ``` -------------------------------- ### Getting PTS Start from PVRStreamTimes - C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__addon__pvr___defs___stream___p_v_r_stream_times.html This C++ method retrieves the Presentation Time Stamp (PTS) start value previously set using `SetPTSStart()` from the `PVRStreamTimes` class. It returns an `int64_t` value. ```C++ int64_t GetPTSStart() ``` -------------------------------- ### Initializing Navigation and Resizing (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__addon__game___hardware_rendering.html This JavaScript snippet initializes the Doxygen navigation tree and resizable elements after the document is ready. It links the navigation to the specific HTML page for hardware rendering operations. ```JavaScript $(document).ready(function(){initNavTree('group__cpp__kodi__addon__game___hardware_rendering.html',''); initResizable(); }); ``` -------------------------------- ### Getting Start Presentation Timestamp in Kodi Inputstream (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/addon-instance_2_inputstream_8h_source.html Retrieves the start presentation timestamp (PTS) value, typically after it has been modified by SetPtsStart. This function is part of the InputstreamTimes interface for managing stream timing. ```C++ double GetPtsStart() const ``` -------------------------------- ### Initializing Doxygen Navigation and Resizable Elements (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/_channels_8h_source.html This JavaScript snippet uses jQuery to initialize the Doxygen navigation tree (`initNavTree`) and resizable elements (`initResizable`) once the document is ready. This ensures the interactive navigation and layout features of the Doxygen documentation are functional. ```JavaScript $(document).ready(function(){initNavTree('_channels_8h_source.html',''); initResizable(); }); ``` -------------------------------- ### Initialize Search on Document Ready (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__addon__pvr___defs___menuhook___p_v_r_menuhook___help.html This JavaScript snippet ensures that the `init_search()` function is executed once the entire DOM is loaded, setting up the search functionality for the web page. ```JavaScript $(document).ready(function() { init_search(); }); ``` -------------------------------- ### Getting PVR Timer Start Time - Kodi Addon - C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/_timers_8h_source.html This function retrieves the start time of a PVR timer. It returns the `time_t` value stored in the `startTime` member of the internal `m_cStructure`. ```C++ time_t GetStartTime() const { return m_cStructure->startTime; } ``` -------------------------------- ### Getting Add-on Installation Path in C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/classkodi_1_1addon_1_1_c_instance_peripheral.html This C++ function declaration, AddonPath, is a constant member function that returns the full installation path of the add-on as a std::string. It provides read-only access to the add-on's directory. ```C++ const std::string AddonPath () const ``` -------------------------------- ### Initializing Doxygen Navigation and Resizable Elements (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__python__xbmcwsgi___wsgi_response_body.html This JavaScript snippet, executed on document ready, initializes Doxygen's navigation tree (`initNavTree`) to a specific page related to `WsgiResponseBody` and also initializes resizable elements (`initResizable`). This sets up the interactive navigation and layout features of the documentation, improving user experience. ```JavaScript $(document).ready(function(){initNavTree('group__python__xbmcwsgi___wsgi_response_body.html',''); initResizable(); }); ``` -------------------------------- ### Initialize Navigation Tree and Resizable Elements - JavaScript Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/classkodi_1_1addon_1_1_p_v_r_provider-members.html This snippet executes functions to set up the navigation tree (`initNavTree`) and enable resizable elements (`initResizable`) once the document is ready. This is specific to the Doxygen-generated documentation structure, ensuring proper layout and navigation for the class member list. ```JavaScript $(document).ready(function(){initNavTree('classkodi_1_1addon_1_1_p_v_r_provider.html',''); initResizable(); }); ``` -------------------------------- ### Example Usage of FindEndBracket (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__tools___string_utils___search_control.html This C++ example illustrates the use of `kodi::tools::StringUtils::FindEndBracket` to find the closing character of a specified bracket pair within a string, starting from a given position. ```C++ #include int ref, var; ref = 11; var = kodi::tools::StringUtils::FindEndBracket("atest testbb test", 'a', 'b'); EXPECT_EQ(ref, var); ``` -------------------------------- ### Define Start Method for CInstanceScreensaver (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/addon-instance_2_screensaver_8h_source.html This virtual method, `Start()`, is intended to be overridden by derived classes to implement the specific logic for starting a screensaver. The default implementation simply returns `true`, indicating a successful start, but actual screensaver behavior would be defined in an override. ```C++ virtual bool Start() { return true; } ``` -------------------------------- ### Handling Playback Start in XBMC Player (Python) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/_player_8h_source.html This callback is triggered when media playback officially starts. It's a general event for the beginning of any playback, useful for initial setup or logging. It takes no parameters. ```Python onPlayBackStarted() ``` -------------------------------- ### Initializing Doxygen Navigation and Resizable Layout (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/gui_2dialogs_2ok_8h_source.html This JavaScript snippet initializes the Doxygen navigation tree and enables resizable panels on the documentation page once the document is fully loaded, enhancing user interaction. ```JavaScript $(document).ready(function(){initNavTree('gui_2dialogs_2ok_8h_source.html',''); initResizable(); }); ``` -------------------------------- ### Handling Clean Started Event (Python) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/_monitor_8h_source.html This method is a callback triggered when a cleaning operation, such as library cleaning, has started. It can accept optional arguments related to the cleaning process, allowing for setup or pre-cleaning actions. ```Python onCleanStarted(...) ``` -------------------------------- ### Initialize Doxygen Navigation Tree and Resizable Panels in JavaScript Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/addon-instance_2_v_f_s_8h_source.html This JavaScript snippet initializes the Doxygen navigation tree and resizable panels upon document readiness. It links the navigation to the VFS.h source file and enables UI elements for better browsing experience. ```JavaScript $(document).ready(function(){initNavTree('addon-instance_2_v_f_s_8h_source.html',''); initResizable(); }); ``` -------------------------------- ### Getting Start Any Time Flag in Kodi PVR C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/_timers_8h_source.html This method retrieves the boolean flag indicating if the PVR timer can start at any time. It accesses the `bStartAnyTime` member of the internal `m_cStructure` to return its current state. ```C++ bool GetStartAnyTime() const { return m_cStructure->bStartAnyTime; } ``` -------------------------------- ### Initializing Search Functionality (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/dir_f18c689157100b9cf15fbbaa6078521e.html This snippet uses jQuery's `$(document).ready()` to ensure the `init_search()` function is called once the DOM is fully loaded. This is a common pattern for setting up search functionality in web pages generated by Doxygen. ```JavaScript $(document).ready(function() { init_search(); }); ``` -------------------------------- ### Getting PTS Start Time in Kodi PVR C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/_stream_8h_source.html Retrieves the Presentation Time Stamp (PTS) start value for the stream, which was previously set using SetPTSStart(). This value indicates the initial PTS for playback. ```C++ int64_t GetPTSStart() const ``` -------------------------------- ### Initialize Doxygen Navigation Tree and Resizable Elements - JavaScript Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp.html This JavaScript snippet initializes the navigation tree and resizable elements of the Doxygen documentation. It ensures that the navigation structure is properly loaded and interactive once the document is ready. ```JavaScript $(document).ready(function(){initNavTree('group__cpp.html',''); initResizable(); }); ``` -------------------------------- ### Initialize Navigation Tree and Resizable Elements (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/classkodi_1_1addon_1_1_p_v_r_timer.html This JavaScript snippet executes on document ready, initializing the navigation tree to highlight the `PVRTimer` class page and enabling resizable elements on the page. This enhances user experience by providing dynamic layout adjustments. ```JavaScript $(document).ready(function(){initNavTree('classkodi_1_1addon_1_1_p_v_r_timer.html',''); initResizable(); }); ``` -------------------------------- ### Requesting EPG for Channel - Kodi PVR C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__addon__pvr___e_p_g_tag.html This function requests Electronic Program Guide (EPG) data for a specific channel within a given time range from the PVR backend. It takes the channel UID, start time, end time, and a result set object to populate with EPG tags. Currently, the example implementation returns PVR_ERROR_NOT_IMPLEMENTED, indicating it needs to be fully implemented by the client. ```C++ PVR_ERROR CMyInstance::GetEPGForChannel(int channelUid, time_t start, time_t end, kodi::addon::PVREPGTagsResultSet& results) { return PVR_ERROR_NOT_IMPLEMENTED; } ``` -------------------------------- ### Getting Addon Installation Path (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__gui__helpers__gl___c_shader_program.html This C++ function, `GetAddonPath`, retrieves the system installation folder for a Kodi add-on. It can optionally append a string to the path, providing a convenient way to construct paths to addon resources. ```C++ std::string ATTRIBUTE_HIDDEN GetAddonPath(const std::string &append="") ``` -------------------------------- ### Initializing Doxygen Navigation Tree and Resizable Panels (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/dir_ce7299c1ca924da751165a3041cd3195.html Similar to the search initialization, this snippet uses $(document).ready() to execute functions that set up the navigation tree (initNavTree) and enable resizable panels (initResizable). These functions are essential for the interactive sidebar and layout adjustments in the Doxygen-generated documentation, linking to specific directory references. ```JavaScript $(document).ready(function(){initNavTree('dir_ce7299c1ca924da751165a3041cd3195.html',''); initResizable(); }); ``` -------------------------------- ### Initializing Doxygen Navigation and Resizing on Document Ready (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/struct_kodi_to_addon_func_table___peripheral.html Similar to search initialization, this JavaScript snippet uses jQuery's `$(document).ready()` to call `initNavTree()` and `initResizable()`. These functions are crucial for setting up the navigation tree and enabling resizable elements within the Doxygen documentation. ```JavaScript $(document).ready(function(){initNavTree('struct_kodi_to_addon_func_table___peripheral.html',''); initResizable(); }); ``` -------------------------------- ### Getting Addon Installation Path in Kodi C++ Addon Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/addon-instance_2_peripheral_8h_source.html This method returns the full file system path where the add-on itself is installed. This path can be used to access add-on resources like media files or default configurations. ```C++ const std::string AddonPath() const ``` -------------------------------- ### Getting Start Time in Kodi PVR EPG Tag C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/_e_p_g_8h_source.html Retrieves the start time of the EPG program. This method provides read-only access to the 'startTime' field from the internal 'm_cStructure' member, returning it as a 'time_t' value. ```C++ time_t GetStartTime() const { return m_cStructure->startTime; } ``` -------------------------------- ### Initializing Doxygen Navigation Tree and Resizable Panels (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__addon__peripheral___defs___peripheral_capabilities.html This JavaScript snippet uses jQuery's `$(document).ready()` to execute two Doxygen-specific initialization functions once the document is ready. `initNavTree()` sets up the navigation tree, highlighting the current page. `initResizable()` initializes the functionality for resizable panels within the documentation interface, improving user experience by allowing adjustment of layout elements. ```JavaScript $(document).ready(function(){initNavTree('group__cpp__kodi__addon__peripheral___defs___peripheral_capabilities.html',''); initResizable(); }); ``` -------------------------------- ### Get Control Height - Python Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__python__xbmcgui__control.html This Python example demonstrates how to get the current height of a GUI control, such as a button, using the `getHeight()` method. The method returns an integer representing the control's height, which is useful for sizing and layout adjustments. ```Python height = self.button.getHeight() ``` -------------------------------- ### Initializing Doxygen Navigation and Resizable Elements (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/struct_addon_props___peripheral.html This JavaScript snippet, executed after the DOM is ready, initializes Doxygen's navigation tree (`initNavTree`) to a specific HTML page (`struct_addon_props___peripheral.html`) and also sets up resizable elements (`initResizable`). This enhances the user interface of the generated documentation by providing interactive navigation and layout adjustments. ```JavaScript $(document).ready(function(){initNavTree('struct_addon_props___peripheral.html',''); initResizable(); }); ``` -------------------------------- ### Initializing Navigation and Resizable Elements - JavaScript Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/struct_addon_props___visualization-members.html This snippet executes functions to initialize navigation (`initNavTree`) and resizable elements (`initResizable`) once the document is ready. It specifically targets the `struct_addon_props__visualization.html` page for navigation tree setup. ```JavaScript $(document).ready(function(){initNavTree('struct_addon_props___visualization.html',''); initResizable(); }); ``` -------------------------------- ### Get PVR Stream Start Time (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/classkodi_1_1addon_1_1_p_v_r_stream_times.html This C++ member function of `PVRStreamTimes` retrieves the absolute start time of the PVR stream. The returned `time_t` value represents the stream's initial timestamp, reflecting values set by `SetStartTime()`. ```C++ time_t GetStartTime () const ``` -------------------------------- ### Initializing Window - XBMCgui Python Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/class_x_b_m_c_addon_1_1xbmcgui_1_1_window.html This callback method is automatically invoked when the window is initialized and ready to be displayed. It receives the `self` reference to the window instance. Developers typically override this method to perform initial setup, such as adding controls or loading data, before the window becomes visible. ```Python onInit(self) ``` -------------------------------- ### Getting EPG Event ID for Kodi PVR Recording in C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/_recordings_8h_source.html This method retrieves the EPG (Electronic Program Guide) event ID associated with a PVR recording. It is used to get values that have been previously set using the SetEPGEventId method. ```C++ unsigned int GetEPGEventId() const ``` -------------------------------- ### Getting Addon Installation Path (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi.html This C++ function, `GetAddonPath`, returns the system installation folder for the current Kodi addon. An optional `append` parameter allows adding a sub-path to the returned string, providing flexibility for accessing addon resources. ```C++ std::string ATTRIBUTE_HIDDEN kodi::GetAddonPath( const std::string & _append_ = "" ) ``` -------------------------------- ### Initialize Search on Document Ready (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/_module_xbmcplugin_8h_source.html This JavaScript snippet ensures that the `init_search()` function is called once the DOM is fully loaded. It is typically used in Doxygen-generated documentation to set up the search functionality. ```JavaScript $(document).ready(function() { init_search(); }); ``` -------------------------------- ### Initializing Navigation Tree and Resizable Elements (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/classkodi_1_1addon_1_1_v_f_s_url.html This JavaScript snippet executes functions to initialize the navigation tree (initNavTree) and enable resizable elements (initResizable) once the document is ready, likely for a dynamic documentation interface. ```javascript $(document).ready(function(){initNavTree('classkodi_1_1addon_1_1_v_f_s_url.html',''); initResizable(); }); ``` -------------------------------- ### Example Usage of CTimer for Continuous Callback (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__tools___c_timer.html This C++ example demonstrates how to use the `kodi::tools::CTimer` class to set up a continuous callback. The `CExample` class initializes a `CTimer` with a lambda function that calls `TimerCall()` and then starts the timer to execute every 5 seconds. ```C++ #include class ATTRIBUTE_HIDDEN CExample { public: CExample() : m_timer([this](){TimerCall();}) { m_timer.Start(5000, true); // let call continuously all 5 seconds } void TimerCall() { fprintf(stderr, "Hello World\\n"); } private: kodi::tools::CTimer m_timer; }; ``` -------------------------------- ### Initialize Doxygen Navigation Tree and Resizable Panels (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/_module_xbmcgui_8h_source.html This JavaScript snippet initializes the Doxygen navigation tree and resizable panels upon document readiness. It ensures that the documentation's navigation structure is properly set up and that UI elements like sidebars are resizable for better user experience. ```JavaScript $(document).ready(function(){initNavTree('_module_xbmcgui_8h_source.html',''); initResizable(); }); ``` -------------------------------- ### Getting Current File Position with xbmcvfs.File in Python Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__python__file.html Shows how to get the current read/write position within an opened file using the `tell()` method. This function was added in Kodi v19. Examples demonstrate its usage with both explicit file closing and the recommended context manager approach. ```Python f = xbmcvfs.File(file) s = f.tell() f.close() ``` ```Python with xbmcvfs.File(file) as f: s = f.tell() ``` -------------------------------- ### Initializing Window XBMC GUI C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/interfaces_2legacy_2_window_8h_source.html This method is called when the XBMC GUI window is initialized. It provides a hook for custom setup logic when the window is created and ready for use. It takes no parameters and returns nothing. ```C++ virtual void onInit(); ``` -------------------------------- ### Get Picture Resolution (Python) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/class_x_b_m_c_addon_1_1xbmc_1_1_info_tag_picture.html This method retrieves the resolution of the picture. The resolution is returned as a string in the format 'width x height', for example, '1920 x 1080'. ```Python getResolution() ``` -------------------------------- ### Getting Elapsed Seconds from CTimer in C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/_timer_8h_source.html This method calculates and returns the elapsed time in seconds since the timer started. It achieves this by calling `GetElapsedMilliseconds()` and converting the result to seconds. ```C++ float GetElapsedSeconds() const { return GetElapsedMilliseconds() / 1000.0f; } ``` -------------------------------- ### Initializing Doxygen Search in JavaScript Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__gui__helpers__gl.html This JavaScript snippet uses jQuery's `$(document).ready()` to ensure that the `init_search()` function is called once the DOM is fully loaded. This is typically used to set up search functionality for Doxygen-generated documentation. ```JavaScript $(document).ready(function() { init_search(); }); ``` -------------------------------- ### Initializing Doxygen Navigation and Resizable Panels (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/yes__no_8h_source.html This JavaScript snippet initializes the Doxygen navigation tree and resizable panels when the document is ready. It sets up the interactive navigation structure and allows users to resize parts of the layout for better viewing. ```JavaScript $(document).ready(function(){initNavTree('yes__no_8h_source.html',''); initResizable(); }); ``` -------------------------------- ### Getting Stream Properties in C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__addon__pvr___streams___t_v.html Retrieves the stream properties from the PVR add-on. This method is currently not implemented in the example and returns `PVR_ERROR_NOT_IMPLEMENTED`, indicating that the functionality is not yet provided. ```C++ PVR_ERROR CMyInstance::GetStreamProperties(std::vector& properties) { return PVR_ERROR_NOT_IMPLEMENTED; } ``` -------------------------------- ### Defining Mid String Function in C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__tools___string_utils___edit_control.html This snippet defines the 'Mid' function within 'kodi::tools::StringUtils'. It extracts a substring from the middle of a given string, starting at a specified position and extending for a given count. The 'count' parameter is optional and defaults to 'std::string::npos' to get the rest of the string. It takes a constant reference to a string, a starting position, and an optional count. ```C++ static std::string Mid(const std::string &str, size_t first, size_t count=std::string::npos) ``` -------------------------------- ### Implementing OnInit Callback for Kodi Window (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/gui_2window_8h_source.html This virtual function serves as an initialization callback for a Kodi GUI window. It is intended to be overridden by derived classes to perform setup operations when the window is created. The default implementation returns false, indicating no specific initialization action is taken. ```C++ virtual bool OnInit() { return false; } ``` -------------------------------- ### Initializing Doxygen Navigation and Resizing (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/c-api_2addon-instance_2_game_8h_source.html This JavaScript snippet initializes the Doxygen navigation tree to the current page and enables resizable elements within the documentation, improving user interface interactivity. ```JavaScript $(document).ready(function(){initNavTree('c-api_2addon-instance_2_game_8h_source.html',''); initResizable(); }); ``` -------------------------------- ### Declaring and Implementing GetChannelGroups in Kodi PVR Addon (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__addon__pvr__supports_channel_groups.html This entry combines the declaration and an example implementation start for the GetChannelGroups method. This virtual method is crucial for retrieving a list of channel groups from the PVR backend, distinguishing between TV and radio groups. The example shows how an addon instance (CMyPVRInstance) would define this method, including a placeholder return for unimplemented logic. ```C++ virtual PVR_ERROR GetChannelGroups(bool radio, kodi::addon::PVRChannelGroupsResultSet & results) ``` ```C++ PVR_ERROR CMyPVRInstance::GetChannelGroups(bool radio, kodi::addon::PVRChannelGroupsResultSet& groups) { // Add logic to fetch and populate channel groups here return PVR_ERROR_NOT_IMPLEMENTED; // Placeholder for actual implementation } ``` -------------------------------- ### Get EPG Search String (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/classkodi_1_1addon_1_1_p_v_r_timer.html Retrieves the EPG (Electronic Program Guide) search string used for this PVR timer. This string is typically set using `SetEPGSearchString` and is used for recurring or smart recordings. ```C++ std::string GetEPGSearchString () const ``` -------------------------------- ### Initialize Doxygen Navigation Tree and Resizable Panels (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/c-api_2gui_2controls_2image_8h_source.html This JavaScript snippet initializes the Doxygen navigation tree and resizable panels upon document readiness, providing interactive navigation and layout adjustments for the documentation. ```JavaScript $(document).ready(function(){initNavTree('c-api_2gui_2controls_2image_8h_source.html',''); initResizable(); }); ``` -------------------------------- ### Constructing Parameterized Visualization Instance - Kodi Addon - C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/addon-instance_2_visualization_8h_source.html This constructor for the `CInstanceVisualization` class supports multiple instance types, initializing with a Kodi handle and an optional Kodi version string. ```C++ CInstanceVisualization(KODI_HANDLE instance, const std::string &kodiVersion="") ``` -------------------------------- ### Get PVR Stream Start PTS (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/classkodi_1_1addon_1_1_p_v_r_stream_times.html This C++ member function of `PVRStreamTimes` retrieves the Presentation Time Stamp (PTS) corresponding to the `startTime` of the stream. It provides the base PTS value from which `PTSBegin` and `PTSEnd` are relative. ```C++ int64_t GetPTSStart () const ``` -------------------------------- ### Initialize Doxygen Search Functionality (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/addon-instance_2_p_v_r_8h_source.html This JavaScript snippet uses jQuery's `$(document).ready()` to ensure that the `init_search()` function is called only after the entire HTML document has been loaded and parsed. It is typically used in Doxygen-generated documentation to set up the search box. ```JavaScript $(document).ready(function() { init_search(); }); ``` -------------------------------- ### Getting Chapter Position in Milliseconds in Kodi Inputstream (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/classkodi_1_1addon_1_1_c_instance_input_stream.html Returns the start position of a specific chapter, identified by its index 'ch', in milliseconds. This provides precise timing information for navigating directly to a chapter's beginning. ```C++ virtual int64_t GetChapterPos (int ch) ``` -------------------------------- ### Getting Elapsed Time in Milliseconds for C++ CTimer Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/_timer_8h_source.html This constant member function returns the elapsed time of the timer as a floating-point value in milliseconds. It provides a precise measurement of the duration since the timer started. ```C++ float GetElapsedMilliseconds() const ``` -------------------------------- ### Initializing Navigation Tree and Resizable Elements - JavaScript Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/_doxygen__on__addon.html Similar to the search initialization, this snippet ensures that the navigation tree ('initNavTree') and resizable UI elements ('initResizable') are set up only after the DOM is fully loaded. This is crucial for interactive documentation pages that rely on dynamic content and layout adjustments. ```JavaScript $(document).ready(function(){initNavTree('_doxygen__on__addon.html',''); initResizable(); }); ``` -------------------------------- ### Get MD5 Digest of Text (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__gui__dialogs___keyboard.html This utility function calculates and returns the MD5 hash of a given input string. It is typically used to hash passwords before comparison or storage, as demonstrated in the password check example. ```C++ std::string ATTRIBUTE_HIDDEN GetMD5(const std::string &text) ``` -------------------------------- ### Implementing Screensaver Addon Start Callback in C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/addon-instance_2_screensaver_8h_source.html The 'ADDON_Start' function serves as the entry point for the screensaver addon when it is activated. It casts the generic 'AddonInstance_Screensaver' to 'CInstanceScreensaver', retrieves a rendering helper, and then calls the class's internal 'Start' method. It returns a boolean indicating successful initialization. ```C++ inline static bool ADDON_Start(AddonInstance_Screensaver* instance) { CInstanceScreensaver* thisClass = static_cast(instance->toAddon->addonInstance); thisClass->m_renderHelper = kodi::gui::GetRenderHelper(); return thisClass->Start(); } ``` -------------------------------- ### Initializing Navigation Tree and Resizable Elements (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/struct_v_f_s___c_a_c_h_e___s_t_a_t_u_s___d_a_t_a.html This JavaScript snippet executes on document ready, initializing the navigation tree (initNavTree) to highlight the current page (struct_v_f_s___c_a_c_h_e___s_t_a_t_u_s___d_a_t_a.html) and enabling resizable elements (initResizable) for the documentation layout. ```JavaScript $(document).ready(function(){initNavTree('struct_v_f_s___c_a_c_h_e___s_t_a_t_u_s___d_a_t_a.html',''); initResizable(); }); ``` -------------------------------- ### Getting Elapsed Seconds in C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__tools___c_timer.html This inline C++ function retrieves the elapsed time from a timer as a floating-point value, measured in seconds. It provides a precise measurement of the duration that has passed since the timer was started or last reset. ```C++ float GetElapsedSeconds() const inline ``` -------------------------------- ### Initializing Navigation Tree and Resizable Elements (jQuery/JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__addon__peripheral___defs___peripheral.html Similar to the search initialization, this snippet uses `$(document).ready()` to execute two functions once the DOM is fully loaded. `initNavTree()` is called with a specific HTML path, suggesting it sets up a navigation tree structure, possibly for Doxygen-generated documentation. `initResizable()` likely enables resizing functionality for certain UI elements on the page, enhancing user interaction with the documentation layout. ```JavaScript $(document).ready(function(){initNavTree('group__cpp__kodi__addon__peripheral___defs___peripheral.html',''); initResizable(); }); ``` -------------------------------- ### Getting Start Any Time Flag for PVR Timer (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi__addon__pvr___defs___timer___p_v_r_timer.html This function retrieves the startAnyTime flag, which indicates if the startTime parameter is disregarded for EPG-based timers. The returned boolean value reflects the setting previously configured by SetStartAnyTime. ```C++ bool GetStartAnyTime( ) ``` -------------------------------- ### Getting Elapsed Time in Seconds for C++ CTimer Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/_timer_8h_source.html This constant member function returns the elapsed time of the timer as a floating-point value in seconds. It provides a convenient way to measure the duration since the timer started. ```C++ float GetElapsedSeconds() const ``` -------------------------------- ### Initializing Doxygen Navigation and Resizable Panels - JavaScript Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/addon-instance_2_inputstream_8h_source.html This JavaScript snippet runs on document readiness, initializing the Doxygen navigation tree to a specific source file (`addon-instance_2_inputstream_8h_source.html`) and enabling resizable panels for improved user interface interaction. ```JavaScript $(document).ready(function(){initNavTree('addon-instance_2_inputstream_8h_source.html',''); initResizable(); }); ``` -------------------------------- ### Getting Elapsed Milliseconds from CTimer in C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/_timer_8h_source.html This method calculates and returns the elapsed time in milliseconds since the timer started. It returns 0.0f if the timer is not running and uses `std::chrono` for precise time calculations. ```C++ float GetElapsedMilliseconds() const { using namespace std::chrono; if (!IsRunning()) return 0.0f; const auto now = system_clock::now(); return static_cast(duration_cast(now.time_since_epoch() - (m_endTime - m_timeout)).count()); } ``` -------------------------------- ### Getting Addon Library Path (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/group__cpp__kodi.html This C++ function, `GetLibPath`, provides the OS-associated executable binary path for the addon, which can differ from the installation path returned by `GetAddonPath` on some systems (e.g., Linux). This is crucial for locating dynamic libraries. ```C++ std::string ATTRIBUTE_HIDDEN kodi::GetLibPath( ) ``` -------------------------------- ### Initialize Navigation Tree and Resizable Panels (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/definitions_8h_source.html Similar to the search initialization, this JavaScript snippet executes functions after the document is ready. It initializes the navigation tree (`initNavTree`) for the documentation, linking it to the current source file, and also initializes resizable panels (`initResizable`) for a better user experience in the Doxygen interface. ```JavaScript $(document).ready(function(){initNavTree('definitions_8h_source.html',''); initResizable(); }); ``` -------------------------------- ### Getting Elapsed Milliseconds from CTimer in C++ Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/classkodi_1_1tools_1_1_c_timer.html The GetElapsedMilliseconds method returns the time elapsed since the timer started, expressed in milliseconds as a floating-point number. It's a const method, indicating it does not modify the object's state. ```C++ float GetElapsedMilliseconds() const ``` -------------------------------- ### Initialize Navigation Tree and Resizable Elements (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/struct_addon_instance___game.html This JavaScript snippet, executed on document readiness, calls `initNavTree()` to set up the navigation tree, pointing to `struct_addon_instance___game.html` as the current page. It also calls `initResizable()` to enable resizing functionality for elements on the page, which is common in interactive documentation layouts generated by tools like Doxygen. ```JavaScript $(document).ready(function(){initNavTree('struct_addon_instance___game.html',''); initResizable(); }); ``` -------------------------------- ### Retrieve EPG Support - Kodi PVRCapabilities (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/addon-instance_2pvr_2_general_8h_source.html This function retrieves whether the PVR add-on supports Electronic Program Guide (EPG) functionality. It is used to get values that have been previously set by `SetSupportsEPG`. ```C++ bool GetSupportsEPG() const ``` -------------------------------- ### Initializing Navigation Tree and Resizable Elements (JavaScript) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/dir_0060cbc898fd51943e8780e643236cd8.html This JavaScript snippet executes functions to initialize the navigation tree and resizable UI elements once the document is ready. initNavTree sets up the directory navigation, while initResizable enables dynamic resizing of documentation panels, enhancing user interaction and layout flexibility. ```JavaScript $(document).ready(function(){initNavTree('dir_0060cbc898fd51943e8780e643236cd8.html',''); initResizable(); }); ``` -------------------------------- ### Getting Stream Times in Kodi PVR Addon (C++) Source: https://github.com/alwinesch/alwinesch.github.io/blob/master/addon-instance_2_p_v_r_8h_source.html Obtains various time-related information for the current stream, such as start time, end time, and current position. The information is populated into the `PVRStreamTimes` structure. ```C++ virtual PVR_ERROR GetStreamTimes(kodi::addon::PVRStreamTimes ×) ```