Annotation of sbbs/src/conio/cterm.h, revision 1.1.1.1

1.1       root        1: /* $Id: cterm.h,v 1.13 2005/11/20 06:36:34 deuce Exp $ */
                      2: 
                      3: /****************************************************************************
                      4:  * @format.tab-size 4          (Plain Text/Source Code File Header)                    *
                      5:  * @format.use-tabs true       (see http://www.synchro.net/ptsc_hdr.html)              *
                      6:  *                                                                                                                                                     *
                      7:  * Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html         *
                      8:  *                                                                                                                                                     *
                      9:  * This library is free software; you can redistribute it and/or                       *
                     10:  * modify it under the terms of the GNU Lesser General Public License          *
                     11:  * as published by the Free Software Foundation; either version 2                      *
                     12:  * of the License, or (at your option) any later version.                                      *
                     13:  * See the GNU Lesser General Public License for more details: lgpl.txt or     *
                     14:  * http://www.fsf.org/copyleft/lesser.html                                                                     *
                     15:  *                                                                                                                                                     *
                     16:  * Anonymous FTP access to the most recent released source is available at     *
                     17:  * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net     *
                     18:  *                                                                                                                                                     *
                     19:  * Anonymous CVS access to the development source and modification history     *
                     20:  * is available at cvs.synchro.net:/cvsroot/sbbs, example:                                     *
                     21:  * cvs -d :pserver:[email protected]:/cvsroot/sbbs login                       *
                     22:  *     (just hit return, no password is necessary)                                                     *
                     23:  * cvs -d :pserver:[email protected]:/cvsroot/sbbs checkout src                *
                     24:  *                                                                                                                                                     *
                     25:  * For Synchronet coding style and modification guidelines, see                                *
                     26:  * http://www.synchro.net/source.html                                                                          *
                     27:  *                                                                                                                                                     *
                     28:  * You are encouraged to submit any modifications (preferably in Unix diff     *
                     29:  * format) via e-mail to [email protected]                                                                      *
                     30:  *                                                                                                                                                     *
                     31:  * Note: If this box doesn't appear square, then you need to fix your tabs.    *
                     32:  ****************************************************************************/
                     33: 
                     34: #ifndef _CTERM_H_
                     35: #define _CTERM_H_
                     36: 
                     37: #include <stdio.h>     /* FILE* */
                     38: 
                     39: enum {
                     40:         CTERM_MUSIC_NORMAL
                     41:        ,CTERM_MUSIC_LEGATO
                     42:        ,CTERM_MUSIC_STACATTO
                     43: };
                     44: 
                     45: enum {
                     46:         CTERM_LOG_NONE
                     47:        ,CTERM_LOG_ASCII
                     48:        ,CTERM_LOG_RAW
                     49: };
                     50: 
                     51: #define CTERM_LOG_MASK 0x7f
                     52: #define CTERM_LOG_PAUSED       0x80
                     53: 
                     54: struct cterminal {
                     55:        int     height;
                     56:        int     width;
                     57:        int     x;
                     58:        int     y;
                     59:        char *buffer;
                     60:        int     attr;
                     61:        int save_xpos;
                     62:        int save_ypos;
                     63:        char    escbuf[1024];
                     64:        int     sequence;
                     65:        int music_enable;
                     66:        char    musicbuf[1024];
                     67:        int music;
                     68:        int     tempo;
                     69:        int     octave;
                     70:        int notelen;
                     71:        int noteshape;
                     72:        int musicfore;
                     73:        char *scrollback;
                     74:        int backpos;
                     75:        int backlines;
                     76:        int     xpos;
                     77:        int ypos;
                     78:        int log;
                     79:        FILE* logfile;
                     80:        char    DA[1024];
                     81:        char    fontbuf[4096];
                     82:        int             font_slot;
                     83:        int             font_size;
                     84:        int             font_read;
                     85:        int             font_start_time;
                     86: };
                     87: 
                     88: #define CTERM_MUSIC_SYNCTERM   0
                     89: #define        CTERM_MUSIC_BANSI               1
                     90: #define        CTERM_MUSIC_ENABLED             2
                     91: 
                     92: #ifdef __cplusplus
                     93: extern "C" {
                     94: #endif
                     95: 
                     96: extern struct cterminal cterm;
                     97: 
                     98: void cterm_init(int height, int width, int xpos, int ypos, int backlines, unsigned char *scrollback);
                     99: char *cterm_write(unsigned char *buf, int buflen, char *retbuf, size_t retsize, int *speed);
                    100: int cterm_openlog(char *logfile, int logtype);
                    101: void cterm_closelog(void);
                    102: void cterm_end(void);
                    103: #ifdef __cplusplus
                    104: }
                    105: #endif
                    106: 
                    107: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.