1"====================================================================== 2| 3| SDL declarations 4| 5| 6 ======================================================================" 7 8 9"====================================================================== 10| 11| Copyright 2006, 2008 Free Software Foundation, Inc. 12| Written by Brad Watson 13| 14| This file is part of the GNU Smalltalk class library. 15| 16| The GNU Smalltalk class library is free software; you can redistribute it 17| and/or modify it under the terms of the GNU Lesser General Public License 18| as published by the Free Software Foundation; either version 2.1, or (at 19| your option) any later version. 20| 21| The GNU Smalltalk class library is distributed in the hope that it will be 22| useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 23| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 24| General Public License for more details. 25| 26| You should have received a copy of the GNU Lesser General Public License 27| along with the GNU Smalltalk class library; see the file COPYING.LIB. 28| If not, write to the Free Software Foundation, 59 Temple Place - Suite 29| 330, Boston, MA 02110-1301, USA. 30| 31 ======================================================================" 32 33 34"====================================================================== 35| 36| Notes: implemented without callbacks. 37| 38 ======================================================================" 39 40Object subclass: #SdlLoadSo 41 instanceVariableNames: '' 42 classVariableNames: '' 43 poolDictionaries: '' 44 category: 'LibSDL-Core'! ! 45 46!SdlLoadSo class methodsFor: 'C call-outs'! 47 48sdlLoadObject: aString0 49 "I load a shared object and answer with the address for it. My C 50 function call prototype: 51 52 extern DECLSPEC void * SDLCALL SDL_LoadObject(const char *sofile);" 53 <cCall: 'SDL_LoadObject' returning: #cObject 54 args: #( #string )>! 55 56sdlLoadFunction: aCobject name: aString1 57 "I answer the address of the function whose name and shared object 58 are given to me in. My C function call prototype: 59 60 extern DECLSPEC void * SDLCALL SDL_LoadFunction(void *handle, const char *name);" 61 <cCall: 'SDL_LoadFunction' returning: #cObject 62 args: #( #cObject #string )>! 63 64sdlUnloadObject: aCobject0 65 "I unload a shared object from memory. My C function call 66 prototype: 67 68 extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle);" 69 <cCall: 'SDL_UnloadObject' returning: #void 70 args: #( #cObject )>! ! 71