include/SDL_loadso.h
author Sam Lantinga <slouken@libsdl.org>
Thu, 10 Jul 2003 07:46:19 +0000
changeset 648 12a21d82a060
child 649 81c74904f51f
permissions -rw-r--r--
Exposed SDL_LoadObject(), SDL_LoadFunction(), and SDL_UnloadObject() APIs
slouken@648
     1
/*
slouken@648
     2
    SDL - Simple DirectMedia Layer
slouken@648
     3
    Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002  Sam Lantinga
slouken@648
     4
slouken@648
     5
    This library is free software; you can redistribute it and/or
slouken@648
     6
    modify it under the terms of the GNU Library General Public
slouken@648
     7
    License as published by the Free Software Foundation; either
slouken@648
     8
    version 2 of the License, or (at your option) any later version.
slouken@648
     9
slouken@648
    10
    This library is distributed in the hope that it will be useful,
slouken@648
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@648
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@648
    13
    Library General Public License for more details.
slouken@648
    14
slouken@648
    15
    You should have received a copy of the GNU Library General Public
slouken@648
    16
    License along with this library; if not, write to the Free
slouken@648
    17
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
slouken@648
    18
slouken@648
    19
    Sam Lantinga
slouken@648
    20
    slouken@libsdl.org
slouken@648
    21
*/
slouken@648
    22
slouken@648
    23
#ifdef SAVE_RCSID
slouken@648
    24
static char rcsid =
slouken@648
    25
 "@(#) $Id$";
slouken@648
    26
#endif
slouken@648
    27
slouken@648
    28
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
slouken@648
    29
/* System dependent library loading routines                           */
slouken@648
    30
slouken@648
    31
#ifndef _SDL_loadso_h
slouken@648
    32
#define _SDL_loadso_h
slouken@648
    33
slouken@648
    34
#include "begin_code.h"
slouken@648
    35
/* Set up for C function definitions, even when using C++ */
slouken@648
    36
#ifdef __cplusplus
slouken@648
    37
extern "C" {
slouken@648
    38
#endif
slouken@648
    39
slouken@648
    40
/* This function dynamically loads a shared object and returns a pointer
slouken@648
    41
 * to the object handle (or NULL if there was an error).
slouken@648
    42
 * The 'sofile' parameter is a system dependent name of the object file.
slouken@648
    43
 */
slouken@648
    44
extern DECLSPEC void * SDLCALL SDL_LoadObject(const char *sofile);
slouken@648
    45
slouken@648
    46
/* Given an object handle, this function looks up the address of the
slouken@648
    47
 * named function in the shared object and returns it.  This address
slouken@648
    48
 * is no longer valid after calling SDL_UnloadObject().
slouken@648
    49
 */
slouken@648
    50
extern DECLSPEC void * SDLCALL SDL_LoadFunction(void *handle, const char *name);
slouken@648
    51
slouken@648
    52
/* Unload a shared object from memory */
slouken@648
    53
extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle);
slouken@648
    54
slouken@648
    55
/* Ends C function definitions when using C++ */
slouken@648
    56
#ifdef __cplusplus
slouken@648
    57
}
slouken@648
    58
#endif
slouken@648
    59
#include "close_code.h"
slouken@648
    60
slouken@648
    61
#endif /* _SDL_loadso_h */