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

Side by Side Diff: ui/aura/root_window_host.h

Issue 11412315: Make the cursor have separate mode for disabled mouse events and invisible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years 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
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_AURA_ROOT_WINDOW_HOST_H_ 5 #ifndef UI_AURA_ROOT_WINDOW_HOST_H_
6 #define UI_AURA_ROOT_WINDOW_HOST_H_ 6 #define UI_AURA_ROOT_WINDOW_HOST_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 // Releases OS capture of the root window. 69 // Releases OS capture of the root window.
70 virtual void ReleaseCapture() = 0; 70 virtual void ReleaseCapture() = 0;
71 71
72 // Sets the currently displayed cursor. 72 // Sets the currently displayed cursor.
73 virtual void SetCursor(gfx::NativeCursor cursor) = 0; 73 virtual void SetCursor(gfx::NativeCursor cursor) = 0;
74 74
75 // Queries the mouse's current position relative to the host window and sets 75 // Queries the mouse's current position relative to the host window and sets
76 // it in |location_return|. Returns true if the cursor is within the host 76 // it in |location_return|. Returns true if the cursor is within the host
77 // window. The position set to |location_return| is constrained within the 77 // window. The position set to |location_return| is constrained within the
78 // host window. 78 // host window. If the cursor is disabled, returns false and (0, 0) is set to
79 // |location_return|.
79 // This method is expensive, instead use gfx::Screen::GetCursorScreenPoint(). 80 // This method is expensive, instead use gfx::Screen::GetCursorScreenPoint().
80 virtual bool QueryMouseLocation(gfx::Point* location_return) = 0; 81 virtual bool QueryMouseLocation(gfx::Point* location_return) = 0;
81 82
82 // Clips the cursor to the bounds of the root window until UnConfineCursor(). 83 // Clips the cursor to the bounds of the root window until UnConfineCursor().
83 virtual bool ConfineCursorToRootWindow() = 0; 84 virtual bool ConfineCursorToRootWindow() = 0;
84 virtual void UnConfineCursor() = 0; 85 virtual void UnConfineCursor() = 0;
85 86
86 // Called when the cursor visibility has changed. 87 // Invoked when the cursor gets enabled or disabled.
87 virtual void OnCursorVisibilityChanged(bool show) = 0; 88 virtual void OnCursorEnableStateChanged(bool enabled) = 0;
88 89
89 // Moves the cursor to the specified location relative to the root window. 90 // Moves the cursor to the specified location relative to the root window.
90 virtual void MoveCursorTo(const gfx::Point& location) = 0; 91 virtual void MoveCursorTo(const gfx::Point& location) = 0;
91 92
92 // Sets if the window should be focused when shown. 93 // Sets if the window should be focused when shown.
93 virtual void SetFocusWhenShown(bool focus_when_shown) = 0; 94 virtual void SetFocusWhenShown(bool focus_when_shown) = 0;
94 95
95 // Copies |source_bounds| from the root window (as displayed on the host 96 // Copies |source_bounds| from the root window (as displayed on the host
96 // machine) to |canvas| at offset |dest_offset|. The bounds need to be in 97 // machine) to |canvas| at offset |dest_offset|. The bounds need to be in
97 // physical pixels. 98 // physical pixels.
(...skipping 15 matching lines...) Expand all
113 // Called when the device scale factor of the root window has chagned. 114 // Called when the device scale factor of the root window has chagned.
114 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) = 0; 115 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) = 0;
115 116
116 // Stop listening events in preparation for shutdown. 117 // Stop listening events in preparation for shutdown.
117 virtual void PrepareForShutdown() = 0; 118 virtual void PrepareForShutdown() = 0;
118 }; 119 };
119 120
120 } // namespace aura 121 } // namespace aura
121 122
122 #endif // UI_AURA_ROOT_WINDOW_HOST_H_ 123 #endif // UI_AURA_ROOT_WINDOW_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698