home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 3
/
PDCD_3.iso
/
pocketbk
/
utilsf
/
hypoc2
/
HPIF.DOC
< prev
next >
Wrap
Text File
|
1994-11-05
|
22KB
|
555 lines
HyperPoc program interface:
===================================================================
Changes in Version 2.2
-------------------------------------------------------------------
OnTick A timer tick is now guaranteed when the OnTick bit
is set and the interval can be specified (default 1/2 sec)
helpClue new function to control help system.
===================================================================
HyperPoc V2 allows to define program objects. User written programs
can be executed on card open or on activation.
This interface, is however, unsupported. We cannot give information exceeding
the information offered with this text.
Program objects can:
1. Place any graphic information on the current card.
2. Display an own window
3. Manage events from keyboard and other devices
4. Access to other cards via predefined HyperPoc routines
5. Access to other files within the system
6. Create files
How to:
1. Installation
Make sure to include HCIF.OPA into the \APP\HYPERPOC folder.
If you do not plan to use Program objects, you don't need this module.
=======================================================================
2. Creation of program object
Write the required OPL module.
The module must start with
APP HYPERPOC
ENDA
PROC modnam%:(parm$)
modnam must be identical with the name of the module.
On invocation parm$ will contain the parameter string as defined in HyperPoc.
We suggest to store the program into the folder ...\APP\HYPERPOC\SUB\ .
However, it may be stored elsewhere, especially during debugging.
If you are creating your program on a PC, you may want to use OPLLINT
to check your program for missing definitions. Use HPREF.OPL to support
this process:
OPLLINT modnam hpref -imc -rmodnam
=======================================================================
3. Define program object on card or background.
This is done in the HyperPoc Editor (PSION-E or PSION-B) and PSION-P.
You are asked for the module name (modnam) and a parameter string.
This string will be passed to the module on invocation (parm$).
=======================================================================
4. Programming guidelines
a) Use never variable names starting with HY.
b) Use never subroutine names starting with HY.
c) Close any windows you have opened before returning control back
to HyperPoc.
d) !!!!!!!!!!!!!!!!!! Files !!!!!!!!!!!!!!!!!!!!
Never, never use file commands such as ERASE, UPDATE, APPEND
without preceeding them by a USE B/C/D statement.
Unsolicited use of these statements can cause the corruption of
your stacks.
The file handle A cannot be used because it is used by HyperPoc.
During the debugging stage make backup copies of all of your
stacks.
e) Stacks
Never access physically do stacks. Stack data structures may
change during updates and are not published for this reason.
HCIF provides a set of specialised routines for stack access (see below).
=======================================================================
5. Interface routines
cardnum% = findCd%:(stack$,srchmod%,srch$,addr(handle&))
This routine finds a card in the specified stack. Set handle& = 0 for
the first call. Subsequent calls will find other cards matching the
specified search criterion.
The function returns 0 when no (more) cards are found.
stack$ stack name (full path name).
srchmod% = 1 card text
2 card keywords
3 card number
srch$ = Text string, Keyword, or number
For srchmod% = 1 or = 2 srch$ may contain
wild cards (*,?)
handle& Card handle. To be used with other
access routines.
It is possible to manage different
cards simultanously using different
handle& and stack$ variables.
cardnum% logical card number
0 = no card found
2 = home card
>2 other cards
---------------------------------------------------------------------------
findBg:(stack$,addr(handle&))
This routine finds the background of the specified stack.
stack$ stack name (full path name).
handle& Background handle. To be used with other
access routines.
It is possible to manage different
backgrounds simultanously using different
handle& and stack$ variables.
The global variable ObjPar% will contain the hypertext emphasis
(gStyle format) of the specified stack.
---------------------------------------------------------------------------
obj% = CdObj%:(stack$,addr(handle&),ObjMsk&)
This routine returns objects of the current card or background
one by one with each call. When no more objects can be returned,
the result is 0.
The routine sets the following global variables:
ObjX%, ObjY%, ObjW%, ObjH%
ObjTxt$ (128)
ObjAttr$ (70)
ObjPar%
ObjX%, ObjY%, ObjW%, ObjH% contain object position and dimension.
ObjTxt$, ObjAttr$, ObjPar% depend on the object type
stack$ stack name (full path name).
handle& Card or background handle.
ObjMsk& Selection mask for objects.
2**obj% will select objects of type obj%
Combinations are possible.
E.g. 2**2+2**5 = 36 = &00000024
selects texts and phone numbers
Specify &ffffffff for all objects.
obj% = object type
0 no (more) object found
1 Application &00000002
2 Text &00000004
3 Card link &00000008
4 Icon &00000010
5 Phone # &00000020
6 Polyline &00000040
7 unused
8 Rectangle &00000100
9 Clock &00000200
10 Keywords &00000400
11 Bitmap &00000800
12 Music &00001000
13 Menu function &00002000
14 Round rectangle &00004000
15 HotTab &00008000
16 unused
17 Explainer &00020000
18 unused
19 Program &00080000
Application:
ObjTxt$ = File name (e.g. DATA.DAT)
ObjAttr$ = Application name (e.g. WORLD)
Text:
ObjTxt$ = character string
any character code n% < 32
represents a gap of n% pixels instead