| 3113 | #endif |
| 3114 | |
| 3115 | static void |
| 3116 | HandleUpdate(EventRecord *theEvent) |
| 3117 | { |
| 3118 | WindowPtr theWindow = (WindowPtr) theEvent->message; |
| 3119 | NhWindow *aWin = GetNhWin(theWindow); |
| 3120 | Rect r; |
| 3121 | #if 1 //!TARGET_API_MAC_CARBON |
| 3122 | EventRecord fake; |
| 3123 | #endif |
| 3124 | |
| 3125 | char existing_update_region = FALSE; |
| 3126 | Rect rect; |
| 3127 | |
| 3128 | if (theWindow == _mt_window) { |
| 3129 | existing_update_region = |
| 3130 | (get_invalid_region(theWindow, &rect) == noErr); |
| 3131 | } |
| 3132 | BeginUpdate(theWindow); |
| 3133 | SetPortWindowPort(theWindow); |
| 3134 | GetWindowBounds(theWindow, kWindowContentRgn, &r); |
| 3135 | OffsetRect(&r, -r.left, -r.top); |
| 3136 | EraseRect(&r); |
| 3137 | #if 0 // TARGET_API_MAC_CARBON |
| 3138 | switch (GetWindowKind(theWindow) - WIN_BASE_KIND) { |
| 3139 | case NHW_BASE: |
| 3140 | case NHW_MAP: |
| 3141 | case NHW_STATUS: |
| 3142 | image_tty(NULL, theWindow); |
| 3143 | break; |
| 3144 | case NHW_MESSAGE: |
| 3145 | MsgUpdate(GetNhWin(theWindow)); |
| 3146 | break; |
| 3147 | case NHW_MENU: |
| 3148 | MenwUpdate(GetNhWin(theWindow)); |
| 3149 | break; |
| 3150 | case NHW_TEXT: |
| 3151 | TextUpdate(GetNhWin(theWindow)); |
| 3152 | break; |
| 3153 | } |
| 3154 | #else |
| 3155 | winUpdateFuncs[GetWindowKind(theWindow) - WIN_BASE_KIND](&fake, |
| 3156 | theWindow); |
| 3157 | #endif |
| 3158 | |
| 3159 | if (theWindow == _mt_window && existing_update_region) { |
| 3160 | set_invalid_region(theWindow, &rect); |
| 3161 | } |
| 3162 | aWin->drawn = TRUE; |
| 3163 | EndUpdate(theWindow); |
| 3164 | } |
| 3165 | |
| 3166 | #if 1 //!TARGET_API_MAC_CARBON |
| 3167 |
no test coverage detected