Add bare-minimum extension-reaper-macos REAPER extension skeleton

C/C++ extension built directly against the vendored Cockos reaper-sdk
headers (no Rust/reaper-rs wrapper layer). Loads, registers a test
action, and confirms via REAPER's console — confirmed working in
REAPER 2026-07-15.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Paul Lipscomb
2026-07-15 19:12:33 -04:00
parent 7ecc718f5d
commit cd5ebd84d6
512 changed files with 330043 additions and 1 deletions
+50
View File
@@ -0,0 +1,50 @@
// extension-reaper-macos — bare-minimum REAPER extension.
//
// Verifies the extension loads and is recognized by REAPER: prints a
// confirmation line to the REAPER console on load, and registers one test
// action ("extension-reaper-macos: Hello") in the Actions list.
#define REAPERAPI_MINIMAL
#define REAPERAPI_WANT_ShowConsoleMsg
#define REAPERAPI_IMPLEMENT
#include "reaper_plugin.h"
#include "reaper_plugin_functions.h"
static int g_hello_cmd_id = 0;
static bool HookCommand2(KbdSectionInfo *sec, int command, int val, int val2, int relmode, HWND hwnd)
{
if (command == g_hello_cmd_id)
{
ShowConsoleMsg("[extension-reaper-macos] Hello action triggered\n");
return true;
}
return false;
}
extern "C" REAPER_PLUGIN_DLL_EXPORT int REAPER_PLUGIN_ENTRYPOINT(REAPER_PLUGIN_HINSTANCE hInstance, reaper_plugin_info_t *rec)
{
if (!rec)
return 0; // REAPER is unloading us
if (rec->caller_version != REAPER_PLUGIN_VERSION)
return 0;
if (REAPERAPI_LoadAPI(rec->GetFunc) != 0)
return 0; // a required API function was missing
custom_action_register_t action = {
0, // main section
"EXTENSION_REAPER_MACOS_HELLO",
"extension-reaper-macos: Hello",
NULL,
};
g_hello_cmd_id = rec->Register("custom_action", &action);
rec->Register("hookcommand2", (void *)HookCommand2);
ShowConsoleMsg("[extension-reaper-macos] loaded successfully\n");
return 1;
}