blob: c8e0ab0bb06dbf0e9ea4c4fafdee2c91a5689345 [file] [log] [blame]
// Auto-generated with: android/scripts/gen-entries.py --mode=wrapper android/scripts/tests/gen-entries/t.001/test.entries --output=/tmp/emulator-gen-entries-testing/gen-entries/t.001/test.wrapper
// DO NOT EDIT THIS FILE
#include <dlfcn.h>
#include "render_api_platform_types.h"
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
typedef void (*OnPostFn)(void* context, int width, int height, int ydir,
int format, int type, unsigned char* pixels);
///
/// W R A P P E R P O I N T E R S
///
static int (*__dll_initLibrary)() = 0;
static int (*__dll_setStreamMode)(int mode) = 0;
static int (*__dll_initOpenGLRenderer)(int width, int height, char* addr, size_t addrLen) = 0;
static void (*__dll_getHardwareStrings)(const char** vendor, const char** renderer, const char** version) = 0;
static void (*__dll_setPostCallback)(OnPostFn onPost, void* onPostContext) = 0;
static bool (*__dll_createOpenGLSubwindow)(FBNativeWindowType window, int x, int y, int width, int height, float zRot) = 0;
static bool (*__dll_destroyOpenGLSubwindow)() = 0;
static void (*__dll_setOpenGLDisplayRotation)(float zRot) = 0;
static void (*__dll_repaintOpenGLDisplay)() = 0;
static int (*__dll_stopOpenGLRenderer)() = 0;
///
/// W R A P P E R F U N C T I O N S
///
int initLibrary() {
return __dll_initLibrary();
}
int setStreamMode(int mode) {
return __dll_setStreamMode(mode);
}
int initOpenGLRenderer(int width, int height, char* addr, size_t addrLen) {
return __dll_initOpenGLRenderer(width, height, addr, addrLen);
}
void getHardwareStrings(const char** vendor, const char** renderer, const char** version) {
__dll_getHardwareStrings(vendor, renderer, version);
}
void setPostCallback(OnPostFn onPost, void* onPostContext) {
__dll_setPostCallback(onPost, onPostContext);
}
bool createOpenGLSubwindow(FBNativeWindowType window, int x, int y, int width, int height, float zRot) {
return __dll_createOpenGLSubwindow(window, x, y, width, height, zRot);
}
bool destroyOpenGLSubwindow() {
return __dll_destroyOpenGLSubwindow();
}
void setOpenGLDisplayRotation(float zRot) {
__dll_setOpenGLDisplayRotation(zRot);
}
void repaintOpenGLDisplay() {
__dll_repaintOpenGLDisplay();
}
int stopOpenGLRenderer() {
return __dll_stopOpenGLRenderer();
}
///
/// I N I T I A L I Z A T I O N F U N C T I O N
///
int render_api_dynlink_init(void* lib) {
__dll_initLibrary = (int(*)())dlsym(lib, "initLibrary");
if (!__dll_initLibrary) return -1;
__dll_setStreamMode = (int(*)(int mode))dlsym(lib, "setStreamMode");
if (!__dll_setStreamMode) return -1;
__dll_initOpenGLRenderer = (int(*)(int width, int height, char* addr, size_t addrLen))dlsym(lib, "initOpenGLRenderer");
if (!__dll_initOpenGLRenderer) return -1;
__dll_getHardwareStrings = (void(*)(const char** vendor, const char** renderer, const char** version))dlsym(lib, "getHardwareStrings");
if (!__dll_getHardwareStrings) return -1;
__dll_setPostCallback = (void(*)(OnPostFn onPost, void* onPostContext))dlsym(lib, "setPostCallback");
if (!__dll_setPostCallback) return -1;
__dll_createOpenGLSubwindow = (bool(*)(FBNativeWindowType window, int x, int y, int width, int height, float zRot))dlsym(lib, "createOpenGLSubwindow");
if (!__dll_createOpenGLSubwindow) return -1;
__dll_destroyOpenGLSubwindow = (bool(*)())dlsym(lib, "destroyOpenGLSubwindow");
if (!__dll_destroyOpenGLSubwindow) return -1;
__dll_setOpenGLDisplayRotation = (void(*)(float zRot))dlsym(lib, "setOpenGLDisplayRotation");
if (!__dll_setOpenGLDisplayRotation) return -1;
__dll_repaintOpenGLDisplay = (void(*)())dlsym(lib, "repaintOpenGLDisplay");
if (!__dll_repaintOpenGLDisplay) return -1;
__dll_stopOpenGLRenderer = (int(*)())dlsym(lib, "stopOpenGLRenderer");
if (!__dll_stopOpenGLRenderer) return -1;
return 0;
}