docs: add extra sdk docs
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
CHAPTER 7
|
||||
|
||||
|
||||
PROGRAMMING IN HWIF
|
||||
|
||||
|
||||
This document is a beta version and may be subject to change.
|
||||
|
||||
|
||||
This chapter describes the changes and additions that have been made to the HWIF library as a result of the
|
||||
introduction of the Siena and Series 3c machines into the SIBO range.
|
||||
|
||||
|
||||
Grey lines in menus
|
||||
|
||||
|
||||
The introduction of small fonts for dialogs on the Workabout and Siena resulted in a change to the data
|
||||
structures in the property of the GATE class. This caused an inconsistency in the Hwif library between the
|
||||
Series 3a and later machines in the way that it stores the positions of grey lines in menus. For reasons of
|
||||
future consistency, the change has been incorporated in all SIBO machines with ROM version numbers of
|
||||
Ox356F and above. It is therefore present in Workabout, Siena and Series 3c machines, although Series 3c
|
||||
dialogs do not need to make use of the small font.
|
||||
|
||||
|
||||
A suitably written Hwif application that makes no use of grey lines in menus will run on any SIBO
|
||||
machine, regardless of the version of the Hwif library that was used to build it. However, any Hwif
|
||||
application that uses grey lines in its menus and was built with the version of Hwif supplied with version
|
||||
2.10 of the SIBO C SDK will not run on Series 3a machines. Such applications that were built with earlier
|
||||
versions of Hwif will run on the Series 3a, but not on the Workabout, Siena or Series 3c.
|
||||
|
||||
|
||||
All Hwif programs that are linked with the modified Hwif library that is described below can run on the
|
||||
Series 3, Series 3a, Series 3c, Workabout and Siena - provided, of course, that their displays are tailored to
|
||||
the various screen sizes and graphics capabilities of these machines.
|
||||
|
||||
|
||||
Hwif library modification
|
||||
|
||||
|
||||
The Building the Hwif library section in the Advanced use of Hwif chapter of the Programming in Hwif
|
||||
manual explains how to build a customised version of the Hwif library, using the Hwif source files
|
||||
provided with the SIBO C SDK. Before making the modification that is described in this section, you
|
||||
should verify that you can build the existing Hwif library.
|
||||
|
||||
|
||||
The required modification is to the hMenuRun function, which can be found in the hhwif-c source file. The
|
||||
published source for this function is:
|
||||
|
||||
|
||||
GLDEF_C INT hMenuRun ()
|
||||
/*
|
||||
Display and use the menu bar
|
||||
*/
|
||||
{
|
||||
if (_GreyLines)
|
||||
p_bcpy (&DatGate->gate.g.ulines[0], GreyLines,16*sizeof (UWORD) ) ;
|
||||
return (p_send3 (DatGate,O GT MENU RUN, MenuPositions) );
|
||||
}
|
||||
|
||||
|
||||
This needs to be modified as shown below, to take into account the changed data structure that was
|
||||
introduced with ROM version 3.56F:
|
||||
|
||||
|
||||
SIENA/SERIES 3C UPGRADE
|
||||
|
||||
|
||||
GLDEF_C INT hMenuRun ()
|
||||
/*
|
||||
Display and use the menu bar
|
||||
af
|
||||
{
|
||||
if (_GreyLines)
|
||||
{
|
||||
p_bcpy( (BYTE *) &DatGate->gate.g.ulines [0]
|
||||
-((p_version()>0x355f) ? 0 : sizeof (DLG _X CONSTANTS) ),
|
||||
_GreyLines,16*sizeof (UWORD) );
|
||||
}
|
||||
return (p_send3(DatGate,O GT MENU RUN, MenuPositions) );
|
||||
}
|
||||
|
||||
|
||||
Once the source file has been modified in this way, you should rebuild the Hwif library and use the rebuilt
|
||||
version when developing Hwif applications for any target SIBO machine.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user