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/controls/link.cc | |
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/controls/link.cc')
-rw-r--r-- | views/controls/link.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/views/controls/link.cc b/views/controls/link.cc index 14bc112..34a9e46 100644 --- a/views/controls/link.cc +++ b/views/controls/link.cc @@ -4,6 +4,10 @@ #include "views/controls/link.h" +#if defined(OS_LINUX) +#include <gdk/gdk.h> +#endif + #include "app/gfx/font.h" #include "base/logging.h" #include "views/event.h" @@ -184,17 +188,19 @@ void Link::SetEnabled(bool f) { } } -#if defined(OS_WIN) -HCURSOR Link::GetCursorForPoint(Event::EventType event_type, int x, int y) { +gfx::NativeCursor Link::GetCursorForPoint(Event::EventType event_type, int x, + int y) { if (enabled_) { - if (!g_hand_cursor) { +#if defined(OS_WIN) + if (!g_hand_cursor) g_hand_cursor = LoadCursor(NULL, IDC_HAND); - } return g_hand_cursor; +#elif defined(OS_LINUX) + return gdk_cursor_new(GDK_HAND2); +#endif } else { return NULL; } } -#endif } // namespace views |