MorePalmOS
A development library for developing Palm OS applications

MoreEvent.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * MorePalmOS
00003  * Copyright (c) 2004 Steven Fisher
00004  *
00005  * Distributed under the Boost Software License, Version 1.0. See accompanying
00006  * license file License.txt or <http://www.boost.org/LICENSE_1_0.txt>.
00007  *
00008  * http://morepalmos.sourceforge.net
00009  *
00010  *   MorePalmOS is the humble begining of an attempt to provide a library for
00011  *   Palm OS development which works around system bugs, illustrate how to
00012  *   use system calls, and provide "glue code" for programming Palm OS
00013  *   applications in a more straightforward way while minimally impacting
00014  *   code size.
00015  *****************************************************************************/
00016 
00017 #include "MorePrefix.h"
00018 #include "MoreEvent.h"
00019 #include "MorePrivate.h"
00020 
00021 #include <Chars.h>
00022 #include <Event.h>
00023 #include <SysEvtMgr.h>
00024 #include <MemoryMgr.h>
00025 
00026 //-----------------------------------------------------------------------------
00027 
00028 void MEvtPowerOff( MOREPALMOS_NOPARAMS )
00029 {
00030         EvtEnqueueKey( vchrHardPower, 0, commandKeyMask );
00031 }
00032 
00033 //-----------------------------------------------------------------------------
00034 
00035 void MEvtKeepOn( MOREPALMOS_NOPARAMS )
00036 {
00037         EvtEnqueueKey( vchrResetAutoOff, 0, commandKeyMask );
00038 }
00039 
00040 //-----------------------------------------------------------------------------
00041 
00042 void MEvtStopApp( MOREPALMOS_NOPARAMS )
00043 {
00044         EventType newEvent;
00045         MemSet( &newEvent, sizeof( newEvent ), 0 );
00046         newEvent.eType = appStopEvent;
00047         EvtAddEventToQueue( &newEvent );
00048 }

SourceForge.net Logo