aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2003-04-18 01:36:15 +0000
committernyamatongwe <unknown>2003-04-18 01:36:15 +0000
commit25a167ffe9c75c993f2c2a45ad3ebe3295e3d41a (patch)
treefbd4625f23c543e6b00c6f984b687f380e824761
parentf9256cec73623374f31cefe959145aa5dff211f5 (diff)
downloadscintilla-mirror-25a167ffe9c75c993f2c2a45ad3ebe3295e3d41a.tar.gz
Patch from Simon for portable DLL loading.
-rw-r--r--include/Platform.h18
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.
*/