add: Basic plugin class.
This commit is contained in:
@@ -32,6 +32,7 @@ add_subdirectory(dialog)
|
||||
add_subdirectory(node)
|
||||
add_subdirectory(packaging)
|
||||
add_subdirectory(panel)
|
||||
add_subdirectory(pluginSupport)
|
||||
add_subdirectory(render)
|
||||
add_subdirectory(shaders)
|
||||
add_subdirectory(task)
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
pluginSupport/Plugin.cpp
|
||||
pluginSupport/Plugin.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
@@ -0,0 +1,5 @@
|
||||
//
|
||||
// Created by katherinesolar on 25-8-3.
|
||||
//
|
||||
|
||||
#include "Plugin.h"
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// Created by katherinesolar on 25-8-3.
|
||||
//
|
||||
|
||||
#ifndef PLUGIN_H
|
||||
#define PLUGIN_H
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
namespace olive
|
||||
{
|
||||
typedef int(*button_callback_t)();
|
||||
namespace plugin
|
||||
{
|
||||
struct Button {
|
||||
std::string name;
|
||||
button_callback_t callback;
|
||||
};
|
||||
|
||||
struct Menu {
|
||||
std::string name;
|
||||
std::map<std::string, std::vector<Button>> buttons;
|
||||
};
|
||||
struct Plugin {
|
||||
std::string name;
|
||||
std::string version;
|
||||
std::string author;
|
||||
std::vector<Menu> menus;
|
||||
};
|
||||
}
|
||||
class Plugin {
|
||||
private:
|
||||
std::vector<plugin::Plugin> plugins_;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif //PLUGIN_H
|
||||
Reference in New Issue
Block a user