1777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* Copyright (C) 2010 The Android Open Source Project 2777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine** 3777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine** This software is licensed under the terms of the GNU General Public 4777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine** License version 2, as published by the Free Software Foundation, and 5777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine** may be copied, distributed, and modified under those terms. 6777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine** 7777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine** This program is distributed in the hope that it will be useful, 8777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine** but WITHOUT ANY WARRANTY; without even the implied warranty of 9777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine** GNU General Public License for more details. 11777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine*/ 12777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 13777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine#ifndef _ANDROID_PROTOCOL_UI_COMMANDS_API_H 14777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine#define _ANDROID_PROTOCOL_UI_COMMANDS_API_H 15777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 16777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* 17777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * Contains the API for calling into the UI with the Core control commands. 18777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine */ 19777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 20777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* Changes the scale of the emulator window at runtime. 21777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * Param: 22777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * scale, is_dpi - New window scale parameters 23777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * Return: 24777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * 0 on success, or < 0 on failure. 25777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine */ 26777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkineextern int uicmd_set_window_scale(double scale, int is_dpi); 27777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 28777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* This is temporary redeclaration for AndroidHwLightBrightnessFunc declared 29777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * in android/hw-control.h We redeclare it here in order to keep type 30777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * consistency between android_core_set_brightness_change_callback and 31777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * light_brightness field of AndroidHwControlFuncs structure. 32777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine */ 33777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkinetypedef void (*AndroidHwLightBrightnessCallback)(void* opaque, 34777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine const char* light, 35777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine int brightness); 36777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 37777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* Registers a UI callback to be called when brightness is changed by the core. */ 38777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkineextern int uicmd_set_brightness_change_callback(AndroidHwLightBrightnessCallback callback, 39777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine void* opaque); 40777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 41777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine#endif /* _ANDROID_PROTOCOL_UI_COMMANDS_API_H */ 42