






|
 |
Developers
onHand Manual: Rupsys (C bindings)
onHand/Ruputer functions
- char *getArg(void)
Returns the filer association (file name) that originated the program
loading.
- int Keyin(int repeat,int blink)
Waits for button and returns the button status
(b7...Down/Right/Up/Left/Enter/El/Menu/Filer...b0; b15:Event, b11...SerCon/SerIdle/CellMounted...b9),
with the specified RepeatDetectMask; blink should be -1. Uses bi_getbtn() to
perform its task.
- int EventCall(int bt)
Handles the alarm sound event. Must be called after Keyin() using the
returned value of Keyin() as parameter. If it returns -1 it's an application
termination request, if it returns 1 you have to call EventExec(); otherwise
all is ok.
- int EventExec(void)
Handles the mini-filer call, time check display, power off and docking
warning message events. After this call you have to redraw the screen. If it
returns -1 it's an application termination request.
- int softkey(void *sts, char *str ,int mode,char *fname)
Opens the soft keyboard for input; sts is a pointer to a STRSTS structure,
str is the input buffer, mode is the multilineflag, and fname the filename
of the style file.
- int dispMess(char *M[],int Num)
Displays a message window containing Num lines with the strings specified in
M[0] to M[Num-1].
- void dispMessBar(char *MSG)
Shows a window with the specified message and a progress bar.
- void endMessBar(void)
Closes the window created with dispMessBar()
- void dispRenew(void)
Issues a dispMessBar() with the text "Updating"
- void endRenew(void)
Closes the window created by dispRenew()
- int dispYN(char *MESS1,char *MESS2,int defCSR)
Shows a yes/no message box with two lines of text, specifid in MESS1 and
MESS2, making the button specified in defCSR (0: Yes, 1: No, -1: System
default[No]) the initial selection. Screen contents aren't preserved.
- int dispYNLarge(char *MESS1,char *MESS2,int defCSR)
Exactly as dispYN() but with a larger window that fills the entire onhand/ruputer
screen.
- int dispCancelYN(void)
Shows a dispYN() window with the message "Do you want to cancel data
input?". Screen contents aren't preserved.
- void dispWaiting(void)
Shows the waiting clock animation.
- void endWaiting(void)
Ends the displaying of the waiting clock.
- void dispVOLerr(void)
Shows a warning-icon message with the text "Batteries low" and the
options "help" and "ok". "Help" clears the
screen and shows "Batteries low or severe environment" and
"Push any key to return". "Ok" simply exits the message
box. The screen contents aren't preserved.
- void dispMEMORYerr(void)
Makes two short beeps and shows a warning-icon message with the text
"Out of Memory" and the options "help" and
"ok". "Help" clears the screen and shows "File is
too large or insufficient available memory" and "Push any key to
return". "Ok" simply exits the message box. The screen
contents aren't preserved.
- int aprMenu(char *menuNAME,MENU *p,int Num)
Show a menu with title menuNAME with Num entries in p (p is declared as in
``MENU p[]={ { fn_menu1,"Menutext1",0,0},{
fn_menu2,"Menutext2",0,0},[...]};''). Returns -2 for a application
termination request. If a menu_funcion() returns -3, it's selection doesn't
makes aprMenu() to exit.
- int setBackMenu(void)
Function for aprMenu() menues; makes aprMenu() to exit with a return value
of 0.
- int setExitMenu(void)
Function for aprMenu() menues; makes aprMenu() to exit with a value of -2,
that is, application termination request.
- int dispList(char *menuNAME,MENU *p,int Num,int *menuNO,int
SETTING)
Displays a menu similar to that of aprMenu(), but function menus are asumed
to be NULL or return -3 and the selected menu number (0..Num-1) is stored in
MenuNO. SETTING is a flag indicating whether a small filer is allowed.
- void dispTitle(char *NAME)
Puts in the top of the screen the title specified in NAME in centered
position.
- void dispTitleMore(char *NAME)
Puts a title like dispTitle() but centering NAME so that it won't overlap a
gauge painted with dispTitleUpDw().
- void dispTitleUpDw(int sel,int top,int total)
Draws a gauge in the title bar that represents the relative position of sel
between top and total.
- int adjTime(void)
Displays the time adjust screen. Returns -2, so when it's used as an
aprMenu()'s menu_function() it forces a program termination request.
- int sendTime(void)
Send time data to another onhand/ruputer via IR.
- int recvTime(WatchDT *Rtime)
Receive time data from another onhand/ruputer via IR.
- void setRTC(void)
Writes the system time (pSystemCtl->CPUram) to the RTC (Real Time Clock).
setRTCquit() must be called afterwards.
- void setRTCquit(void)
Terminates the setRTC() processing. Must be called after setRTC().
- void getRTC(void)
Update the system time (pSystemCtl->CPUram) with the time stored in the
RTC.
- void setWeeklyAlarm(void)
Updates the memory structures that holds the weekly alarms by reading the
file weekly.ini
- void setAlarm(void)
Updates the memory structures that holds the event alarms by reading the
file alarm.ini
- void setSaverCounter(void)
Resets the screen-saver counter (the counter used for turning the LCD off
after a certain amount of idle time)
- int sendFile(char *fmes,int fd,long size)
Send size bytes from the file indicated by fp to another onhand/ruputer.
fmes is a string identificating the data.
- int recvFile(char *fmes,int fd)
Receive data from another onhand/ruputer into the file indicated by fd. fmes
is a string indentificating the data.
- void TIMERStart(void)
Starts the count down timer. pSystemCtl->TIMERdata must be set to the
address of a filled Tdata structure (members: int hour, min, sec, co). If
pSystemCtl->EventManager->eventReq is ORed with EVENT_TMDWN1 and
EVENT_TMDWN2, KeyIn() returns everysecond because of an event (the type of
event is stored in pSystemCtl->EventManager->event) EVENT_TMDWN2, and
when timer expires a EVENT_TMDWN1.
- void TIMERStop(void)
Stos the count down timer.
- int NextExecute(char *exename)
Terminate the present program and start the one specified in exename.
- int ChildExecute(char *path,int *rcode)
Executes the child program (a program that's loaded in the range
0x10D700-0x10F1FF, max 6.75kB) and puts it's return code in rcode.
- void CheckExecute(void)
Runs the check.exf program so alarm information is reloaded.
- void dispNowWeek(int x,int y,int font,int dot,int
mode)
Displays the weekday in the specified position with the specified font and
dot dots between letters (using resource pSystemCtl->CPUram)
- void dispNowDate(int x,int y,int font,int dot,int
YearNotDisp)
Displays the date (YearNotDisp: 0=w/o year, 1=with year) in the specified
position with the specified font and dot dots between letters (resource
pSystemCtl->CPUram)
- void dispNowAmPm(int x,int y,int font,int dot)
Displays if it's AM or PM in the specified position with the specified font
and dot dots between letters (resource pSystemCtl->CPUram)
- int dispNowTime(int x1,int x2,int x3,int y,int
font,int dot,int Alldisp)
Displays the time [hour, minute] at the position specified for the hour, the
separator and the minutes, using the specified font and dot
letter-separation (Alldisp: 0=display only the changed digit(s), 1=display
all) (resource pSystemCtl->CPUram)
- void dispNowSec(int x,int y,int font,int dot,int
Alldisp)
Displays the time [seconds] at the position specified using the specified
font and dot letter-separation (Alldisp: 0=display only the changed digit(s),
1=display all) (resource pSystemCtl->CPUram)
- int pauseScroll(int repkey,int flg,int y)
When repkey equals flg it returns -1, and increments an internal counter.
When the internal counter reachs 6 it draws a scroll jump mark (downwards if
flg is BKey_dw and upwards if flg is BKey_up) at the specified y position
and returns 0. Otherwise it returns 0. To be of use it must be used as in
"while(pauseScroll(Bkey_up,Bkey_up,30));" or as in
"while(pauseScroll(Bkey_dw,Bkey_dw,30));".
- int getFilerVersion(void)
Returns the filer version.
Extended psdos Functions
Extended wbios Functions
- int bi_vwrflush(void)
Flush data write buffers into flash memory. Must be called after file close
if there has been file write operations
- int bi_vsecread(int drv,int head,int cyl,int
secno,int snum,void *rbuf)
Reads snum sectors into rbuf from the specified drive, head, cylinder and
secno
- int bi_vsecwrite(int drv,int head,int cyl,int
secno,int snum,void *wbuf)
Writes snum sectors into rbuf from the specified drive, head, cylinder and
secno
Written with the information provided in the onHand
manuals. Copyleft by dario@softhome.net
This text is distributed under the GNU FDL. Last updated (dd/mm/yyyy):
21/10/2001
|