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 the API for calling into the UI with Core's framebuffer updates. 15 */ 16 17#ifndef _ANDROID_PROTOCOL_FB_UPDATES_H 18#define _ANDROID_PROTOCOL_FB_UPDATES_H 19 20#include "sysemu.h" 21 22/* Requests the Core to refresh framebuffer. 23 * This message is sent by the UI to the Core right after the UI is initialized. 24 * This message forces the Core to send a full display update back to the UI. */ 25#define AFB_REQUEST_REFRESH 1 26 27/* Header of framebuffer update message sent from the core to the UI. */ 28typedef struct FBUpdateMessage { 29 /* x, y, w, and h identify the rectangle that is being updated. */ 30 uint16_t x; 31 uint16_t y; 32 uint16_t w; 33 uint16_t h; 34 35 /* Contains updating rectangle copied over from the framebuffer's pixels. */ 36 uint8_t rect[0]; 37} FBUpdateMessage; 38 39/* Header for framebuffer requests sent from the UI to the Core. */ 40typedef struct FBRequestHeader { 41 /* Request type. See AFB_REQUEST_XXX for the values. */ 42 uint8_t request_type; 43} FBRequestHeader; 44 45#endif /* _ANDROID_PROTOCOL_FB_UPDATES_H */ 46