diff options
Diffstat (limited to 'include/Platform.h')
-rw-r--r-- | include/Platform.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/Platform.h b/include/Platform.h index db3cd6c7d..63c9514e8 100644 --- a/include/Platform.h +++ b/include/Platform.h @@ -52,6 +52,7 @@ typedef void *SurfaceID; typedef void *WindowID; typedef void *MenuID; typedef void *TickerID; +typedef void *Function; /** * A geometric point class. @@ -429,6 +430,23 @@ public: }; /** + * Dynamic Library (DLL/SO/...) loading + */ +class DynamicLibrary { +public: + virtual ~DynamicLibrary() {}; + + /// @return Pointer to function "name", or NULL on failure. + virtual Function *FindFunction(const char *name) = 0; + + /// @return true if the library was loaded successfully. + virtual bool IsValid() = 0; + + /// @return An instance of a DynamicLibrary subclass with "modulePath" loaded. + static DynamicLibrary *Load(const char *modulePath); +}; + +/** * Platform class used to retrieve system wide parameters such as double click speed * and chrome colour. Not a creatable object, more of a module with several functions. */ |