# HG changeset patch # User Sam Lantinga # Date 1057823179 0 # Node ID 12a21d82a060750e3bb380a48b5b5142f1498fd2 # Parent 56dddbeb089ac132fed989f2b0a6f90853bf10c2 Exposed SDL_LoadObject(), SDL_LoadFunction(), and SDL_UnloadObject() APIs diff -r 56dddbeb089a -r 12a21d82a060 WhatsNew --- a/WhatsNew Wed Jul 09 15:38:28 2003 +0000 +++ b/WhatsNew Thu Jul 10 07:46:19 2003 +0000 @@ -3,6 +3,9 @@ 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 -r 56dddbeb089a -r 12a21d82a060 configure.in --- a/configure.in Wed Jul 09 15:38:28 2003 +0000 +++ b/configure.in Thu Jul 10 07:46:19 2003 +0000 @@ -1558,7 +1558,7 @@ { 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 -r 56dddbeb089a -r 12a21d82a060 include/SDL_loadso.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/include/SDL_loadso.h Thu Jul 10 07:46:19 2003 +0000 @@ -0,0 +1,61 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@libsdl.org +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* System dependent library loading routines */ + +#ifndef _SDL_loadso_h +#define _SDL_loadso_h + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + +/* This function dynamically loads a shared object and returns a pointer + * 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 * 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 * SDLCALL SDL_LoadFunction(void *handle, const char *name); + +/* Unload a shared object from memory */ +extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle); + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif /* _SDL_loadso_h */ diff -r 56dddbeb089a -r 12a21d82a060 src/SDL_loadso.h --- a/src/SDL_loadso.h Wed Jul 09 15:38:28 2003 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* - SDL - Simple DirectMedia Layer - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Sam Lantinga - slouken@libsdl.org -*/ - -#ifdef SAVE_RCSID -static char rcsid = - "@(#) $Id$"; -#endif - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* 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 - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/* This function dynamically loads a shared object and returns a pointer - * 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); - -/* 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); - -/* Unload a shared object from memory */ -extern DECLSPEC void SDL_UnloadObject(void *handle); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* _SDL_loadso_h */ diff -r 56dddbeb089a -r 12a21d82a060 src/main/beos/exports/Makefile --- a/src/main/beos/exports/Makefile Wed Jul 09 15:38:28 2003 +0000 +++ b/src/main/beos/exports/Makefile Thu Jul 10 07:46:19 2003 +0000 @@ -12,6 +12,7 @@ ../../../../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 -r 56dddbeb089a -r 12a21d82a060 src/main/beos/exports/SDL.exp --- a/src/main/beos/exports/SDL.exp Wed Jul 09 15:38:28 2003 +0000 +++ b/src/main/beos/exports/SDL.exp Thu Jul 10 07:46:19 2003 +0000 @@ -74,6 +74,9 @@ _SDL_GetModState _SDL_SetModState _SDL_GetKeyName +_SDL_LoadObject +_SDL_LoadFunction +_SDL_UnloadObject _SDL_SetModuleHandle _SDL_RegisterApp _SDL_InitQuickDraw diff -r 56dddbeb089a -r 12a21d82a060 src/main/macos/exports/Makefile --- a/src/main/macos/exports/Makefile Wed Jul 09 15:38:28 2003 +0000 +++ b/src/main/macos/exports/Makefile Thu Jul 10 07:46:19 2003 +0000 @@ -14,6 +14,7 @@ ../../../../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 -r 56dddbeb089a -r 12a21d82a060 src/main/macos/exports/SDL.x --- a/src/main/macos/exports/SDL.x Wed Jul 09 15:38:28 2003 +0000 +++ b/src/main/macos/exports/SDL.x Thu Jul 10 07:46:19 2003 +0000 @@ -76,6 +76,9 @@ SDL_GetModState SDL_SetModState SDL_GetKeyName + SDL_LoadObject + SDL_LoadFunction + SDL_UnloadObject SDL_GetMouseState SDL_GetRelativeMouseState SDL_WarpMouse diff -r 56dddbeb089a -r 12a21d82a060 src/main/macosx/exports/Makefile --- a/src/main/macosx/exports/Makefile Wed Jul 09 15:38:28 2003 +0000 +++ b/src/main/macosx/exports/Makefile Thu Jul 10 07:46:19 2003 +0000 @@ -13,6 +13,7 @@ ../../../../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 -r 56dddbeb089a -r 12a21d82a060 src/main/macosx/exports/SDL.x --- a/src/main/macosx/exports/SDL.x Wed Jul 09 15:38:28 2003 +0000 +++ b/src/main/macosx/exports/SDL.x Thu Jul 10 07:46:19 2003 +0000 @@ -74,6 +74,9 @@ _SDL_GetModState _SDL_SetModState _SDL_GetKeyName + _SDL_LoadObject + _SDL_LoadFunction + _SDL_UnloadObject _SDL_GetMouseState _SDL_GetRelativeMouseState _SDL_WarpMouse diff -r 56dddbeb089a -r 12a21d82a060 src/main/win32/exports/Makefile --- a/src/main/win32/exports/Makefile Wed Jul 09 15:38:28 2003 +0000 +++ b/src/main/win32/exports/Makefile Thu Jul 10 07:46:19 2003 +0000 @@ -13,6 +13,7 @@ ../../../../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 -r 56dddbeb089a -r 12a21d82a060 src/main/win32/exports/SDL.def --- a/src/main/win32/exports/SDL.def Wed Jul 09 15:38:28 2003 +0000 +++ b/src/main/win32/exports/SDL.def Thu Jul 10 07:46:19 2003 +0000 @@ -74,6 +74,9 @@ SDL_GetModState SDL_SetModState SDL_GetKeyName + SDL_LoadObject + SDL_LoadFunction + SDL_UnloadObject SDL_SetModuleHandle SDL_RegisterApp SDL_InitQuickDraw