save version string with session for informational purposes
[ardour.git] / libs / ardour / ardour / lv2_extensions.h
index 5fd69cfe997cf051ae2e4fc73b417876e5c38e88..d49846c8fdfdc70573b37ff6aff8443b8f570972 100644 (file)
 /** 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;
 
 /**
@@ -105,8 +118,8 @@ typedef struct {
 */
 
 #define LV2_PLUGINLICENSE_URI "http://harrisonconsoles.com/lv2/license"
-#define LV2_PLUGINLICENSE_PREFIX LV2_INLINEDISPLAY_URI "#"
-#define LV2_PLUGINLICENSE__interface LV2_INLINEDISPLAY_PREFIX "interface"
+#define LV2_PLUGINLICENSE_PREFIX LV2_PLUGINLICENSE_URI "#"
+#define LV2_PLUGINLICENSE__interface LV2_PLUGINLICENSE_PREFIX "interface"
 
 typedef struct _LV2_License_Interface {
        /* @return -1 if no license is needed; 0 if unlicensed, 1 if licensed */