Move android_app_version_* into an inner variables dict.
[chromium-blink-merge.git] / ppapi / c / ppb_mouse_cursor.h
blobbc6a5f542fa457bbb8591d68ff9fda16dd2bf787
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
3 * found in the LICENSE file.
4 */
6 /* From ppb_mouse_cursor.idl modified Thu Mar 28 10:11:32 2013. */
8 #ifndef PPAPI_C_PPB_MOUSE_CURSOR_H_
9 #define PPAPI_C_PPB_MOUSE_CURSOR_H_
11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_macros.h"
14 #include "ppapi/c/pp_point.h"
15 #include "ppapi/c/pp_resource.h"
16 #include "ppapi/c/pp_stdint.h"
18 #define PPB_MOUSECURSOR_INTERFACE_1_0 "PPB_MouseCursor;1.0"
19 #define PPB_MOUSECURSOR_INTERFACE PPB_MOUSECURSOR_INTERFACE_1_0
21 /**
22 * @file
23 * This file defines the <code>PPB_MouseCursor</code> interface for setting
24 * the mouse cursor.
28 /**
29 * @addtogroup Enums
30 * @{
32 /**
33 * The <code>PP_MouseCursor_Type</code> enumeration lists the available stock
34 * cursor types.
36 enum PP_MouseCursor_Type {
37 PP_MOUSECURSOR_TYPE_CUSTOM = -1,
38 PP_MOUSECURSOR_TYPE_POINTER = 0,
39 PP_MOUSECURSOR_TYPE_CROSS = 1,
40 PP_MOUSECURSOR_TYPE_HAND = 2,
41 PP_MOUSECURSOR_TYPE_IBEAM = 3,
42 PP_MOUSECURSOR_TYPE_WAIT = 4,
43 PP_MOUSECURSOR_TYPE_HELP = 5,
44 PP_MOUSECURSOR_TYPE_EASTRESIZE = 6,
45 PP_MOUSECURSOR_TYPE_NORTHRESIZE = 7,
46 PP_MOUSECURSOR_TYPE_NORTHEASTRESIZE = 8,
47 PP_MOUSECURSOR_TYPE_NORTHWESTRESIZE = 9,
48 PP_MOUSECURSOR_TYPE_SOUTHRESIZE = 10,
49 PP_MOUSECURSOR_TYPE_SOUTHEASTRESIZE = 11,
50 PP_MOUSECURSOR_TYPE_SOUTHWESTRESIZE = 12,
51 PP_MOUSECURSOR_TYPE_WESTRESIZE = 13,
52 PP_MOUSECURSOR_TYPE_NORTHSOUTHRESIZE = 14,
53 PP_MOUSECURSOR_TYPE_EASTWESTRESIZE = 15,
54 PP_MOUSECURSOR_TYPE_NORTHEASTSOUTHWESTRESIZE = 16,
55 PP_MOUSECURSOR_TYPE_NORTHWESTSOUTHEASTRESIZE = 17,
56 PP_MOUSECURSOR_TYPE_COLUMNRESIZE = 18,
57 PP_MOUSECURSOR_TYPE_ROWRESIZE = 19,
58 PP_MOUSECURSOR_TYPE_MIDDLEPANNING = 20,
59 PP_MOUSECURSOR_TYPE_EASTPANNING = 21,
60 PP_MOUSECURSOR_TYPE_NORTHPANNING = 22,
61 PP_MOUSECURSOR_TYPE_NORTHEASTPANNING = 23,
62 PP_MOUSECURSOR_TYPE_NORTHWESTPANNING = 24,
63 PP_MOUSECURSOR_TYPE_SOUTHPANNING = 25,
64 PP_MOUSECURSOR_TYPE_SOUTHEASTPANNING = 26,
65 PP_MOUSECURSOR_TYPE_SOUTHWESTPANNING = 27,
66 PP_MOUSECURSOR_TYPE_WESTPANNING = 28,
67 PP_MOUSECURSOR_TYPE_MOVE = 29,
68 PP_MOUSECURSOR_TYPE_VERTICALTEXT = 30,
69 PP_MOUSECURSOR_TYPE_CELL = 31,
70 PP_MOUSECURSOR_TYPE_CONTEXTMENU = 32,
71 PP_MOUSECURSOR_TYPE_ALIAS = 33,
72 PP_MOUSECURSOR_TYPE_PROGRESS = 34,
73 PP_MOUSECURSOR_TYPE_NODROP = 35,
74 PP_MOUSECURSOR_TYPE_COPY = 36,
75 PP_MOUSECURSOR_TYPE_NONE = 37,
76 PP_MOUSECURSOR_TYPE_NOTALLOWED = 38,
77 PP_MOUSECURSOR_TYPE_ZOOMIN = 39,
78 PP_MOUSECURSOR_TYPE_ZOOMOUT = 40,
79 PP_MOUSECURSOR_TYPE_GRAB = 41,
80 PP_MOUSECURSOR_TYPE_GRABBING = 42
82 PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(PP_MouseCursor_Type, 4);
83 /**
84 * @}
87 /**
88 * @addtogroup Interfaces
89 * @{
91 /**
92 * The <code>PPB_MouseCursor</code> allows setting the mouse cursor.
94 struct PPB_MouseCursor_1_0 {
95 /**
96 * Sets the given mouse cursor. The mouse cursor will be in effect whenever
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
99 * <code>PP_MOUSECURSOR_TYPE_NONE</code> type.
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
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
105 * specify your image and hot spot.
107 * @param[in] instance A <code>PP_Instance</code> identifying the instance
108 * that the mouse cursor will affect.
110 * @param[in] type A <code>PP_MouseCursor_Type</code> identifying the type of
111 * mouse cursor to show.
113 * @param[in] image A <code>PPB_ImageData</code> resource identifying the
114 * custom image to set when the type is
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.
117 * When you are specifying a predefined cursor, this parameter must be 0.
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.
121 * When specifying a stock cursor, this parameter is ignored.
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.
126 PP_Bool (*SetCursor)(PP_Instance instance,
127 enum PP_MouseCursor_Type type,
128 PP_Resource image,
129 const struct PP_Point* hot_spot);
132 typedef struct PPB_MouseCursor_1_0 PPB_MouseCursor;
134 * @}
137 #endif /* PPAPI_C_PPB_MOUSE_CURSOR_H_ */