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

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

Issue 10919135: Move ash specific cursor code to CursorManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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/x/events_x.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 869ef7c527c3946f59b14333a47745f2b4d7e450..d6dc0c3172d6461b550552b99d41da180b2aba17 100644
--- a/ui/base/x/x11_util.h
+++ b/ui/base/x/x11_util.h
@@ -97,6 +97,12 @@ UI_EXPORT XcursorImage* SkBitmapToXcursorImage(const SkBitmap* bitmap,
const gfx::Point& hotspot);
#endif
+// Hides the host cursor.
+UI_EXPORT void HideHostCursor();
+
+// Returns an invisible cursor.
+UI_EXPORT ::Cursor CreateInvisibleCursor();
+
// These functions do not cache their results --------------------------
// Get the X window id for the default root window
@@ -319,6 +325,24 @@ class UI_EXPORT XScopedString {
DISALLOW_COPY_AND_ASSIGN(XScopedString);
};
+// Keeps track of a cursor returned by an X function and makes sure it's
+// XFreeCursor'd.
+class UI_EXPORT XScopedCursor {
+ public:
+ // Keeps track of |cursor| created with |display|.
+ XScopedCursor(::Cursor cursor, Display* display);
+ ~XScopedCursor();
+
+ ::Cursor get() const;
+ void reset(::Cursor cursor);
+
+ private:
+ ::Cursor cursor_;
+ Display* display_;
+
+ DISALLOW_COPY_AND_ASSIGN(XScopedCursor);
+};
+
} // namespace ui
#endif // UI_BASE_X_X11_UTIL_H_
« no previous file with comments | « ui/base/x/events_x.cc ('k') | ui/base/x/x11_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698