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

Unified Diff: chromeos_brightness.h

Issue 5640003: libcros: Watch for display brightness changes. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/cros.git@master
Patch Set: update comment Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « SConstruct.chromiumos ('k') | chromeos_brightness.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « SConstruct.chromiumos ('k') | chromeos_brightness.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698