Source:NetHack 3.6.0/include/mttypriv.h

From NetHackWiki
(Redirected from Source:Mttypriv.h)
Jump to: navigation, search

Below is the full text to mttypriv.h from the source code of NetHack 3.6.0. To link to a particular line, write [[Source:NetHack 3.6.0/include/mttypriv.h#line123]], for example.

The NetHack General Public License applies to screenshots, source code and other content from NetHack.

This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.

  1.  /* NetHack 3.6	mttypriv.h	$NHDT-Date: 1432512780 2015/05/25 00:13:00 $  $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ */
  2.  /* Copyright (c) Jon W{tte 1993.					*/
  3.  /* NetHack may be freely redistributed.  See license for details.	*/
  4.  
  5.  /*
  6.   * This file contains private structures used to implement the
  7.   * tty windows - note that these structures may change between
  8.   * minor releases!
  9.   */
  10.  
  11.  #ifndef _H_tty_private
  12.  #define _H_tty_private
  13.  
  14.  #ifndef _H_tty_public
  15.  #include "mactty.h"
  16.  #endif
  17.  
  18.  #if !TARGET_API_MAC_CARBON
  19.  #include <QDOffscreen.h>
  20.  #include <Gestalt.h>
  21.  #include <Errors.h>
  22.  #endif
  23.  
  24.  #define TA_TO_RGB(ta, rgb)                       \
  25.      (((rgb).red = (((ta) >> 16) & 0xff) * 257),  \
  26.       ((rgb).green = (((ta) >> 8) & 0xff) * 257), \
  27.       ((rgb).blue = ((ta) &0xff) * 257)),         \
  28.          rgb
  29.  
  30.  typedef struct tty_record {
  31.      WindowPtr its_window;
  32.  
  33.      short font_number;
  34.      short font_size;
  35.      short char_width;
  36.      short row_height;
  37.      short ascent_height;
  38.  
  39.      short x_size;
  40.      short y_size;
  41.      short x_curs;
  42.      short y_curs;
  43.  
  44.      GWorldPtr its_window_world;
  45.      BitMap its_bits;
  46.      GrafPtr offscreen_port;
  47.      GWorldPtr offscreen_world;
  48.  #if CLIP_RECT_ONLY
  49.      Rect invalid_rect;
  50.  #else
  51.      RgnHandle invalid_part;
  52.  #endif
  53.  
  54.      long attribute[TTY_NUMBER_ATTRIBUTES];
  55.      long last_cursor;
  56.  
  57.      Boolean was_allocated;
  58.      Boolean curs_state;
  59.      Boolean uses_gworld;
  60.  } tty_record;
  61.  
  62.  #endif /* _H_tty_private */