mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Pass cursor type and custom cursor information to CefRenderHandler::OnCursorChange (issue #1443).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1928 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -1840,6 +1840,68 @@ typedef struct _cef_page_range_t {
|
||||
int to;
|
||||
} cef_page_range_t;
|
||||
|
||||
///
|
||||
// Cursor type values.
|
||||
///
|
||||
typedef enum {
|
||||
CT_POINTER = 0,
|
||||
CT_CROSS,
|
||||
CT_HAND,
|
||||
CT_IBEAM,
|
||||
CT_WAIT,
|
||||
CT_HELP,
|
||||
CT_EASTRESIZE,
|
||||
CT_NORTHRESIZE,
|
||||
CT_NORTHEASTRESIZE,
|
||||
CT_NORTHWESTRESIZE,
|
||||
CT_SOUTHRESIZE,
|
||||
CT_SOUTHEASTRESIZE,
|
||||
CT_SOUTHWESTRESIZE,
|
||||
CT_WESTRESIZE,
|
||||
CT_NORTHSOUTHRESIZE,
|
||||
CT_EASTWESTRESIZE,
|
||||
CT_NORTHEASTSOUTHWESTRESIZE,
|
||||
CT_NORTHWESTSOUTHEASTRESIZE,
|
||||
CT_COLUMNRESIZE,
|
||||
CT_ROWRESIZE,
|
||||
CT_MIDDLEPANNING,
|
||||
CT_EASTPANNING,
|
||||
CT_NORTHPANNING,
|
||||
CT_NORTHEASTPANNING,
|
||||
CT_NORTHWESTPANNING,
|
||||
CT_SOUTHPANNING,
|
||||
CT_SOUTHEASTPANNING,
|
||||
CT_SOUTHWESTPANNING,
|
||||
CT_WESTPANNING,
|
||||
CT_MOVE,
|
||||
CT_VERTICALTEXT,
|
||||
CT_CELL,
|
||||
CT_CONTEXTMENU,
|
||||
CT_ALIAS,
|
||||
CT_PROGRESS,
|
||||
CT_NODROP,
|
||||
CT_COPY,
|
||||
CT_NONE,
|
||||
CT_NOTALLOWED,
|
||||
CT_ZOOMIN,
|
||||
CT_ZOOMOUT,
|
||||
CT_GRAB,
|
||||
CT_GRABBING,
|
||||
CT_CUSTOM,
|
||||
} cef_cursor_type_t;
|
||||
|
||||
///
|
||||
// Structure representing cursor information. |buffer| will be
|
||||
// |size.width|*|size.height|*4 bytes in size and represents a BGRA image with
|
||||
// an upper-left origin.
|
||||
///
|
||||
typedef struct _cef_cursor_info_t {
|
||||
cef_point_t hotspot;
|
||||
float image_scale_factor;
|
||||
void* buffer;
|
||||
cef_size_t size;
|
||||
} cef_cursor_info_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -756,4 +756,25 @@ inline bool operator!=(const CefPageRange& a, const CefPageRange& b) {
|
||||
}
|
||||
|
||||
|
||||
struct CefCursorInfoTraits {
|
||||
typedef cef_cursor_info_t struct_type;
|
||||
|
||||
static inline void init(struct_type* s) {}
|
||||
|
||||
static inline void clear(struct_type* s) {}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
bool copy) {
|
||||
target->hotspot = src->hotspot;
|
||||
target->image_scale_factor = src->image_scale_factor;
|
||||
target->buffer = src->buffer;
|
||||
target->size = src->size;
|
||||
}
|
||||
};
|
||||
|
||||
///
|
||||
// Class representing cursor information.
|
||||
///
|
||||
typedef CefStructBase<CefCursorInfoTraits> CefCursorInfo;
|
||||
|
||||
#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_
|
||||
|
Reference in New Issue
Block a user