home *** CD-ROM | disk | FTP | other *** search
-
- XES Data Structures
- ===================
-
- Assembler declaration of an XES parameter block structure:
-
- WNX_id ds.w 1 one word I.D. number
- WNX_idname ds.b 16 unique 16 byte identifier
- WNX_apid ds.w 1 application I.D. of parent
- WNX_grafhandle ds.w 1 graphics handle of parent
- WNX_global ds.l 1 ptr to parent's GLOBAL array
- WNX_vdiparams ds.l 1 ptr to parent's VDI array
- WNX_aesparams ds.l 1 ptr to parent's AES array
- WNX_messagebuf ds.l 1 ptr to parent's message buffer
- WNX_in ds.w 8 WNX_in array (8 words)
- WNX_out ds.w 8 WNX_out array (8 words)
- WNX_flags ds.w 1 event flags {a la evnt_multi}
- WNX_link ds.l 1 address for resuming execution
- WNX_tcount ds.w 1 timer count in 20ms increments
- WNX_troutine ds.l 1 address of TIMER routine
- WNX_mroutine ds.l 1 address of MESSAGE routine
- WNX_broutine ds.l 1 address of BUTTON routine
- WNX_kroutine ds.l 1 address of KEYBOARD routine
- WNX_rroutine ds.l 1 address of REDRAW routine
- WNX_termroutine ds.l 1 address if WNX terminates
-
-
-
- C definition of an XES parameter block structure:
-
- typedef struct {
- int WNX_id; /* unique WNX application i.d. */
- char WNX_idname[16]; /* unique 16 byte identifier */
- int WNX_apid; /* application I.D. of parent */
- int WNX_grafhandle; /* graf_handle of parent */
- long WNX_global; /* ptr to parent's GLOBAL array */
- long WNX_vdiparams; /* ptr to parent's VDI array */
- long WNX_aesparams; /* ptr to parent's AES array */
- long WNX_messagebuf; /* ptr to parent's message buffer */
- int WNX_in[8]; /* WNX_in array (8 words) */
- int WNX_out[8]; /* WNX_out array (8 words) */
- int WNX_flags; /* event flags like evnt_multi */
- long WNX_link; /* address for resuming execution */
- int WNX_tcount; /* timer count (in 20ms increments) */
- void (*WNX_troutine)(); /* ptr to the routine to be run on timer event */
- void (*WNX_mroutine)(); /* this is for the message routine */
- void (*WNX_broutine)(); /* this is for the left button click routine */
- void (*WNX_kroutine)(); /* this is for the keyboard routine */
- void (*WNX_rroutine)(); /* this is the for redraws */
- void (*WNX_termroutine)(); /* this is when the WNX terminates */
- }xesparmblk;
-
-
-
- * NOTE: WNX_in is defined in XESBLK.H as an array of 8 words, so
- * to access variables, remember that WNX_in+2 in assembler would
- * refer to WNX_in(1) in C!
-
-
-
- XES Function Calls (8/23/91)
- ============================
-
- XES_submit:
- This allows a WNX written in a high level language to end a routine
- without using the low-level assembler RTS function. This function
- is NECESSARY at initialization time for the WNX.
-
- C syntax:
- xes_submit(&xparmblk)
-
- in: none.
-
- out: none.
-
-
-
- XES_init:
- Tells Wind-XES the pointer to this application's XES
- parameter block.
-
- C syntax:
- xes_init(&xparmblk)
-
- in: d1 = ptr to new parmblk.
-
- out: parmblk variables filled with all kinds of goodies.
-
-
-
- XES_rsrcinit:
- This fixes up a resource, if needed, and (most importantly)
- corrects some data structures internal to Wind-XES.
-
- C syntax:
- xes_rsrcinit(fixflag,scaleflag,treeptr,&xparmblk)
-
-
- in: WNX_in(0).W = fixup flag... if 0, no fixup of the .RSC is
- requested.
- WNX_in(1).W = scaling (0 = none, 1 = normal GEM, 2 = perfect fix)
- WNX_in(2).L = if WNX_in(0) = 0, ptr to binary resource file.
- if WNX_in(0) != 0, ptr to an area of memory that
- is identical to a .RSC file on a disk, with the
- exception that it already has been fixed up.
-
- out: WNX_out(0).W = number of trees in RSC.
- WNX_out(1).L = address of first tree in RSC.
- WNX_out(3).L = address of the tree list in RSC.
-
- or: 0 for all WNX_out(0) - WNX_out(3) if failed.
-
-
-
- XES_sibling:
- The eXtended Environment System's way to identify duplicates of
- the same task by their unique i.d's. WNX_in(0) should be a ptr to
- the string to search for.
- (NOTE: Walk through WNX_secret!)
-
- C syntax:
- xes_sibling(&string,&xparmblk)
-
- in: WNX_in(0).L = ptr to 16 byte i.d.
-
- out: WNX_out(0).W = number of matches.
- WNX_out(1).L = ptr to tempbuf
-
-
-
- XES_inqsibling:
- The eXtended Environment System can allow a WNX to pick a sibling
- find out information about.
-
- (NOTE: Walk through WNX_secret!)
-
- in: WNX_in(0).L = ptr to 16 byte i.d.
- WNX_in(2).W = WNX i.d. number of process to inquire.
-
- out: WNX_out(0).L = pointer to information about WNX.
-
-
-
- XES_mesagwrite:
- The eXtended Environment System can allow a WNX to write messages
- selectively to another WNX process.
-
- C syntax:
- xes_mesagwrite(&message,length,&recipientlist,&xparmblk)
-
- in: WNX_in(0).L = pointer to recipient list/ap_id of ACC to send to.
- WNX_in(2).W = length of message (up to 256 bytes)
- WNX_in(3).L = pointer to message
-
- out: none.
-
-
-
- XES_malloc:
- A way for a WNX to allocate RAM that will not be affected by
- the main application's actions. Under some revisions of TOS, when
- a m_alloc is done, if a program is running, its process descriptor
- is given to the OS. This circumvents that problem.
-
- C syntax:
- xes_malloc(amount,&xparmblk)
-
- in: WNX_in(0).L = amount of RAM to reserve.
-
- out: WNX_out(0).L = address of RAM in the system.
-
-
-
- XES_flush:
- A WNX can terminate itself.
-
- C syntax:
- xes_flush(&xparmblk)
-
- in: none.
-
- out: none.
-
-
-
- XES_genv:
- Returns a pointer to the vq_extnd parameters in WNX_out(0), and
- a ptr to the attributes of the current virtual workstation in
- WNX_out(2). This helps in finding out (or modifying) the current
- settings of the ST without performing GEM calls.
- (NOTE: this is the INQ_TAB area in the Line-A!)
-
- C syntax:
- xes_genv(&xparmblk)
-
- in: none.
-
- out: WNX_out(0).L = address of Line-A structure (from DC.W $A000).
- WNX_out(2).L = ptr to virtual workstation attributes (45 words).
- WNX_out(4).W = screen width (in pixels).
- WNX_out(5).W = screen height (in pixels).
- WNX_out(6).W = X scale of screen font to 8x8 font.
- WNX_out(7).W = Y scale of " " " " " " .
-
-
-
- XES_pwindow:
- Tells WNX how large (and where!) the parent's Wind-X window is.
-
- C syntax:
- xes_pwindow(&xparmblk)
-
- in: none.
-
- out: WNX_out(0).W = x coord of Wind-X window.
- WNX_out(1).W = y " " " " .
- WNX_out(2).W = width of Wind-X window.
- WNX_out(3).W = height of " " .
- WNX_out(4).W = x coord of desktop work area.
- WNX_out(5).W = y coord of " " " " .
- WNX_out(6).W = width of desktop work area.
- WNX_out(7).W = height of " " " " .
-
-
-
- XES_draw:
- The eXtended Environment System's objc_DRAW. This is intelligent
- enough to check the proper settings so as to update as neatly as
- possible. This can only be used on trees in the Wind-X window.
-
- C syntax:
- xes_draw(startindex,endindex,&xparmblk)
-
- in: WNX_in(0).W = index of starting object depth.
- WNX_in(1).W = index of ending object depth.
-
- out: none.
-
-
-
- XES_redraw:
- This is an objc_draw that is capable of drawing ANY resource
- in relation to the window it is to be displayed in.
-
- C syntax:
- xes_redraw(handle,aflag,treeptr,dflag,&xparmblk)
-
- in: WNX_in(0).W = window to redraw
- WNX_in(1).W = align to window x and y of work area if -1.
- WNX_in(2).L = ptr to resource tree
- WNX_in(4).W = 0 to just to align the .RSC, otherwise, draw.
-
- out: none.
-
-
-
- XES_chrsrc:
- This lets the application change the resource tree used in the
- Wind-X window that it is using.
-
- C syntax:
- xes_chrsrc(treenum,&xparmblk)
-
- in: WNX_in(0).W = new tree index.
-
- out: WNX_out(0).W = -1 if failed, or new tree index.
-
-
-
- XES_stredit:
- Automatically routes user input to a mini-text editor that
- validates against a template for an editable text object.
- This will take considerable amounts of sweat.
-
- C syntax:
- xes_stredit(handle,treeptr,index,ch,curspos,&xparmblk)
-
- in: WNX_in(0).W = handle of the window this stuff is in.
- WNX_in(1).L = address of resource tree.
- WNX_in(3).W = index of object (must be F_text or F_boxtext!)
- WNX_in(4).W = character to try to use.
- WNX_out(5).W = -1 or requested cursor position.
- (cursor position ranges from 0 to 4095)
-
- out: WNX_out(0).W = -1 if character was invalid, or ASCII value.
- WNX_out+1.W = -1 or cursor position.
-
-
-
- XES_xformdo:
- Tells Wind-X to handle the button press currently being
- processed in a similar manner to form_do under the GEM AES.
- By first checking the ob_flags we determine the exit conditions
- and if the object is not exitable, we return a -1.
- Users cannot interact with non-exitable or hidden objects!
-
- NOTE: Objects can change their ob_state in this area!
-
- C syntax:
- xes_xformdo(handle,treeptr,index,&xparmblk)
-
- in: WNX_in(0).W = handle of window this tree is in.
- WNX_in(1).L = address of resource tree.
- WNX_in(3).W = index of the object (-1 if unknown).
-
- out: WNX_out(0).W = index of selected object
-