summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/lv2_extensions.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-03-14 16:44:20 +0100
committerRobin Gareus <robin@gareus.org>2016-03-14 16:45:27 +0100
commit93bc9b972888f5a8c08115eccb66a35d4f3853a6 (patch)
tree74b2bc1c9ca47a6f369d166f70667fd97631558a /libs/ardour/ardour/lv2_extensions.h
parente180b0f706c58b6ee7c45d01d3c70d205c00abff (diff)
update [LV2] Plugin Inline Display API: drop cairo dependency
Diffstat (limited to 'libs/ardour/ardour/lv2_extensions.h')
-rw-r--r--libs/ardour/ardour/lv2_extensions.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/libs/ardour/ardour/lv2_extensions.h b/libs/ardour/ardour/lv2_extensions.h
index 5fd69cfe99..139e1a6594 100644
--- a/libs/ardour/ardour/lv2_extensions.h
+++ b/libs/ardour/ardour/lv2_extensions.h
@@ -36,13 +36,23 @@
/** Opaque handle for LV2_Inline_Display::queue_draw() */
typedef void* LV2_Inline_Display_Handle;
-/** Alias for cairo_image_surface_t */
-typedef void* LV2_Inline_Display_Image_Surface;
+/** raw image pixmap format is ARGB32,
+ * the data pointer is owned by the plugin and must be valid
+ * from the first call to render until cleanup.
+ */
+typedef struct {
+ unsigned char *data;
+ int width;
+ int height;
+ int stride;
+} LV2_Inline_Display_Image_Surface;
+/** a LV2 Feature provided by the Host to the plugin */
typedef struct {
/** Opaque host data */
LV2_Inline_Display_Handle handle;
- /** Request from run() that the host should call render() */
+ /** Request from run() that the host should call render() at a later time
+ * to update the inline display */
void (*queue_draw)(LV2_Inline_Display_Handle handle);
} LV2_Inline_Display;
@@ -53,12 +63,15 @@ typedef struct {
/**
* The render method. This is called by the host in a non-realtime context,
* usually the main GUI thread.
+ * The data pointer is owned by the plugin and must be valid
+ * from the first call to render until cleanup.
*
* @param instance The LV2 instance
* @param w the max available width
- * @return pointer to a cairo image surface or NULL
+ * @param h the max available height
+ * @return pointer to a LV2_Inline_Display_Image_Surface or NULL
*/
- LV2_Inline_Display_Image_Surface (*render)(LV2_Handle instance, uint32_t w, uint32_t h);
+ LV2_Inline_Display_Image_Surface* (*render)(LV2_Handle instance, uint32_t w, uint32_t h);
} LV2_Inline_Display_Interface;
/**