Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Small App Idea: Aqua Focus Layer (with Eye Candy)

Small App Idea: Aqua Focus Layer (with Eye Candy) (Page 2)
Thread Tools
Gul Banana
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
Sep 4, 2002, 12:32 AM
 
I do believe that I also can see where the dual monitor bug would come from, and how to fix it Saturday also shall be my target, then...
[vash:~] banana% killall killall
Terminated
     
mythrndr
Fresh-Faced Recruit
Join Date: Mar 2002
Location: Champaign, IL
Status: Offline
Reply With Quote
Sep 4, 2002, 02:32 AM
 
Hey all,

I've whipped up a quick app that is commented and demonstrates how to create a window that passes keys through to both Carbon and Cocoa windows as well as creating a semi transparent view through. The code is in the distribution and should help those having some trouble in learning how to do these sorts of things.

Of course, if you are really in the competition and want to solve the issues yourself, then don't download this!

You can find the distribution at http://www.everythingmacosx.com/ , which is my personal home page.

Cheers!

Jeff

Jeff Thompson
CTO, CodeTek Studios, Inc.
Jeff Thompson
CTO, CodeTek Studios, Inc.
Codetek VirtualDesktop -> The Mac OS X Killer Desktop App - http://www.codetek.com/
     
mythrndr
Fresh-Faced Recruit
Join Date: Mar 2002
Location: Champaign, IL
Status: Offline
Reply With Quote
Sep 4, 2002, 03:43 PM
 
I fixed a strange bug in my code.

Apparantly when you obtain a windowRef in the case where it did not exist before, several of a windows parameters seem to be reset. The new code is at the same link as before.

-Jeff
Jeff Thompson
CTO, CodeTek Studios, Inc.
Codetek VirtualDesktop -> The Mac OS X Killer Desktop App - http://www.codetek.com/
     
00101001
Mac Enthusiast
Join Date: Jan 2001
Status: Offline
Reply With Quote
Sep 4, 2002, 04:09 PM
 
