1
0
mirror of synced 2024-12-15 09:11:15 +01:00
ImHex/lib/libimhex/include/hex/helpers/loader_script_handler.hpp

38 lines
1.0 KiB
C++
Raw Normal View History

2020-12-01 02:21:40 +01:00
#pragma once
#include <string>
#include <string_view>
#include <hex/helpers/paths.hpp>
2020-12-01 02:21:40 +01:00
struct _object;
typedef struct _object PyObject;
namespace hex {
namespace prv {
class Provider;
}
2020-12-01 02:21:40 +01:00
class LoaderScript {
public:
LoaderScript() = delete;
static bool processFile(const fs::path &scriptPath);
2020-12-01 02:21:40 +01:00
static void setFilePath(const fs::path &filePath) { LoaderScript::s_filePath = filePath; }
static void setDataProvider(prv::Provider *provider) { LoaderScript::s_dataProvider = provider; }
2020-12-01 02:21:40 +01:00
private:
static inline fs::path s_filePath;
static inline prv::Provider *s_dataProvider;
2020-12-01 02:21:40 +01:00
static PyObject *Py_getFilePath(PyObject *self, PyObject *args);
static PyObject *Py_addPatch(PyObject *self, PyObject *args);
static PyObject *Py_addBookmark(PyObject *self, PyObject *args);
static PyObject *Py_addStruct(PyObject *self, PyObject *args);
static PyObject *Py_addUnion(PyObject *self, PyObject *args);
2020-12-01 02:21:40 +01:00
};
}