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

Side by Side Diff: ui/views/widget/widget.h

Issue 10479010: Gesture related changes for views: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test and add some mores Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/widget/root_view.cc ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_WIDGET_WIDGET_H_ 5 #ifndef UI_VIEWS_WIDGET_WIDGET_H_
6 #define UI_VIEWS_WIDGET_WIDGET_H_ 6 #define UI_VIEWS_WIDGET_WIDGET_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <stack> 10 #include <stack>
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 const NativeWidget* native_widget() const; 559 const NativeWidget* native_widget() const;
560 NativeWidget* native_widget(); 560 NativeWidget* native_widget();
561 561
562 internal::NativeWidgetPrivate* native_widget_private() { 562 internal::NativeWidgetPrivate* native_widget_private() {
563 return native_widget_; 563 return native_widget_;
564 } 564 }
565 const internal::NativeWidgetPrivate* native_widget_private() const { 565 const internal::NativeWidgetPrivate* native_widget_private() const {
566 return native_widget_; 566 return native_widget_;
567 } 567 }
568 568
569 // Sets mouse capture on the specified view. 569 // Sets capture to the specified view. This makes it so that all mouse, touch
570 void SetMouseCapture(views::View* view); 570 // and gesture events go to |view|.
571 void SetCapture(views::View* view);
571 572
572 // Releases mouse capture. 573 // Releases capture.
573 void ReleaseMouseCapture(); 574 void ReleaseCapture();
575
576 // Returns true if the widget has capture.
577 bool HasCapture();
574 578
575 // Returns the current event being processed. If there are multiple events 579 // Returns the current event being processed. If there are multiple events
576 // being processed at the same time (e.g. one event triggers another event), 580 // being processed at the same time (e.g. one event triggers another event),
577 // then the most recent event is returned. Returns NULL if no event is being 581 // then the most recent event is returned. Returns NULL if no event is being
578 // processed. 582 // processed.
579 const Event* GetCurrentEvent(); 583 const Event* GetCurrentEvent();
580 584
581 // Invoked when the tooltip text changes for the specified views. 585 // Invoked when the tooltip text changes for the specified views.
582 void TooltipTextChanged(View* view); 586 void TooltipTextChanged(View* view);
583 587
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 // Tracks whether native widget has been initialized. 770 // Tracks whether native widget has been initialized.
767 bool native_widget_initialized_; 771 bool native_widget_initialized_;
768 772
769 // Whether native widget has been destroyed. 773 // Whether native widget has been destroyed.
770 bool native_widget_destroyed_; 774 bool native_widget_destroyed_;
771 775
772 // TODO(beng): Remove NativeWidgetGtk's dependence on these: 776 // TODO(beng): Remove NativeWidgetGtk's dependence on these:
773 // If true, the mouse is currently down. 777 // If true, the mouse is currently down.
774 bool is_mouse_button_pressed_; 778 bool is_mouse_button_pressed_;
775 779
780 // If true, a touch device is currently down.
781 bool is_touch_down_;
782
776 // TODO(beng): Remove NativeWidgetGtk's dependence on these: 783 // TODO(beng): Remove NativeWidgetGtk's dependence on these:
777 // The following are used to detect duplicate mouse move events and not 784 // The following are used to detect duplicate mouse move events and not
778 // deliver them. Displaying a window may result in the system generating 785 // deliver them. Displaying a window may result in the system generating
779 // duplicate move events even though the mouse hasn't moved. 786 // duplicate move events even though the mouse hasn't moved.
780 bool last_mouse_event_was_move_; 787 bool last_mouse_event_was_move_;
781 gfx::Point last_mouse_event_position_; 788 gfx::Point last_mouse_event_position_;
782 789
783 DISALLOW_COPY_AND_ASSIGN(Widget); 790 DISALLOW_COPY_AND_ASSIGN(Widget);
784 }; 791 };
785 792
786 } // namespace views 793 } // namespace views
787 794
788 #endif // UI_VIEWS_WIDGET_WIDGET_H_ 795 #endif // UI_VIEWS_WIDGET_WIDGET_H_
OLDNEW
« no previous file with comments | « ui/views/widget/root_view.cc ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698