home *** CD-ROM | disk | FTP | other *** search
/ pc.louisiana.edu/pub/unix/ / Louisiana_UNIX.tar / Louisiana_UNIX / xspread3.0.zoo / scXstuff.h < prev    next >
C/C++ Source or Header  |  1994-06-02  |  4KB  |  85 lines

  1. /*
  2.  * Copyright (C) 1992  Board of Regents of the University of Wisconsin
  3.  * on behalf of the Department of Electrical Engineering and Computer
  4.  * Science, University of Wisconsin-Milwaukee, Milwaukee, WI 53201.
  5.  *
  6.  * This program is free software; you can redistribute it and/or modify
  7.  * it under the terms of the GNU General Public License as published by
  8.  * the Free Software Foundation; either version 2 of the License, or
  9.  * (at your option) any later version.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * a copy of which is included here in file "GNU_GENERAL"
  18.  * along with this program; if not, write to the Free Software
  19.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  *
  21.  * The programs in this directory were developed by software engineering 
  22.  * teams as part of the course "Introduction to Software Engineering" 
  23.  * under the supervision of Professor G. Davida.
  24.  * This is a modification of a program written or modified by
  25.  * others.  The original copyrights, as per GNU General Public License,
  26.  * may still be applicable.  The UWM copyright is applicable only
  27.  * the those parts generated at UWM.
  28.  *
  29.  * Please send all changes, enhancements, and other comments about this
  30.  * software to
  31.  *             soft-eng@cs.uwm.edu
  32.  *
  33.  * No Warranty, expressed or implied, comes with this software.
  34.  * This software is intended to be used by not-for-profit
  35.  * organizations or by individuals for personal HOME use. 
  36.  * This software, or any of its parts, may not be used by for-profit
  37.  * organization, regardless of application or intended product or
  38.  * customer, without the permission of the Board of Regents of the 
  39.  * University  of Wisconsin is strictly forbidden. 
  40.  *
  41.  * Contact:    soft-eng@cs.uwm.edu
  42.  *            or
  43.  *        
  44.  *        Software Engineering Coordinator
  45.  *        Computer Science
  46.  *            Department of EECS
  47.  *        University of Wisconsin - Milwaukee
  48.  *        Milwaukee, WI  53201
  49.  *        414-229-4677
  50.  *
  51.  *        HISTORY,CLAIMS and CONTRIBUTIONS
  52.  */
  53.  
  54. /* This file declares the functions and globals defined in scXstuff.c */
  55. /* REVISION HISTORY */
  56. /* 7-19-91   B. Backman   Creation */
  57.  
  58.  
  59. extern Display    *dpy;        /* X server connection */
  60. extern Window     mainwin;    /* Window ID of main window*/
  61. extern GC         maingc,    /* GC for mainwin */
  62.                 maingcreversed,    /* reverse-field GC for mainwin */
  63.               invertgc;    /* (invert) reverse-field GC for mainwin */
  64. extern XFontStruct *curfont;     /* Font descriptor structure for current font */
  65. extern int curfontwidth, 
  66.        curfontheight;    /* dimensions of current font (in pixels) */
  67. char *userfont;            /*  user specified font name */
  68.  
  69. /* macros textrow() and textcol() compute the y-coordinate of the bottom of row
  70.    r and the x-coordinate of the left-hand side of column c, respectively. 
  71.    This is for use with XDrawImageString.  The coordinates are based on 
  72.    curfontheight and curfontwidth.  NOTE: textcol() will only work for a 
  73.    fixed-width font! Otherwise, it doesn't make sense to calculate column 
  74.    positions anyway because they change */
  75. #define textrow(r)  ((((r)+1)*curfontheight)-1)
  76. #define textcol(c)  ((c)*curfontwidth)
  77.  
  78.  
  79. /* functions defined in scXstuff.c  */
  80. extern int cleardownfrom(/*row*/);
  81. extern int clearupfrom(/*row*/);
  82. /* extern void error(); */
  83. extern int sc_Xinit(/*argc, argv*/);
  84. extern int sc_handleresize(/*xevent*/);
  85.