export some sdl functions

This commit is contained in:
lixianjing 2024-04-26 17:30:13 +08:00
parent 6bbf3cd357
commit f9cc378c0c
2 changed files with 81 additions and 0 deletions

11
SDL2Config.cmake Normal file
View File

@ -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})

View File

@ -140,3 +140,73 @@
* @annotation ["global"] * @annotation ["global"]
* @return {const char*} * @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}
*/