/****************************************************************************** * * Copyright (c) 1999 Palm Computing, Inc. or its subsidiaries. * All rights reserved. * * File: Starter.c * *****************************************************************************/ #include #include "StarterRsc.h" #include "sfapp.h" #include "sfevent.h" /*********************************************************************** * * FUNCTION: SfMainFormHandleEvent * * DESCRIPTION: Event handler for the main form. In this example * most of the events are handled by Stateflow. Each * event that Stateflow should handle must be * intercepted and broadcast to the stateflow machine. * * PARAMETERS: event - a pointer to an EventType structure * * RETURNED: true if the event has been handled and should * not be passed to a higher level handler. * * REVISION HISTORY: * * ***********************************************************************/ Boolean SfMainFormHandleEvent( EventPtr eventP) { Boolean handled = false; switch (eventP->eType) { case frmOpenEvent: FrmDrawForm ( FrmGetActiveForm() ); handled = true; break; case ctlSelectEvent: switch (eventP->data.ctlSelect.controlID) { case MainEventButton: broadcast_E(); handled = true; break; default: break; } default: break; } return handled; }