What does the standard windows event handler?

Discussion in 'Mac Programming' started by Sigmund, May 18, 2010.

  1. Sigmund macrumors newbie

    Joined:
    Sep 27, 2009
    Location:
    Bergen, Norway
    #1
    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
     
  2. Detrius macrumors 68000

    Joined:
    Sep 10, 2008
    Location:
    Asheville, NC
    #2
    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.
     
  3. Sydde macrumors 68020

    Sydde

    Joined:
    Aug 17, 2009
    #3
    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.
     
  4. Sigmund thread starter macrumors newbie

    Joined:
    Sep 27, 2009
    Location:
    Bergen, Norway
    #4
    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?
     

Share This Page