home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / fontutils-0.6-base.tgz / fontutils-0.6-base.tar / fsf / fontutils / xbfe / main.h < prev    next >
C/C++ Source or Header  |  1992-03-27  |  2KB  |  66 lines

  1. /* main.h: global variable declarations.
  2.  
  3. Copyright (C) 1992 Free Software Foundation, Inc.
  4.  
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2, or (at your option)
  8. any later version.
  9.  
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. GNU General Public License for more details.
  14.  
  15. You should have received a copy of the GNU General Public License
  16. along with this program; if not, write to the Free Software
  17. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  18.  
  19. #ifndef MAIN_H
  20. #define MAIN_H
  21.  
  22. #include "xt-common.h"
  23.  
  24. #include "font.h"
  25. #include "types.h"
  26.  
  27. #include "char.h"
  28.  
  29.  
  30. /* For the resource database.  */
  31. #define CLASS_NAME "XBfe"
  32.  
  33. typedef struct
  34. {
  35.   string name;
  36.   real dpi;
  37.   boolean modified;
  38.   font_info_type info;
  39.   char_type *chars[MAX_CHARCODE + 1];
  40.   charcode_type current_charcode;
  41. } font_type;
  42.  
  43. /* The basename of the font, as it was given to the program.  */
  44. #define FONT_NAME(f) ((f).name)
  45.  
  46. /* The resolution of the font, in pixels per inch.  */
  47. #define FONT_DPI(f) ((f).dpi)
  48.  
  49. /* Says whether any of the characters in the font have been edited.  */
  50. #define FONT_MODIFIED(f) ((f).modified)
  51.  
  52. /* The information about the font that the library supplies.  See
  53.    `../include/font.h' for the details on this structure.  */
  54. #define FONT_INFO(f) ((f).info)
  55.  
  56. /* Pointers to the characters.  */
  57. #define FONT_CHAR(f, code) ((f).chars[code])
  58.  
  59. /* A pointer to the character we're currently editing in the font F.  */
  60. #define FONT_CURRENT_CHAR(f) FONT_CHAR (f, FONT_CURRENT_CHARCODE (f))
  61.  
  62. /* The character code of the character we are currently displaying.  */
  63. #define FONT_CURRENT_CHARCODE(f) ((f).current_charcode)
  64.  
  65. #endif /* not MAIN_H */
  66.