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 UI-side "framebuffer" client that receives framebuffer updates 15 * from the Core. 16 */ 17 18 #ifndef _ANDROID_FRAMEBUFFER_UI_H 19 #define _ANDROID_FRAMEBUFFER_UI_H 20 21 #include "android/looper.h" 22 #include "android/framebuffer.h" 23 #include "android/looper.h" 24 #include "android/async-utils.h" 25 26 /* Creates framebuffer client, and connects it with the core. 27 * Param: 28 * console_socket Address of the core's console socket. 29 * protocol Protocol to use for the updates: 30 * -raw Stream pixels over socket 31 * -shared Use shared memory for pixels. 32 * fb - Framebuffer associated with this FB client. 33 * Return: 34 * 0 on success, or < 0 on failure. 35 */ 36 int fbUpdatesImpl_create(SockAddress* console_socket, 37 const char* protocol, 38 QFrameBuffer* fb, 39 Looper* looper); 40 41 /* Disconnects and destroys framebuffer client. */ 42 void fbUpdatesImpl_destroy(void); 43 44 #endif /* _ANDROID_FRAMEBUFFER_UI_H */ 45