Source:NetHack 3.4.3/include/mttypriv.h

From NetHackWiki
Jump to: navigation, search

Below is the full text to include/mttypriv.h from NetHack 3.4.3. To link to a particular line, write [[mttypriv.h#line123]], for example.

  1. /*	SCCS Id: @(#)mttypriv.h 3.4	1993/03/01	*/
  2. /* Copyright (c) Jon W{tte 1993.					*/
  3. /* NetHack may be freely redistributed.  See license for details.	*/

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. /*
  2. * This file contains private structures used to implement the
  3. * tty windows - note that these structures may change between
  4. * minor releases!
  5. */
  6.  
  7. #ifndef _H_tty_private
  8. # define _H_tty_private
  9.  
  10. # ifndef _H_tty_public
  11. #include "mactty.h"
  12. # endif
  13.  
  14. #if !TARGET_API_MAC_CARBON
  15. # include <QDOffscreen.h>
  16. # include <Gestalt.h>
  17. # include <Errors.h>
  18. #endif
  19.  
  20. #define TA_TO_RGB(ta,rgb) (((rgb).red=(((ta)>>16)&0xff)*257),((rgb).green=(((ta)>>8)&0xff)*257),\
  21. 	((rgb).blue=((ta)&0xff)*257)),rgb
  22.  
  23. typedef struct tty_record {
  24. 	WindowPtr	its_window ;
  25.  
  26. 	short		font_number ;
  27. 	short		font_size ;
  28. 	short		char_width ;
  29. 	short		row_height ;
  30. 	short		ascent_height ;
  31.  
  32. 	short		x_size ;
  33. 	short		y_size ;
  34. 	short		x_curs ;
  35. 	short		y_curs ;
  36.  
  37. 	GWorldPtr		its_window_world ;
  38. 	BitMap			its_bits ;
  39. 	GrafPtr			offscreen_port ;
  40. 	GWorldPtr		offscreen_world ;
  41. #if CLIP_RECT_ONLY
  42. 	Rect			invalid_rect ;
  43. #else
  44. 	RgnHandle		invalid_part ;
  45. #endif
  46.  
  47. 	long		attribute [ TTY_NUMBER_ATTRIBUTES ] ;
  48. 	long		last_cursor ;
  49.  
  50. 	Boolean		was_allocated ;
  51. 	Boolean		curs_state ;
  52. 	Boolean		uses_gworld ;
  53. } tty_record ;
  54.  
  55.  
  56. #endif	/* _H_tty_private */