00001 /* SCCS Id: @(#)mttypriv.h 3.4 1993/03/01 */ 00002 /* Copyright (c) Jon W{tte 1993. */ 00003 /* NetHack may be freely redistributed. See license for details. */ 00004 00005 /* 00006 * This file contains private structures used to implement the 00007 * tty windows - note that these structures may change between 00008 * minor releases! 00009 */ 00010 00011 #ifndef _H_tty_private 00012 # define _H_tty_private 00013 00014 # ifndef _H_tty_public 00015 #include "mactty.h" 00016 # endif 00017 00018 #if !TARGET_API_MAC_CARBON 00019 # include <QDOffscreen.h> 00020 # include <Gestalt.h> 00021 # include <Errors.h> 00022 #endif 00023 00024 #define TA_TO_RGB(ta,rgb) (((rgb).red=(((ta)>>16)&0xff)*257),((rgb).green=(((ta)>>8)&0xff)*257),\ 00025 ((rgb).blue=((ta)&0xff)*257)),rgb 00026 00027 typedef struct tty_record { 00028 WindowPtr its_window ; 00029 00030 short font_number ; 00031 short font_size ; 00032 short char_width ; 00033 short row_height ; 00034 short ascent_height ; 00035 00036 short x_size ; 00037 short y_size ; 00038 short x_curs ; 00039 short y_curs ; 00040 00041 GWorldPtr its_window_world ; 00042 BitMap its_bits ; 00043 GrafPtr offscreen_port ; 00044 GWorldPtr offscreen_world ; 00045 #if CLIP_RECT_ONLY 00046 Rect invalid_rect ; 00047 #else 00048 RgnHandle invalid_part ; 00049 #endif 00050 00051 long attribute [ TTY_NUMBER_ATTRIBUTES ] ; 00052 long last_cursor ; 00053 00054 Boolean was_allocated ; 00055 Boolean curs_state ; 00056 Boolean uses_gworld ; 00057 } tty_record ; 00058 00059 00060 #endif /* _H_tty_private */