Home | History | Annotate | Download | only in protocol
      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 /*
     14  * Contains implementation of the API for calling into the UI with the Core
     15  * control commands for standalone (monolithic) emulator.
     16  */
     17 
     18 #include "android/android.h"
     19 #include "android/hw-control.h"
     20 #include "android/protocol/ui-commands-api.h"
     21 
     22 /* Implemented in android/qemulator.c */
     23 extern void android_emulator_set_window_scale(double scale, int is_dpi);
     24 
     25 int
     26 uicmd_set_window_scale(double scale, int is_dpi)
     27 {
     28     android_emulator_set_window_scale(scale, is_dpi);
     29     return 0;
     30 }
     31 
     32 int
     33 uicmd_set_brightness_change_callback(AndroidHwLightBrightnessCallback callback,
     34                                      void* opaque)
     35 {
     36     AndroidHwControlFuncs  funcs;
     37     funcs.light_brightness = callback;
     38     android_hw_control_set(opaque, &funcs);
     39     return 0;
     40 }
     41