What is the style of Mac OS X's windowing system?
I know with just how the X11 system functions, where customers connect using an outlet to the web server process and also send procedures to the window web server to execute particular procedures on their part.
Yet I do not recognize (and also I can not locate excellent records) defining just how a GUI application connects with the window system on Mac OS X. Several of the inquiries that I have include:
- Just how does an application receive occasions from the windowing system?
- Does the application demand to register with the bit, or some windowing system web server?
- Just how does the windowing system demand that an application upgrade its display screen?
- Just how does an application cause a re-display procedure?
- Exists a socket-based method, or a few other RPC system to the windowing system?
- Does the windowing system, or the application, have straight hardware accessibility?
- What are the procedures readily available in between customer applications and also the windowing system?
This is what I have actually had the ability to collect until now :
Applications connect over some type of exclusive API to the WindowServer procedure, the WindowServer procedure is the one that in fact obtains hardware occasions (computer mouse, key-board) and also sends off those to the customer applications. (this is still an open inquiry : what method do they make use of if any kind of, do they make use of Mach ports and also MIG, or some Socket - based API, not exactly sure).
Some details is below :
The WindowServer is the Quartz Compositor. Commonly applications make use of the Quartz2D API which revealed in the CoreGraphics API (CGXXX funtions). Applications create CoreGraphics "Contexts" (CGContext) and also attract there. Whether the context is pressed when it is done as large bitmap, or if the procedures are sent out to the web server like they get on X11 is still an open inquiry.
There is a minimal API revealed to regulate particular facets of the WindowServer procedure, the type of configuration setups that are commonly done from the Settings application, yet there is no documents on just how applications in fact connect visuals demands or pump messages from the web server, apart from the Carbon/Cocoa APIs revealed.
Apple's documentation for OS X is additionally a wonderful source, and also is clearly even more up - to - day.