Version 0.0 October 23, 1995
By Bill Kendrick, (c) NBS 1995
Window: specifies a window in which activities are to
be done
Col: (color) defines a color in which to draw (eg
BLACK, CLEAR, WHITE, etc.)
LineMode: defines a mode in which to draw lines
(eg NORMAL, DASHED, etc.)
String: a character string (array)
Stat: status value (eg SUCCESS)
Font: specifies a font with which to draw text
Col's (Colors):
BLACK: black (foreground) color
WHITE: white (background) color
CLEAR: no color
LineMode's:
NORMAL: solid line
DASHED: dashed line
Stat's:
SUCCESS: command successful
FAILURE: command not successful, check
"ErrStr" for the error which occurred
NULL: Unassigned value (or error)
TRUE: True
FALSE: False
ErrStr: String storing the last error for the
client. (eg "Already connected!")
Stat Connect(Char Array Name, AppType)Name" is the program's name,
AppType" is the type of application it is (eg
"Demo").
SUCCESS or FAILURE.
Stat Disconnect()SUCCESS or FAILURE.
Byte GetDepth()NULL if not connected.
Byte GetWidth()NULL if not connected.
Byte GetHeight()NULL if not connected.
Stat GetModel(String Model,Ver,Date,Manuf)Model,Ver,Date,Manuf" are return buffers. It stores
"NONE" in all strings if an error occurred.
SUCCESS or FAILURE.
Int FontHeight(Font F)NULL
Int CharWidth(Font F, Char C)F" is the font.
C" is the character.
NULL
Stat DrawString(Window W, Int X,Y, String S, Col FC,BC,
Font F)S at position
X,Y in window W using the font
specified by the font ID F.
If the background is CLEAR, then only the
pixels of the characters will be drawn (no solid rectangle will be
behind them). If the foreground is CLEAR, then the image
behind the text will "show through" the background (if there is any).
W" is the window in which to draw,
X,Y" is the position (in pixels) for the top
left corner of the drawn string,
S" is the text to be drawn,
FC,BC" are the foreground (text) and background
(clearing solid) colors,
F" is the font to draw with.
SUCCESS or FAILURE.
Stat RaiseWin(Window WID)WID" is the window to raise
SUCCESS or FAILURE
Window OpenWin(Int X,Y,W,H,B, String Name)X,Y,W,H" are the (suggested) X/Y position of the top
left corner of the window and the width and height of the window,
B" is the thickness of the window's border,
Title" is the title for the window.
Window value or NULL if there
is an error.
Stat CloseWin(Window WID)SUCCESS or FAILURE.
Stat DrawLine(Window W, Int X1,Y1,X2,Y2, Col C, LineMode
M)W" is the window to draw in,
X1,Y1,X2,Y2" are the start and end points of the line,
C" is the color to draw the line in,
M" is the style in which to draw the line (eg
"DASHED").
SUCCESS or FAILURE.
Stat DrawRect(Window W, Int X,Y,Wi,H, Col OC, LineMode OM,
Col FC)DASHED").
CLEAR for an outline only)
SUCCESS or FAILURE.
Font LoadFont(String F)F into the server, if it
is not loaded already, and if it can be loaded.
F" is the filename of the font to load.
NULL.