Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(756)

Unified Diff: ui/base/x/x11_util.h

Issue 9463003: aura-x11: Add custom web cursor support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: x custom cursor cache Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/base/x/x11_util.h
diff --git a/ui/base/x/x11_util.h b/ui/base/x/x11_util.h
index 86955bf5d3e783ab89812b8f4f50b660aadadd0d..25f5b205c7721fc686713d6bd8a217a864a17fcb 100644
--- a/ui/base/x/x11_util.h
+++ b/ui/base/x/x11_util.h
@@ -24,6 +24,7 @@ typedef unsigned long XID;
typedef unsigned long XSharedMemoryId; // ShmSeg in the X headers.
typedef struct _XDisplay Display;
typedef unsigned long Cursor;
+typedef struct _XcursorImage XcursorImage;
#if defined(TOOLKIT_USES_GTK)
typedef struct _GdkDrawable GdkWindow;
@@ -77,6 +78,19 @@ const int kCursorClearXCursorCache = -1;
// |cursor_shape| is an X font cursor shape, see XCreateFontCursor().
UI_EXPORT Cursor GetXCursor(int cursor_shape);
+#if defined(USE_AURA)
+// Creates a custom X cursor from the image. This takes ownership of image. The
+// caller must not free/modify the image. The refcount of the newly created
+// cursor is set to 1.
+UI_EXPORT Cursor CreateReffedCustomXCursor(XcursorImage* image);
Daniel Erat 2012/02/24 21:04:36 will defer to others on "Reffed" vs. "Refed" vs. "
+
+// Increases the refcount of the custom cursor.
+UI_EXPORT void RefCustomXCursor(Cursor cursor);
+
+// Decreases the refcount of the custom cursor, and destroys it if it reaches 0.
+UI_EXPORT void UnrefCustomXCursor(Cursor cursor);
+#endif
+
// These functions do not cache their results --------------------------
// Get the X window id for the default root window

Powered by Google App Engine
This is Rietveld 408576698