mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[sim] Expose GUI control functions via HAL_RegisterExtension (#4034)
This commit is contained in:
26
simulation/halsim_gui/src/main/native/include/HALSimGuiExt.h
Normal file
26
simulation/halsim_gui/src/main/native/include/HALSimGuiExt.h
Normal file
@@ -0,0 +1,26 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
|
||||
namespace halsimgui {
|
||||
|
||||
// These functions can be used to hook into the GUI, and can be accessed
|
||||
// via HAL_RegisterExtensionListener
|
||||
|
||||
#define HALSIMGUI_EXT_ADDGUIINIT "halsimgui::AddGuiInit"
|
||||
using AddGuiInitFn = void (*)(std::function<void()> initialize);
|
||||
|
||||
#define HALSIMGUI_EXT_ADDGUILATEEXECUTE "halsimgui::AddGuiLateExecute"
|
||||
using AddGuiLateExecuteFn = void (*)(std::function<void()> execute);
|
||||
|
||||
#define HALSIMGUI_EXT_ADDGUIEARLYEXECUTE "halsimgui::AddGuiEarlyExecute"
|
||||
using AddGuiEarlyExecuteFn = void (*)(std::function<void()> execute);
|
||||
|
||||
#define HALSIMGUI_EXT_GUIEXIT "halsimgui::GuiExit"
|
||||
using GuiExitFn = void (*)();
|
||||
|
||||
} // namespace halsimgui
|
||||
Reference in New Issue
Block a user