Lisp_Object Qname;
Lisp_Object Qonly;
Lisp_Object Qunsplittable;
+Lisp_Object Qmenu_bar_lines;
Lisp_Object Qwidth;
Lisp_Object Qx;
f->param_alist = Qnil;
f->scroll_bars = Qnil;
f->condemned_scroll_bars = Qnil;
+ f->face_alist = Qnil;
root_window = make_window ();
if (mini_p)
}
\f
DEFUN ("select-frame", Fselect_frame, Sselect_frame, 1, 2, "e",
- "Select the frame FRAME. FRAME's selected window becomes \"the\"\n\
-selected window. If the optional parameter NO-ENTER is non-nil, don't\n\
-focus on that frame.\n\
-\n\
-This function is interactive, and may be bound to the ``switch-frame''\n\
-event; when invoked this way, it switches to the frame named in the\n\
-event. When called from lisp, FRAME may be a ``switch-frame'' event;\n\
-if it is, select the frame named in the event.\n\
+ "Select the frame FRAME.\n\
+Subseqent editing commands apply to its selected window.\n\
+The selection of FRAME lasts until the next time the user does\n\
+something to select a different frame, or until the next time this\n\
+function is called.")
+ (frame, no_enter)
+ Lisp_Object frame, no_enter;
+{
+ return Fhandle_switch_frame (frame, no_enter);
+}
+
+
+DEFUN ("handle-switch-frame", Fhandle_switch_frame, Shandle_switch_frame, 1, 2, "e",
+ "Handle a switch-frame event EVENT.\n\
+Switch-frame events is usually bound to this function.\n\
+A switch-frame event tells Emacs that the window manager has requested\n\
+that the user's events be directed to the frame mentioned in the event.\n\
+This function selects the selected window of the frame of EVENT.\n\
\n\
-Changing the selected frame can change focus redirections. See\n\
-`redirect-frame-focus' for details.")
+If EVENT is frame object, handle it as if it were a switch-frame event\n\
+to that frame.")
(frame, no_enter)
Lisp_Object frame, no_enter;
{
/* Don't let the frame remain selected. */
if (f == selected_frame)
- Fselect_frame (next_frame (frame, Qt), Qnil);
+ Fhandle_switch_frame (next_frame (frame, Qt), Qnil);
/* Don't allow minibuf_window to remain on a deleted frame. */
if (EQ (f->minibuffer_window, minibuf_window))
}
-DEFUN ("frame-to-front", Fframe_to_front, Sframe_to_front, 1, 1, 0,
+DEFUN ("raise-frame", Fraise_frame, Sraise_frame, 1, 1, 0,
"Bring FRAME to the front, so it occludes any frames it overlaps.\n\
If FRAME is invisible, make it visible.\n\
If Emacs is displaying on an ordinary terminal or some other device which\n\
return Qnil;
}
-DEFUN ("frame-to-back", Fframe_to_back, Sframe_to_back, 1, 1, 0,
+/* Should we have a corresponding function called Flower_Power? */
+DEFUN ("lower-frame", Flower_frame, Slower_frame, 1, 1, 0,
"Send FRAME to the back, so it is occluded by any frames that overlap it.\n\
If Emacs is displaying on an ordinary terminal or some other device which\n\
doesn't support multiple overlapping frames, this function does nothing.")
: (FRAME_MINIBUF_ONLY_P (f) ? Qonly
: FRAME_MINIBUF_WINDOW (f))));
store_in_alist (&alist, Qunsplittable, (f->no_split ? Qt : Qnil));
+ store_in_alist (&alist, Qmenu_bar_lines, (FRAME_MENU_BAR_LINES (f)));
/* I think this should be done with a hook. */
#ifdef HAVE_X_WINDOWS
staticpro (&Qwidth);
Qx = intern ("x");
staticpro (&Qx);
+ Qmenu_bar_lines = intern ("menu-bar-lines");
+ staticpro (&Qmenu_bar_lines);
staticpro (&Vframe_list);
defsubr (&Sframep);
defsubr (&Sframe_live_p);
+ defsubr (&Shandle_switch_frame);
defsubr (&Sselect_frame);
defsubr (&Sselected_frame);
defsubr (&Swindow_frame);
defsubr (&Siconify_frame);
defsubr (&Sframe_visible_p);
defsubr (&Svisible_frame_list);
- defsubr (&Sframe_to_front);
- defsubr (&Sframe_to_back);
+ defsubr (&Sraise_frame);
+ defsubr (&Slower_frame);
defsubr (&Sredirect_frame_focus);
defsubr (&Sframe_focus);
defsubr (&Sframe_parameters);
keys_of_frame ()
{
- initial_define_lispy_key (global_map, "switch-frame", "select-frame");
+ initial_define_lispy_key (global_map, "switch-frame", "handle-switch-frame");
}
\f
#else /* not MULTI_FRAME */
return Qnil;
}
-DEFUN ("frame-height", Fframe_height, Sframe_height, 0, 0, 0,
- "Return number of lines available for display on selected frame.")
- ()
+DEFUN ("frame-height", Fframe_height, Sframe_height, 0, 1, 0,
+ "Return number of lines available for display on FRAME.\n\
+If FRAME is omitted, describe the currently selected frame.")
+ (frame)
+ Lisp_Object frame;
{
return make_number (FRAME_HEIGHT (selected_frame));
}
-DEFUN ("frame-width", Fframe_width, Sframe_width, 0, 0, 0,
- "Return number of columns available for display on selected frame.")
- ()
+DEFUN ("frame-width", Fframe_width, Sframe_width, 0, 1, 0,
+ "Return number of columns available for display on FRAME.\n\
+If FRAME is omitted, describe the currently selected frame.")
+ (frame)
+ Lisp_Object frame;
{
return make_number (FRAME_WIDTH (selected_frame));
}