From f9cc378c0c0512a54293fdbfbf358502b3513d57 Mon Sep 17 00:00:00 2001 From: lixianjing Date: Fri, 26 Apr 2024 17:30:13 +0800 Subject: [PATCH] export some sdl functions --- SDL2Config.cmake | 11 ++++++++ src/dllexports.h | 70 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 SDL2Config.cmake diff --git a/SDL2Config.cmake b/SDL2Config.cmake new file mode 100644 index 000000000..df3cc8894 --- /dev/null +++ b/SDL2Config.cmake @@ -0,0 +1,11 @@ +set(SDL2_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR} CACHE PATH "Path to SDL2 root directory") + +# 查找awtk库的头文件和库文件 +find_library(SDL2_LIBRARY NAMES SDL2 PATHS ${SDL2_ROOT_DIR}/lib) + +set(SDL2_LIBRARIES) +set(SDL2_INCLUDE_DIRS ${SDL2_ROOT_DIR}/3rd/SDL/include) + +link_directories(${SDL2_ROOT_DIR}/lib) +include_directories(${SDL2_INCLUDE_DIRS}) + diff --git a/src/dllexports.h b/src/dllexports.h index 531c9bf7e..42c381f7f 100644 --- a/src/dllexports.h +++ b/src/dllexports.h @@ -140,3 +140,73 @@ * @annotation ["global"] * @return {const char*} */ + + +/** + * @method SDL_CreateWindow + * @annotation ["global"] + * @return {int} + */ + +/** + * @method SDL_DestroyWindow + * @annotation ["global"] + * @return {int} + */ + +/** + * @method SDL_GL_CreateContext + * @annotation ["global"] + * @return {int} + */ + +/** + * @method SDL_GL_MakeCurrent + * @annotation ["global"] + * @return {int} + */ + + +/** + * @method SDL_GL_GetDrawableSize + * @annotation ["global"] + * @return {int} + */ + +/** + * @method SDL_GL_DeleteContext + * @annotation ["global"] + * @return {int} + */ + +SDL_GL_DeleteContext +/** + * @method SDL_GL_DeleteContext + * @annotation ["global"] + * @return {int} + */ + +/** + * @method SDL_GL_SwapWindow + * @annotation ["global"] + * @return {int} + */ + +/** + * @method SDL_GL_SetSwapInterval + * @annotation ["global"] + * @return {int} + */ + +/** + * @method SDL_GetWindowPosition + * @annotation ["global"] + * @return {int} + */ + +/** + * @method SDL_GetWindowSize + * @annotation ["global"] + * @return {int} + */ +