From 7727703d4e0350b80b1077ed80f96e1110cad668 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 10 Jul 2003 07:46:19 +0000 Subject: [PATCH] Exposed SDL_LoadObject(), SDL_LoadFunction(), and SDL_UnloadObject() APIs --- WhatsNew | 3 +++ configure.in | 2 +- {src => include}/SDL_loadso.h | 7 +++---- src/main/beos/exports/Makefile | 1 + src/main/beos/exports/SDL.exp | 3 +++ src/main/macos/exports/Makefile | 1 + src/main/macos/exports/SDL.x | 3 +++ src/main/macosx/exports/Makefile | 1 + src/main/macosx/exports/SDL.x | 3 +++ src/main/win32/exports/Makefile | 1 + src/main/win32/exports/SDL.def | 3 +++ 11 files changed, 23 insertions(+), 5 deletions(-) rename {src => include}/SDL_loadso.h (87%) diff --git a/WhatsNew b/WhatsNew index d9d86c8f2..31645f458 100644 --- a/WhatsNew +++ b/WhatsNew @@ -3,6 +3,9 @@ This is a list of API changes in SDL's version history. Version 1.0: +1.2.6: + Added SDL_LoadObject(), SDL_LoadFunction(), and SDL_UnloadObject() + 1.2.5: Added SDL_BUTTON_WHEELUP (4) and SDL_BUTTON_WHEELDOWN (5) diff --git a/configure.in b/configure.in index ed2ea8fa8..1b7b13825 100644 --- a/configure.in +++ b/configure.in @@ -1558,7 +1558,7 @@ CheckDLOPEN() { AC_ARG_ENABLE(dlopen, [ --enable-dlopen use dlopen for shared object loading [default=no]], - , enable_dlopen=no) + , enable_dlopen=yes) if test x$enable_dlopen = xyes; then AC_MSG_CHECKING(for dlopen) use_dlopen=no diff --git a/src/SDL_loadso.h b/include/SDL_loadso.h similarity index 87% rename from src/SDL_loadso.h rename to include/SDL_loadso.h index 6a9aa78a0..ade01a638 100644 --- a/src/SDL_loadso.h +++ b/include/SDL_loadso.h @@ -27,7 +27,6 @@ static char rcsid = /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* System dependent library loading routines */ -/* Note: This API isn't meant for public release until SDL 1.3 */ #ifndef _SDL_loadso_h #define _SDL_loadso_h @@ -42,16 +41,16 @@ extern "C" { * to the object handle (or NULL if there was an error). * The 'sofile' parameter is a system dependent name of the object file. */ -extern DECLSPEC void *SDL_LoadObject(const char *sofile); +extern DECLSPEC void * SDLCALL SDL_LoadObject(const char *sofile); /* Given an object handle, this function looks up the address of the * named function in the shared object and returns it. This address * is no longer valid after calling SDL_UnloadObject(). */ -extern DECLSPEC void *SDL_LoadFunction(void *handle, const char *name); +extern DECLSPEC void * SDLCALL SDL_LoadFunction(void *handle, const char *name); /* Unload a shared object from memory */ -extern DECLSPEC void SDL_UnloadObject(void *handle); +extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle); /* Ends C function definitions when using C++ */ #ifdef __cplusplus diff --git a/src/main/beos/exports/Makefile b/src/main/beos/exports/Makefile index c694d29f7..251d1696b 100644 --- a/src/main/beos/exports/Makefile +++ b/src/main/beos/exports/Makefile @@ -12,6 +12,7 @@ HEADERS = \ ../../../../include/SDL_joystick.h \ ../../../../include/SDL_keyboard.h \ ../../../../include/SDL_keysym.h \ + ../../../../include/SDL_loadso.h \ ../../../../include/SDL_main.h \ ../../../../include/SDL_mouse.h \ ../../../../include/SDL_mutex.h \ diff --git a/src/main/beos/exports/SDL.exp b/src/main/beos/exports/SDL.exp index cfa13783e..90c2495f0 100644 --- a/src/main/beos/exports/SDL.exp +++ b/src/main/beos/exports/SDL.exp @@ -74,6 +74,9 @@ _SDL_GetKeyState _SDL_GetModState _SDL_SetModState _SDL_GetKeyName +_SDL_LoadObject +_SDL_LoadFunction +_SDL_UnloadObject _SDL_SetModuleHandle _SDL_RegisterApp _SDL_InitQuickDraw diff --git a/src/main/macos/exports/Makefile b/src/main/macos/exports/Makefile index 15f801f79..087429f8b 100644 --- a/src/main/macos/exports/Makefile +++ b/src/main/macos/exports/Makefile @@ -14,6 +14,7 @@ HEADERS = \ ../../../../include/SDL_joystick.h \ ../../../../include/SDL_keyboard.h \ ../../../../include/SDL_keysym.h \ + ../../../../include/SDL_loadso.h \ ../../../../include/SDL_mouse.h \ ../../../../include/SDL_mutex.h \ ../../../../include/SDL_quit.h \ diff --git a/src/main/macos/exports/SDL.x b/src/main/macos/exports/SDL.x index cbfe7c82e..79d3658b8 100644 --- a/src/main/macos/exports/SDL.x +++ b/src/main/macos/exports/SDL.x @@ -76,6 +76,9 @@ SDL_GetModState SDL_SetModState SDL_GetKeyName + SDL_LoadObject + SDL_LoadFunction + SDL_UnloadObject SDL_GetMouseState SDL_GetRelativeMouseState SDL_WarpMouse diff --git a/src/main/macosx/exports/Makefile b/src/main/macosx/exports/Makefile index d2d381c87..dd6818be1 100644 --- a/src/main/macosx/exports/Makefile +++ b/src/main/macosx/exports/Makefile @@ -13,6 +13,7 @@ HEADERS = \ ../../../../include/SDL_joystick.h \ ../../../../include/SDL_keyboard.h \ ../../../../include/SDL_keysym.h \ + ../../../../include/SDL_loadso.h \ ../../../../include/SDL_mouse.h \ ../../../../include/SDL_mutex.h \ ../../../../include/SDL_quit.h \ diff --git a/src/main/macosx/exports/SDL.x b/src/main/macosx/exports/SDL.x index b0a15c450..747a702f2 100644 --- a/src/main/macosx/exports/SDL.x +++ b/src/main/macosx/exports/SDL.x @@ -74,6 +74,9 @@ _SDL_GetModState _SDL_SetModState _SDL_GetKeyName + _SDL_LoadObject + _SDL_LoadFunction + _SDL_UnloadObject _SDL_GetMouseState _SDL_GetRelativeMouseState _SDL_WarpMouse diff --git a/src/main/win32/exports/Makefile b/src/main/win32/exports/Makefile index 7e495bc56..76adae83c 100644 --- a/src/main/win32/exports/Makefile +++ b/src/main/win32/exports/Makefile @@ -13,6 +13,7 @@ HEADERS = \ ../../../../include/SDL_joystick.h \ ../../../../include/SDL_keyboard.h \ ../../../../include/SDL_keysym.h \ + ../../../../include/SDL_loadso.h \ ../../../../include/SDL_main.h \ ../../../../include/SDL_mouse.h \ ../../../../include/SDL_mutex.h \ diff --git a/src/main/win32/exports/SDL.def b/src/main/win32/exports/SDL.def index f9420a7a4..d24e54908 100644 --- a/src/main/win32/exports/SDL.def +++ b/src/main/win32/exports/SDL.def @@ -74,6 +74,9 @@ SDL_GetModState SDL_SetModState SDL_GetKeyName + SDL_LoadObject + SDL_LoadFunction + SDL_UnloadObject SDL_SetModuleHandle SDL_RegisterApp SDL_InitQuickDraw