diff options
author | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-31 20:38:03 +0000 |
---|---|---|
committer | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-31 20:38:03 +0000 |
commit | 66e5af67ff42c6db608aad2bc87393c468c8a642 (patch) | |
tree | 7ba907d99e1c86e0680ef8e4282cc9973a2d36bd /views/widget/widget_gtk.h | |
parent | 5332b834259dbab2ebbefba1944824df469139d4 (diff) | |
download | chromium_src-66e5af67ff42c6db608aad2bc87393c468c8a642.zip chromium_src-66e5af67ff42c6db608aad2bc87393c468c8a642.tar.gz chromium_src-66e5af67ff42c6db608aad2bc87393c468c8a642.tar.bz2 |
Consolidate Widget Event code, other cleanup.
Rename *NativeCapture to *MouseCapture.
Rename and move ShouldReleaseCaptureOnMouseReleased.
Move static flag function to Event.
BUG=72040
TEST=Mouse interaction on win & linux_views.
Review URL: http://codereview.chromium.org/6756043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80065 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget/widget_gtk.h')
-rw-r--r-- | views/widget/widget_gtk.h | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/views/widget/widget_gtk.h b/views/widget/widget_gtk.h index 1bb4adc..9ddc0a4 100644 --- a/views/widget/widget_gtk.h +++ b/views/widget/widget_gtk.h @@ -173,9 +173,6 @@ class WidgetGtk : public Widget, // Returns true if it's handled by the focus manager. bool HandleKeyboardEvent(GdkEventKey* event); - // Returns the view::Event::flags for a GdkEventButton. - static int GetFlagsForEventButton(const GdkEventButton& event); - // Enables debug painting. See |debug_paint_enabled_| for details. static void EnableDebugPaint(); @@ -196,9 +193,9 @@ class WidgetGtk : public Widget, virtual void* GetNativeWindowProperty(const char* name) OVERRIDE; virtual TooltipManager* GetTooltipManager() const OVERRIDE; virtual bool IsScreenReaderActive() const OVERRIDE; - virtual void SetNativeCapture() OVERRIDE; - virtual void ReleaseNativeCapture() OVERRIDE; - virtual bool HasNativeCapture() const OVERRIDE; + virtual void SetMouseCapture() OVERRIDE; + virtual void ReleaseMouseCapture() OVERRIDE; + virtual bool HasMouseCapture() const OVERRIDE; virtual gfx::Rect GetWindowScreenBounds() const OVERRIDE; virtual gfx::Rect GetClientAreaScreenBounds() const OVERRIDE; virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; @@ -279,12 +276,6 @@ class WidgetGtk : public Widget, CHROMEGTK_CALLBACK_0(WidgetGtk, void, OnMap); CHROMEGTK_CALLBACK_0(WidgetGtk, void, OnHide); - void set_mouse_down(bool mouse_down) { is_mouse_down_ = mouse_down; } - - // Returns whether capture should be released on mouse release. The default - // is true. - virtual bool ReleaseCaptureOnMouseReleased(); - // Invoked when gtk grab is stolen by other GtkWidget in the same // application. virtual void HandleGtkGrabBroke(); @@ -308,12 +299,6 @@ class WidgetGtk : public Widget, CHROMEGTK_CALLBACK_1(WidgetGtk, gboolean, OnWindowPaint, GdkEventExpose*); - // Process a mouse click. - bool ProcessMousePressed(GdkEventButton* event); - void ProcessMouseReleased(GdkEventButton* event); - // Process scroll event. - bool ProcessScroll(GdkEventScroll* event); - // Returns the first ancestor of |widget| that is a window. static Window* GetWindowImpl(GtkWidget* widget); @@ -357,20 +342,6 @@ class WidgetGtk : public Widget, scoped_ptr<DropTargetGtk> drop_target_; - // If true, the mouse is currently down. - bool is_mouse_down_; - - // The following are used to detect duplicate mouse move events and not - // deliver them. Displaying a window may result in the system generating - // duplicate move events even though the mouse hasn't moved. - - // If true, the last event was a mouse move event. - bool last_mouse_event_was_move_; - - // Coordinates of the last mouse move event, in screen coordinates. - int last_mouse_move_x_; - int last_mouse_move_y_; - // The following factory is used to delay destruction. ScopedRunnableMethodFactory<WidgetGtk> close_widget_factory_; |