Data Fields
PP_Bool(* | SetCursor )(PP_Instance instance, enum PP_MouseCursor_Type type, PP_Resource image, const struct PP_Point *hot_spot) |
Detailed Description
The PPB_MouseCursor
allows setting the mouse cursor.
Field Documentation
PP_Bool(* PPB_MouseCursor::SetCursor)(PP_Instance instance, enum PP_MouseCursor_Type type, PP_Resource image, const struct PP_Point *hot_spot) |
Sets the given mouse cursor.
The mouse cursor will be in effect whenever the mouse is over the given instance until it is set again by another call. Note that you can hide the mouse cursor by setting it to the PP_MOUSECURSOR_TYPE_NONE
type.
This function allows setting both system defined mouse cursors and custom cursors. To set a system-defined cursor, pass the type you want and set the custom image to 0 and the hot spot to NULL. To set a custom cursor, set the type to PP_MOUSECURSOR_TYPE_CUSTOM
and specify your image and hot spot.
- Parameters:
[in] instance A PP_Instance
identifying the instance that the mouse cursor will affect.[in] type A PP_MouseCursor_Type
identifying the type of mouse cursor to show.[in] image A PPB_ImageData
resource identifying the custom image to set when the type isPP_MOUSECURSOR_TYPE_CUSTOM
. The image must be less than 32 pixels in each direction and must be of the system's native image format. When you are specifying a predefined cursor, this parameter must be 0.[in] hot_spot When setting a custom cursor, this identifies the pixel position within the given image of the "hot spot" of the cursor. When specifying a stock cursor, this parameter is ignored.
- Returns:
- PP_TRUE on success, or PP_FALSE if the instance or cursor type is invalid, or if the image is too large.
The documentation for this struct was generated from the following file: