6 #include "utf8_string.hpp"
7 #include "sass/functions.h"
11 #define LOAD_LIB(var, path) HMODULE var = LoadLibraryW(UTF_8::convert_to_utf16(path).c_str())
12 #define LOAD_LIB_WCHR(var, path_wide_str) HMODULE var = LoadLibraryW(path_wide_str.c_str())
13 #define LOAD_LIB_FN(type, var, name) type var = (type) GetProcAddress(plugin, name)
14 #define CLOSE_LIB(var) FreeLibrary(var)
22 #define LOAD_LIB(var, path) void* var = dlopen(path.c_str(), RTLD_LAZY)
23 #define LOAD_LIB_FN(type, var, name) type var = (type) dlsym(plugin, name)
24 #define CLOSE_LIB(var) dlclose(var)
38 // load one specific plugin
39 bool load_plugin(const std::string& path);
40 // load all plugins from a directory
41 size_t load_plugins(const std::string& path);
43 public: // public accessors
44 const std::vector<Sass_Importer_Entry> get_headers(void) { return headers; }
45 const std::vector<Sass_Importer_Entry> get_importers(void) { return importers; }
46 const std::vector<Sass_Function_Entry> get_functions(void) { return functions; }
48 private: // private vars
49 std::vector<Sass_Importer_Entry> headers;
50 std::vector<Sass_Importer_Entry> importers;
51 std::vector<Sass_Function_Entry> functions;