Pepper_56_C_interfaces
Pepper_56_C_interfaces
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
PPB_Core_1_0 Struct Reference

#include <ppb_core.h>

Public Attributes

void(* AddRefResource )(PP_Resource resource)
 
void(* ReleaseResource )(PP_Resource resource)
 
PP_Time(* GetTime )(void)
 
PP_TimeTicks(* GetTimeTicks )(void)
 
void(* CallOnMainThread )(int32_t delay_in_milliseconds, struct PP_CompletionCallback callback, int32_t result)
 
PP_Bool(* IsMainThread )(void)
 

Detailed Description

The PPB_Core interface contains pointers to functions related to memory management, time, and threads on the browser.

Member Data Documentation

void(* PPB_Core_1_0::AddRefResource)(PP_Resource resource)

AddRefResource() adds a reference to a resource.

Parameters
[in]configA PP_Resource corresponding to a resource.
void(* PPB_Core_1_0::CallOnMainThread)(int32_t delay_in_milliseconds, struct PP_CompletionCallback callback, int32_t result)

CallOnMainThread() schedules work to be executed on the main module thread after the specified delay. The delay may be 0 to specify a call back as soon as possible.

The result parameter will just be passed as the second argument to the callback. Many applications won't need this, but it allows a module to emulate calls of some callbacks which do use this value.

Note: CallOnMainThread, even when used from the main thread with a delay of 0 milliseconds, will never directly invoke the callback. Even in this case, the callback will be scheduled asynchronously.

Note: If the browser is shutting down or if the module has no instances, then the callback function may not be called.

Parameters
[in]delay_in_millisecondsAn int32_t delay in milliseconds.
[in]callbackA PP_CompletionCallback callback function that the browser will call after the specified delay.
[in]resultAn int32_t that the browser will pass to the given PP_CompletionCallback.
PP_Time(* PPB_Core_1_0::GetTime)(void)

GetTime() returns the "wall clock time" according to the browser.

Returns
A PP_Time containing the "wall clock time" according to the browser.
PP_TimeTicks(* PPB_Core_1_0::GetTimeTicks)(void)

GetTimeTicks() returns the "tick time" according to the browser. This clock is used by the browser when passing some event times to the module (e.g. using the PP_InputEvent::time_stamp_seconds field). It is not correlated to any actual wall clock time (like GetTime()). Because of this, it will not run change if the user changes their computer clock.

Returns
A PP_TimeTicks containing the "tick time" according to the browser.
PP_Bool(* PPB_Core_1_0::IsMainThread)(void)

IsMainThread() returns true if the current thread is the main pepper thread.

This function is useful for implementing sanity checks, and deciding if dispatching using CallOnMainThread() is required.

Returns
A PP_Bool containing PP_TRUE if the current thread is the main pepper thread, otherwise PP_FALSE.
void(* PPB_Core_1_0::ReleaseResource)(PP_Resource resource)

ReleaseResource() removes a reference from a resource.

Parameters
[in]configA PP_Resource corresponding to a resource.

The documentation for this struct was generated from the following file: