home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 June
/
SIMTEL_0692.cdr
/
msdos
/
desqview
/
api_exam.arc
/
ASSEMBLY.DOC
< prev
next >
Wrap
Text File
|
1988-10-01
|
10KB
|
243 lines
API Details
In order for you to get a feel for the power built-in to each and every
DESQview, we've included a short description about each API command.
The DESQview 2.0 API is an objected-oriented interface. The data structures
DESQview uses to represent windows, mailboxes, etc. are called "objects".
A call to the API involves "sending a message" to an object, indicating
which of several operations you want performed on that data structure.
This is referred to as the "send interface". Almost the entire API
consists of sending one of 25 messages to one of 7 different object types.
The DESQview 2.0 API also has a non-object-oriented interface called
the "direct call interface". This is the small subset of API functions
that are not, by nature, object oriented or that are convenient alternatives
to the send interface.
The DESQview 2.0 API has a concise way of encoding a complete description
of a window so that a single call to the API can create the window,
fill it with the desired information, size and position it on the
display, and define fields that interact with the user. All this is
done using "Window Streams".
So that you can interrogate a window for its current contents, position,
etc., the DESQview 2.0 API also has "Query Streams". In fact, any
window parameter that can be set by a Window Stream can be read by
a Query Stream.
DESQview calls the portion of itself that interfaces with the user
the "Window Manager". Each time a user presses the DESQ key (normally
the Alt key) and makes a menu selection, it is the Window Manager
that opens, switches, rearranges and closes windows, transfers data,
displays help, or quits DESQview. In order for an application to have
the same power as the user, the DESQview 2.0 API has "Manager Streams".
Manager Streams enable an application to interact with the Window
Manager.
Using Manager Streams an application can, for example, ask the Window
Manager to make one of its windows the topmost window in the system,
disallow any resizing of the window by the user, and even notify
the application if the user tries to close the window. Using Manager
Streams an application can disallow use of the DESQview menu and DESQview
submenus.
But, there's still even more to the DESQview 2.0 API. DESQview provides
a comprehensive set of functions for simplifying the job of interfacing
with the user. Instead of dealing with user input a single character
at a time, your application can present entire menus, dialogue boxes,
help screens to DESQview and get back the resulting user input. Common
functions such as cursor control, insertion and deletion of characters,
tracking the mouse, and selection from option lists are performed
by DESQview. DESQview performs these functions under control of a
data structure called the "Field Table".
Information about a window's size, position, contents and Field Table
can be combined together into "Panels". Panels can be stored on disk
or in memory for later display. Panels can be constructed manually
or via the DESQview API Panel Design Tool.
DESQview 2.0 API Commands:
Send Interface Commands
WINDOW Objects
ADDTO write characters &attributes to a window
AT position the logical cursor
EOF return TRUE if cursor is past end window
ERASE clear a window
FREE close and free a window or a task
HANDLE return handle of current task's window
LEN return # characters/line in logical window
NEW create a new window or task
OPEN fill a window with a given character
READ read the next logical line from a window
READN read the next n characters/attributes
REDRAW redraw a window
SIZEOF return total # characters/logical window
SUBFROM write attributes to a window
WRITE write characters and/or command streams
KEYBOARD Objects
ADDTO set keyboard control flags
CLOSE close a keyboard object
ERASE discard all input queued to Keyboard
FREE free a Keyboard object
HANDLE return handle of task's default keybd
NEW create a new Keyboard object
OPEN attach a Keyboard to a window
READ get the next input from the Keyboard
SETESC intercept keystrokes to input fields
SIZEOF return # of input buffers queued
STATUS get the scan code for the last key read
SUBFROM clear keyboard control flags
WRITE add input buffer to Keyboard queue
MAILBOX Objects
ADDR return tender of the last message READ
ADDTO send a message and status by value
CLOSE close a Mailbox
ERASE discard all queued messages
FREE frees a Mailbox
HANDLE return handle of task's default mailbox
LOCK request exclusive access to a resource
NEW create a new Mailbox
OPEN open a Mailbox for input
READ get the next message from the queue
SETNAME assign a name to a Mailbox
SIZEOF return the # of messages in the queue
STATUS return status of the last message READ
SUBFROM send a message &status by reference
WRITE send a message by value with status=0
OBJECTQ Objects
CLOSE Close an Objectq
ERASE remove all objects from the queue
HANDLE return the handle of a task's Objectq
OPEN open the Objectq
READ wait for input from any open object
SIZEOF return the number of objects queued
STATUS return whether or not Objectq is open
SUBFROM remove specific object from queue
WRITE add an object to the Objectq
PANEL Objects
APPLY display a particular panel
CLOSE close a panel object
DIR return a pointer to the panel directory
FREE free a panel object
NEW create a panel object
OPEN associate panel object with a panel file
SIZEOF return the # of panels in a panel file
STATUS verify success of an OPEN or APPLY
POINTER Objects
ADDTO set pointer control flags
CLOSE stop taking pointer input
ERASE discard all pointer messages
FREE free a Pointer object
GETSCALE return the current scaling factors
NEW create a new Pointer object
OPEN start taking Pointer input for window
READ wait for the next pointer message
SETSCALE set the current scaling factors
SIZEOF return the number of messages queued
STATUS return the status of the last message
SUBFROM reset pointer control flags
WRITE move the pointer to a specified position
TIMER Objects
ADDTO start a timer for a specified interval
CLOSE close a Timer object
ERASE cancel the current timer interval
FREE free a Timer object
LEN return time remaining before expiration
NEW create a new Timer object
OPEN open a Timer object
READ wait for the current timer to expire
SIZEOF return elapsed time since timer started
STATUS return the status of the Timer object
WRITE start a timer to end at a specified time
Direct Call Interface Commands
APILEVEL define minimum API level required
APPNUM get the current application's number
BEGINC begin critical region
CSTYLE use C language style control codes
DBGPOKE poke debug information onto display
DISPEROR display an error message window
DVPRESENT determine if DESQview is present
ENDC end critical region
FINDMAIL find a mailbox by name
FREEBIT undefine second-level interrupt handler
GETBIT define a second-level interrupt handler
GETBUF get address of a Logical Window Buffer
GETMEM allocate buffer from System Memory
ISOBJ determine if a handle is valid
JUSTIFY turn off/on automatic justification
KMOUSE control the keyboard mouse
LOCATE find window at given screen location
NEWPROC start a new process
OSTACK switch to task's internal stack
PAUSE relinquish control to other tasks
PGMINT interrupt another task
POSTTASK awaken task by posting its Objectq
POSWIN position a window on the display
PRINTC display a character in a window
PUSHKEY push key into keyboard input stream
PUTMEM free a buffer allocated by GETMEM
SETBIT schedule a second-level interrupt handler
SHADOW get window buffer and start shadowing
SOUND make a sound
START start a task that was previously stopped
STOP stop a task until START is called
UPDATE update a portion of a window
USTACK switch off task's internal stack
Window Stream Commands
00 to 9F print strings (attributes,characters,blanks) to window
A0 to CF change size/ position of a window
D0 to DF set options for appearance of window:
frames, color, show/hide window, display of control characters
E0 to EF perform immediate actions:
clearing, scrolling, recoloring, redrawing window;
create new windows &repeat command sequences
F0 to FF define, read, write fields within window.
Query Stream Commands
same as Window Stream commands
Manager Streams
00 to 3F Allows specific DESQview commands:
move & resize window, scroll data, hide, rearrange program,
suspend application, display DESQview menu
40 to 71 notify application on specific DESQview commands.
84 to 8B specify environment of window:
suspend application when it is in background,
set application's asynchronous notification.
AE to BF enable/disable DESQview extensions.
C0 to FF reorder, hide, unhide, suspend resume
applications.