2 Copyright 2012 David Robillard <http://drobilla.net>
3 Copyright 2016 Robin Gareus <robin@gareus.org>
5 Permission to use, copy, modify, and/or distribute this software for any
6 purpose with or without fee is hereby granted, provided that the above
7 copyright notice and this permission notice appear in all copies.
9 THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 @defgroup inlinedisplay Inline-Display
21 Support for displaying a miniaturized, non-interactive view
22 in the host's mixer strip.
27 #ifndef LV2_INLINE_DISPLAY_H
28 #define LV2_INLINE_DISPLAY_H
34 #define LV2_INLINEDISPLAY_URI "http://harrisonconsoles.com/lv2/inlinedisplay"
35 #define LV2_INLINEDISPLAY_PREFIX LV2_INLINEDISPLAY_URI "#"
36 #define LV2_INLINEDISPLAY__interface LV2_INLINEDISPLAY_PREFIX "interface"
37 #define LV2_INLINEDISPLAY__queue_draw LV2_INLINEDISPLAY_PREFIX "queue_draw"
43 /** Opaque handle for LV2_Inline_Display::queue_draw() */
44 typedef void* LV2_Inline_Display_Handle
;
46 /** raw image pixmap format is ARGB32,
47 * the data pointer is owned by the plugin and must be valid
48 * from the first call to render until cleanup.
55 } LV2_Inline_Display_Image_Surface
;
57 /** a LV2 Feature provided by the Host to the plugin
59 * This allows a the plugin during in realtime context to
60 * invalidate the currently displayed data and request from
61 * the host to call render() as soon as feasible.
64 /** Opaque host data */
65 LV2_Inline_Display_Handle handle
;
66 /** Request from run() that the host should call render() at a later
67 * time to update the inline display
69 void (*queue_draw
)(LV2_Inline_Display_Handle handle
);
73 * Plugin Inline-Display Interface.
77 * The render method. This is called by the host in the main GUI thread
78 * (non realtime, the context with access to graphics drawing APIs).
80 * The data pointer is owned by the plugin and must be valid
81 * from the first call to render until cleanup.
83 * The host specifies a maxium available area for the plugin to draw.
84 * the returned Image Surface contains the actual area which
85 * the plugin allocated.
87 * @param instance The LV2 instance
88 * @param w the max available width
89 * @param h the max available height
90 * @return pointer to a LV2_Inline_Display_Image_Surface or NULL
92 const LV2_Inline_Display_Image_Surface
* (*render
)(
94 uint32_t w
, uint32_t h
);
95 } LV2_Inline_Display_Interface
;
101 #endif /* LV2_INLINE_DISPLAY_H */