Newbie Questions
Newbie Questions
- Subject: Newbie Questions
- From: R Brandon Gaisford <email@hidden>
- Date: Mon, 24 Sep 2001 20:39:09 -0600
I'm currently trying to port a Windows Java App
over to OSX. The application includes a certain
amount of native code. I've been reading OSX
books and online manuals as well Developer
docs trying to get up to speed on the Mac. I've
never done any native coding on a Mac before.
I have found covers for most of the native functionality
required by this app within Cocoa. There are two areas
however which are giving me a lot of trouble.
1) This application is installed in a school environment.
It is necessary to prevent students from having access
to the OS during normal program execution. It is necessary
to intercept all the standard MacOS keyboard shortcuts (i.e.
<command><Q>, <Option><Command><esc>...).
I don't want to drop them all however and would like the
ability to forward those I'm interested in to a specific process.
In the Windows app we refer to this as a low level keyboard
hook. What objects/APIs within Cocoa/Carbon will allow this
sort of access to keyboard events?
2) It is also necessary to hide the desktop thereby preventing
access to normal desktop features such as the the menu bar.
I've been playing around with CGDirectDisplay within the context
of the samples on the developer website (FullScreen and/or
"fullscreen CGL" to be exact). It seems as if this is the best route
for me to follow given the above requirements. Is it possible to
display a (Java) window of my choosing within the context of
this display element? At certain points during application
execution it is necessary to switch back to the default desktop.
Any advice/guidance in these areas would be greatly appreciated!!
Brandon Gaisford
Waterford Institute