Vladimir Chtchetkine | e95660a | 2010-12-20 08:28:03 -0800 | [diff] [blame] | 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 | /* |
Vladimir Chtchetkine | 94a2fba | 2011-01-31 10:49:06 -0800 | [diff] [blame] | 14 | * Contains the API for calling into the UI with Core's framebuffer updates. |
Vladimir Chtchetkine | e95660a | 2010-12-20 08:28:03 -0800 | [diff] [blame] | 15 | */ |
| 16 | |
Vladimir Chtchetkine | 94a2fba | 2011-01-31 10:49:06 -0800 | [diff] [blame] | 17 | #ifndef _ANDROID_PROTOCOL_FB_UPDATES_H |
| 18 | #define _ANDROID_PROTOCOL_FB_UPDATES_H |
Vladimir Chtchetkine | e95660a | 2010-12-20 08:28:03 -0800 | [diff] [blame] | 19 | |
| 20 | #include "sysemu.h" |
| 21 | |
Vladimir Chtchetkine | 94a2fba | 2011-01-31 10:49:06 -0800 | [diff] [blame] | 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 | |
Vladimir Chtchetkine | e95660a | 2010-12-20 08:28:03 -0800 | [diff] [blame] | 27 | /* Header of framebuffer update message sent from the core to the UI. */ |
| 28 | typedef 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 Chtchetkine | e95660a | 2010-12-20 08:28:03 -0800 | [diff] [blame] | 35 | /* Contains updating rectangle copied over from the framebuffer's pixels. */ |
| 36 | uint8_t rect[0]; |
| 37 | } FBUpdateMessage; |
| 38 | |
Vladimir Chtchetkine | 94a2fba | 2011-01-31 10:49:06 -0800 | [diff] [blame] | 39 | /* Header for framebuffer requests sent from the UI to the Core. */ |
Vladimir Chtchetkine | ac389ae | 2011-01-20 14:35:55 -0800 | [diff] [blame] | 40 | typedef struct FBRequestHeader { |
| 41 | /* Request type. See AFB_REQUEST_XXX for the values. */ |
| 42 | uint8_t request_type; |
| 43 | } FBRequestHeader; |
| 44 | |
Vladimir Chtchetkine | 94a2fba | 2011-01-31 10:49:06 -0800 | [diff] [blame] | 45 | #endif /* _ANDROID_PROTOCOL_FB_UPDATES_H */ |