new modole system

This commit is contained in:
Ryzerth
2020-09-19 12:48:34 +02:00
parent 1ef31f0f8b
commit d6b9e1d86a
164 changed files with 414 additions and 413 deletions

7
demo/CMakeLists.txt Normal file
View File

@ -0,0 +1,7 @@
cmake_minimum_required(VERSION 3.13)
project(demo)
file(GLOB SRC "src/*.cpp")
add_library(demo SHARED ${SRC})
target_link_libraries(demo PRIVATE sdrpp_core)

38
demo/src/main.cpp Normal file
View File

@ -0,0 +1,38 @@
#include <imgui.h>
#include <module.h>
#include <watcher.h>
#include <dsp/types.h>
#include <dsp/stream.h>
#include <thread>
#include <ctime>
#include <stdio.h>
#include <style.h>
#define CONCAT(a, b) ((std::string(a) + b).c_str())
struct DemoContext_t {
std::string name;
};
MOD_EXPORT void* _INIT_(mod::API_t* _API, ImGuiContext* imctx, std::string _name) {
DemoContext_t* ctx = new DemoContext_t;
ctx->name = _name;
return ctx;
}
MOD_EXPORT void _NEW_FRAME_(DemoContext_t* ctx) {
}
MOD_EXPORT void _DRAW_MENU_(DemoContext_t* ctx) {
ImGui::Text(ctx->name.c_str());
}
MOD_EXPORT void _HANDLE_EVENT_(DemoContext_t* ctx, int eventId) {
}
MOD_EXPORT void _STOP_(DemoContext_t* ctx) {
}