Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Sigmund

macrumors newbie
Original poster
Sep 27, 2009
16
0
Bergen, Norway
Exactly what does the standard windows event handler do? What events are handled and what new events are generated? I can't find any accurate information on this anywhere.

I'm using Carbon.

Sigmund
 
This is purely an assumption, but I would assume the standard event handler would do all the stuff you would *expect* out of a window or a control. For example, if you hit the red button at the top left, the window closes. You need an event handler to interpret that. If you click on a pop-up menu, the menu actually pops up and highlights things as you mouse over it. All of that requires an event handler.
 
Windows handle events that make sense to them, such as drags, resizes and clicks on their titlebar buttons. Nothing else. They are typically close to the end of the responder chain and if they receive an event that they cannot handle, they pass it along to whatever is beyond them, perhaps the app itself. Most responder-type objects handle events directly themselves and usually do not involve the window in their responses.
 
Thanks for answers. Those are the main principles that can be found in guides and references. But is there an exact list somewhere?

The standard windows event handler handles quite a few events and creates others. In order to plan for event handling or debug weird behavior it would be nice to have a comprehensive list of exactly what events are handled and what new events are generated.

For example, it seems as the kEventWindowUpdate event is handled and kEventWindowDrawContent is generated instead. I'd like to see a list of all this.

The best source of information I know is the CarbonEvents.h header file. Is there anything better somewhere?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.