| Index: chromeos_brightness.h
|
| diff --git a/chromeos_brightness.h b/chromeos_brightness.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c836f69882331db0623ef034872f6aa1331d7f62
|
| --- /dev/null
|
| +++ b/chromeos_brightness.h
|
| @@ -0,0 +1,30 @@
|
| +// Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROMEOS_BRIGHTNESS_H_
|
| +#define CHROMEOS_BRIGHTNESS_H_
|
| +
|
| +namespace chromeos {
|
| +
|
| +// Signature of function invoked to handle brightness changes. Arguments are
|
| +// the object passed to MonitorBrightness() and the current brightness level
|
| +// (between 0 and 100, inclusive). This is currently only invoked in response
|
| +// to user-requested brightness changes, i.e. caused by the brightness keys.
|
| +typedef void (*BrightnessMonitorFunction)(void*, int);
|
| +
|
| +class OpaqueBrightnessConnection;
|
| +typedef OpaqueBrightnessConnection* BrightnessConnection;
|
| +
|
| +// Register a handler that will be called when the screen brightness changes.
|
| +extern BrightnessConnection (*MonitorBrightness)(
|
| + BrightnessMonitorFunction monitor_function,
|
| + void* object);
|
| +
|
| +// Unregister the handler. Takes the BrightnessConnection returned by
|
| +// MonitorBrightness().
|
| +extern void (*DisconnectBrightness)(BrightnessConnection connection);
|
| +
|
| +} // namespace chromeos
|
| +
|
| +#endif // CHROMEOS_BRIGHTNESS_H_
|
|
|