Slide 6.17: Line-by-line anatomy of Hello.c
  Slide 6.19: Line-by-line anatomy of Hello.c (cont.)
  Home


Line-by-line Anatomy of Hello.c (Cont.)


EventType event;
Events are structures that the system passes to the application when the user interacts with the graphical user interface.
  typedef  struct {
    eventsEnum  eType;
    Boolean  penDown;
    UInt8  tapCount;
    Int16  screenX;
    Int16  screenY;
    union {
      ...
    } data;
  } EventType;
where the fields are

The struct EventType contains all the data associated with a system event. All event types have some common data. Most events also have data specific to those events. The specific data uses a union that is part of the EventType data structure. The Event Reference section gives details on the important data associated with each type of event.