All event driven programs have the same global execution behavior:
program main; begin initialize application; while not finished do begin if user has done something interesting respond to it end; clean up application; end