text: The interactions between applications, users and the Photon server are represented by data structures called events.
  This chapter discusses:
  Event information is stored in structures of type PhEvent_t; see the Photon Library Reference.
  Most of the time, you can use a widget's callbacks to handle what the user does while pointing to it. If you're working with event handlers, you'll need to know what events Photon emits.
  When you press the pointer button, Photon emits a Ph_EV_BUT_PRESS event to the widget that currently has focus.
  When you release the button, Photon emits two Ph_EV_BUT_RELEASE events::
  Or:
  After the second click, you either get a third one or an ENDCLICK, and so on. But eventually you get an ENDCLICK -- and the next time the person clicks, the click count is 1 again. ); }
  This section describes how to use PhEmit(), as well as:
  The most general way for your application to emit an event is to call PhEmit():
  int PhEmit( PhEvent_t *event, PhRect_t *rects, void *data );
  The arguments are:
  If you set collector.rid to a region ID, only that region notices the event.
  The Photon Manager sets the following members of the event structure after it has enqueued a copy of the event to an application::
  Sometimes an application needs to target an event directly at a specific region, without making the event travel through the event space before arriving at that region. You can use an inclusive event or a direct event to ensure that the targeted region sees the event.
  For an inclusive event, do the following:
  If you don't want an inclusive targeted event to continue through the event space, you must make the emitting region opaque to that type of event, or use a direct event instead.
  For a direct event, do the following:
  If you want to send an event to a specific widget, you could call PhEmit() as described above, but you'll need to look after a lot of details, including making sure: );
  Sometimes you might need to simulate a key press in your application. Depending on what exactly you want to achieve, you can choose from several ways of generating key events:
  event->emitter.rid = Ph_DEV_RID;
  The rectangle set should consist of a single pixel -- if you're not using the window manager, or if PWM is set to use cursor focus, the position of that pixel determines which window the event will hit..
  The PtWidget widget class provides these callbacks for processing events: value returned by a widget's Pt_CB_RAW callback indicates what's to be done with the event:
  Let's look at a simple widget family to see how this works. Let's suppose you have a window that contains a pane that contains a button. Here's what normally happens when you click on the button:
  If the pane's Pt_CB_FILTER callback says to ignore the event:
  For information on adding event handlers, see:
  Most applications collect events by calling PtMainLoop(). This routine processes Photon events and supports work procedures and input handling.
  If your application doesn't use widgets, you can collect events:.
  If you need to capture mouse coordinates, for example to drag graphical objects in your application, you'll need to work with events.
  There are two types of dragging:
  Dragging is done in two steps:
  These steps are discussed in the sections that follow.:
  If Ph_DRAG_TRACK is included in flags, then opaque dragging is used; if Ph_DRAG_TRACK isn't included, outline dragging is used.
  The following flags indicate which edge(s) of the dragging rectangle track the pointer::
  If you're doing outline dragging, the event subtype you're interested in is Ph_EV_DRAG_COMPLETE. When this event occurs, your callback should: ); }
  The callback for opaque dragging is similar to that for outline dragging--the only difference is the subtype of event handled:
  if (cbinfo->event->subtype != Ph_EV_DRAG_MOVE) { return (Pt_CONTINUE); }