1/* Copyright (C) 2010 The Android Open Source Project
2**
3** This software is licensed under the terms of the GNU General Public
4** License version 2, as published by the Free Software Foundation, and
5** may be copied, distributed, and modified under those terms.
6**
7** This program is distributed in the hope that it will be useful,
8** but WITHOUT ANY WARRANTY; without even the implied warranty of
9** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10** GNU General Public License for more details.
11*/
12
13#ifndef _ANDROID_PROTOCOL_UI_COMMANDS_API_H
14#define _ANDROID_PROTOCOL_UI_COMMANDS_API_H
15
16/*
17 * Contains the API for calling into the UI with the Core control commands.
18 */
19
20/* Changes the scale of the emulator window at runtime.
21 * Param:
22 *  scale, is_dpi - New window scale parameters
23 * Return:
24 *  0 on success, or < 0 on failure.
25 */
26extern int uicmd_set_window_scale(double scale, int is_dpi);
27
28/* This is temporary redeclaration for AndroidHwLightBrightnessFunc declared
29 * in android/hw-control.h We redeclare it here in order to keep type
30 * consistency between android_core_set_brightness_change_callback and
31 * light_brightness field of AndroidHwControlFuncs structure.
32 */
33typedef void  (*AndroidHwLightBrightnessCallback)(void* opaque,
34                                                  const char* light,
35                                                  int  brightness);
36
37/* Registers a UI callback to be called when brightness is changed by the core. */
38extern int uicmd_set_brightness_change_callback(AndroidHwLightBrightnessCallback callback,
39                                                void* opaque);
40
41#endif /* _ANDROID_PROTOCOL_UI_COMMANDS_API_H */
42