Native Client

pp::MouseCursor Class Reference

List of all members.

Static Public Member Functions

static bool SetCursor (const InstanceHandle &instance, PP_MouseCursor_Type type, const ImageData &image=ImageData(), const Point &hot_spot=Point(0, 0))

Function Details

static bool pp::MouseCursor::SetCursor ( const InstanceHandle instance,
PP_MouseCursor_Type  type,
const ImageData image = ImageData(),
const Point hot_spot = Point(0, 0) 
) [static]

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 a default-constructor ImageData object. To set a custom cursor, set the type to PP_MOUSECURSOR_TYPE_CUSTOM and specify your image and hot spot.

Parameters:
[in]instanceA handle indentifying the instance that the mouse cursor will affect.
[in]typeA PP_MouseCursor_Type identifying the type of mouse cursor to show. See ppapi/c/ppb_mouse_cursor.h.
[in]imageA ImageData object identifying the custom image to set when the type is PP_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 should be a default-constructed ImageData.
[in]hot_spotWhen setting a custom cursor, this idenfifies the pixel position within the given image of the "hot spot" of the cursor. When specifying a stock cursor, this parameter is ignored.
Returns:
true on success, or false if the instance or cursor type was invalid or if the image was too large.

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

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.