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 > hints needed: building a multi-desktop manager

hints needed: building a multi-desktop manager
Thread Tools
Fresh-Faced Recruit
Join Date: Dec 1999
Status: Offline
Reply With Quote
Aug 13, 2002, 08:09 PM
 
Hi, I was looking for some pointers on how to do a few things on OSX. I'm trying to include an OSX machine (my machine of choice) into a system we've built using Windows. (I've done lots of programming on Unix and Windows, and while I've been a Mac user for a dozen years, I've never done any programming on the Mac.)

(Background: I'm a CS prof at Georgia Tech, and as part of a research project my group is doing, we are integrating desktop computers with electronic whiteboards and other devices to create a more cohesive electronic work environment. We currently use Windows for the desktop/laptop machines).

On the desktop (currently a Windows machines), we have a multiple workspace manager, where each workspace represents some activity you are working on. As part of the integration with the whiteboard, we show visualizations on the whiteboard of each workspace on all your machines; these serve as both awareness of your projects, plus as an achor for notes and other integration with the whiteboard.

To create these visualizations, we need snapshots of the application windows in each workspace. We also need to watch keystrokes on the desktop, to intercept hotkeys and (eventually) to do automatic background searches of your files and the web for things related to what you are doing.

So, what I need to know is, how can I have a process periodically (or, preferably, when things like focus changes and window open/close events occur) grab copies of windows from other applications. And, how can I watch what is being typed, even if it's not in my application. Any hints, even pointers to the "correct part of the manual", would be appreciated.

On Windows, we use low-level Win32 hooks to intercept all events on the system. I haven't been able to find anything equivalent on OSX.

thanks for any pointers.
     
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
Aug 13, 2002, 11:58 PM
 
Take a look at vnc. There's an OS X server here.

There's also a very nice (disclaimer - I ported it to OS X) VNC client here.
Geekspiff - generating spiffdiddlee software since before you began paying attention.
     
Fresh-Faced Recruit
Join Date: Dec 1999
Status: Offline
Reply With Quote
Aug 14, 2002, 08:26 AM
 
Originally posted by smeger:
Take a look at vnc. There's an OS X server here.

There's also a very nice (disclaimer - I ported it to OS X) VNC client here.
That's a great suggestion, thanks!

Alas, the link to OSX VNC link you give goes to some generic homepage. I've done some googling, and can't find an OSX vnc server anywhere. I've even found posts on the web saying "the OSX VNC server has disappeared!"

If you have, or know of, a copy of the source to it, I'd really appreciate it.
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Aug 14, 2002, 04:29 PM
 
Originally posted by blairmacintyre:
Alas, the link to OSX VNC link you give goes to some generic homepage. I've done some googling, and can't find an OSX vnc server anywhere. I've even found posts on the web saying "the OSX VNC server has disappeared!"
It worked fine for me. I went to the VersionTracker page, clicked on the download link, and now I've got OSXvnc-0.7.dmg. Here's the direct download link. Try that. If it doesn't work, I can mail you the DMG.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Fresh-Faced Recruit
Join Date: Dec 1999
Status: Offline
Reply With Quote
Aug 14, 2002, 08:16 PM
 
Originally posted by Chuckit:

It worked fine for me. I went to the VersionTracker page, clicked on the download link, and now I've got OSXvnc-0.7.dmg. Here's the direct download link. Try that. If it doesn't work, I can mail you the DMG.
Sorry, I should have been clearer. I tried to go to the "developers" site from VersionTracker so I could get the source, and that link was dead. More searching eventually revealed that the author had dropped the domain used by versiontracker and moved to a .mac web page.
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Aug 18, 2002, 04:30 AM
 
Originally posted by blairmacintyre:
To create these visualizations, we need snapshots of the application windows in each workspace.
All you can do using public APIs is get a read-only pointer to the screen. To get window rects and info about who owns windows requires using private, undocumented, APIs which don't have any headers and may require reading assembly of Apple libraries and a bit of guesswork at the arguments

We also need to watch keystrokes on the desktop, to intercept hotkeys
This isn't terribly easy, either. There has been some discussion about this on the darwin-development mailing list. It requires writing your own IOKit HID driver superclass, or something like that.

So, what I need to know is, how can I have a process periodically (or, preferably, when things like focus changes and window open/close events occur) grab copies of windows from other applications. And, how can I watch what is being typed, even if it's not in my application.
The official answer is: "You can't". Oh, and there is no manual
     
   
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:09 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2