MorePalmOS
A development library for developing Palm OS applications

MoreList.h

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 
00024 #ifndef MORELIST_H
00025 #define MORELIST_H
00026 
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030 
00031 #include "MorePrefix.h"
00032 #include "MoreTypes.h"
00033 
00034 #include <Form.h>
00035 #include <List.h>
00036 
00037 #if MOREPALMOS_MACRO_SIMPLE_FUNCS
00038 
00039         #define MLstGetPtrByIdxSafely( formP, idx )\
00040                 ( ListType* )MFrmGetObjPtrOfTypeByIdx( formP, idx, frmListObj )
00041         #define MLstGetPtrByIDSafely( formP, ID )\
00042                 ( ListType* )MFrmGetObjPtrOfTypeByID( formP, ID, frmListObj )
00043         #define MLstGetPtrByObjPtrSafely( formP, ptr )\
00044                 ( ListType* )MFrmGetObjPtrOfTypeByPtr( formP, ptr, frmListObj )
00045 
00046         #define MLstGetPtrByIdx( formP, idx )\
00047                 ( ListType* )MFrmGetObjPtrByIdx( formP, idx )
00048         #define MLstGetPtrByID( formP, ID )\
00049                 ( ListType* )MFrmGetObjPtrByID( formP, ID )
00050         #define MLstGetPtrByObjPtr( ptr )\
00051                 ( ListType* )( ptr )
00052 
00053 #else
00054 
00055         ListType* MLstGetPtrByIdxSafely( const FormType* formP, FrmObjectIdx_t idx );
00056 
00057         ListType* MLstGetPtrByIDSafely( const FormType* formP, FrmObjectID_t ID );
00058 
00059         ListType* MLstGetPtrByObjPtrSafely( const FormType* formP, FrmObject_t* ptr );
00060 
00061         ListType* MLstGetPtrByIdx( const FormType* formP, FrmObjectIdx_t idx );
00062 
00063         ListType* MLstGetPtrByID( const FormType* formP, FrmObjectID_t ID );
00064 
00065         ListType* MLstGetPtrByObjPtr( FrmObject_t* ptr );
00066 
00067 #endif
00068 
00073 Int16 MLstGetSelectionByID( FormType* formP, FrmObjectID_t listId );
00074 
00079 Int16 MLstGetSelectionByIdx( FormType* formP, FrmObjectIdx_t listIdx );
00080 
00081 #define MLstGetSelectionByPtr( listP ) LstGetSelection( listP )
00082 
00088 void MLstSetTriggerAndListValueIdxByIdx( FormType* formP, FrmObjectIdx_t triggerIdx,
00089                 FrmObjectIdx_t listIdx, CtlValue_t item );
00090 
00096 void MLstSetTriggerAndListValueIdxByID( FormType* formP, FrmObjectID_t triggerID,
00097                 FrmObjectID_t listID, CtlValue_t item );
00098 
00106 void MLstSetTriggerValueByIdx( FormType* formP, FrmObjectIdx_t triggerIdx,
00107                 FrmObjectIdx_t listIdx, CtlValue_t item );
00108 
00116 void MLstSetTriggerValueByID( FormType* formP, FrmObjectIdx_t triggerIdx,
00117                 FrmObjectID_t listID, CtlValue_t item );
00118 
00126 void MLstSetTriggerValueByPtr( FormType* formP, void* triggerP,
00127                 void* listP, CtlValue_t item );
00128 
00129 #ifdef __cplusplus
00130 }
00131 #endif
00132 
00133 #endif

SourceForge.net Logo