blob: c4f977930b45bd707731cdc6d4bfb030aee80ef9 [file] [log] [blame]
Vladimir Chtchetkinee95660a2010-12-20 08:28:03 -08001/* 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/*
Vladimir Chtchetkine94a2fba2011-01-31 10:49:06 -080014 * Contains the API for calling into the UI with Core's framebuffer updates.
Vladimir Chtchetkinee95660a2010-12-20 08:28:03 -080015 */
16
Vladimir Chtchetkine94a2fba2011-01-31 10:49:06 -080017#ifndef _ANDROID_PROTOCOL_FB_UPDATES_H
18#define _ANDROID_PROTOCOL_FB_UPDATES_H
Vladimir Chtchetkinee95660a2010-12-20 08:28:03 -080019
20#include "sysemu.h"
21
Vladimir Chtchetkine94a2fba2011-01-31 10:49:06 -080022/* 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
Vladimir Chtchetkinee95660a2010-12-20 08:28:03 -080027/* 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
Vladimir Chtchetkinee95660a2010-12-20 08:28:03 -080035 /* Contains updating rectangle copied over from the framebuffer's pixels. */
36 uint8_t rect[0];
37} FBUpdateMessage;
38
Vladimir Chtchetkine94a2fba2011-01-31 10:49:06 -080039/* Header for framebuffer requests sent from the UI to the Core. */
Vladimir Chtchetkineac389ae2011-01-20 14:35:55 -080040typedef struct FBRequestHeader {
41 /* Request type. See AFB_REQUEST_XXX for the values. */
42 uint8_t request_type;
43} FBRequestHeader;
44
Vladimir Chtchetkine94a2fba2011-01-31 10:49:06 -080045#endif /* _ANDROID_PROTOCOL_FB_UPDATES_H */