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 | /* |
| 14 | * Contains framebuffer declarations that are shared by the core and the UI. |
| 15 | */ |
| 16 | |
| 17 | #ifndef _ANDROID_FRAMEBUFFER_COMMON_H |
| 18 | #define _ANDROID_FRAMEBUFFER_COMMON_H |
| 19 | |
| 20 | #include "sysemu.h" |
| 21 | |
| 22 | /* Header of framebuffer update message sent from the core to the UI. */ |
| 23 | typedef struct FBUpdateMessage { |
| 24 | /* x, y, w, and h identify the rectangle that is being updated. */ |
| 25 | uint16_t x; |
| 26 | uint16_t y; |
| 27 | uint16_t w; |
| 28 | uint16_t h; |
| 29 | |
| 30 | /* Number of bits used to encode a single pixel. */ |
| 31 | uint8_t bits_per_pixel; |
| 32 | |
| 33 | /* Contains updating rectangle copied over from the framebuffer's pixels. */ |
| 34 | uint8_t rect[0]; |
| 35 | } FBUpdateMessage; |
| 36 | |
| 37 | #endif /* _ANDROID_FRAMEBUFFER_UI_H */ |