Exposed SDL_LoadObject(), SDL_LoadFunction(), and SDL_UnloadObject() APIs
authorSam Lantinga <slouken@libsdl.org>
Thu, 10 Jul 2003 07:46:19 +0000
changeset 64812a21d82a060
parent 647 56dddbeb089a
child 649 81c74904f51f
Exposed SDL_LoadObject(), SDL_LoadFunction(), and SDL_UnloadObject() APIs
WhatsNew
configure.in
include/SDL_loadso.h
src/SDL_loadso.h
src/main/beos/exports/Makefile
src/main/beos/exports/SDL.exp
src/main/macos/exports/Makefile
src/main/macos/exports/SDL.x
src/main/macosx/exports/Makefile
src/main/macosx/exports/SDL.x
src/main/win32/exports/Makefile
src/main/win32/exports/SDL.def
     1.1 --- a/WhatsNew	Wed Jul 09 15:38:28 2003 +0000
     1.2 +++ b/WhatsNew	Thu Jul 10 07:46:19 2003 +0000
     1.3 @@ -3,6 +3,9 @@
     1.4  
     1.5  Version 1.0:
     1.6  
     1.7 +1.2.6:
     1.8 +	Added SDL_LoadObject(), SDL_LoadFunction(), and SDL_UnloadObject()
     1.9 +
    1.10  1.2.5:
    1.11  	Added SDL_BUTTON_WHEELUP (4) and SDL_BUTTON_WHEELDOWN (5)
    1.12  
     2.1 --- a/configure.in	Wed Jul 09 15:38:28 2003 +0000
     2.2 +++ b/configure.in	Thu Jul 10 07:46:19 2003 +0000
     2.3 @@ -1558,7 +1558,7 @@
     2.4  {
     2.5      AC_ARG_ENABLE(dlopen,
     2.6  [  --enable-dlopen         use dlopen for shared object loading [default=no]],
     2.7 -                  , enable_dlopen=no)
     2.8 +                  , enable_dlopen=yes)
     2.9      if test x$enable_dlopen = xyes; then
    2.10          AC_MSG_CHECKING(for dlopen)
    2.11          use_dlopen=no
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/include/SDL_loadso.h	Thu Jul 10 07:46:19 2003 +0000
     3.3 @@ -0,0 +1,61 @@
     3.4 +/*
     3.5 +    SDL - Simple DirectMedia Layer
     3.6 +    Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002  Sam Lantinga
     3.7 +
     3.8 +    This library is free software; you can redistribute it and/or
     3.9 +    modify it under the terms of the GNU Library General Public
    3.10 +    License as published by the Free Software Foundation; either
    3.11 +    version 2 of the License, or (at your option) any later version.
    3.12 +
    3.13 +    This library is distributed in the hope that it will be useful,
    3.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    3.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    3.16 +    Library General Public License for more details.
    3.17 +
    3.18 +    You should have received a copy of the GNU Library General Public
    3.19 +    License along with this library; if not, write to the Free
    3.20 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    3.21 +
    3.22 +    Sam Lantinga
    3.23 +    slouken@libsdl.org
    3.24 +*/
    3.25 +
    3.26 +#ifdef SAVE_RCSID
    3.27 +static char rcsid =
    3.28 + "@(#) $Id$";
    3.29 +#endif
    3.30 +
    3.31 +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    3.32 +/* System dependent library loading routines                           */
    3.33 +
    3.34 +#ifndef _SDL_loadso_h
    3.35 +#define _SDL_loadso_h
    3.36 +
    3.37 +#include "begin_code.h"
    3.38 +/* Set up for C function definitions, even when using C++ */
    3.39 +#ifdef __cplusplus
    3.40 +extern "C" {
    3.41 +#endif
    3.42 +
    3.43 +/* This function dynamically loads a shared object and returns a pointer
    3.44 + * to the object handle (or NULL if there was an error).
    3.45 + * The 'sofile' parameter is a system dependent name of the object file.
    3.46 + */
    3.47 +extern DECLSPEC void * SDLCALL SDL_LoadObject(const char *sofile);
    3.48 +
    3.49 +/* Given an object handle, this function looks up the address of the
    3.50 + * named function in the shared object and returns it.  This address
    3.51 + * is no longer valid after calling SDL_UnloadObject().
    3.52 + */
    3.53 +extern DECLSPEC void * SDLCALL SDL_LoadFunction(void *handle, const char *name);
    3.54 +
    3.55 +/* Unload a shared object from memory */
    3.56 +extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle);
    3.57 +
    3.58 +/* Ends C function definitions when using C++ */
    3.59 +#ifdef __cplusplus
    3.60 +}
    3.61 +#endif
    3.62 +#include "close_code.h"
    3.63 +
    3.64 +#endif /* _SDL_loadso_h */
     4.1 --- a/src/SDL_loadso.h	Wed Jul 09 15:38:28 2003 +0000
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,62 +0,0 @@
     4.4 -/*
     4.5 -    SDL - Simple DirectMedia Layer
     4.6 -    Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002  Sam Lantinga
     4.7 -
     4.8 -    This library is free software; you can redistribute it and/or
     4.9 -    modify it under the terms of the GNU Library General Public
    4.10 -    License as published by the Free Software Foundation; either
    4.11 -    version 2 of the License, or (at your option) any later version.
    4.12 -
    4.13 -    This library is distributed in the hope that it will be useful,
    4.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    4.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    4.16 -    Library General Public License for more details.
    4.17 -
    4.18 -    You should have received a copy of the GNU Library General Public
    4.19 -    License along with this library; if not, write to the Free
    4.20 -    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    4.21 -
    4.22 -    Sam Lantinga
    4.23 -    slouken@libsdl.org
    4.24 -*/
    4.25 -
    4.26 -#ifdef SAVE_RCSID
    4.27 -static char rcsid =
    4.28 - "@(#) $Id$";
    4.29 -#endif
    4.30 -
    4.31 -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    4.32 -/* System dependent library loading routines                           */
    4.33 -/* Note: This API isn't meant for public release until SDL 1.3         */
    4.34 -
    4.35 -#ifndef _SDL_loadso_h
    4.36 -#define _SDL_loadso_h
    4.37 -
    4.38 -#include "begin_code.h"
    4.39 -/* Set up for C function definitions, even when using C++ */
    4.40 -#ifdef __cplusplus
    4.41 -extern "C" {
    4.42 -#endif
    4.43 -
    4.44 -/* This function dynamically loads a shared object and returns a pointer
    4.45 - * to the object handle (or NULL if there was an error).
    4.46 - * The 'sofile' parameter is a system dependent name of the object file.
    4.47 - */
    4.48 -extern DECLSPEC void *SDL_LoadObject(const char *sofile);
    4.49 -
    4.50 -/* Given an object handle, this function looks up the address of the
    4.51 - * named function in the shared object and returns it.  This address
    4.52 - * is no longer valid after calling SDL_UnloadObject().
    4.53 - */
    4.54 -extern DECLSPEC void *SDL_LoadFunction(void *handle, const char *name);
    4.55 -
    4.56 -/* Unload a shared object from memory */
    4.57 -extern DECLSPEC void SDL_UnloadObject(void *handle);
    4.58 -
    4.59 -/* Ends C function definitions when using C++ */
    4.60 -#ifdef __cplusplus
    4.61 -}
    4.62 -#endif
    4.63 -#include "close_code.h"
    4.64 -
    4.65 -#endif /* _SDL_loadso_h */
     5.1 --- a/src/main/beos/exports/Makefile	Wed Jul 09 15:38:28 2003 +0000
     5.2 +++ b/src/main/beos/exports/Makefile	Thu Jul 10 07:46:19 2003 +0000
     5.3 @@ -12,6 +12,7 @@
     5.4  	../../../../include/SDL_joystick.h \
     5.5  	../../../../include/SDL_keyboard.h \
     5.6  	../../../../include/SDL_keysym.h \
     5.7 +	../../../../include/SDL_loadso.h \
     5.8  	../../../../include/SDL_main.h \
     5.9  	../../../../include/SDL_mouse.h \
    5.10  	../../../../include/SDL_mutex.h \
     6.1 --- a/src/main/beos/exports/SDL.exp	Wed Jul 09 15:38:28 2003 +0000
     6.2 +++ b/src/main/beos/exports/SDL.exp	Thu Jul 10 07:46:19 2003 +0000
     6.3 @@ -74,6 +74,9 @@
     6.4  _SDL_GetModState
     6.5  _SDL_SetModState
     6.6  _SDL_GetKeyName
     6.7 +_SDL_LoadObject
     6.8 +_SDL_LoadFunction
     6.9 +_SDL_UnloadObject
    6.10  _SDL_SetModuleHandle
    6.11  _SDL_RegisterApp
    6.12  _SDL_InitQuickDraw
     7.1 --- a/src/main/macos/exports/Makefile	Wed Jul 09 15:38:28 2003 +0000
     7.2 +++ b/src/main/macos/exports/Makefile	Thu Jul 10 07:46:19 2003 +0000
     7.3 @@ -14,6 +14,7 @@
     7.4  	../../../../include/SDL_joystick.h \
     7.5  	../../../../include/SDL_keyboard.h \
     7.6  	../../../../include/SDL_keysym.h \
     7.7 +	../../../../include/SDL_loadso.h \
     7.8  	../../../../include/SDL_mouse.h \
     7.9  	../../../../include/SDL_mutex.h \
    7.10  	../../../../include/SDL_quit.h \
     8.1 --- a/src/main/macos/exports/SDL.x	Wed Jul 09 15:38:28 2003 +0000
     8.2 +++ b/src/main/macos/exports/SDL.x	Thu Jul 10 07:46:19 2003 +0000
     8.3 @@ -76,6 +76,9 @@
     8.4  	SDL_GetModState
     8.5  	SDL_SetModState
     8.6  	SDL_GetKeyName
     8.7 +	SDL_LoadObject
     8.8 +	SDL_LoadFunction
     8.9 +	SDL_UnloadObject
    8.10  	SDL_GetMouseState
    8.11  	SDL_GetRelativeMouseState
    8.12  	SDL_WarpMouse
     9.1 --- a/src/main/macosx/exports/Makefile	Wed Jul 09 15:38:28 2003 +0000
     9.2 +++ b/src/main/macosx/exports/Makefile	Thu Jul 10 07:46:19 2003 +0000
     9.3 @@ -13,6 +13,7 @@
     9.4  	../../../../include/SDL_joystick.h \
     9.5  	../../../../include/SDL_keyboard.h \
     9.6  	../../../../include/SDL_keysym.h \
     9.7 +	../../../../include/SDL_loadso.h \
     9.8  	../../../../include/SDL_mouse.h \
     9.9  	../../../../include/SDL_mutex.h \
    9.10  	../../../../include/SDL_quit.h \
    10.1 --- a/src/main/macosx/exports/SDL.x	Wed Jul 09 15:38:28 2003 +0000
    10.2 +++ b/src/main/macosx/exports/SDL.x	Thu Jul 10 07:46:19 2003 +0000
    10.3 @@ -74,6 +74,9 @@
    10.4  	_SDL_GetModState
    10.5  	_SDL_SetModState
    10.6  	_SDL_GetKeyName
    10.7 +	_SDL_LoadObject
    10.8 +	_SDL_LoadFunction
    10.9 +	_SDL_UnloadObject
   10.10  	_SDL_GetMouseState
   10.11  	_SDL_GetRelativeMouseState
   10.12  	_SDL_WarpMouse
    11.1 --- a/src/main/win32/exports/Makefile	Wed Jul 09 15:38:28 2003 +0000
    11.2 +++ b/src/main/win32/exports/Makefile	Thu Jul 10 07:46:19 2003 +0000
    11.3 @@ -13,6 +13,7 @@
    11.4  	../../../../include/SDL_joystick.h \
    11.5  	../../../../include/SDL_keyboard.h \
    11.6  	../../../../include/SDL_keysym.h \
    11.7 +	../../../../include/SDL_loadso.h \
    11.8  	../../../../include/SDL_main.h \
    11.9  	../../../../include/SDL_mouse.h \
   11.10  	../../../../include/SDL_mutex.h \
    12.1 --- a/src/main/win32/exports/SDL.def	Wed Jul 09 15:38:28 2003 +0000
    12.2 +++ b/src/main/win32/exports/SDL.def	Thu Jul 10 07:46:19 2003 +0000
    12.3 @@ -74,6 +74,9 @@
    12.4  	SDL_GetModState
    12.5  	SDL_SetModState
    12.6  	SDL_GetKeyName
    12.7 +	SDL_LoadObject
    12.8 +	SDL_LoadFunction
    12.9 +	SDL_UnloadObject
   12.10  	SDL_SetModuleHandle
   12.11  	SDL_RegisterApp
   12.12  	SDL_InitQuickDraw