| OLD | NEW |
| 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
| 4 */ | 4 */ |
| 5 | 5 |
| 6 /* From ppb_core.idl modified Wed Oct 5 14:06:02 2011. */ | 6 /* From ppb_core.idl modified Mon Mar 19 12:02:10 2012. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_PPB_CORE_H_ | 8 #ifndef PPAPI_C_PPB_CORE_H_ |
| 9 #define PPAPI_C_PPB_CORE_H_ | 9 #define PPAPI_C_PPB_CORE_H_ |
| 10 | 10 |
| 11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
| 12 #include "ppapi/c/pp_completion_callback.h" | 12 #include "ppapi/c/pp_completion_callback.h" |
| 13 #include "ppapi/c/pp_macros.h" | 13 #include "ppapi/c/pp_macros.h" |
| 14 #include "ppapi/c/pp_resource.h" | 14 #include "ppapi/c/pp_resource.h" |
| 15 #include "ppapi/c/pp_stdint.h" | 15 #include "ppapi/c/pp_stdint.h" |
| 16 #include "ppapi/c/pp_time.h" | 16 #include "ppapi/c/pp_time.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 * resource. | 51 * resource. |
| 52 */ | 52 */ |
| 53 void (*ReleaseResource)(PP_Resource resource); | 53 void (*ReleaseResource)(PP_Resource resource); |
| 54 /** | 54 /** |
| 55 * GetTime() returns the "wall clock time" according to the | 55 * GetTime() returns the "wall clock time" according to the |
| 56 * browser. | 56 * browser. |
| 57 * | 57 * |
| 58 * @return A <code>PP_Time</code> containing the "wall clock time" according | 58 * @return A <code>PP_Time</code> containing the "wall clock time" according |
| 59 * to the browser. | 59 * to the browser. |
| 60 */ | 60 */ |
| 61 PP_Time (*GetTime)(); | 61 PP_Time (*GetTime)(void); |
| 62 /** | 62 /** |
| 63 * GetTimeTicks() returns the "tick time" according to the browser. | 63 * GetTimeTicks() returns the "tick time" according to the browser. |
| 64 * This clock is used by the browser when passing some event times to the | 64 * This clock is used by the browser when passing some event times to the |
| 65 * module (e.g. using the <code>PP_InputEvent::time_stamp_seconds</code> | 65 * module (e.g. using the <code>PP_InputEvent::time_stamp_seconds</code> |
| 66 * field). It is not correlated to any actual wall clock time | 66 * field). It is not correlated to any actual wall clock time |
| 67 * (like GetTime()). Because of this, it will not run change if the user | 67 * (like GetTime()). Because of this, it will not run change if the user |
| 68 * changes their computer clock. | 68 * changes their computer clock. |
| 69 * | 69 * |
| 70 * @return A <code>PP_TimeTicks</code> containing the "tick time" according | 70 * @return A <code>PP_TimeTicks</code> containing the "tick time" according |
| 71 * to the browser. | 71 * to the browser. |
| 72 */ | 72 */ |
| 73 PP_TimeTicks (*GetTimeTicks)(); | 73 PP_TimeTicks (*GetTimeTicks)(void); |
| 74 /** | 74 /** |
| 75 * CallOnMainThread() schedules work to be executed on the main module thread | 75 * CallOnMainThread() schedules work to be executed on the main module thread |
| 76 * after the specified delay. The delay may be 0 to specify a call back as | 76 * after the specified delay. The delay may be 0 to specify a call back as |
| 77 * soon as possible. | 77 * soon as possible. |
| 78 * | 78 * |
| 79 * The <code>result</code> parameter will just be passed as the second | 79 * The <code>result</code> parameter will just be passed as the second |
| 80 * argument to the callback. Many applications won't need this, but it allows | 80 * argument to the callback. Many applications won't need this, but it allows |
| 81 * a module to emulate calls of some callbacks which do use this value. | 81 * a module to emulate calls of some callbacks which do use this value. |
| 82 * | 82 * |
| 83 * <strong>Note:</strong> CallOnMainThread, even when used from the main | 83 * <strong>Note:</strong> CallOnMainThread, even when used from the main |
| (...skipping 16 matching lines...) Expand all Loading... |
| 100 /** | 100 /** |
| 101 * IsMainThread() returns true if the current thread is the main pepper | 101 * IsMainThread() returns true if the current thread is the main pepper |
| 102 * thread. | 102 * thread. |
| 103 * | 103 * |
| 104 * This function is useful for implementing sanity checks, and deciding if | 104 * This function is useful for implementing sanity checks, and deciding if |
| 105 * dispatching using CallOnMainThread() is required. | 105 * dispatching using CallOnMainThread() is required. |
| 106 * | 106 * |
| 107 * @return A <code>PP_Bool</code> containing <code>PP_TRUE</code> if the | 107 * @return A <code>PP_Bool</code> containing <code>PP_TRUE</code> if the |
| 108 * current thread is the main pepper thread, otherwise <code>PP_FALSE</code>. | 108 * current thread is the main pepper thread, otherwise <code>PP_FALSE</code>. |
| 109 */ | 109 */ |
| 110 PP_Bool (*IsMainThread)(); | 110 PP_Bool (*IsMainThread)(void); |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 typedef struct PPB_Core_1_0 PPB_Core; | 113 typedef struct PPB_Core_1_0 PPB_Core; |
| 114 /** | 114 /** |
| 115 * @} | 115 * @} |
| 116 */ | 116 */ |
| 117 | 117 |
| 118 #endif /* PPAPI_C_PPB_CORE_H_ */ | 118 #endif /* PPAPI_C_PPB_CORE_H_ */ |
| 119 | 119 |
| OLD | NEW |