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_mouse_cursor.idl modified Mon Mar 26 22:05:07 2012. */ | 6 /* From ppb_mouse_cursor.idl modified Thu Mar 28 10:11:32 2013. */ |
7 | 7 |
8 #ifndef PPAPI_C_PPB_MOUSE_CURSOR_H_ | 8 #ifndef PPAPI_C_PPB_MOUSE_CURSOR_H_ |
9 #define PPAPI_C_PPB_MOUSE_CURSOR_H_ | 9 #define PPAPI_C_PPB_MOUSE_CURSOR_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_resource.h" | 15 #include "ppapi/c/pp_resource.h" |
16 #include "ppapi/c/pp_stdint.h" | 16 #include "ppapi/c/pp_stdint.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 * the mouse is over the given instance until it is set again by another | 97 * the mouse is over the given instance until it is set again by another |
98 * call. Note that you can hide the mouse cursor by setting it to the | 98 * call. Note that you can hide the mouse cursor by setting it to the |
99 * <code>PP_MOUSECURSOR_TYPE_NONE</code> type. | 99 * <code>PP_MOUSECURSOR_TYPE_NONE</code> type. |
100 * | 100 * |
101 * This function allows setting both system defined mouse cursors and | 101 * This function allows setting both system defined mouse cursors and |
102 * custom cursors. To set a system-defined cursor, pass the type you want | 102 * custom cursors. To set a system-defined cursor, pass the type you want |
103 * and set the custom image to 0 and the hot spot to NULL. To set a custom | 103 * and set the custom image to 0 and the hot spot to NULL. To set a custom |
104 * cursor, set the type to <code>PP_MOUSECURSOR_TYPE_CUSTOM</code> and | 104 * cursor, set the type to <code>PP_MOUSECURSOR_TYPE_CUSTOM</code> and |
105 * specify your image and hot spot. | 105 * specify your image and hot spot. |
106 * | 106 * |
107 * @param[in] instance A <code>PP_Instance</code> indentifying the instance | 107 * @param[in] instance A <code>PP_Instance</code> identifying the instance |
108 * that the mouse cursor will affect. | 108 * that the mouse cursor will affect. |
109 * | 109 * |
110 * @param[in] type A <code>PP_MouseCursor_Type</code> identifying the type of | 110 * @param[in] type A <code>PP_MouseCursor_Type</code> identifying the type of |
111 * mouse cursor to show. | 111 * mouse cursor to show. |
112 * | 112 * |
113 * @param[in] image A <code>PPB_ImageData</code> resource identifying the | 113 * @param[in] image A <code>PPB_ImageData</code> resource identifying the |
114 * custom image to set when the type is | 114 * custom image to set when the type is |
115 * <code>PP_MOUSECURSOR_TYPE_CUSTOM</code>. The image must be less than 32 | 115 * <code>PP_MOUSECURSOR_TYPE_CUSTOM</code>. The image must be less than 32 |
116 * pixels in each direction and must be of the system's native image format. | 116 * pixels in each direction and must be of the system's native image format. |
117 * When you are specifying a predefined cursor, this parameter must be 0. | 117 * When you are specifying a predefined cursor, this parameter must be 0. |
118 * | 118 * |
119 * @param[in] hot_spot When setting a custom cursor, this idenfifies the | 119 * @param[in] hot_spot When setting a custom cursor, this identifies the |
120 * pixel position within the given image of the "hot spot" of the cursor. | 120 * pixel position within the given image of the "hot spot" of the cursor. |
121 * When specifying a stock cursor, this parameter is ignored. | 121 * When specifying a stock cursor, this parameter is ignored. |
122 * | 122 * |
123 * @return PP_TRUE on success, or PP_FALSE if the instance or cursor type | 123 * @return PP_TRUE on success, or PP_FALSE if the instance or cursor type |
124 * is invalid, or if the image is too large. | 124 * is invalid, or if the image is too large. |
125 */ | 125 */ |
126 PP_Bool (*SetCursor)(PP_Instance instance, | 126 PP_Bool (*SetCursor)(PP_Instance instance, |
127 enum PP_MouseCursor_Type type, | 127 enum PP_MouseCursor_Type type, |
128 PP_Resource image, | 128 PP_Resource image, |
129 const struct PP_Point* hot_spot); | 129 const struct PP_Point* hot_spot); |
130 }; | 130 }; |
131 | 131 |
132 typedef struct PPB_MouseCursor_1_0 PPB_MouseCursor; | 132 typedef struct PPB_MouseCursor_1_0 PPB_MouseCursor; |
133 /** | 133 /** |
134 * @} | 134 * @} |
135 */ | 135 */ |
136 | 136 |
137 #endif /* PPAPI_C_PPB_MOUSE_CURSOR_H_ */ | 137 #endif /* PPAPI_C_PPB_MOUSE_CURSOR_H_ */ |
138 | 138 |
OLD | NEW |