@@ -19,19 +19,19 @@ #ifndef OF_WINDOWS # include typedef void *OFPluginHandle; -typedef enum OFDLOpenFlags { +typedef enum { OFDLOpenFlagLazy = RTLD_LAZY, OFDLOpenFlagNow = RTLD_NOW } OFDLOpenFlags; #else # include typedef HMODULE OFPluginHandle; -typedef enum OFDLOpenFlags { +typedef enum { OFDLOpenFlagLazy = 0, OFDLOpenFlagNow = 0 } OFDLOpenFlags; #endif @@ -39,10 +39,14 @@ /** * @class OFPlugin OFPlugin.h ObjFW/OFPlugin.h * * @brief Provides a system for loading plugins at runtime. + * + * A plugin must subclass @ref OFPlugin and have a global function called + * `OFPluginInit`, which returns an instance of the @ref OFPlugin subclass and + * takes no parameters. */ @interface OFPlugin: OFObject { OFPluginHandle _pluginHandle; OF_RESERVE_IVARS(OFPlugin, 4)