OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROMEOS_BRIGHTNESS_H_ |
| 6 #define CHROMEOS_BRIGHTNESS_H_ |
| 7 |
| 8 namespace chromeos { |
| 9 |
| 10 // Signature of function invoked to handle brightness changes. Arguments are |
| 11 // the object passed to MonitorBrightness() and the current brightness level |
| 12 // (between 0 and 100, inclusive). This is currently only invoked in response |
| 13 // to user-requested brightness changes, i.e. caused by the brightness keys. |
| 14 typedef void (*BrightnessMonitorFunction)(void*, int); |
| 15 |
| 16 class OpaqueBrightnessConnection; |
| 17 typedef OpaqueBrightnessConnection* BrightnessConnection; |
| 18 |
| 19 // Register a handler that will be called when the screen brightness changes. |
| 20 extern BrightnessConnection (*MonitorBrightness)( |
| 21 BrightnessMonitorFunction monitor_function, |
| 22 void* object); |
| 23 |
| 24 // Unregister the handler. Takes the BrightnessConnection returned by |
| 25 // MonitorBrightness(). |
| 26 extern void (*DisconnectBrightness)(BrightnessConnection connection); |
| 27 |
| 28 } // namespace chromeos |
| 29 |
| 30 #endif // CHROMEOS_BRIGHTNESS_H_ |
OLD | NEW |