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/macfns.c | |
| 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/macfns.c')
| -rw-r--r-- | src/macfns.c | 137 |
1 files changed, 65 insertions, 72 deletions
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 |