obs-streamFX/source/plugin.hpp

47 lines
1.3 KiB
C++

// AUTOGENERATED COPYRIGHT HEADER START
// Copyright (C) 2017-2023 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
// AUTOGENERATED COPYRIGHT HEADER END
#pragma once
#include "common.hpp"
#include "warning-disable.hpp"
#include <filesystem>
#include <functional>
#include <memory>
#include <set>
#include <string>
#include <utility>
#include "warning-enable.hpp"
namespace streamfx {
/** Simple but efficient loader structure for ordered initia-/finalize.
*
*/
typedef int32_t loader_priority_t;
typedef std::function<void()> loader_function_t;
enum loader_priority : loader_priority_t {
HIGHEST = INT32_MIN,
HIGHER = INT32_MIN / 4 * 3,
HIGH = INT32_MIN / 4 * 2,
ABOVE = INT32_MIN / 4,
NORMAL = 0,
DEFAULT = NORMAL,
BELOW = INT32_MAX / 4,
LOW = INT32_MAX / 4 * 2,
LOWER = INT32_MAX / 4 * 3,
LOWEST = INT32_MAX,
};
struct component {
component(std::string_view name, loader_function_t initializer, loader_function_t finalizer, std::set<std::string> dependencies, loader_priority_t priority = loader_priority::DEFAULT);
};
std::filesystem::path data_file_path(std::string_view file);
std::filesystem::path config_file_path(std::string_view file);
bool open_url(std::string_view url);
const char* translate(const char* key, const char* fallback);
} // namespace streamfx