![]() |
HBBTV
22.3.0
|
NPAPI Utilities for HBBtv. More...
#include "plugin.h"
Go to the source code of this file.
Functions | |
void | NP_UtilsInit (void) |
void | NP_UtilsArrayToResult (NPP instance, U32BIT *array, U32BIT num_elements, NPVariant *result) |
void | NP_UtilsStringToResult (S_HBBTV_STRING str, NPVariant *result) |
void | NP_UtilsHbbtvStringToResult (void *hbbtv_string, NPVariant *result) |
bool | NP_UtilsStringIsNumeric (char *in_string) |
BOOLEAN | NP_UtilsGetU32BIT (const NPVariant *input, U32BIT *output) |
Extracts a number from an NPVariant and saves it (with casting) into the U32BIT pointed by output. This function checks whether the NPVariant contains an uint32_t or a double. More... | |
NPObject * | NP_UtilsAddEventListener (S_PLUGIN *plugin, const NPVariant *value, U32BIT event_type) |
Adds a new event lister to an object. More... | |
U32BIT | NP_UtilsRemoveEventListener (S_PLUGIN *plugin, NPObject *handler) |
Remove an event lister from an object. More... | |
void | NP_UtilsFreeAllEventListeners (S_PLUGIN *plugin) |
Free all event handlers for an object. More... | |
void | NP_UtilsAsyncCallback (S_PLUGIN **plugin_list, void *handle, U32BIT event_type, NPVariant *args, uint32_t num_args) |
Call browser's pluginthreadasynccall to execute JS callback function. More... | |
BOOLEAN | NP_UtilsResolveUrl (NPP instance, S_HBBTV_STRING *uri) |
Resolve URL, convert to full path URL, if needed. More... | |
NPAPI Utilities for HBBtv.
NPObject* NP_UtilsAddEventListener | ( | S_PLUGIN * | plugin, |
const NPVariant * | value, | ||
U32BIT | event_type | ||
) |
Adds a new event lister to an object.
input | - NPP plugin instance reference |
input | - Pointer to head of handler list |
input | - NPObject reference to new event handler |
input | - Object-specific event-type id |
input | - Pointer to plugin object |
input | - NPVariant reference to new event handler |
input | - Object-specific event-type id |
void NP_UtilsAsyncCallback | ( | S_PLUGIN ** | plugin_list, |
void * | handle, | ||
U32BIT | event_type, | ||
NPVariant * | args, | ||
uint32_t | num_args | ||
) |
Call browser's pluginthreadasynccall to execute JS callback function.
input | - NPP plugin instance reference |
input | - NP object of JS Callback function to invoke |
input | - Array of arguments |
input | - Number of arguments |
void NP_UtilsFreeAllEventListeners | ( | S_PLUGIN * | plugin | ) |
Free all event handlers for an object.
input | - Pointer to head of handler list to be freed |
BOOLEAN NP_UtilsGetU32BIT | ( | const NPVariant * | input, |
U32BIT * | output | ||
) |
Extracts a number from an NPVariant and saves it (with casting) into the U32BIT pointed by output. This function checks whether the NPVariant contains an uint32_t or a double.
input | - NPVariant variable containing the number |
output | - pointer to an U32BIT variable where to store the result |
Remove an event lister from an object.
input | - Pointer to head of handler list |
input | - NPObject reference of event handler to be removed |
BOOLEAN NP_UtilsResolveUrl | ( | NPP | instance, |
S_HBBTV_STRING * | uri | ||
) |
Resolve URL, convert to full path URL, if needed.
input | - NPP plugin instance reference |
input/output | - URL (input relative or full, output is full path) |