diff options
| author | Dan Nicolaescu | 2007-05-19 19:08:02 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2007-05-19 19:08:02 +0000 |
| commit | 80ca7302d820bd3460a06db39165bbc35144c684 (patch) | |
| tree | 9cbfeba96180f4d60e44037a71bf4a1fff4a2022 /src | |
| parent | 696758702fa8eae3cfa46859cc260398b15d71bd (diff) | |
| download | emacs-80ca7302d820bd3460a06db39165bbc35144c684.tar.gz emacs-80ca7302d820bd3460a06db39165bbc35144c684.zip | |
* s/darwin.h (SYSTEM_PURESIZE_EXTRA): Define here.
* termhooks.h (union display_info): Add mac_display_info.
* term.c (init_tty): Only use terminal->kboard when MULTI_KBOARD
is defined.
* macterm.h (struct mac_display_info): Add terminal.
* w32term.c (w32_initialize): Make static.
* macterm.c (XTset_terminal_modes): Add a terminal parameter.
(XTreset_terminal_modes): Likewise.
(x_clear_frame): Add a frame parameter.
(note_mouse_movement): Get rif from the frame.
(mac_term_init): Initialize the terminal.
(mac_initialize): Make static and move terminal initialization ...
(mac_create_terminal): ... in this new function.
* macmenu.c: Reorder includes.
(Fx_popup_menu): Use terminal specific mouse_position_hook.
* macfns.c (x_set_mouse_color): Get rif from the frame.
(x_set_tool_bar_lines): Don't use updating_frame.
(mac_window): Add 2 new parameters for consistency with other
systems.
(Fx_create_frame): Fix doc string. Rename the parameter.
(Fx_create_frame): Set the frame parameters following what is done
in X11 and w32.
(Fx_open_connection): Remove window-system check.
(start_hourglass): Likewise.
(x_create_tip_frame): Get the keyboard from the terminal.
* w32fns.c (Fx_create_frame): Use kboard from the terminal.
* term/mac-win.el: Provide mac-win.
(mac-initialized): New variable.
(mac-initialize-window-system): New function. Move global setup
here.
(handle-args-function-alist, frame-creation-function-alist):
(window-system-initialization-alist): Add mac entries.
* loadup.el: Load mac-win on a Mac.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog.multi-tty | 37 | ||||
| -rw-r--r-- | src/macfns.c | 137 | ||||
| -rw-r--r-- | src/macmenu.c | 6 | ||||
| -rw-r--r-- | src/macterm.c | 106 | ||||
| -rw-r--r-- | src/macterm.h | 4 | ||||
| -rw-r--r-- | src/s/darwin.h | 4 | ||||
| -rw-r--r-- | src/term.c | 3 | ||||
| -rw-r--r-- | src/termhooks.h | 6 | ||||
| -rw-r--r-- | src/w32fns.c | 2 | ||||
| -rw-r--r-- | src/w32term.c | 4 |
10 files changed, 187 insertions, 122 deletions
diff --git a/src/ChangeLog.multi-tty b/src/ChangeLog.multi-tty index c8d48c20176..4f173a3962d 100644 --- a/src/ChangeLog.multi-tty +++ b/src/ChangeLog.multi-tty | |||
| @@ -1,3 +1,40 @@ | |||
| 1 | 2007-05-19 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Define here. | ||
| 4 | |||
| 5 | * termhooks.h (union display_info): Add mac_display_info. | ||
| 6 | |||
| 7 | * term.c (init_tty): Only use terminal->kboard when MULTI_KBOARD | ||
| 8 | is defined. | ||
| 9 | |||
| 10 | * macterm.h (struct mac_display_info): Add terminal. | ||
| 11 | |||
| 12 | * w32term.c (w32_initialize): Make static. | ||
| 13 | |||
| 14 | * macterm.c (XTset_terminal_modes): Add a terminal parameter. | ||
| 15 | (XTreset_terminal_modes): Likewise. | ||
| 16 | (x_clear_frame): Add a frame parameter. | ||
| 17 | (note_mouse_movement): Get rif from the frame. | ||
| 18 | (mac_term_init): Initialize the terminal. | ||
| 19 | (mac_initialize): Make static and move terminal initialization ... | ||
| 20 | (mac_create_terminal): ... in this new function. | ||
| 21 | |||
| 22 | * macmenu.c: Reorder includes. | ||
| 23 | (Fx_popup_menu): Use terminal specific mouse_position_hook. | ||
| 24 | |||
| 25 | * macfns.c (x_set_mouse_color): Get rif from the frame. | ||
| 26 | (x_set_tool_bar_lines): Don't use updating_frame. | ||
| 27 | (mac_window): Add 2 new parameters for consistency with other | ||
| 28 | systems. | ||
| 29 | (Fx_create_frame): Fix doc string. Rename the parameter. | ||
| 30 | (Fx_create_frame): Set the frame parameters following what is done | ||
| 31 | in X11 and w32. | ||
| 32 | (Fx_open_connection): Remove window-system check. | ||
| 33 | (start_hourglass): Likewise. | ||
| 34 | (x_create_tip_frame): Get the keyboard from the terminal. | ||
| 35 | |||
| 36 | * w32fns.c (Fx_create_frame): Use kboard from the terminal. | ||
| 37 | |||
| 1 | 2007-05-17 Jason Rumney <jasonr@gnu.org> | 38 | 2007-05-17 Jason Rumney <jasonr@gnu.org> |
| 2 | 39 | ||
| 3 | * w32fns.c (x_create_tip_frame): Set window_system. | 40 | * w32fns.c (x_create_tip_frame): Set window_system. |
diff --git a/src/macfns.c b/src/macfns.c index 6ce4b66031e..382259e2fce 100644 --- a/src/macfns.c +++ b/src/macfns.c | |||
| @@ -107,7 +107,6 @@ extern Lisp_Object Vwindow_system_version; | |||
| 107 | int image_cache_refcount, dpyinfo_refcount; | 107 | int image_cache_refcount, dpyinfo_refcount; |
| 108 | #endif | 108 | #endif |
| 109 | 109 | ||
| 110 | |||
| 111 | #if 0 /* Use xstricmp instead. */ | 110 | #if 0 /* Use xstricmp instead. */ |
| 112 | /* compare two strings ignoring case */ | 111 | /* compare two strings ignoring case */ |
| 113 | 112 | ||
| @@ -1447,7 +1446,7 @@ x_set_mouse_color (f, arg, oldval) | |||
| 1447 | BLOCK_INPUT; | 1446 | BLOCK_INPUT; |
| 1448 | 1447 | ||
| 1449 | if (FRAME_MAC_WINDOW (f) != 0) | 1448 | if (FRAME_MAC_WINDOW (f) != 0) |
| 1450 | rif->define_frame_cursor (f, cursor); | 1449 | FRAME_TERMINAL (f)->rif->define_frame_cursor (f, cursor); |
| 1451 | 1450 | ||
| 1452 | f->output_data.mac->text_cursor = cursor; | 1451 | f->output_data.mac->text_cursor = cursor; |
| 1453 | f->output_data.mac->nontext_cursor = nontext_cursor; | 1452 | f->output_data.mac->nontext_cursor = nontext_cursor; |
| @@ -1708,10 +1707,8 @@ x_set_tool_bar_lines (f, value, oldval) | |||
| 1708 | below the menu bar. */ | 1707 | below the menu bar. */ |
| 1709 | if (FRAME_MAC_WINDOW (f) && FRAME_TOOL_BAR_LINES (f) == 0) | 1708 | if (FRAME_MAC_WINDOW (f) && FRAME_TOOL_BAR_LINES (f) == 0) |
| 1710 | { | 1709 | { |
| 1711 | updating_frame = f; | 1710 | clear_frame (f); |
| 1712 | clear_frame (); | ||
| 1713 | clear_current_matrices (f); | 1711 | clear_current_matrices (f); |
| 1714 | updating_frame = NULL; | ||
| 1715 | } | 1712 | } |
| 1716 | 1713 | ||
| 1717 | /* If the tool bar gets smaller, the internal border below it | 1714 | /* If the tool bar gets smaller, the internal border below it |
| @@ -2237,8 +2234,10 @@ XParseGeometry (string, x, y, width, height) | |||
| 2237 | /* Create and set up the Mac window for frame F. */ | 2234 | /* Create and set up the Mac window for frame F. */ |
| 2238 | 2235 | ||
| 2239 | static void | 2236 | static void |
| 2240 | mac_window (f) | 2237 | mac_window (f, window_prompting, minibuffer_only) |
| 2241 | struct frame *f; | 2238 | struct frame *f; |
| 2239 | long window_prompting; | ||
| 2240 | int minibuffer_only; | ||
| 2242 | { | 2241 | { |
| 2243 | Rect r; | 2242 | Rect r; |
| 2244 | 2243 | ||
| @@ -2497,15 +2496,15 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame, | |||
| 2497 | 1, 1, 0, | 2496 | 1, 1, 0, |
| 2498 | doc: /* Make a new window, which is called a "frame" in Emacs terms. | 2497 | doc: /* Make a new window, which is called a "frame" in Emacs terms. |
| 2499 | Returns an Emacs frame object. | 2498 | Returns an Emacs frame object. |
| 2500 | ALIST is an alist of frame parameters. | 2499 | PARAMETERS is an alist of frame parameters. |
| 2501 | If the parameters specify that the frame should not have a minibuffer, | 2500 | If the parameters specify that the frame should not have a minibuffer, |
| 2502 | and do not specify a specific minibuffer window to use, | 2501 | and do not specify a specific minibuffer window to use, |
| 2503 | then `default-minibuffer-frame' must be a frame whose minibuffer can | 2502 | then `default-minibuffer-frame' must be a frame whose minibuffer can |
| 2504 | be shared by the new frame. | 2503 | be shared by the new frame. |
| 2505 | 2504 | ||
| 2506 | This function is an internal primitive--use `make-frame' instead. */) | 2505 | This function is an internal primitive--use `make-frame' instead. */) |
| 2507 | (parms) | 2506 | (parameters) |
| 2508 | Lisp_Object parms; | 2507 | Lisp_Object parameters; |
| 2509 | { | 2508 | { |
| 2510 | struct frame *f; | 2509 | struct frame *f; |
| 2511 | Lisp_Object frame, tem; | 2510 | Lisp_Object frame, tem; |
| @@ -2522,23 +2521,21 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 2522 | 2521 | ||
| 2523 | check_mac (); | 2522 | check_mac (); |
| 2524 | 2523 | ||
| 2525 | parms = Fcopy_alist (parms); | ||
| 2526 | |||
| 2527 | /* Use this general default value to start with | 2524 | /* Use this general default value to start with |
| 2528 | until we know if this frame has a specified name. */ | 2525 | until we know if this frame has a specified name. */ |
| 2529 | Vx_resource_name = Vinvocation_name; | 2526 | Vx_resource_name = Vinvocation_name; |
| 2530 | 2527 | ||
| 2531 | display = mac_get_arg (parms, Qdisplay, 0, 0, RES_TYPE_STRING); | 2528 | display = mac_get_arg (parameters, Qdisplay, 0, 0, RES_TYPE_STRING); |
| 2532 | if (EQ (display, Qunbound)) | 2529 | if (EQ (display, Qunbound)) |
| 2533 | display = Qnil; | 2530 | display = Qnil; |
| 2534 | dpyinfo = check_x_display_info (display); | 2531 | dpyinfo = check_x_display_info (display); |
| 2535 | #ifdef MULTI_KBOARD | 2532 | #ifdef MULTI_KBOARD |
| 2536 | kb = dpyinfo->kboard; | 2533 | kb = dpyinfo->terminal->kboard; |
| 2537 | #else | 2534 | #else |
| 2538 | kb = &the_only_kboard; | 2535 | kb = &the_only_kboard; |
| 2539 | #endif | 2536 | #endif |
| 2540 | 2537 | ||
| 2541 | name = mac_get_arg (parms, Qname, "name", "Name", RES_TYPE_STRING); | 2538 | name = mac_get_arg (parameters, Qname, "name", "Name", RES_TYPE_STRING); |
| 2542 | if (!STRINGP (name) | 2539 | if (!STRINGP (name) |
| 2543 | && ! EQ (name, Qunbound) | 2540 | && ! EQ (name, Qunbound) |
| 2544 | && ! NILP (name)) | 2541 | && ! NILP (name)) |
| @@ -2548,7 +2545,7 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 2548 | Vx_resource_name = name; | 2545 | Vx_resource_name = name; |
| 2549 | 2546 | ||
| 2550 | /* See if parent window is specified. */ | 2547 | /* See if parent window is specified. */ |
| 2551 | parent = mac_get_arg (parms, Qparent_id, NULL, NULL, RES_TYPE_NUMBER); | 2548 | parent = mac_get_arg (parameters, Qparent_id, NULL, NULL, RES_TYPE_NUMBER); |
| 2552 | if (EQ (parent, Qunbound)) | 2549 | if (EQ (parent, Qunbound)) |
| 2553 | parent = Qnil; | 2550 | parent = Qnil; |
| 2554 | if (! NILP (parent)) | 2551 | if (! NILP (parent)) |
| @@ -2558,8 +2555,8 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 2558 | /* No need to protect DISPLAY because that's not used after passing | 2555 | /* No need to protect DISPLAY because that's not used after passing |
| 2559 | it to make_frame_without_minibuffer. */ | 2556 | it to make_frame_without_minibuffer. */ |
| 2560 | frame = Qnil; | 2557 | frame = Qnil; |
| 2561 | GCPRO4 (parms, parent, name, frame); | 2558 | GCPRO4 (parameters, parent, name, frame); |
| 2562 | tem = mac_get_arg (parms, Qminibuffer, "minibuffer", "Minibuffer", | 2559 | tem = mac_get_arg (parameters, Qminibuffer, "minibuffer", "Minibuffer", |
| 2563 | RES_TYPE_SYMBOL); | 2560 | RES_TYPE_SYMBOL); |
| 2564 | if (EQ (tem, Qnone) || NILP (tem)) | 2561 | if (EQ (tem, Qnone) || NILP (tem)) |
| 2565 | f = make_frame_without_minibuffer (Qnil, kb, display); | 2562 | f = make_frame_without_minibuffer (Qnil, kb, display); |
| @@ -2578,20 +2575,24 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 2578 | /* Note that X Windows does support scroll bars. */ | 2575 | /* Note that X Windows does support scroll bars. */ |
| 2579 | FRAME_CAN_HAVE_SCROLL_BARS (f) = 1; | 2576 | FRAME_CAN_HAVE_SCROLL_BARS (f) = 1; |
| 2580 | 2577 | ||
| 2578 | f->terminal = dpyinfo->terminal; | ||
| 2579 | f->terminal->reference_count++; | ||
| 2580 | |||
| 2581 | f->output_method = output_mac; | 2581 | f->output_method = output_mac; |
| 2582 | f->output_data.mac = (struct mac_output *) xmalloc (sizeof (struct mac_output)); | 2582 | f->output_data.mac = (struct mac_output *) xmalloc (sizeof (struct mac_output)); |
| 2583 | bzero (f->output_data.mac, sizeof (struct mac_output)); | 2583 | bzero (f->output_data.mac, sizeof (struct mac_output)); |
| 2584 | FRAME_FONTSET (f) = -1; | 2584 | FRAME_FONTSET (f) = -1; |
| 2585 | record_unwind_protect (unwind_create_frame, frame); | ||
| 2585 | 2586 | ||
| 2586 | f->icon_name | 2587 | f->icon_name |
| 2587 | = mac_get_arg (parms, Qicon_name, "iconName", "Title", RES_TYPE_STRING); | 2588 | = mac_get_arg (parameters, Qicon_name, "iconName", "Title", RES_TYPE_STRING); |
| 2588 | if (! STRINGP (f->icon_name)) | 2589 | if (! STRINGP (f->icon_name)) |
| 2589 | f->icon_name = Qnil; | 2590 | f->icon_name = Qnil; |
| 2590 | 2591 | ||
| 2591 | /* FRAME_MAC_DISPLAY_INFO (f) = dpyinfo; */ | 2592 | /* XXX Is this needed? */ |
| 2593 | FRAME_MAC_DISPLAY_INFO (f) = dpyinfo; | ||
| 2592 | 2594 | ||
| 2593 | /* With FRAME_MAC_DISPLAY_INFO set up, this unwind-protect is safe. */ | 2595 | /* With FRAME_MAC_DISPLAY_INFO set up, this unwind-protect is safe. */ |
| 2594 | record_unwind_protect (unwind_create_frame, frame); | ||
| 2595 | #if GLYPH_DEBUG | 2596 | #if GLYPH_DEBUG |
| 2596 | image_cache_refcount = FRAME_X_IMAGE_CACHE (f)->refcount; | 2597 | image_cache_refcount = FRAME_X_IMAGE_CACHE (f)->refcount; |
| 2597 | dpyinfo_refcount = dpyinfo->reference_count; | 2598 | dpyinfo_refcount = dpyinfo->reference_count; |
| @@ -2633,7 +2634,7 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 2633 | { | 2634 | { |
| 2634 | Lisp_Object font; | 2635 | Lisp_Object font; |
| 2635 | 2636 | ||
| 2636 | font = mac_get_arg (parms, Qfont, "font", "Font", RES_TYPE_STRING); | 2637 | font = mac_get_arg (parameters, Qfont, "font", "Font", RES_TYPE_STRING); |
| 2637 | 2638 | ||
| 2638 | BLOCK_INPUT; | 2639 | BLOCK_INPUT; |
| 2639 | /* First, try whatever font the caller has specified. */ | 2640 | /* First, try whatever font the caller has specified. */ |
| @@ -2645,7 +2646,6 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 2645 | else | 2646 | else |
| 2646 | font = x_new_font (f, SDATA (font)); | 2647 | font = x_new_font (f, SDATA (font)); |
| 2647 | } | 2648 | } |
| 2648 | |||
| 2649 | /* Try out a font which we hope has bold and italic variations. */ | 2649 | /* Try out a font which we hope has bold and italic variations. */ |
| 2650 | #if USE_ATSUI | 2650 | #if USE_ATSUI |
| 2651 | if (! STRINGP (font)) | 2651 | if (! STRINGP (font)) |
| @@ -2664,48 +2664,50 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 2664 | error ("Cannot find any usable font"); | 2664 | error ("Cannot find any usable font"); |
| 2665 | UNBLOCK_INPUT; | 2665 | UNBLOCK_INPUT; |
| 2666 | 2666 | ||
| 2667 | x_set_frame_parameters (f, Fcons (Fcons (Qfont, font), Qnil)); | 2667 | x_default_parameter (f, parameters, Qfont, font, |
| 2668 | "font", "Font", RES_TYPE_STRING); | ||
| 2668 | } | 2669 | } |
| 2669 | 2670 | ||
| 2670 | x_default_parameter (f, parms, Qborder_width, make_number (0), | 2671 | /* XXX Shouldn't this be borderWidth, not borderwidth ?*/ |
| 2672 | x_default_parameter (f, parameters, Qborder_width, make_number (0), | ||
| 2671 | "borderwidth", "BorderWidth", RES_TYPE_NUMBER); | 2673 | "borderwidth", "BorderWidth", RES_TYPE_NUMBER); |
| 2672 | /* This defaults to 2 in order to match xterm. We recognize either | 2674 | /* This defaults to 2 in order to match xterm. We recognize either |
| 2673 | internalBorderWidth or internalBorder (which is what xterm calls | 2675 | internalBorderWidth or internalBorder (which is what xterm calls |
| 2674 | it). */ | 2676 | it). */ |
| 2675 | if (NILP (Fassq (Qinternal_border_width, parms))) | 2677 | if (NILP (Fassq (Qinternal_border_width, parameters))) |
| 2676 | { | 2678 | { |
| 2677 | Lisp_Object value; | 2679 | Lisp_Object value; |
| 2678 | 2680 | ||
| 2679 | value = mac_get_arg (parms, Qinternal_border_width, | 2681 | value = mac_get_arg (parameters, Qinternal_border_width, |
| 2680 | "internalBorder", "InternalBorder", RES_TYPE_NUMBER); | 2682 | "internalBorder", "InternalBorder", RES_TYPE_NUMBER); |
| 2681 | if (! EQ (value, Qunbound)) | 2683 | if (! EQ (value, Qunbound)) |
| 2682 | parms = Fcons (Fcons (Qinternal_border_width, value), | 2684 | parameters = Fcons (Fcons (Qinternal_border_width, value), |
| 2683 | parms); | 2685 | parameters); |
| 2684 | } | 2686 | } |
| 2685 | /* Default internalBorderWidth to 0 on Windows to match other programs. */ | 2687 | /* Default internalBorderWidth to 0 on Windows to match other programs. */ |
| 2686 | x_default_parameter (f, parms, Qinternal_border_width, make_number (0), | 2688 | x_default_parameter (f, parameters, Qinternal_border_width, make_number (0), |
| 2687 | "internalBorderWidth", "InternalBorder", RES_TYPE_NUMBER); | 2689 | "internalBorderWidth", "InternalBorder", RES_TYPE_NUMBER); |
| 2688 | x_default_parameter (f, parms, Qvertical_scroll_bars, Qright, | 2690 | x_default_parameter (f, parameters, Qvertical_scroll_bars, Qright, |
| 2689 | "verticalScrollBars", "ScrollBars", RES_TYPE_SYMBOL); | 2691 | "verticalScrollBars", "ScrollBars", RES_TYPE_SYMBOL); |
| 2690 | 2692 | ||
| 2691 | /* Also do the stuff which must be set before the window exists. */ | 2693 | /* Also do the stuff which must be set before the window exists. */ |
| 2692 | x_default_parameter (f, parms, Qforeground_color, build_string ("black"), | 2694 | x_default_parameter (f, parameters, Qforeground_color, build_string ("black"), |
| 2693 | "foreground", "Foreground", RES_TYPE_STRING); | 2695 | "foreground", "Foreground", RES_TYPE_STRING); |
| 2694 | x_default_parameter (f, parms, Qbackground_color, build_string ("white"), | 2696 | x_default_parameter (f, parameters, Qbackground_color, build_string ("white"), |
| 2695 | "background", "Background", RES_TYPE_STRING); | 2697 | "background", "Background", RES_TYPE_STRING); |
| 2696 | x_default_parameter (f, parms, Qmouse_color, build_string ("black"), | 2698 | x_default_parameter (f, parameters, Qmouse_color, build_string ("black"), |
| 2697 | "pointerColor", "Foreground", RES_TYPE_STRING); | 2699 | "pointerColor", "Foreground", RES_TYPE_STRING); |
| 2698 | x_default_parameter (f, parms, Qcursor_color, build_string ("black"), | 2700 | x_default_parameter (f, parameters, Qcursor_color, build_string ("black"), |
| 2699 | "cursorColor", "Foreground", RES_TYPE_STRING); | 2701 | "cursorColor", "Foreground", RES_TYPE_STRING); |
| 2700 | x_default_parameter (f, parms, Qborder_color, build_string ("black"), | 2702 | x_default_parameter (f, parameters, Qborder_color, build_string ("black"), |
| 2701 | "borderColor", "BorderColor", RES_TYPE_STRING); | 2703 | "borderColor", "BorderColor", RES_TYPE_STRING); |
| 2702 | x_default_parameter (f, parms, Qscreen_gamma, Qnil, | 2704 | x_default_parameter (f, parameters, Qscreen_gamma, Qnil, |
| 2703 | "screenGamma", "ScreenGamma", RES_TYPE_FLOAT); | 2705 | "screenGamma", "ScreenGamma", RES_TYPE_FLOAT); |
| 2704 | x_default_parameter (f, parms, Qline_spacing, Qnil, | 2706 | x_default_parameter (f, parameters, Qline_spacing, Qnil, |
| 2705 | "lineSpacing", "LineSpacing", RES_TYPE_NUMBER); | 2707 | "lineSpacing", "LineSpacing", RES_TYPE_NUMBER); |
| 2706 | x_default_parameter (f, parms, Qleft_fringe, Qnil, | 2708 | x_default_parameter (f, parameters, Qleft_fringe, Qnil, |
| 2707 | "leftFringe", "LeftFringe", RES_TYPE_NUMBER); | 2709 | "leftFringe", "LeftFringe", RES_TYPE_NUMBER); |
| 2708 | x_default_parameter (f, parms, Qright_fringe, Qnil, | 2710 | x_default_parameter (f, parameters, Qright_fringe, Qnil, |
| 2709 | "rightFringe", "RightFringe", RES_TYPE_NUMBER); | 2711 | "rightFringe", "RightFringe", RES_TYPE_NUMBER); |
| 2710 | 2712 | ||
| 2711 | 2713 | ||
| @@ -2717,29 +2719,29 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 2717 | happen. */ | 2719 | happen. */ |
| 2718 | init_frame_faces (f); | 2720 | init_frame_faces (f); |
| 2719 | 2721 | ||
| 2720 | x_default_parameter (f, parms, Qmenu_bar_lines, make_number (1), | 2722 | x_default_parameter (f, parameters, Qmenu_bar_lines, make_number (1), |
| 2721 | "menuBar", "MenuBar", RES_TYPE_NUMBER); | 2723 | "menuBar", "MenuBar", RES_TYPE_NUMBER); |
| 2722 | x_default_parameter (f, parms, Qtool_bar_lines, make_number (1), | 2724 | x_default_parameter (f, parameters, Qtool_bar_lines, make_number (1), |
| 2723 | "toolBar", "ToolBar", RES_TYPE_NUMBER); | 2725 | "toolBar", "ToolBar", RES_TYPE_NUMBER); |
| 2724 | x_default_parameter (f, parms, Qbuffer_predicate, Qnil, | 2726 | |
| 2725 | "bufferPredicate", "BufferPredicate", | 2727 | x_default_parameter (f, parameters, Qbuffer_predicate, Qnil, |
| 2726 | RES_TYPE_SYMBOL); | 2728 | "bufferPredicate", "BufferPredicate", RES_TYPE_SYMBOL); |
| 2727 | x_default_parameter (f, parms, Qtitle, Qnil, | 2729 | x_default_parameter (f, parameters, Qtitle, Qnil, |
| 2728 | "title", "Title", RES_TYPE_STRING); | 2730 | "title", "Title", RES_TYPE_STRING); |
| 2729 | x_default_parameter (f, parms, Qfullscreen, Qnil, | 2731 | x_default_parameter (f, parameters, Qfullscreen, Qnil, |
| 2730 | "fullscreen", "Fullscreen", RES_TYPE_SYMBOL); | 2732 | "fullscreen", "Fullscreen", RES_TYPE_SYMBOL); |
| 2731 | 2733 | ||
| 2732 | f->output_data.mac->parent_desc = FRAME_MAC_DISPLAY_INFO (f)->root_window; | 2734 | f->output_data.mac->parent_desc = FRAME_MAC_DISPLAY_INFO (f)->root_window; |
| 2733 | 2735 | ||
| 2734 | /* Compute the size of the window. */ | 2736 | /* Compute the size of the window. */ |
| 2735 | window_prompting = x_figure_window_size (f, parms, 1); | 2737 | window_prompting = x_figure_window_size (f, parameters, 1); |
| 2736 | 2738 | ||
| 2737 | tem = mac_get_arg (parms, Qunsplittable, 0, 0, RES_TYPE_BOOLEAN); | 2739 | tem = mac_get_arg (parameters, Qunsplittable, 0, 0, RES_TYPE_BOOLEAN); |
| 2738 | f->no_split = minibuffer_only || EQ (tem, Qt); | 2740 | f->no_split = minibuffer_only || EQ (tem, Qt); |
| 2739 | 2741 | ||
| 2740 | mac_window (f); | 2742 | mac_window (f, window_prompting, minibuffer_only); |
| 2743 | x_icon (f, parameters); | ||
| 2741 | 2744 | ||
| 2742 | x_icon (f, parms); | ||
| 2743 | x_make_gc (f); | 2745 | x_make_gc (f); |
| 2744 | 2746 | ||
| 2745 | /* Now consider the frame official. */ | 2747 | /* Now consider the frame official. */ |
| @@ -2748,18 +2750,17 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 2748 | 2750 | ||
| 2749 | /* We need to do this after creating the window, so that the | 2751 | /* We need to do this after creating the window, so that the |
| 2750 | icon-creation functions can say whose icon they're describing. */ | 2752 | icon-creation functions can say whose icon they're describing. */ |
| 2751 | x_default_parameter (f, parms, Qicon_type, Qnil, | 2753 | x_default_parameter (f, parameters, Qicon_type, Qnil, |
| 2752 | "bitmapIcon", "BitmapIcon", RES_TYPE_SYMBOL); | 2754 | "bitmapIcon", "BitmapIcon", RES_TYPE_SYMBOL); |
| 2753 | 2755 | ||
| 2754 | x_default_parameter (f, parms, Qauto_raise, Qnil, | 2756 | x_default_parameter (f, parameters, Qauto_raise, Qnil, |
| 2755 | "autoRaise", "AutoRaiseLower", RES_TYPE_BOOLEAN); | 2757 | "autoRaise", "AutoRaiseLower", RES_TYPE_BOOLEAN); |
| 2756 | x_default_parameter (f, parms, Qauto_lower, Qnil, | 2758 | x_default_parameter (f, parameters, Qauto_lower, Qnil, |
| 2757 | "autoLower", "AutoRaiseLower", RES_TYPE_BOOLEAN); | 2759 | "autoLower", "AutoRaiseLower", RES_TYPE_BOOLEAN); |
| 2758 | x_default_parameter (f, parms, Qcursor_type, Qbox, | 2760 | x_default_parameter (f, parameters, Qcursor_type, Qbox, |
| 2759 | "cursorType", "CursorType", RES_TYPE_SYMBOL); | 2761 | "cursorType", "CursorType", RES_TYPE_SYMBOL); |
| 2760 | x_default_parameter (f, parms, Qscroll_bar_width, Qnil, | 2762 | x_default_parameter (f, parameters, Qscroll_bar_width, Qnil, |
| 2761 | "scrollBarWidth", "ScrollBarWidth", | 2763 | "scrollBarWidth", "ScrollBarWidth", RES_TYPE_NUMBER); |
| 2762 | RES_TYPE_NUMBER); | ||
| 2763 | 2764 | ||
| 2764 | /* Dimensions, especially FRAME_LINES (f), must be done via change_frame_size. | 2765 | /* Dimensions, especially FRAME_LINES (f), must be done via change_frame_size. |
| 2765 | Change will not be effected unless different from the current | 2766 | Change will not be effected unless different from the current |
| @@ -2767,8 +2768,8 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 2767 | width = FRAME_COLS (f); | 2768 | width = FRAME_COLS (f); |
| 2768 | height = FRAME_LINES (f); | 2769 | height = FRAME_LINES (f); |
| 2769 | 2770 | ||
| 2770 | SET_FRAME_COLS (f, 0); | ||
| 2771 | FRAME_LINES (f) = 0; | 2771 | FRAME_LINES (f) = 0; |
| 2772 | SET_FRAME_COLS (f, 0); | ||
| 2772 | change_frame_size (f, height, width, 1, 0, 0); | 2773 | change_frame_size (f, height, width, 1, 0, 0); |
| 2773 | 2774 | ||
| 2774 | /* Tell the server what size and position, etc, we want, and how | 2775 | /* Tell the server what size and position, etc, we want, and how |
| @@ -2785,7 +2786,7 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 2785 | { | 2786 | { |
| 2786 | Lisp_Object visibility; | 2787 | Lisp_Object visibility; |
| 2787 | 2788 | ||
| 2788 | visibility = mac_get_arg (parms, Qvisibility, 0, 0, RES_TYPE_SYMBOL); | 2789 | visibility = mac_get_arg (parameters, Qvisibility, 0, 0, RES_TYPE_SYMBOL); |
| 2789 | if (EQ (visibility, Qunbound)) | 2790 | if (EQ (visibility, Qunbound)) |
| 2790 | visibility = Qt; | 2791 | visibility = Qt; |
| 2791 | 2792 | ||
| @@ -2807,10 +2808,12 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 2807 | 2808 | ||
| 2808 | /* All remaining specified parameters, which have not been "used" | 2809 | /* All remaining specified parameters, which have not been "used" |
| 2809 | by x_get_arg and friends, now go in the misc. alist of the frame. */ | 2810 | by x_get_arg and friends, now go in the misc. alist of the frame. */ |
| 2810 | for (tem = parms; !NILP (tem); tem = XCDR (tem)) | 2811 | for (tem = parameters; !NILP (tem); tem = XCDR (tem)) |
| 2811 | if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem)))) | 2812 | if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem)))) |
| 2812 | f->param_alist = Fcons (XCAR (tem), f->param_alist); | 2813 | f->param_alist = Fcons (XCAR (tem), f->param_alist); |
| 2813 | 2814 | ||
| 2815 | store_frame_param (f, Qwindow_system, Qmac); | ||
| 2816 | |||
| 2814 | UNGCPRO; | 2817 | UNGCPRO; |
| 2815 | 2818 | ||
| 2816 | /* Make sure windows on this frame appear in calls to next-window | 2819 | /* Make sure windows on this frame appear in calls to next-window |
| @@ -3273,9 +3276,6 @@ x_display_info_for_name (name) | |||
| 3273 | 3276 | ||
| 3274 | CHECK_STRING (name); | 3277 | CHECK_STRING (name); |
| 3275 | 3278 | ||
| 3276 | if (! EQ (Vwindow_system, intern ("mac"))) | ||
| 3277 | error ("Not using Mac native windows"); | ||
| 3278 | |||
| 3279 | for (dpyinfo = &one_mac_display_info, names = x_display_name_list; | 3279 | for (dpyinfo = &one_mac_display_info, names = x_display_name_list; |
| 3280 | dpyinfo; | 3280 | dpyinfo; |
| 3281 | dpyinfo = dpyinfo->next, names = XCDR (names)) | 3281 | dpyinfo = dpyinfo->next, names = XCDR (names)) |
| @@ -3320,9 +3320,6 @@ terminate Emacs if we can't open the connection. */) | |||
| 3320 | if (! NILP (xrm_string)) | 3320 | if (! NILP (xrm_string)) |
| 3321 | CHECK_STRING (xrm_string); | 3321 | CHECK_STRING (xrm_string); |
| 3322 | 3322 | ||
| 3323 | if (! EQ (Vwindow_system, intern ("mac"))) | ||
| 3324 | error ("Not using Mac native windows"); | ||
| 3325 | |||
| 3326 | if (! NILP (xrm_string)) | 3323 | if (! NILP (xrm_string)) |
| 3327 | xrm_option = (unsigned char *) SDATA (xrm_string); | 3324 | xrm_option = (unsigned char *) SDATA (xrm_string); |
| 3328 | else | 3325 | else |
| @@ -3585,10 +3582,6 @@ start_hourglass () | |||
| 3585 | EMACS_TIME delay; | 3582 | EMACS_TIME delay; |
| 3586 | int secs, usecs = 0; | 3583 | int secs, usecs = 0; |
| 3587 | 3584 | ||
| 3588 | /* Don't bother for ttys. */ | ||
| 3589 | if (NILP (Vwindow_system)) | ||
| 3590 | return; | ||
| 3591 | |||
| 3592 | cancel_hourglass (); | 3585 | cancel_hourglass (); |
| 3593 | 3586 | ||
| 3594 | if (INTEGERP (Vhourglass_delay) | 3587 | if (INTEGERP (Vhourglass_delay) |
| @@ -3801,7 +3794,7 @@ x_create_tip_frame (dpyinfo, parms, text) | |||
| 3801 | parms = Fcopy_alist (parms); | 3794 | parms = Fcopy_alist (parms); |
| 3802 | 3795 | ||
| 3803 | #ifdef MULTI_KBOARD | 3796 | #ifdef MULTI_KBOARD |
| 3804 | kb = dpyinfo->kboard; | 3797 | kb = dpyinfo->terminal->kboard; |
| 3805 | #else | 3798 | #else |
| 3806 | kb = &the_only_kboard; | 3799 | kb = &the_only_kboard; |
| 3807 | #endif | 3800 | #endif |
diff --git a/src/macmenu.c b/src/macmenu.c index a5196a156eb..a23e516dd07 100644 --- a/src/macmenu.c +++ b/src/macmenu.c | |||
| @@ -26,10 +26,10 @@ Boston, MA 02110-1301, USA. */ | |||
| 26 | #include <stdio.h> | 26 | #include <stdio.h> |
| 27 | 27 | ||
| 28 | #include "lisp.h" | 28 | #include "lisp.h" |
| 29 | #include "frame.h" | ||
| 29 | #include "termhooks.h" | 30 | #include "termhooks.h" |
| 30 | #include "keyboard.h" | 31 | #include "keyboard.h" |
| 31 | #include "keymap.h" | 32 | #include "keymap.h" |
| 32 | #include "frame.h" | ||
| 33 | #include "window.h" | 33 | #include "window.h" |
| 34 | #include "blockinput.h" | 34 | #include "blockinput.h" |
| 35 | #include "buffer.h" | 35 | #include "buffer.h" |
| @@ -720,8 +720,8 @@ no quit occurs and `x-popup-menu' returns nil. */) | |||
| 720 | enum scroll_bar_part part; | 720 | enum scroll_bar_part part; |
| 721 | unsigned long time; | 721 | unsigned long time; |
| 722 | 722 | ||
| 723 | if (mouse_position_hook) | 723 | if (FRAME_TERMINAL (new_f)->mouse_position_hook) |
| 724 | (*mouse_position_hook) (&new_f, 1, &bar_window, | 724 | (*FRAME_TERMINAL (new_f)->mouse_position_hook) (&new_f, 1, &bar_window, |
| 725 | &part, &x, &y, &time); | 725 | &part, &x, &y, &time); |
| 726 | if (new_f != 0) | 726 | if (new_f != 0) |
| 727 | XSETFRAME (window, new_f); | 727 | XSETFRAME (window, new_f); |
diff --git a/src/macterm.c b/src/macterm.c index 316e61cc537..b48ffb47fdb 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -231,14 +231,14 @@ void x_raise_frame P_ ((struct frame *)); | |||
| 231 | void x_set_window_size P_ ((struct frame *, int, int, int)); | 231 | void x_set_window_size P_ ((struct frame *, int, int, int)); |
| 232 | void x_wm_set_window_state P_ ((struct frame *, int)); | 232 | void x_wm_set_window_state P_ ((struct frame *, int)); |
| 233 | void x_wm_set_icon_pixmap P_ ((struct frame *, int)); | 233 | void x_wm_set_icon_pixmap P_ ((struct frame *, int)); |
| 234 | void mac_initialize P_ ((void)); | 234 | static void mac_initialize P_ ((void)); |
| 235 | static void x_font_min_bounds P_ ((XFontStruct *, int *, int *)); | 235 | static void x_font_min_bounds P_ ((XFontStruct *, int *, int *)); |
| 236 | static int x_compute_min_glyph_bounds P_ ((struct frame *)); | 236 | static int x_compute_min_glyph_bounds P_ ((struct frame *)); |
| 237 | static void x_update_end P_ ((struct frame *)); | 237 | static void x_update_end P_ ((struct frame *)); |
| 238 | static void XTframe_up_to_date P_ ((struct frame *)); | 238 | static void XTframe_up_to_date P_ ((struct frame *)); |
| 239 | static void XTset_terminal_modes P_ ((void)); | 239 | static void XTset_terminal_modes P_ ((struct terminal *)); |
| 240 | static void XTreset_terminal_modes P_ ((void)); | 240 | static void XTreset_terminal_modes P_ ((struct terminal *)); |
| 241 | static void x_clear_frame P_ ((void)); | 241 | static void x_clear_frame P_ ((struct frame *)); |
| 242 | static void frame_highlight P_ ((struct frame *)); | 242 | static void frame_highlight P_ ((struct frame *)); |
| 243 | static void frame_unhighlight P_ ((struct frame *)); | 243 | static void frame_unhighlight P_ ((struct frame *)); |
| 244 | static void x_new_focus_frame P_ ((struct x_display_info *, struct frame *)); | 244 | static void x_new_focus_frame P_ ((struct x_display_info *, struct frame *)); |
| @@ -266,6 +266,8 @@ static void x_scroll_bar_report_motion P_ ((struct frame **, Lisp_Object *, | |||
| 266 | static int is_emacs_window P_ ((WindowPtr)); | 266 | static int is_emacs_window P_ ((WindowPtr)); |
| 267 | static XCharStruct *mac_per_char_metric P_ ((XFontStruct *, XChar2b *, int)); | 267 | static XCharStruct *mac_per_char_metric P_ ((XFontStruct *, XChar2b *, int)); |
| 268 | static void XSetFont P_ ((Display *, GC, XFontStruct *)); | 268 | static void XSetFont P_ ((Display *, GC, XFontStruct *)); |
| 269 | static struct terminal *mac_create_terminal P_ ((struct mac_display_info *dpyinfo)); | ||
| 270 | |||
| 269 | 271 | ||
| 270 | #define GC_FORE_COLOR(gc) (&(gc)->fore_color) | 272 | #define GC_FORE_COLOR(gc) (&(gc)->fore_color) |
| 271 | #define GC_BACK_COLOR(gc) (&(gc)->back_color) | 273 | #define GC_BACK_COLOR(gc) (&(gc)->back_color) |
| @@ -2306,7 +2308,7 @@ mac_destroy_fringe_bitmap (which) | |||
| 2306 | rarely happens). */ | 2308 | rarely happens). */ |
| 2307 | 2309 | ||
| 2308 | static void | 2310 | static void |
| 2309 | XTset_terminal_modes () | 2311 | XTset_terminal_modes (struct terminal *t) |
| 2310 | { | 2312 | { |
| 2311 | } | 2313 | } |
| 2312 | 2314 | ||
| @@ -2314,7 +2316,7 @@ XTset_terminal_modes () | |||
| 2314 | the windows go away, and suspending requires no action. */ | 2316 | the windows go away, and suspending requires no action. */ |
| 2315 | 2317 | ||
| 2316 | static void | 2318 | static void |
| 2317 | XTreset_terminal_modes () | 2319 | XTreset_terminal_modes (struct terminal *t) |
| 2318 | { | 2320 | { |
| 2319 | } | 2321 | } |
| 2320 | 2322 | ||
| @@ -3957,15 +3959,8 @@ x_delete_glyphs (n) | |||
| 3957 | frame. Otherwise clear the selected frame. */ | 3959 | frame. Otherwise clear the selected frame. */ |
| 3958 | 3960 | ||
| 3959 | static void | 3961 | static void |
| 3960 | x_clear_frame () | 3962 | x_clear_frame (struct frame *f) |
| 3961 | { | 3963 | { |
| 3962 | struct frame *f; | ||
| 3963 | |||
| 3964 | if (updating_frame) | ||
| 3965 | f = updating_frame; | ||
| 3966 | else | ||
| 3967 | f = SELECTED_FRAME (); | ||
| 3968 | |||
| 3969 | /* Clearing the frame will erase any cursor, so mark them all as no | 3964 | /* Clearing the frame will erase any cursor, so mark them all as no |
| 3970 | longer visible. */ | 3965 | longer visible. */ |
| 3971 | mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f))); | 3966 | mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f))); |
| @@ -4499,7 +4494,7 @@ note_mouse_movement (frame, pos) | |||
| 4499 | clear_mouse_face (dpyinfo); | 4494 | clear_mouse_face (dpyinfo); |
| 4500 | dpyinfo->mouse_face_mouse_frame = 0; | 4495 | dpyinfo->mouse_face_mouse_frame = 0; |
| 4501 | if (!dpyinfo->grabbed) | 4496 | if (!dpyinfo->grabbed) |
| 4502 | rif->define_frame_cursor (frame, | 4497 | FRAME_RIF (frame)->define_frame_cursor (frame, |
| 4503 | frame->output_data.mac->nontext_cursor); | 4498 | frame->output_data.mac->nontext_cursor); |
| 4504 | } | 4499 | } |
| 4505 | 4500 | ||
| @@ -11626,6 +11621,7 @@ mac_term_init (display_name, xrm_option, resource_name) | |||
| 11626 | char *resource_name; | 11621 | char *resource_name; |
| 11627 | { | 11622 | { |
| 11628 | struct mac_display_info *dpyinfo; | 11623 | struct mac_display_info *dpyinfo; |
| 11624 | struct terminal *terminal; | ||
| 11629 | 11625 | ||
| 11630 | BLOCK_INPUT; | 11626 | BLOCK_INPUT; |
| 11631 | 11627 | ||
| @@ -11641,6 +11637,13 @@ mac_term_init (display_name, xrm_option, resource_name) | |||
| 11641 | dpyinfo = &one_mac_display_info; | 11637 | dpyinfo = &one_mac_display_info; |
| 11642 | bzero (dpyinfo, sizeof (*dpyinfo)); | 11638 | bzero (dpyinfo, sizeof (*dpyinfo)); |
| 11643 | 11639 | ||
| 11640 | terminal = mac_create_terminal (dpyinfo); | ||
| 11641 | |||
| 11642 | /* Set the name of the terminal. */ | ||
| 11643 | terminal->name = (char *) xmalloc (SBYTES (display_name) + 1); | ||
| 11644 | strncpy (terminal->name, SDATA (display_name), SBYTES (display_name)); | ||
| 11645 | terminal->name[SBYTES (display_name)] = 0; | ||
| 11646 | |||
| 11644 | #ifdef MAC_OSX | 11647 | #ifdef MAC_OSX |
| 11645 | dpyinfo->mac_id_name | 11648 | dpyinfo->mac_id_name |
| 11646 | = (char *) xmalloc (SCHARS (Vinvocation_name) | 11649 | = (char *) xmalloc (SCHARS (Vinvocation_name) |
| @@ -11844,31 +11847,39 @@ static struct redisplay_interface x_redisplay_interface = | |||
| 11844 | mac_shift_glyphs_for_insert | 11847 | mac_shift_glyphs_for_insert |
| 11845 | }; | 11848 | }; |
| 11846 | 11849 | ||
| 11847 | void | 11850 | static struct terminal * |
| 11848 | mac_initialize () | 11851 | mac_create_terminal (struct mac_display_info *dpyinfo) |
| 11849 | { | 11852 | { |
| 11850 | rif = &x_redisplay_interface; | 11853 | struct terminal *terminal; |
| 11851 | 11854 | ||
| 11852 | clear_frame_hook = x_clear_frame; | 11855 | terminal = create_terminal (); |
| 11853 | ins_del_lines_hook = x_ins_del_lines; | 11856 | |
| 11854 | delete_glyphs_hook = x_delete_glyphs; | 11857 | terminal->type = output_mac; |
| 11855 | ring_bell_hook = XTring_bell; | 11858 | terminal->display_info.mac = dpyinfo; |
| 11856 | reset_terminal_modes_hook = XTreset_terminal_modes; | 11859 | dpyinfo->terminal = terminal; |
| 11857 | set_terminal_modes_hook = XTset_terminal_modes; | 11860 | |
| 11858 | update_begin_hook = x_update_begin; | 11861 | terminal->rif = &x_redisplay_interface; |
| 11859 | update_end_hook = x_update_end; | 11862 | terminal->clear_frame_hook = x_clear_frame; |
| 11860 | set_terminal_window_hook = XTset_terminal_window; | 11863 | terminal->ins_del_lines_hook = x_ins_del_lines; |
| 11861 | read_socket_hook = XTread_socket; | 11864 | terminal->delete_glyphs_hook = x_delete_glyphs; |
| 11862 | frame_up_to_date_hook = XTframe_up_to_date; | 11865 | terminal->ring_bell_hook = XTring_bell; |
| 11863 | mouse_position_hook = XTmouse_position; | 11866 | terminal->reset_terminal_modes_hook = XTreset_terminal_modes; |
| 11864 | frame_rehighlight_hook = XTframe_rehighlight; | 11867 | terminal->set_terminal_modes_hook = XTset_terminal_modes; |
| 11865 | frame_raise_lower_hook = XTframe_raise_lower; | 11868 | terminal->update_begin_hook = x_update_begin; |
| 11866 | 11869 | terminal->update_end_hook = x_update_end; | |
| 11867 | set_vertical_scroll_bar_hook = XTset_vertical_scroll_bar; | 11870 | terminal->set_terminal_window_hook = XTset_terminal_window; |
| 11868 | condemn_scroll_bars_hook = XTcondemn_scroll_bars; | 11871 | terminal->read_socket_hook = XTread_socket; |
| 11869 | redeem_scroll_bar_hook = XTredeem_scroll_bar; | 11872 | terminal->frame_up_to_date_hook = XTframe_up_to_date; |
| 11870 | judge_scroll_bars_hook = XTjudge_scroll_bars; | 11873 | terminal->mouse_position_hook = XTmouse_position; |
| 11874 | terminal->frame_rehighlight_hook = XTframe_rehighlight; | ||
| 11875 | terminal->frame_raise_lower_hook = XTframe_raise_lower; | ||
| 11876 | |||
| 11877 | terminal->set_vertical_scroll_bar_hook = XTset_vertical_scroll_bar; | ||
| 11878 | terminal->condemn_scroll_bars_hook = XTcondemn_scroll_bars; | ||
| 11879 | terminal->redeem_scroll_bar_hook = XTredeem_scroll_bar; | ||
| 11880 | terminal->judge_scroll_bars_hook = XTjudge_scroll_bars; | ||
| 11871 | 11881 | ||
| 11882 | #if 0 | ||
| 11872 | TTY_SCROLL_REGION_OK (CURTTY ()) = 1; /* we'll scroll partial frames */ | 11883 | TTY_SCROLL_REGION_OK (CURTTY ()) = 1; /* we'll scroll partial frames */ |
| 11873 | TTY_CHAR_INS_DEL_OK (CURTTY ()) = 1; | 11884 | TTY_CHAR_INS_DEL_OK (CURTTY ()) = 1; |
| 11874 | TTY_LINE_INS_DEL_OK (CURTTY ()) = 1; /* we'll just blt 'em */ | 11885 | TTY_LINE_INS_DEL_OK (CURTTY ()) = 1; /* we'll just blt 'em */ |
| @@ -11876,6 +11887,22 @@ mac_initialize () | |||
| 11876 | TTY_MEMORY_BELOW_FRAME (CURTTY ()) = 0; /* we don't remember what | 11887 | TTY_MEMORY_BELOW_FRAME (CURTTY ()) = 0; /* we don't remember what |
| 11877 | scrolls off the | 11888 | scrolls off the |
| 11878 | bottom */ | 11889 | bottom */ |
| 11890 | #else | ||
| 11891 | terminal->scroll_region_ok = 1; /* We'll scroll partial frames. */ | ||
| 11892 | terminal->char_ins_del_ok = 1; | ||
| 11893 | terminal->line_ins_del_ok = 1; /* We'll just blt 'em. */ | ||
| 11894 | terminal->fast_clear_end_of_line = 1; /* X does this well. */ | ||
| 11895 | terminal->memory_below_frame = 0; /* We don't remember what scrolls | ||
| 11896 | off the bottom. */ | ||
| 11897 | |||
| 11898 | #endif | ||
| 11899 | return terminal; | ||
| 11900 | } | ||
| 11901 | |||
| 11902 | static void | ||
| 11903 | mac_initialize () | ||
| 11904 | { | ||
| 11905 | |||
| 11879 | baud_rate = 19200; | 11906 | baud_rate = 19200; |
| 11880 | 11907 | ||
| 11881 | last_tool_bar_item = -1; | 11908 | last_tool_bar_item = -1; |
| @@ -11925,6 +11952,7 @@ mac_initialize () | |||
| 11925 | #endif | 11952 | #endif |
| 11926 | 11953 | ||
| 11927 | UNBLOCK_INPUT; | 11954 | UNBLOCK_INPUT; |
| 11955 | |||
| 11928 | } | 11956 | } |
| 11929 | 11957 | ||
| 11930 | 11958 | ||
diff --git a/src/macterm.h b/src/macterm.h index f2d69b7821d..fe61674f30f 100644 --- a/src/macterm.h +++ b/src/macterm.h | |||
| @@ -64,6 +64,9 @@ struct mac_display_info | |||
| 64 | /* Chain of all mac_display_info structures. */ | 64 | /* Chain of all mac_display_info structures. */ |
| 65 | struct mac_display_info *next; | 65 | struct mac_display_info *next; |
| 66 | 66 | ||
| 67 | /* The generic display parameters corresponding to this X display. */ | ||
| 68 | struct terminal *terminal; | ||
| 69 | |||
| 67 | /* This is a cons cell of the form (NAME . FONT-LIST-CACHE). | 70 | /* This is a cons cell of the form (NAME . FONT-LIST-CACHE). |
| 68 | The same cons cell also appears in x_display_name_list. */ | 71 | The same cons cell also appears in x_display_name_list. */ |
| 69 | Lisp_Object name_list_element; | 72 | Lisp_Object name_list_element; |
| @@ -611,7 +614,6 @@ extern void x_free_frame_resources P_ ((struct frame *)); | |||
| 611 | extern void x_destroy_window P_ ((struct frame *)); | 614 | extern void x_destroy_window P_ ((struct frame *)); |
| 612 | extern void x_wm_set_size_hint P_ ((struct frame *, long, int)); | 615 | extern void x_wm_set_size_hint P_ ((struct frame *, long, int)); |
| 613 | extern void x_delete_display P_ ((struct x_display_info *)); | 616 | extern void x_delete_display P_ ((struct x_display_info *)); |
| 614 | extern void mac_initialize P_ ((void)); | ||
| 615 | extern Pixmap XCreatePixmap P_ ((Display *, WindowPtr, unsigned int, | 617 | extern Pixmap XCreatePixmap P_ ((Display *, WindowPtr, unsigned int, |
| 616 | unsigned int, unsigned int)); | 618 | unsigned int, unsigned int)); |
| 617 | extern Pixmap XCreatePixmapFromBitmapData P_ ((Display *, WindowPtr, char *, | 619 | extern Pixmap XCreatePixmapFromBitmapData P_ ((Display *, WindowPtr, char *, |
diff --git a/src/s/darwin.h b/src/s/darwin.h index cb032429f7d..72ed8964a7d 100644 --- a/src/s/darwin.h +++ b/src/s/darwin.h | |||
| @@ -53,6 +53,10 @@ Boston, MA 02110-1301, USA. */ | |||
| 53 | #endif | 53 | #endif |
| 54 | #endif | 54 | #endif |
| 55 | 55 | ||
| 56 | /* We need a little extra space, see ../../lisp/loadup.el. */ | ||
| 57 | #define SYSTEM_PURESIZE_EXTRA 30000 | ||
| 58 | |||
| 59 | |||
| 56 | /* SYSTEM_TYPE should indicate the kind of system you are using. | 60 | /* SYSTEM_TYPE should indicate the kind of system you are using. |
| 57 | It sets the Lisp variable system-type. */ | 61 | It sets the Lisp variable system-type. */ |
| 58 | 62 | ||
diff --git a/src/term.c b/src/term.c index 04d5f74fc2c..53727a975ea 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -2732,9 +2732,8 @@ to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.", | |||
| 2732 | prompt in the mini-buffer. */ | 2732 | prompt in the mini-buffer. */ |
| 2733 | if (current_kboard == initial_kboard) | 2733 | if (current_kboard == initial_kboard) |
| 2734 | current_kboard = terminal->kboard; | 2734 | current_kboard = terminal->kboard; |
| 2735 | #endif | ||
| 2736 | |||
| 2737 | term_get_fkeys (address, terminal->kboard); | 2735 | term_get_fkeys (address, terminal->kboard); |
| 2736 | #endif | ||
| 2738 | 2737 | ||
| 2739 | /* Get frame size from system, or else from termcap. */ | 2738 | /* Get frame size from system, or else from termcap. */ |
| 2740 | { | 2739 | { |
diff --git a/src/termhooks.h b/src/termhooks.h index 21c746758fb..e9fcbb37750 100644 --- a/src/termhooks.h +++ b/src/termhooks.h | |||
| @@ -293,6 +293,9 @@ enum { | |||
| 293 | #endif /* CONSP */ | 293 | #endif /* CONSP */ |
| 294 | 294 | ||
| 295 | 295 | ||
| 296 | struct mac_display_info; | ||
| 297 | struct w32_display_info; | ||
| 298 | |||
| 296 | /* Terminal-local parameters. */ | 299 | /* Terminal-local parameters. */ |
| 297 | struct terminal | 300 | struct terminal |
| 298 | { | 301 | { |
| @@ -327,9 +330,8 @@ struct terminal | |||
| 327 | { | 330 | { |
| 328 | struct tty_display_info *tty; /* termchar.h */ | 331 | struct tty_display_info *tty; /* termchar.h */ |
| 329 | struct x_display_info *x; /* xterm.h */ | 332 | struct x_display_info *x; /* xterm.h */ |
| 330 | #ifdef WINDOWSNT | ||
| 331 | struct w32_display_info *w32; /* w32term.h */ | 333 | struct w32_display_info *w32; /* w32term.h */ |
| 332 | #endif | 334 | struct mac_display_info *mac; /* macterm.h */ |
| 333 | } display_info; | 335 | } display_info; |
| 334 | 336 | ||
| 335 | 337 | ||
diff --git a/src/w32fns.c b/src/w32fns.c index 597eea05fbe..0306804f14c 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -4165,7 +4165,7 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 4165 | display = Qnil; | 4165 | display = Qnil; |
| 4166 | dpyinfo = check_x_display_info (display); | 4166 | dpyinfo = check_x_display_info (display); |
| 4167 | #ifdef MULTI_KBOARD | 4167 | #ifdef MULTI_KBOARD |
| 4168 | kb = dpyinfo->kboard; | 4168 | kb = dpyinfo->terminal->kboard; |
| 4169 | #else | 4169 | #else |
| 4170 | kb = &the_only_kboard; | 4170 | kb = &the_only_kboard; |
| 4171 | #endif | 4171 | #endif |
diff --git a/src/w32term.c b/src/w32term.c index 27ba0d41d2b..7173a5ed25a 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -230,7 +230,7 @@ void x_raise_frame P_ ((struct frame *)); | |||
| 230 | void x_set_window_size P_ ((struct frame *, int, int, int)); | 230 | void x_set_window_size P_ ((struct frame *, int, int, int)); |
| 231 | void x_wm_set_window_state P_ ((struct frame *, int)); | 231 | void x_wm_set_window_state P_ ((struct frame *, int)); |
| 232 | void x_wm_set_icon_pixmap P_ ((struct frame *, int)); | 232 | void x_wm_set_icon_pixmap P_ ((struct frame *, int)); |
| 233 | void w32_initialize P_ ((void)); | 233 | static void w32_initialize P_ ((void)); |
| 234 | static void x_font_min_bounds P_ ((XFontStruct *, int *, int *)); | 234 | static void x_font_min_bounds P_ ((XFontStruct *, int *, int *)); |
| 235 | int x_compute_min_glyph_bounds P_ ((struct frame *)); | 235 | int x_compute_min_glyph_bounds P_ ((struct frame *)); |
| 236 | static void x_update_end P_ ((struct frame *)); | 236 | static void x_update_end P_ ((struct frame *)); |
| @@ -6403,7 +6403,7 @@ x_delete_display (dpyinfo) | |||
| 6403 | 6403 | ||
| 6404 | DWORD WINAPI w32_msg_worker (void * arg); | 6404 | DWORD WINAPI w32_msg_worker (void * arg); |
| 6405 | 6405 | ||
| 6406 | void | 6406 | static void |
| 6407 | w32_initialize () | 6407 | w32_initialize () |
| 6408 | { | 6408 | { |
| 6409 | baud_rate = 19200; | 6409 | baud_rate = 19200; |