how to get a WindowRef

Jan 16, 2007 at 8:07pm

how to get a WindowRef

Recently I was trying to write an external that could load QuartComposer patches and directly interact with their published ports.

I successfully succeed in loading a few ones but I’m currently using a quick and dirty hack which consist of grabbing the main screen as described here:

http://developer.apple.com/documentation/GraphicsImaging/Conceptual/QuartzComposer/qc_play_renderer/chapter_6_section_4.html#//apple_ref/doc/uid/TP40001357-CH209-BAJIDAHB

but it never gives it back…

Now I’d like to do it properly and for that I need to be able to wrap a WindowRef as a NSWindow.

So the question is how to properly create a window and get a WindowRef with the MaxMSP API?

#29740
Jan 16, 2007 at 9:35pm

On Jan 16, 2007, at 12:07 PM, remy muller wrote:

> So the question is how to properly create a window and get a
> WindowRef with the MaxMSP API?

Use wind_new() to create the window. Then use wind_syswind() to get
the WindowPtr (which is what t_syswind is defined to be on Mac)

t_syswind wind_syswind(t_wind *x);

Hope this helps.

-Joshua

#93473
Jan 16, 2007 at 10:32pm

thanks,

I’ll let you know how far I get.

#93474
Jan 17, 2007 at 11:31am

thanks again for pointing me in the right direction, I can now have a working NSWindow with a QCView inside it out of a t_wind.

I’m still not finished yet, but now it’s only QuartzComposer/ObjectiveC related.

#93475

You must be logged in to reply to this topic.