| 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 ppp_instance.idl modified Mon Feb 6 14:04:52 2012. */ | 6 /* From ppp_instance.idl modified Thu Jun 28 15:08:39 2012. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_PPP_INSTANCE_H_ | 8 #ifndef PPAPI_C_PPP_INSTANCE_H_ |
| 9 #define PPAPI_C_PPP_INSTANCE_H_ | 9 #define PPAPI_C_PPP_INSTANCE_H_ |
| 10 | 10 |
| 11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
| 12 #include "ppapi/c/pp_instance.h" | 12 #include "ppapi/c/pp_instance.h" |
| 13 #include "ppapi/c/pp_macros.h" | 13 #include "ppapi/c/pp_macros.h" |
| 14 #include "ppapi/c/pp_point.h" | 14 #include "ppapi/c/pp_point.h" |
| 15 #include "ppapi/c/pp_rect.h" | 15 #include "ppapi/c/pp_rect.h" |
| 16 #include "ppapi/c/pp_resource.h" | 16 #include "ppapi/c/pp_resource.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 /** | 114 /** |
| 115 * <code>DidChangeView() is called when the position, size, or other view | 115 * <code>DidChangeView() is called when the position, size, or other view |
| 116 * attributes of the instance has changed. | 116 * attributes of the instance has changed. |
| 117 */ | 117 */ |
| 118 void (*DidChangeView)(PP_Instance instance, PP_Resource view); | 118 void (*DidChangeView)(PP_Instance instance, PP_Resource view); |
| 119 /** | 119 /** |
| 120 * DidChangeFocus() is called when an instance has gained or lost focus. | 120 * DidChangeFocus() is called when an instance has gained or lost focus. |
| 121 * Having focus means that keyboard events will be sent to the instance. | 121 * Having focus means that keyboard events will be sent to the instance. |
| 122 * An instance's default condition is that it will not have focus. | 122 * An instance's default condition is that it will not have focus. |
| 123 * | 123 * |
| 124 * The focus flag takes into account both browser tab and window focus as |
| 125 * well as focus of the plugin element on the page. In order to be deemed |
| 126 * to have focus, the browser window must be topmost, the tab must be |
| 127 * selected in the window, and the instance must be the focused element on |
| 128 * the page. |
| 129 * |
| 124 * <strong>Note:</strong>Clicks on instances will give focus only if you | 130 * <strong>Note:</strong>Clicks on instances will give focus only if you |
| 125 * handle the click event. Return <code>true</code> from | 131 * handle the click event. Return <code>true</code> from |
| 126 * <code>HandleInputEvent</code> in <code>PPP_InputEvent</code> (or use | 132 * <code>HandleInputEvent</code> in <code>PPP_InputEvent</code> (or use |
| 127 * unfiltered events) to signal that the click event was handled. Otherwise, | 133 * unfiltered events) to signal that the click event was handled. Otherwise, |
| 128 * the browser will bubble the event and give focus to the element on the page | 134 * the browser will bubble the event and give focus to the element on the page |
| 129 * that actually did end up consuming it. If you're not getting focus, check | 135 * that actually did end up consuming it. If you're not getting focus, check |
| 130 * to make sure you're returning true from the mouse click in | 136 * to make sure you're either requesting them via |
| 131 * <code>HandleInputEvent</code>. | 137 * <code>RequestInputEvents()<code> (which implicitly marks all input events |
| 138 * as consumed) or via <code>RequestFilteringInputEvents()</code> and |
| 139 * returning true from your event handler. |
| 132 * | 140 * |
| 133 * @param[in] instance A <code>PP_Instance</code> identifying the instance | 141 * @param[in] instance A <code>PP_Instance</code> identifying the instance |
| 134 * receiving the input event. | 142 * receiving the input event. |
| 135 * | 143 * |
| 136 * @param[in] has_focus Indicates the new focused state of the instance. | 144 * @param[in] has_focus Indicates the new focused state of the instance. |
| 137 */ | 145 */ |
| 138 void (*DidChangeFocus)(PP_Instance instance, PP_Bool has_focus); | 146 void (*DidChangeFocus)(PP_Instance instance, PP_Bool has_focus); |
| 139 /** | 147 /** |
| 140 * HandleDocumentLoad() is called after initialize for a full-frame | 148 * HandleDocumentLoad() is called after initialize for a full-frame |
| 141 * module that was instantiated based on the MIME type of a DOMWindow | 149 * module that was instantiated based on the MIME type of a DOMWindow |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 const struct PP_Rect* clip); | 187 const struct PP_Rect* clip); |
| 180 void (*DidChangeFocus)(PP_Instance instance, PP_Bool has_focus); | 188 void (*DidChangeFocus)(PP_Instance instance, PP_Bool has_focus); |
| 181 PP_Bool (*HandleDocumentLoad)(PP_Instance instance, PP_Resource url_loader); | 189 PP_Bool (*HandleDocumentLoad)(PP_Instance instance, PP_Resource url_loader); |
| 182 }; | 190 }; |
| 183 /** | 191 /** |
| 184 * @} | 192 * @} |
| 185 */ | 193 */ |
| 186 | 194 |
| 187 #endif /* PPAPI_C_PPP_INSTANCE_H_ */ | 195 #endif /* PPAPI_C_PPP_INSTANCE_H_ */ |
| 188 | 196 |
| OLD | NEW |