GPS4Palm

Source Code Documentation


Utils.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  *
00003  * $RCSfile: Utils_8h-source.html,v $
00004  *
00005  * GPS4Palm Utility Functions
00006  *
00007  * This program is Copyright (C) 03/2003 Matthias Prinke
00008  * <matthias.prinke@surfeu.de> and covered by GNU's GPL.
00009  * In particular, this program is free software and comes WITHOUT
00010  * ANY WARRANTY.
00011  *
00012  * $Author: mp $
00013  *
00014  * $Date: 2007-10-08 20:40:35 $
00015  *
00016  * $Revision: 1.7.2.1 $
00017  *
00018  * $Log: Utils_8h-source.html,v $
00018  * Revision 1.7.2.1  2007-10-08 20:40:35  mp
00018  * updated for gps4palm V0.9.5 beta
00018  *
00019  * Revision 1.9  2004-11-27 10:17:43  mp
00020  * added Die()
00021  *
00022  * Revision 1.8  2004/11/24 21:26:30  mp
00023  * added UpdateScrollbar(),
00024  * >  * ScrollLines(), and PageScroll()
00025  *
00026  * Revision 1.7  2004/11/14 11:02:49  mp
00027  * added MyFrmGetObjectIndexFromPtr()
00028  *
00029  * Revision 1.6  2004/04/29 20:09:08  mp
00030  * added Dopage() and Doscroll()
00031  *
00032  * Revision 1.5  2003/11/20 20:36:29  mp
00033  * added SetControlValueFromId and GetControlValueFromId
00034  *
00035  * Revision 1.4  2003/11/02 10:42:51  mp
00036  * added backlight(), sermux_select() and sermux_enable()
00037  *
00038  * Revision 1.3  2003/10/20 17:12:33  mp
00039  * added SetFieldText
00040  *
00041  * Revision 1.2  2003/10/15 19:01:37  mp
00042  * added function nibble2hex
00043  *
00044  * Revision 1.1.1.1  2003/07/14 18:59:29  mp
00045  * Imported GPS4Palm to CVS revision control.
00046  *
00047  *
00048  ****************************************************************************/
00049 #ifndef UTILS_H
00050 #define UTILS_H
00051 
00052 #define SetControlValueFromId(id,val)\
00053   FrmSetControlValue(frmP, \
00054     FrmGetObjectIndex(frmP, \
00055     (id)), (val))
00056 
00057 #define GetControlValueFromId(id)\
00058   FrmGetControlValue(frmP, \
00059     FrmGetObjectIndex(frmP, (id)))
00060 
00061 void *GetObjectFromForm(FormPtr form, UInt16 objectID);
00062 
00063 void *GetObjectFromActiveForm(UInt16 objectID);
00064 
00065 UInt16 MyFrmGetObjectIndexFromPtr(const FormPtr formP, void *objP);
00066 
00067 void Die(const Char *msg);
00068 
00069 UInt32 GetRomVersion(void);
00070 
00071 void Dopage(UInt16 tbl_id, Boolean down, UInt16 nr_items, Int32 *top_row);
00072 
00073 void Doscroll(UInt16 tbl_id, UInt16 scl_id, UInt16 nr_items, Int32 *top_row);
00074 
00075 Err RomVersionCompatible(UInt32 requiredVersion, UInt16 launchFlags);
00076 
00077 void UpdateScrollbar(FormPtr form, UInt16 fieldID, UInt16 scrollbarID);
00078 
00079 void ScrollLines(FormPtr form, UInt16 fieldID, UInt16 scrollbarID,
00080   Int16 numLinesToScroll, Boolean redraw);
00081   
00082 void PageScroll(FormPtr form, UInt16 fieldID, UInt16 scrollbarID,
00083   WinDirectionType direction);
00084 
00085 void SetFieldText(UInt16 fldID, Char *srcP, Boolean append, Boolean redraw);
00086 
00087 Err SetFieldTextFromStr(FieldPtr field, Char *s, Boolean redraw);
00088 
00089 char nibble2hex(const char nibble);
00090 
00091 void backlight(Boolean on);
00092 
00093 void sermux_select(Boolean sel);
00094 void sermux_enable(Boolean enable);
00095 
00096 #endif

Created: Mon, 08 Oct 2007 22:33:16 +0200
Copyright ©2004 M. Prinke