home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / msdos / graphics / tcxl.arc / TCXLQREF.DOC < prev    next >
Text File  |  1988-05-13  |  16KB  |  781 lines

  1.  
  2.                             TCXL Quick Reference
  3.                             --------------------
  4.  
  5. TCXLDEF.H   - Miscellaneous Functions
  6. -------------------------------------
  7.  
  8. void beep(void);
  9. sounds a beep in the speaker
  10.  
  11. char *biosver(void);
  12. returns the BIOS version date
  13.  
  14. int clockcal(void);
  15. determines if a clock-calendar board is installed
  16.  
  17. void delay_(unsigned duration);
  18. delays program execution for a specified time period
  19.  
  20. unsigned expmem(void);
  21. determines the amount (if any) of expanded memory on the system
  22.  
  23. unsigned extmem(void);
  24. determines the amount of extended memory on an AT machine
  25.  
  26. int gameport(int equip);
  27. determines if a game port is installed
  28.  
  29. int machid(void);
  30. returns the value of the machine ROM ID byte
  31.  
  32. int mathchip(int equip);
  33. determines if a math coprocessor is installed
  34.  
  35. int numflop(int equip);
  36. returns the number of floppy disk drives installed
  37.  
  38. int numpar(int equip);
  39. returns the number of parallel ports
  40.  
  41. int numser(int equip);
  42. returns the number of serial ports installed
  43.  
  44. void sound_(unsigned pitch,unsigned duration);
  45. sounds a tone in the speaker for specified pitch and duration
  46.  
  47. int tabstop(int col,int tabwidth);
  48. calculates a tab stop from given column and tab width
  49.  
  50. unsigned long timer(void);
  51. returns the value of the BIOS timer
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.                                       1    
  61.  
  62.  
  63. TCXLDSK.H   - Disk Functions
  64. ----------------------------
  65.  
  66. int disktoscrn(char *fname);
  67. copies a saved screen disk file to screen
  68.  
  69. int disktowin(char *fname);
  70. copies a saved window disk file to screen
  71.  
  72. int fcmpdatm(char *fname1,char *fname2);
  73. compares the dates and times of 2 files
  74.  
  75. int fexist(char *fname);
  76. determines if a disk file exists
  77.  
  78. int fhide(char *filename);
  79. hides a disk file
  80.  
  81. unsigned getktot(int drive);
  82. gets the total disk space in kilobytes
  83.  
  84. char *getvol(char drive);
  85. gets the volume label from a disk drive
  86.  
  87. int scrntodisk(char *fname);
  88. copies the current screen to a disk file
  89.  
  90. int wintodisk(int srow,int scol,int erow,int ecol,char *fname);
  91. copies a window of the screen to a disk file
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.                                       2    
  121.  
  122.  
  123. TCXLEMS.H   - EMS Functions
  124. ---------------------------
  125.  
  126. unsigned emsalloc(int numpages);
  127. allocates pages of EMS memory
  128.  
  129. int emsdealloc(int handle);
  130. deallocates previously allocated pages of EMS memory
  131.  
  132. int emsexist(void);
  133. determines if the EMS device driver is loaded.
  134.  
  135. unsigned emsframe(void);
  136. returns the EMS page frame base address
  137.  
  138. unsigned emsfree(void);
  139. returns the number of free EMS pages (16K blocks)
  140.  
  141. int emsmap(int handle,int lpage,int ppage);
  142. maps a logical EMS page onto a physical page address
  143.  
  144. int emsread(void *dest,unsigned emsofs,unsigned numbytes);
  145. reads bytes from an EMS page(s)
  146.  
  147. unsigned emstotal(void);
  148. returns the total number of EMS pages (16K blocks) on the system
  149.  
  150. char *emsver(void);
  151. returns the current EMS version
  152.  
  153. int emswrite(void *src,unsigned emsofs,unsigned numbytes);
  154. writes bytes to an EMS page(s)
  155.  
  156. unsigned expmem(void);
  157. determines the amount (if any) of expanded memory on the system
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.                                       3    
  181.  
  182.  
  183. TCXLKEY.H   - Keyboard Functions
  184. --------------------------------
  185.  
  186. void capsoff(void);
  187. toggles the CapsLock key off
  188.  
  189. void capson(void);
  190. toggles the CapsLock key on
  191.  
  192. void clearkeys(void);
  193. clears the keyboard buffer
  194.  
  195. int getchf(char *valid);
  196. gets a character from the keyboard from a list of valid characters
  197.  
  198. int getns(char *str,int max);
  199. inputs a string of specified length from the keyboard
  200.  
  201. void getxch(int *ch,int *xch);
  202. gets a key (ASCII code/extended ASCII code) from the keyboard
  203.  
  204. int inputsf(char *str,char *fmt);
  205. inputs a formatted string from the keyboard
  206.  
  207. int kbstat(void);
  208. returns the status of the keyboard control keys
  209.  
  210. void numoff(void);
  211. toggles the NumLock key off
  212.  
  213. void numon(void);
  214. toggles the NumLock key on
  215.  
  216. void prompts(char *prompt,char *str);
  217. prompts for a string and accepts keyboard input
  218.  
  219. int waitkey(void);
  220. halts execution until a key is pressed, the keyboard buffer is cleared first
  221.  
  222. int waitkeyt(int duration);
  223. halts execution until a key is pressed or specified time expires
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.                                       4    
  241.  
  242.  
  243. TCXLMOU.H   - Microsoft Mouse Functions
  244. ---------------------------------------
  245.  
  246. void msbpress(int button,int *bstat,int *bcount,int *x,int *y);
  247. gets info about specific button presses of mouse
  248.  
  249. void msbreles(int button,int *bstat,int *bcount,int *x,int *y);
  250. gets info about specific button releases of mouse
  251.  
  252. void mscursor(int curtype,int smask,int cmask);
  253. sets the mouse cursor mode
  254.  
  255. void msgotoxy(int x,int y);
  256. sets the mouse coordinates
  257.  
  258. void mshbounds(int left,int right);
  259. sets the mouse horizontal bounds
  260.  
  261. void mshidecur(void);
  262. hides the mouse cursor
  263.  
  264. int msinit(void);
  265. initializes mouse/determines if present
  266.  
  267. void msmotion(int *xcount,int *ycount);
  268. gets info about movement of mouse
  269.  
  270. void msshowcur(void);
  271. reveals the mouse cursor
  272.  
  273. void msspeed(int xratio,int yratio);
  274. adjusts the mouse sensitivity
  275.  
  276. void msstatus(int *bstat,int *x,int *y);
  277. gets the mouse status
  278.  
  279. void msvbounds(int top,int bottom);
  280. sets the mouse vertical bounds
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.                                       5    
  301.  
  302.  
  303. TCXLPRN.H   - Printer Functions
  304. -------------------------------
  305.  
  306. void lcrlf(void);
  307. prints a carriage return and line feed on the printer
  308.  
  309. void lprintc(int ch);
  310. prints a character on the printer
  311.  
  312. void lprintf(const char *format,...);
  313. sends formatted output to the printer
  314.  
  315. void lprintns(char *str,int width);
  316. prints a string on the printer, formatting width
  317.  
  318. void lprints(char *str);
  319. prints a string on the printer
  320.  
  321. void lprintsb(char *str,int reps);
  322. prints a bold-faced string on the printer
  323.  
  324. void lprintsu(char *str);
  325. prints an underlined string on the printer
  326.  
  327. void scrndump(void);
  328. dumps the current screen to the printer
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.                                       6    
  361.  
  362.  
  363. TCXLSTR.H   - String and Character Functions
  364. --------------------------------------------
  365.  
  366. int cvaltype(int ch,int ctype);
  367. tests a character with character type code, checking validity
  368.  
  369. char *strbmatch(char *str,char *strarr[]);
  370. returns the best match of a string in an array of strings
  371.  
  372. char *strchg(char *str,char oldch,char newch);
  373. changes all matching characters in a string to another
  374.  
  375. char *strcode(char *str,int key);
  376. encodes/decodes a string
  377.  
  378. char *strdel(char *substr,char *str);
  379. deletes a substring from within a string
  380.  
  381. char *strichg(char *str,char oldch,char newch);
  382. changes all matching characters in a string to another, ignores case
  383.  
  384. char *stridel(char *substr,char *str);
  385. deletes a substring from within a string, ignores case
  386.  
  387. char *striinc(char *str1,char *str2);
  388. determines if one string is included in another, ignores case
  389.  
  390. char *strinc(char *str1,char *str2);
  391. determines if one string is included in another
  392.  
  393. char *strins(char *instr,char **str,int st_pos);
  394. inserts one string into another
  395.  
  396. int striocc(char *str,int ch);
  397. returns the number of occurrences of a character in a string, ignores case
  398.  
  399. char *strleft(char *str,int num_chars);
  400. returns a new substring from the left of a string
  401.  
  402. char *strltrim(char **str);
  403. trims leading spaces from a string
  404.  
  405. int strmatch(char *str1,char *str2);
  406. compares 2 strings, returns a match score
  407.  
  408. char *strmid(char *str,int st_pos,int num_chars);
  409. returns a new substring from the middle of a string
  410.  
  411. int strocc(char *str,int ch);
  412. returns the number of occurrences of a character in a string
  413.  
  414. char *strright(char *str,int num_chars);
  415. returns a new substring from the right of a string
  416.  
  417. char *strrol(char *str,int count);
  418.  
  419.  
  420.                                       7    
  421. rotates a string specified number of characters left, characters wrap around
  422.  
  423. char *strror(char *str,int count);
  424. rotates a string specified number of characters right, characters wrap around
  425.  
  426. char *strsetsz(char **str,int newsize);
  427. adjusts the length of a string by truncation or padding with spaces
  428.  
  429. char *strshl(char *str,int count);
  430. shifts a string specified number of characters left, characters 'drop off'
  431.  
  432. char *strshr(char *str,int count);
  433. shifts a string specified number of characters right, characters 'drop off'
  434.  
  435. char *strtrim(char *str);
  436. trims trialing spaces from a string
  437.  
  438. char *struplow(char *str);
  439. converts a string to mixed upper and lower case characters
  440.  
  441. int touplow(char *str,char *pos,int ch);
  442. converts a character to upper or lower case depending on previous character
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.                                       8    
  481.  
  482.  
  483. TCXLVID.H   - Video and Screen Functions
  484. ----------------------------------------
  485.  
  486. int attrib(int fore,int back,int bright,int blink);
  487. creates an attribute
  488.  
  489. void box(int srow,int scol,int erow,int ecol,int btype,int attr);
  490. draws a box on the screen
  491.  
  492. void boxd(int srow,int scol,int erow,int ecol,int btype,int attr);
  493. draws a box directly on the screen (no BIOS calls)
  494.  
  495. void clreol_(void);
  496. clears to the end of line
  497.  
  498. void clrscrn(void);
  499. clears the screen and homes the cursor
  500.  
  501. void clrwin(srow,scol,erow,ecol);
  502. clears a window of the screen
  503.  
  504. int disktoscrn(char *fname);
  505. copies a saved screen disk file to screen
  506.  
  507. void fill(int srow,int scol,int erow,int ecol,int ch,int attr);
  508. fills in a region of the screen with specified character/attribute
  509.  
  510. void filld(int srow,int scol,int erow,int ecol,int ch,int attr);
  511. fills in a region of screen with specified character/attribute (no BIOS calls)
  512.  
  513. void gotoxy_(int row,int col);
  514. sets cursor coordinates on the screen
  515.  
  516. void home(void);
  517. homes the cursor (row 0, column 0)
  518.  
  519. void mode(int mode_code);
  520. sets the video mode
  521.  
  522. void printc(int row,int col,int attr,int ch,int count);
  523. prints a character to the screen at specified location and attribute
  524.  
  525. void printcd(int row,int col,int attr,int ch);
  526. prints a character directly to the screen at specified location and attribute
  527.  
  528. void prints(int row,int col,int attr,char *str);
  529. displays a string on the screen at specified location and attribute
  530.  
  531. void printsd(int row,int col,int attr,char *str);
  532. displays a string directly on the screen at specified location and attribute
  533.  
  534. int readchat(void);
  535. reads the character and attribute under the cursor
  536.  
  537. void readcur(int *row,int *col);
  538.  
  539.  
  540.                                       9    
  541. reads the current cursor location
  542.  
  543. void revattr(int count);
  544. reverses the attribute of the character under the current cursor location
  545.  
  546. int scrntodisk(char *fname);
  547. copies the current screen to a disk file
  548.  
  549. void setattr(int attr,int count);
  550. sets the attribute of the character under the current cursor location
  551.  
  552. void setcursz(int sline,int eline);
  553. sets the cursor size
  554.  
  555. int setlines(int numlines);
  556. sets the number of lines on the display
  557.  
  558. void spc(int num);
  559. displays a specified number of spaces to the screen
  560.  
  561. void srestore(int *sbuf);
  562. restores a previously saved screen
  563.  
  564. int *ssave(void);
  565. saves the current screen to a buffer
  566.  
  567. void videoinit(void);
  568. initializes TCXL's video system to the present video setup
  569.  
  570. int vidtype(void);
  571. returns the video display adapter type
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.                                       10   
  601.  
  602.  
  603. TCXLWIN.H   - Windowing Functions
  604. ---------------------------------
  605.  
  606. int attrib(int fore,int back,int bright,int blink);
  607. creates an attribute
  608.  
  609. int disktowin(char *fname);
  610. copies a saved window disk file to screen
  611.  
  612. int vidtype(void);
  613. returns the video display adapter type
  614.  
  615. int wactiv(int whandle);
  616. activates an already opened window
  617.  
  618. int wcclear(int attr);
  619. clears the active window using specified attribute
  620.  
  621. int wchgattr(int newattr);
  622. changes attribute of the active window
  623.  
  624. int wclear(void);
  625. clears the active window
  626.  
  627. int wclose(void);
  628. closes the active window
  629.  
  630. int wcloseall(void);
  631. closes all open windows
  632.  
  633. int wclreol(void);
  634. clears to the end of the active window's line
  635.  
  636. int wcopy(int nsrow,int nscol);
  637. creates a new window duplicating the active window, becomes the active window
  638.  
  639. char *werrmsg(void);
  640. returns an error message from the last windowing function
  641.  
  642. int wgetc(void);
  643. gets a character from the keyboard within the active window
  644.  
  645. int wgetchf(char *valid);
  646. gets a character from the keyboard within the active window
  647.  
  648. int wgetns(char *str,int maxlen);
  649. gets a string from the keyboard within active window, limits length of input
  650.  
  651. int wgets(char *str);
  652. gets a string from the keyboard within the active window
  653.  
  654. int wgotoxy(int wrow,int wcol);
  655. plots cursor coordinates within the active window
  656.  
  657. int *whide(int **wbuf);
  658.  
  659.  
  660.                                       11   
  661. hides a previously saved window
  662.  
  663. int whline(int wsrow,int wscol,int count,int btype);
  664. draws a horizontal text line in active window
  665.  
  666. int winpdef(int wrow,int wcol,char *str,int ftype,int fattr);
  667. defines an area of the active window for keyboard input
  668.  
  669. int winpread(void);
  670. processes keyboard of all defined areas of active window, allows full editing
  671.  
  672. int winputsf(char *str,char *fmt);
  673. inputs a formatted string from the keyboard within a window
  674.  
  675. int wintodisk(int srow,int scol,int erow,int ecol,char *fname);
  676. copies a window of the screen to a disk file
  677.  
  678. int wisactiv(int whandle);
  679. determines if specified window handle is active
  680.  
  681. int wmbardef(int wrow,int wcol,int attr,char *str,int tagchar);
  682. defines a window bar menu option
  683.  
  684. int wmbarget(int barattr,int taginit,int pulldown);
  685. gets a window bar-selection menu selection from the keyboard
  686.  
  687. int wmbarxcel(void);
  688. cancels all defined window bar menu options
  689.  
  690. int wmove(int nsrow,int nscol);
  691. moves the active window to a new location
  692.  
  693. int wnopen(void);
  694. returns the number of open windows
  695.  
  696. int wopen(int srow,int scol,int erow,int ecol,int btype,int attr);
  697. opens a screen window and makes it active
  698.  
  699. int wpgotoxy(int wrow,int wcol);
  700. plots pseudo cursor coordinates within the active window by wrapping around
  701.  
  702. int wprintc(int row,int col,int attr,int ch);
  703. prints a character in the active window, does not adjust cursor position
  704.  
  705. int wprintf(const char *format,...);
  706. outputs a formatted string to active window, works like printf() does
  707.  
  708. int wprints(int row,int col,int attr,char *str);
  709. prints a string in the active window, does not adjust cursor position
  710.  
  711. int wputc(int ch);
  712. prints a character in the active window at current cursor location
  713.  
  714. int wputns(char *str,int width);
  715. prints a string in the active window, formats width of output
  716.  
  717. int wputs(char *str);
  718.  
  719.  
  720.                                       12   
  721. prints a string in the active window at the current cursor location
  722.  
  723. void wrestore(int *wbuf);
  724. restores a previously saved window of screen memory
  725.  
  726. int *wsave(int srow,int scol,int erow,int ecol);
  727. saves a window of screen memory
  728.  
  729. int wscanf(const char *format,...);
  730. inputs a formatted string from the keyboard, works like scanf() does
  731.  
  732. int wscroll(int count,int direction);
  733. scrolls text within the active window, up or down
  734.  
  735. int wsetesc(int option);
  736. turns Escape checking for several window input functions on/off
  737.  
  738. int wsize(int nerow,int necol);
  739. adjusts the size of the active window
  740.  
  741. int wtextattr(int attr);
  742. sets the default text attribute of the active window
  743.  
  744. int wtitle(char *str,int tpos);
  745. gives active window a title
  746.  
  747. int *wunhide(int **wbuf);
  748. unhides a previously hidden window
  749.  
  750. int wvline(int wsrow,int wscol,int count,int btype);
  751. draws a vertical text line in active window
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.                                       13   
  781.