<div dir="ltr"><div><div> >having two structs with the same functions but for one<br>
>pointer seems silly."<br></div>I agree that can lead to spec bloat. Is it outrageous to define that the LV2UI_Feature_Handle that the host passes in when calling extension data is actually the LV2UI_Handle? This way the same struct can be used, but the handle will be different in different contexts.<br>
</div><div>For what its worth, my plugins don't really need any minimum size. In the instantiate function I give a default size using LV2UI_Resize as a host feature, but after that it can be any size the user (or host) wants.<br>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Aug 24, 2014 at 7:38 PM, David Robillard <span dir="ltr"><<a href="mailto:d@drobilla.net" target="_blank">d@drobilla.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, 2014-08-22 at 14:49 +0100, Filipe Coelho wrote:<br>
<div class="">> On 08/16/2014 05:53 AM, Spencer Jackson wrote:<br>
> > Hello all:<br>
> ><br>
> > I'm trying to implement an FLTK (NTK really) GUI and the only trouble<br>
> > is that it doesn't resize with the window. I think I finally<br>
> > understand how its supposed to go:<br>
> > If the extension data function is called with the uri for<br>
> > LV2UI__resize then I pass back the LV2UI_Resize struct. The trouble is<br>
> > the first member is whatever opaque data I wish to use when the<br>
> > function pointed to by the second member is called. What I really need<br>
> > when the resize_ui function is called is the instance of the GUI<br>
> > object created in the instantiate function. So I need to somehow<br>
> > assign  the LV2UI_Handle to the LV2UI_Feature_Handle. But I don't have<br>
> > access to it. How is this feature supposed to work as plugin<br>
> > extension_data?<br>
><br>
</div>> I started to deal with this in my host, I think the UI should ignore the<br>
> "LV2UI_Feature_Handle handle;" on the Resize struct as it's not possible<br>
> to have any kind of proper pointer in there.<br>
> The host will probably pass the UI handle in the resize function, as it<br>
> is already doing for all other extension-data things.<br>
><br>
> The issue I'm facing now is how to report to the host the minimum size.<br>
> afaik there isn't a method for this in LV2 yet.<br>
><br>
> Perhaps the LV2UI_Resize struct shouldn't really be used for extension-data;<br>
> I think a new struct would make much more sense, kinda like this:<br>
<br>
There are several "bidirectional" feature/extension structs in the UI<br>
extension like this.  I suppose the correct thing to do needs to be<br>
documented, but having two structs with the same functions but for one<br>
pointer seems silly.<br>
<br>
(I sometimes wonder if the discrepancy could be eliminated entirely in<br>
some hypothetical LV3...)<br>
<br>
Minimum size and other simple attributes are best done with options,<br>
unless there's a good reason to have to add new API for it.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
dr<br>
<br>
<br>
_______________________________________________<br>
Devel mailing list<br>
<a href="mailto:Devel@lists.lv2plug.in">Devel@lists.lv2plug.in</a><br>
<a href="http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in" target="_blank">http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in</a><br>
</font></span></blockquote></div><br></div>