JUCE without the window?


#1

Simple question.

I’m interested in various aspects of JUCE (threading, networking, etc.), but want to manage (& create) my own (non-JUCE) window. Is it possible to use JUCE as just a library that allows me to use networking, threading, etc., without having to first create a JUCE window? Can I just use it as an external library that my app links to for this other functionality?

Thanks.

~brian


#2

Yes, of course. Just use the bits you need. The only thing to remember is that if you’re not using the normal juce startup code, you’ll need to call the juce_initialise_NonGUI/GUI functions before using any classes.


#3

Thanks! That works.

Unfortunately, as soon as I call initialiseJuce_NonGUI(), it appears that all of my mouse events are getting swallowed by JUCE. Is there a way to tell JUCE that I don’t want it doing that?


#4

[quote=“lofibri”]Thanks! That works.

Unfortunately, as soon as I call initialiseJuce_NonGUI(), it appears that all of my mouse events are getting swallowed by JUCE. Is there a way to tell JUCE that I don’t want it doing that?[/quote]

That sounds a bit far-fetched to me… if you’re not running the juce event loop, then I don’t see how it could have any effect on mouse events. What platform are you using?


#5

I’m running on OS X. I can easily test that this is indeed the case, as I can spawn threads that do various tasks. They all work as expected. As soon as I spawn a thread that does an

#include “juce_amalgamated.h”

No more mouse.


#6

So what exactly is running the event loop if not juce? Since the juce code has to initialise cocoa, maybe you’ve got creaky old carbon code that isn’t compatible with that?