diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-04 06:40:42 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-04 06:40:42 +0000 |
commit | 9abf8dd6daf601bd5215f612fd530ca009c2e5bd (patch) | |
tree | db13bad567f4803dce769b316713509e0cc96083 /views/view.h | |
parent | 926049f2fee49ce29144c9456112b4199fdb23e7 (diff) | |
download | chromium_src-9abf8dd6daf601bd5215f612fd530ca009c2e5bd.zip chromium_src-9abf8dd6daf601bd5215f612fd530ca009c2e5bd.tar.gz chromium_src-9abf8dd6daf601bd5215f612fd530ca009c2e5bd.tar.bz2 |
Replace HCURSOR usage in views::View with a new gfx::NativeCursor type that also supports GdkCursor*, and wires this up with the existing implementors of the GetCursorForPoint method.
This allows us to get rid of one of the most annoying NOTIMPLEMENTED()s in views-gtk.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/119150
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17614 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view.h')
-rw-r--r-- | views/view.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/views/view.h b/views/view.h index 63fd56d..03291c6 100644 --- a/views/view.h +++ b/views/view.h @@ -12,6 +12,7 @@ #include <string> #include <vector> +#include "base/gfx/native_widget_types.h" #include "base/gfx/rect.h" #include "base/scoped_ptr.h" #include "views/accelerator.h" @@ -811,14 +812,15 @@ class View : public AcceleratorTarget { // insets is returned. virtual gfx::Insets GetInsets() const; -#if defined(OS_WIN) - // TODO(port): Make GetCursorForPoint portable. - // Return the cursor that should be used for this view or NULL if // the default cursor should be used. The provided point is in the - // receiver's coordinate system. - virtual HCURSOR GetCursorForPoint(Event::EventType event_type, int x, int y); -#endif // defined(OS_WIN) + // receiver's coordinate system. The caller is responsible for managing the + // lifetime of the returned object, though that lifetime may vary from + // platform to platform. On Windows, the cursor is a shared resource but in + // Gtk, the framework destroys the returned cursor after setting it. + virtual gfx::NativeCursor GetCursorForPoint(Event::EventType event_type, + int x, + int y); // Convenience to test whether a point is within this view's bounds virtual bool HitTest(const gfx::Point& l) const; |