comparison mac/src/macterm.c @ 36417:350e6092a4c4

* src/macfns.c: Rename everything containing *busy_cursor* and similar to *hourglass*. Change IMAGE_POSITIVE_INTEGER_VALUE to IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR throughout. (x_set_font): If font hasn't changed, avoid recomputing faces and other things, as in xfns.c. (Qcancel_timer): New variable. (syms_of_macfns): Rename x-busy-pointer-shape to x-hourglass-pointer-shape, display-busy-cursor to display-hourglass, busy-cursor-delay to hourglass-delay, as in xfns.c. (x_set_tool_bar_lines): Modify as in xfns.c (x_change_window_heights): New function. * inc/macterm.h (struct x_output): Rename busy_cursor to hourglass_cursor, busy_window to hourglass_window, busy_p to hourglass_p, as in xterm.h. * src/macmenu.c (set_frame_menubar): Run activate-menu-bar-hook with safe_run_hooks, as in xmenu.c. * src/macterm.c (do_check_ram_size): New function. * src/Emacs.r: Add ALRT resource #129 for alert when there is over 256 MB RAM.
author Andrew Choi <akochoi@shaw.ca>
date Tue, 27 Feb 2001 14:33:20 +0000
parents 16e83e3dab3d
children c04e66e2c50c
comparison
equal deleted inserted replaced
36416:e8200ba10907 36417:350e6092a4c4
538 LineTo (x2, y2); 538 LineTo (x2, y2);
539 } 539 }
540 540
541 /* Mac version of XClearArea. */ 541 /* Mac version of XClearArea. */
542 542
543 static void 543 void
544 XClearArea (display, w, x, y, width, height, exposures) 544 XClearArea (display, w, x, y, width, height, exposures)
545 Display *display; 545 Display *display;
546 WindowPtr w; 546 WindowPtr w;
547 int x, y; 547 int x, y;
548 unsigned int width, height; 548 unsigned int width, height;
11099 11099
11100 #define EXTRA_STACK_ALLOC (256 * 1024) 11100 #define EXTRA_STACK_ALLOC (256 * 1024)
11101 11101
11102 #define ARGV_STRING_LIST_ID 129 11102 #define ARGV_STRING_LIST_ID 129
11103 #define ABOUT_ALERT_ID 128 11103 #define ABOUT_ALERT_ID 128
11104 #define RAM_TOO_LARGE_ALERT_ID 129
11104 11105
11105 Boolean terminate_flag = false; 11106 Boolean terminate_flag = false;
11106 11107
11107 /* true if using command key as meta key */ 11108 /* true if using command key as meta key */
11108 Lisp_Object Vmac_command_key_is_meta; 11109 Lisp_Object Vmac_command_key_is_meta;
11172 11173
11173 /* MaxApplZone must be called for AppleScript to execute more 11174 /* MaxApplZone must be called for AppleScript to execute more
11174 complicated scripts */ 11175 complicated scripts */
11175 MaxApplZone (); 11176 MaxApplZone ();
11176 MoreMasters (); 11177 MoreMasters ();
11178 }
11179
11180
11181 static void
11182 do_check_ram_size (void)
11183 {
11184 SInt32 physical_ram_size, logical_ram_size;
11185
11186 if (Gestalt (gestaltPhysicalRAMSize, &physical_ram_size) != noErr
11187 || Gestalt (gestaltLogicalRAMSize, &logical_ram_size) != noErr
11188 || physical_ram_size > 256 * 1024 * 1024
11189 || logical_ram_size > 256 * 1024 * 1024)
11190 {
11191 StopAlert (RAM_TOO_LARGE_ALERT_ID, NULL);
11192 exit (1);
11193 }
11177 } 11194 }
11178 11195
11179 11196
11180 static void 11197 static void
11181 do_window_update (WindowPtr win) 11198 do_window_update (WindowPtr win)
11642 11659
11643 do_init_managers (); 11660 do_init_managers ();
11644 11661
11645 do_get_menus (); 11662 do_get_menus ();
11646 11663
11664 do_check_ram_size ();
11665
11647 init_emacs_passwd_dir (); 11666 init_emacs_passwd_dir ();
11648 11667
11649 init_environ (); 11668 init_environ ();
11650 11669
11651 initialize_applescript (); 11670 initialize_applescript ();