summaryrefslogtreecommitdiff
path: root/plugin.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-08-14 14:49:02 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2016-08-14 14:49:02 +0200
commit7db0ce19674393a4dd9af3beed236038bcfa2e65 (patch)
treea9d1f410fbbac877919ef3a72ce0abd35eabaa43 /plugin.h
parenta9eadcc1b483d5d30a8443e78fa4d84c8f18d6c3 (diff)
Experimental inline display added.
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)
//