From 2409b1037552dd0c0fe1c8ee4a2aacc711ddfc34 Mon Sep 17 00:00:00 2001 From: ehouse Date: Wed, 29 Sep 2004 01:03:49 +0000 Subject: [PATCH] handle LstSetListChoices manually --- palm/funcfile.txt | 2 +- palm/pace_man.c | 30 ++++++++++++++++++++++++++++++ palm/pace_man.h | 2 ++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/palm/funcfile.txt b/palm/funcfile.txt index 42a83c064..65b3543c8 100644 --- a/palm/funcfile.txt +++ b/palm/funcfile.txt @@ -12,6 +12,7 @@ # MenuHandleEvent # FrmSetEventHandler # EvtAddEventToQueue +# LstSetListChoices # ################################################################# CtlEnabled @@ -115,7 +116,6 @@ LstMakeItemVisible LstPopupList LstSetDrawFunction LstSetHeight -LstSetListChoices LstSetSelection MemChunkFree MemHandleLock diff --git a/palm/pace_man.c b/palm/pace_man.c index 372197a57..cf39a0d69 100644 --- a/palm/pace_man.c +++ b/palm/pace_man.c @@ -699,3 +699,33 @@ flipFileInfoToArm( FileInfoType* fout, const unsigned char* fin ) fout->nameP = read_unaligned32( &fin[4] ); fout->nameBufLen = read_unaligned16( &fin[8] ); } /* flipFileInfo */ + +/* from file List.h */ +void +LstSetListChoices( ListType* listP, Char** itemsText, Int16 numItems ) +{ + FUNC_HEADER(LstSetListChoices); + /* var decls */ + /* swapIns */ + { + XP_U16 i; + PNOState* sp = GET_CALLBACK_STATE(); + STACK_START(unsigned char, stack, 10); + /* pushes */ + ADD_TO_STACK4(stack, listP, 0); + ADD_TO_STACK4(stack, itemsText, 4); + ADD_TO_STACK2(stack, numItems, 8); + STACK_END(stack); + + for ( i = 0; i < numItems; ++i ) { + itemsText[i] = Byte_Swap32( itemsText[i] ); + } + + (*sp->call68KFuncP)( sp->emulStateP, + PceNativeTrapNo(sysTrapLstSetListChoices), + stack, 10 ); + /* swapOuts */ + } + FUNC_TAIL(LstSetListChoices); + EMIT_NAME("LstSetListChoices","'L','s','t','S','e','t','L','i','s','t','C','h','o','i','c','e','s'"); +} /* LstSetListChoices */ diff --git a/palm/pace_man.h b/palm/pace_man.h index bc0be501d..ba6cee69d 100644 --- a/palm/pace_man.h +++ b/palm/pace_man.h @@ -41,6 +41,8 @@ extern Boolean MenuHandleEvent( MenuBarType* menuP, EventType* event, extern void FrmSetEventHandler( FormType* formP, FormEventHandlerType* handler ); extern void EvtAddEventToQueue( const EventType* event ); +extern void LstSetListChoices( ListType* listP, Char** itemsText, + Int16 numItems ); #if 0