while you're here, mythrndr, i've actually got a question that I think you might be able to answer (if you don't mind )

how can i grab a list of windows of an external application? -- don't worry, nothing I write can compete with your VirtualDesktop, but i've been looking for weeks on info on how to accomplish this -- and came up with nothing. Thanks a lot if you can help us out (i know a few other people who are trying to figure this out too)
     
mythrndr
Fresh-Faced Recruit
Join Date: Mar 2002
Location: Champaign, IL
Status: Offline
Reply With Quote
Sep 4, 2002, 04:47 PM
 
No problem at all.

First I obtain a list of windows:

{
int i;
int *list;

i = 0;
NSCountWindows(&i);

list = malloc(i * 4);
NSWindowList(i, list);
}

NSWindowList returns an array of window identifiers as used by the WindowServer application.

You can then use CPSGetWindowOwner(list[j], aPSN); to get a process serial number for a window identifier.

This allows you to map window identifiers to processes on the system.

Now the real trick is doing something with them. So far, the only way to muck with windows, is to have code running in the process space of the application that owns the window. If anyone knows otherwise, please please tell me!

Therefore, you should use something like APE from Unsanity (www.unsanity.com), to patch into a process. I don't personally use APE, but I do something very similar. This may however, not work in the future with Pinot or whatever it is going to be called. Hopefully, through open communication with Apple, a public way of doing this will be made available.

I hope this helps out some!

Jeff
Jeff Thompson
CTO, CodeTek Studios, Inc.
Codetek VirtualDesktop -> The Mac OS X Killer Desktop App - http://www.codetek.com/
     
00101001
Mac Enthusiast
Join Date: Jan 2001
Status: Offline
Reply With Quote
Sep 4, 2002, 05:26 PM
 
totally sweet! you rock, dude...

im going to start playing around
     
mythrndr
Fresh-Faced Recruit
Join Date: Mar 2002
Location: Champaign, IL
Status: Offline
Reply With Quote
Sep 4, 2002, 06:56 PM
 
I'm glad your happy!

I'm slowly working on a bunch of little classes to help people do, "odd" things on their system. For example, creating pop up contextual menus on any location on the screen. That sort of fun thing!

Enjoy!

Jeff
Jeff Thompson
CTO, CodeTek Studios, Inc.
Codetek VirtualDesktop -> The Mac OS X Killer Desktop App - http://www.codetek.com/
     
Gul Banana
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
Sep 8, 2002, 04:28 AM
 
Just a quick note that FocusLayer v1.2 is now available! Improvements in this version:

• You can now focus by either window or application. Application mode is more friendly to other applications (no processing power used when not actually switching focus) but window mode works better in a lot of situations.
• Support for multiple monitors
• Fixed crash when clicking on dock icon
• Transparency is now seperate from colour in the preferences
• You can exclude specific applications from FocusLayer's effect
[vash:~] banana% killall killall
Terminated
     
absmiths
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status: Offline
Reply With Quote
Sep 9, 2002, 12:01 PM
 
This is one of the coolest threads I have read in some time. I expected to see a lot of rantings about how Apple should of designed OS X, and instead see two developers in healthy competition to create a useful tool. Kudos. It might be good however if you two would combine the best features of both apps and release as shareware so we could compensate you both...

BTW, what happens when you command-tab? What happens when you command-option-escape? Is it possible to make the application not have a dock icon, but instead respond to a key-combination?

EDIT: Note to self - this is not Windows (no alt-tab).
( Last edited by absmiths; Sep 9, 2002 at 09:00 PM. )
     
mythrndr
Fresh-Faced Recruit
Join Date: Mar 2002
Location: Champaign, IL
Status: Offline
Reply With Quote
Sep 9, 2002, 07:32 PM
 
You can make an app have no Dock icon by setting the target's application settings to have an entry for NSUIElement that is set to 1.

We do this in VirtualDesktop, and just let system status bar item bring up the apps menus.

Cheers,

Jeff
Jeff Thompson
CTO, CodeTek Studios, Inc.
Codetek VirtualDesktop -> The Mac OS X Killer Desktop App - http://www.codetek.com/
     
00101001
Mac Enthusiast
Join Date: Jan 2001
Status: Offline
Reply With Quote
Sep 9, 2002, 10:33 PM
 
Originally posted by absmiths:
instead see two developers in healthy competition to create a useful tool. Kudos. It might be good however if you two would combine the best features of both apps and release as shareware so we could compensate you both...
Thanks dude -- sorry I haven't updated in a while (I just started college and got loaded down with some major work). Unfortunately, that means that I'm probably going to have to concede...

I did get Focus 1.0 working with specifying excluded apps -- and a user prefs system... but FocusLayer 1.2 already does that. (I still like my icon better though )

Maybe in the future I'll update once again -- but until then:: good work on FocusLayer, dude.

(PS -- bug report. excluding apps doesn't seem to work with the Finder -- or did I do something wrong when setting it up? Just out of curiosity -- did you end up having to create a timer to work in window - based mode? -- and: how are you doing the excluding app thing ... i got it working simply with the NSWorkspace activeApplication to return the current app-name string.)

PPS -- you can use my icon if you like it too

Talk to you guys later
-lb
     
Gul Banana
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
Sep 11, 2002, 09:31 AM
 
Well, Focus really wasn't very far behind, but the time issue is certainly a big one - as a student, I have plenty To answer your questions: Exclusion debugging is in process; at the moment I do it the same way you do, [NSWorkspace activeApplication], but it does indeed seem to not work with some apps such as the Finder. I did have to use a timer; and I have a friend who's making me a new übericon for FocusLayer 1.3+ I for one am pleased about what's come out of this - I keep receiving all these emails from people using FL, and it feels really nice. Regarding the possibility of shareware, I'm never going to change FL to anything other than freeware. I have several reasons for that; It's my first actual released program and not as polished as it could be, and it's not all that big a thing anyway, I don't like the idea of charging money for something that's quite literally a couple of pages of code. Of course, that doesn't stop other people. Heck, I'll just claim I'm incredibly generous or something. I suspect this thread is just about dead now, but it's served its purpose... thank you very much to Judge_Fire for the original inspiration, and thank you everyone else for your suggestions. And Loren, of course, for the competition

- Banana out
[vash:~] banana% killall killall
Terminated
     
Groovy
Mac Enthusiast
Join Date: Apr 2001
Status: Offline
Reply With Quote
Sep 11, 2002, 04:35 PM
 
Gul Banana - If you add a moving texture to the layer say something like
ripples so it looks like moving water. Your app will truly be amazing. : )

It would be very cool if the background windows looked like they were say
a few inches under a rippling pond or something.

Then you could add a splash sound every time a window goes down into
the water and a different one when a window pops out of the water.

that would really make it feel like aqua world lol
     
S|ntax
Junior Member
Join Date: Aug 2002
Status: Offline
Reply With Quote
Sep 11, 2002, 05:50 PM
 
few suggestions for focuslayer, would be double clicking on the desktop to hide all the open programs and can this reside in system preferences like some of the haxies do. i would rather turn it on and off there then have it sit in my dock all the time. otherwise this is a great lil tool. very nice job.
     
krove
Mac Elite
Join Date: Jul 2000
Location: Washington, DC
Status: Offline
Reply With Quote
Sep 11, 2002, 11:46 PM
 
I just found this thread, so let me tell you that this will be perfect for my Grandpa.

He's had a computer for a couple years, but he still has a lot of trouble identifying window borders, and with OS X, this has become more confusing because he mistakes the stoplights on one window in the background for the one he's trying to close. Anyway, you get the idea. This should really help him to under stand the way windows are actually layered, etc (or at least minimize confusion over what window is actually in front).


How did it come to this? Goodbye PowerPC. | sensory output
     
diskobolos
Forum Regular
Join Date: Feb 2002
Location: San Francisco
Status: Offline
Reply With Quote
Sep 15, 2002, 10:03 PM
 
FocusLayer is very cool, I've had it on full time since I downloaded it 2 or 3 days ago.. the glitches I've noticed are with apps that use palettes, AppleWorks, Photoshop, BBEdit, Illustrator... and sometimes focus changes when a sheet slides down like in Mozilla.

I hope you're still working on it, it's definately cool. Are you going to post it to versiontracker?
     
Nebagakid
Mac Elite
Join Date: Sep 2000
Location: 'round the corner
Status: Offline
Reply With Quote
Sep 16, 2002, 12:13 AM
 
This is really cool,yeah, more unnecessary animations features would be cool...

like, rippling and sounds, aqua kinda stuff.

also, why does the "About" open up TextEdit? Why not just use another window a text scroll view?
     
Gul Banana
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
Sep 16, 2002, 09:04 AM
 
Originally posted by diskobolos:
FocusLayer is very cool, I've had it on full time since I downloaded it 2 or 3 days ago.. the glitches I've noticed are with apps that use palettes, AppleWorks, Photoshop, BBEdit, Illustrator... and sometimes focus changes when a sheet slides down like in Mozilla.

I hope you're still working on it, it's definately cool. Are you going to post it to versiontracker?
I'm trying to find a workaround for the palette and sheet issues, but it's rather difficult with the way I'm doing things at the moment. FocusLayer is already on VersionTracker, at http://www.versiontracker.com/morein...d=16088&db=mac

Originally posted by Nebagakid:
This is really cool,yeah, more unnecessary animations features would be cool...

like, rippling and sounds, aqua kinda stuff.

also, why does the "About" open up TextEdit? Why not just use another window a text scroll view?
Unnecessary animations are also in the works At the moment, the reason that "About" launches TextEdit is so that it can use the same Read Me file that's contained in the download, which I suppose is a rather lazy way of doing things. Basically, I wanted FL itself to be as lightweight as possible.
[vash:~] banana% killall killall
Terminated
     
Nebagakid
Mac Elite
Join Date: Sep 2000
Location: 'round the corner
Status: Offline
Reply With Quote
Sep 16, 2002, 02:43 PM
 
text is only like 4-8k
     
stew
Senior User
Join Date: Oct 2001
Status: Offline
Reply With Quote
Sep 17, 2002, 05:18 AM
 
Oww..this is so cool! Too bad I chimed in so late in this thread - I had plans for such an app for a while now too.

Further ideas would be:
[those ideas are heavy and will make you want a QuartzGL supported video card...]
* changing the opacity of windows in the background by their Z-order
* a seperate overlay window for every window, dimming it according to its Z-order

The last one should result in a really natural behavior, as objects that are further away have less contrast than the ones close to you. However, it would double the number of windows on your screen as well as the amount of memory used and the amount of CPU/GPU work. I guess that one would only be usable with QuartzGL (time for me to get a new iBook soon...).


Stink different.
     
Gul Banana
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
Sep 18, 2002, 10:41 AM
 
Very nice idea... that one might have to wait until I get _my_ new Radeon, though, as at the moment I don't have the benefits of QE...
[vash:~] banana% killall killall
Terminated
     
Judge_Fire  (op)
Mac Elite
Join Date: Jan 2001
Location: Helsinki, Finland
Status: Offline
Reply With Quote
Sep 18, 2002, 01:57 PM
 
Hey again,

nice to see people are finding this thingy inspiring and even useful!

Can't wait for the new features you're hinting at...

J
     
Gametes
Mac Elite
Join Date: Sep 2000
Location: Norfolk, Va
Status: Offline
Reply With Quote
Aug 15, 2006, 01:19 PM
 
NSFocusLayerApp *OmniDazzle = [[FocusLayer alloc] initWithOptions:@"Funky graphics"];

Way to go guys, at least 3 years ahead of your time. The Kanye West (sik) of Cocoa programmers!
you are not your signature
     
 
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 03:15 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,