OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 ASH_SYSTEM_PALETTE_PALETTE_UTILS_H_ | 5 #ifndef ASH_SYSTEM_PALETTE_PALETTE_UTILS_H_ |
6 #define ASH_SYSTEM_PALETTE_PALETTE_UTILS_H_ | 6 #define ASH_SYSTEM_PALETTE_PALETTE_UTILS_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 | 9 |
10 namespace gfx { | 10 namespace gfx { |
11 class Point; | 11 class Point; |
12 } | 12 } |
13 | 13 |
14 namespace ash { | 14 namespace ash { |
15 namespace palette_utils { | 15 namespace palette_utils { |
16 | 16 |
17 // Returns true if there is a stylus input device on the internal display. This | 17 // Returns true if there is a stylus input device on the internal display. This |
18 // will return false even if there is a stylus input device until hardware | 18 // will return false even if there is a stylus input device until hardware |
19 // probing is complete (see ui::InputDeviceEventObserver). | 19 // probing is complete (see ui::InputDeviceEventObserver). |
20 ASH_EXPORT bool HasStylusInput(); | 20 ASH_EXPORT bool HasStylusInput(); |
21 | 21 |
22 // Returns true if the palette should be shown on every display. | 22 // Returns true if the palette should be shown on every display. |
23 ASH_EXPORT bool IsPaletteEnabledOnEveryDisplay(); | 23 ASH_EXPORT bool IsPaletteEnabledOnEveryDisplay(); |
24 | 24 |
| 25 // Returns true if the palette should be shown to the user. This happens when: |
| 26 // there is a stylus input, there is an internal display, and the user has not |
| 27 // disabled it in settings. This can be overridden by passing switches. |
| 28 ASH_EXPORT bool ShouldShowPalette(); |
| 29 |
25 // Returns true if either the palette icon or the palette widget contain the | 30 // Returns true if either the palette icon or the palette widget contain the |
26 // given point (in screen space). | 31 // given point (in screen space). |
27 ASH_EXPORT bool PaletteContainsPointInScreen(const gfx::Point& point); | 32 ASH_EXPORT bool PaletteContainsPointInScreen(const gfx::Point& point); |
28 | 33 |
29 } // namespace palette_utils | 34 } // namespace palette_utils |
30 } // namespace ash | 35 } // namespace ash |
31 | 36 |
32 #endif // ASH_SYSTEM_PALETTE_PALETTE_UTILS_H_ | 37 #endif // ASH_SYSTEM_PALETTE_PALETTE_UTILS_H_ |
OLD | NEW |