% % This file is a product of Sun Microsystems, Inc. and is provided for % unrestricted use provided that this legend is included on all tape % media and as a part of the software program in whole or part. Users % may copy or modify this file without charge, but are not authorized to % license or distribute it to anyone else except as part of a product % or program developed by the user. % % THIS FILE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE % WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR % PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. % % This file is provided with no support and without any obligation on the % part of Sun Microsystems, Inc. to assist in its use, correction, % modification or enhancement. % % SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE % INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS FILE % OR ANY PART THEREOF. % % In no event will Sun Microsystems, Inc. be liable for any lost revenue % or profits or other special, indirect and consequential damages, even % if Sun has been advised of the possibility of such damages. % % Sun Microsystems, Inc. % 2550 Garcia Avenue % Mountain View, California 94043 % % % NeWS.cps 1.5 88/01/18 % % Copyright (c) 1987 by Sun Microsystems, Inc. % Steve Isaac 12/18/87 % #define T_INITIALIZE 0 #define T_CHANGEFONT 1 #define T_GETSCREENSIZE 2 #define T_GETCURSORPOS 3 #define T_SETCURSORSHAPE 4 #define T_SIZECHANGED 5 #define T_KEYHIT 6 #define T_INSERTSELSTRING 7 #define T_INSERTSELLENGTH 8 #define T_GETLINELENGTH 9 #define T_EXIT 10 cdef ps_initialize(string inittitle, initsave_lines, initcol, initrow, initpixwidth, initpixheight) => T_INITIALIZE (initpixheight, initpixwidth, initrow, initcol) /TitleStripe inittitle def /TextCanvasSize initsave_lines def /hourg /hourg_m framebuffer setstandardcursor #include "NeWSwin.ps" #include "NeWSSbar.ps" #include "textcan.ps" /ptr /ptr_m framebuffer setstandardcursor #include "nterm.ps" cdef ps_changefont(font, height, successfull) => T_CHANGEFONT (successfull) font height A T_CHANGEFONT tagprint typedprint cdef ps_startwrite() [ cdef ps_write(cstring s) s cdef ps_finishwrite(insertflag, x, y) ] insertflag 0 eq {false} {true} ifelse x y B cdef ps_insertstring(cstring s, x, y) [s] true x y B cdef ps_deletestring(len, x, y) len x y E cdef ps_insertline(numlines, y) numlines y F cdef ps_deleteline(numlines, y) numlines y G cdef ps_setscrollinglimits(beginrow, endrow) beginrow endrow H cdef ps_removescrollinglimits() I cdef ps_clearscreen() J cdef ps_flashscreen() K cdef ps_getscreensize(col, row, pixwidth, pixheight) => T_GETSCREENSIZE (pixheight, pixwidth, row, col) L T_GETSCREENSIZE tagprint typedprint typedprint typedprint typedprint cdef ps_oncaret() M cdef ps_offcaret() N cdef ps_movecaret(x, y) x y O cdef ps_movecaretdelta(deltax, deltay) deltax deltay P cdef ps_getcaretpos(x, y) => T_GETCURSORPOS (y, x) Q T_GETCURSORPOS tagprint typedprint typedprint cdef ps_setcaretblink(blinktime, dutycycle) blinktime dutycycle R cdef ps_setcaretcolor(r, g, b) r g b S cdef ps_setcaretshape(string shapename, successfull) => T_SETCURSORSHAPE (successfull) shapename T T_SETCURSORSHAPE tagprint typedprint cdef ps_reversevideo() true U cdef ps_normalvideo() false U cdef ps_getlinelength(linenum, len) => T_GETLINELENGTH (len) linenum V T_GETLINELENGTH tagprint typedprint cdef ps_sizechanged(col, row, pixwidth, pixheight) => T_SIZECHANGED (pixheight, pixwidth, row, col) cdef ps_keyhit(key) => T_KEYHIT (key) cdef ps_insertselstring(string s) => T_INSERTSELSTRING (s) cdef ps_insertsellength(l) => T_INSERTSELLENGTH (l) cdef ps_exit() => T_EXIT