Re: Getting the image of a window?
Re: Getting the image of a window?
- Subject: Re: Getting the image of a window?
- From: Chad Jones <email@hidden>
- Date: Thu, 23 Aug 2001 23:22:13 -0700
Well, I'm more interested for the sake of curiosity how you can access these
lower level types of things in Cocoa.
I just want to know how it works :^)
By "these lower level types" i am assuming you are referring to
getting the information directly from windows on the system. Well,
the 'Window Server' is actually the process which does all the work
of drawing and maintaining all windows on the system (maintaining
window information, window ordering, window size, etc, etc...).
Window Server also draws all the menus, menu bars, dialog boxes etc
on the system. Menus, menu bars, etc are just special purpose
windows according to the window server. Actually, anytime you see
basically *any* graphics on the screen including the initial login
screen this is in some way touching or relying on the window server.
In fact all the higher level API's (Carbon, Cocoa, Java, etc.) all
rely on the window server in some way for drawing their graphics.
The window server itself is a background process which runs basically
at all times. You can actually see the the Window Server process
running by typing 'ps -aux' into terminal.
Anyways, as to how to get any access to any of the 'lower level'
graphics API's like talking to the window server directly, etc. This
is information which is private and will remain Apple private
information for the forseeable future (what did you expect?).
Also, as for the solution to how to get window information, using
grab as a service is good solution (suggested already) or there are
also a couple API calls which let you grab the entire screen.
Though, using grab as a service would be the best choice for Cocoa
applications. ;)
> how about using grab as a service and then getting the information from
> pastboard?
Well, I'm more interested for the sake of curiosity how you can access these
lower level types of things in Cocoa. You're suggestion seems like a good
solution though. I just want to know how it works :^) Thanks though!
Mike Beam
--
*******************************************************
Chad Jones
Engineer, Hardware & Networking group
Worldwide Developer Technical Support
Apple Computer, Inc. email: email@hidden
1 Infinite Loop, MS: 303-2T phone: (408) 974-8106
Cupertino, CA 95014 fax: (408) 862-7602
*******************************************************