We have to call afterMainSetup(); method after all initialization done.
If you call afterMainSetup(); before your setup, it will cause error…
You can set up 3 window types:
// normal usual window
transparent.afterMainSetup(ofxTransparentWindow::NORMAL);
// as desktop background
transparent.afterMainSetup(ofxTransparentWindow::DESKTOPBG);
// like screen saver
transparent.afterMainSetup(ofxTransparentWindow::SCREENSAVER);
That’s all!
P.S.
This is my first Cocoa experience and I did many many guess works.
Please forgive me and let me know if you notice any fails.
OK I figured out a nice solution to toggle between transparent and a regular window. The expanded class is attached in case anyone needs to do the same thing. It allows you to move the application where you want it, hit the spacebar and it will toggle transparent.
Hi, do you think that on OSX it would be possible to forward mouse events to a window “behind” the transparent one ?
If someone could at least point me in the right direction that would be terrific.
the included example works fine for me in OsX 10.9 with Xcode 5 and OF 0.8 …
but if i try to add it to an existing project i got this errors :
Undefined symbols for architecture i386:
"updateView()", referenced from:
ofxTransparentWindow::update() in ofxTransparentWindow.o
"removeWindowBarAndTitle(int)", referenced from:
ofxTransparentWindow::afterMainSetup(int) in ofxTransparentWindow.o
ld: symbol(s) not found for architecture i386
I’ve double checked that the ofxTransparentWindow is included in header search paths, both in project and target … but still i get this error.
What i did :
drag and drop the addon into my project.
deleted the example folder
added …/…/…/addons/ofxTransparentWindow/src on my “Header Search Paths” under Build Settings (both in the target and in the project)
I’m a newbie in .m file handling and maybe i need to tell somewhere to use them properly ?
Is there any special requirement when using .m files …
I fix the linker error and tested it on oF 081!
Seems the linker error was just because file suffix.
ofxTransparentWindowUtil.m => ofxTransparentWindowUtil.mm