summaryrefslogtreecommitdiff
path: root/plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugin.h')
-rw-r--r--plugin.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/plugin.h b/plugin.h
index 3874fed..b8a3f64 100644
--- a/plugin.h
+++ b/plugin.h
@@ -139,6 +139,32 @@ public:
//
+ // Inline GUI (optional)
+ //
+
+ //! Return true if a GUI implementation is to be used.
+ virtual bool hasInlineGUI()
+ {
+ return false;
+ }
+
+ struct InlineDrawContext
+ {
+ std::size_t width{0}; //< Width of the render buffer.
+ std::size_t height{0}; //< Height of the render buffer.
+ std::uint8_t* data{nullptr}; //< Allocated (or reused) RGBA buffer, filled by the plugin.
+ };
+
+ //! Render call back.
+ //! \param width The client area width as specified by the host.
+ //! \param max_height The maximum allowed clieant area height as specified
+ //! by the host.
+ //! \param context The render context filled an maintained by the plugin.
+ virtual void onInlineRedraw(std::size_t width,
+ std::size_t max_height,
+ InlineDrawContext& context) {}
+
+ //
// GUI (optional)
//