Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / May 2005



Tip: Looking for answers? Try searching our database.

Drawing directly to the desktop

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jameslaming@gmail.com - 27 May 2005 12:44 GMT
I'm looking for a way to draw directly to the MacOS X desktop in the
same way that the application switcher in Finder draws a surround and
the current application icons (also I suppose like the screen edges in
Expose and Dashboard in Tiger). I'd like to use OpenGL (naturally) but
without the restriction of a window and without turning it into
full-screen mode. I've seen other apps do it so I know it's not
exclusive to the OS.

Any help is much appreciated.

I'm programming in Carbon, using CodeWarrior Pro 9 and run 10.3.9.
Patrick Machielse - 27 May 2005 12:59 GMT
> I'm looking for a way to draw directly to the MacOS X desktop in the
> same way that the application switcher in Finder draws a surround and
[quoted text clipped - 3 lines]
> full-screen mode. I've seen other apps do it so I know it's not
> exclusive to the OS.

I now next to nothing about Carbon or OpenGL, but the general idea is to
simply create a new, see through, window and draw on that. You can set
the window's 'level' depending on wether it should be behind all
application windows (desktoplevel +1) or in front of all applications.
And you may want to set the click-through behaviour of your window, to
make it pass all mouse clicks to the window underneeth (ultimately the
desktop itself).

patrick
Michael Ash - 27 May 2005 13:22 GMT
> I'm looking for a way to draw directly to the MacOS X desktop in the
> same way that the application switcher in Finder draws a surround and
[quoted text clipped - 3 lines]
> full-screen mode. I've seen other apps do it so I know it's not
> exclusive to the OS.

You have a couple of misconceptions regarding windowing.

None of the stuff you mention is "drawing directly to the desktop", a
phrase which has basically no meaning on Mac OS X. Everything you see on
your screen on Mac OS X is in a window. This includes all of the obvious
windows, but also things like the menu bar, the Dock, tooltips, menus, the
translucent volume-change notifiers, and your examples of the application
switcher and expose's screen edges.

A window on OS X can contain arbitrary contents, including transparency,
and you can set its level to put it anywhere from the actual Finder
Desktop level (behind everything) up to the screensaver level (in front of
everything). You can use OpenGL to draw into a window and have the
generated transparency make the window show through to the contents
underneath, so there really are no "restrictions of a window" such as you
mention.

As far as programming it goes, just make a window without any decorations
(title bar, etc.) and go to town. I don't know how you do this in Carbon,
but it's trivial in Cocoa and I can't imagine Carbon is much harder.
Chris Baum - 27 May 2005 20:05 GMT
> 'm looking for a way to draw directly to the MacOS X desktop in the
> same way that the application switcher in Finder draws a surround and
> the current application icons

CreateNewWindow (kOverlayWindowClass, ...)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.