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

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: . Created 8 years, 9 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
« no previous file with comments | « ui/base/cursor/cursor_x11.cc ('k') | ui/base/x/x11_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..64e7d648df1551ae802157afafcfccbfa3b6cf13 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;
@@ -75,7 +76,20 @@ const int kCursorClearXCursorCache = -1;
// Returns an X11 Cursor, sharable across the process.
// |cursor_shape| is an X font cursor shape, see XCreateFontCursor().
-UI_EXPORT Cursor GetXCursor(int cursor_shape);
+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);
+
+// 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 --------------------------
« no previous file with comments | « ui/base/cursor/cursor_x11.cc ('k') | ui/base/x/x11_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698