/* Generic frame functions.
- Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2003
+ Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2003, 2004
Free Software Foundation.
This file is part of GNU Emacs.
f->selected_window = root_window;
/* Make sure this window seems more recently used than
a newly-created, never-selected window. */
- XSETFASTINT (XWINDOW (f->selected_window)->use_time, ++window_select_count);
+ ++window_select_count;
+ XSETFASTINT (XWINDOW (f->selected_window)->use_time, window_select_count);
f->default_face_done_p = 0;
Subsequent editing commands apply to its selected window.
The selection of FRAME lasts until the next time the user does
something to select a different frame, or until the next time this
-function is called. */)
+function is called. If you are using a window system, the previously
+selected frame may be restored as the selected frame after return to
+the command loop, because it still may have the window system's input
+focus. On a text-only terminal, the next redisplay will display FRAME.
+
+This function returns FRAME, or nil if FRAME has been deleted. */)
(frame, no_enter)
Lisp_Object frame, no_enter;
{
DEFUN ("set-frame-selected-window", Fset_frame_selected_window,
Sset_frame_selected_window, 2, 2, 0,
doc: /* Set the selected window of frame object FRAME to WINDOW.
+Return WINDOW.
If FRAME is nil, the selected frame is used.
If FRAME is the selected frame, this makes WINDOW the selected window. */)
(frame, window)
doc: /* Return t if FRAME is now \"visible\" (actually in use for display).
A frame that is not \"visible\" is not updated and, if it works through
a window system, it may not show at all.
-Return the symbol `icon' if frame is visible only as an icon. */)
+Return the symbol `icon' if frame is visible only as an icon.
+
+On a text-only terminal, all frames are considered visible, whether
+they are currently being displayed or not, and this function returns t
+for all frames. */)
(frame)
Lisp_Object frame;
{
DEFUN ("raise-frame", Fraise_frame, Sraise_frame, 0, 1, "",
doc: /* Bring FRAME to the front, so it occludes any frames it overlaps.
-If FRAME is invisible, make it visible.
+If FRAME is invisible or iconified, make it visible.
If you don't specify a frame, the selected frame is used.
If Emacs is displaying on an ordinary terminal or some other device which
doesn't support multiple overlapping frames, this function does nothing. */)
XSETINT (icon_top, 0);
}
-#ifndef HAVE_CARBON
- /* MAC_TODO: fullscreen */
if (FRAME_VISIBLE_P (f) && fullscreen_is_being_set)
{
/* If the frame is visible already and the fullscreen parameter is
if (new_top != f->top_pos || new_left != f->left_pos)
x_set_offset (f, new_left, new_top, 1);
}
-#endif
/* Don't set these parameters unless they've been explicitly
specified. The window might be mapped or resized while we're in
store_in_alist (alistptr, Qdisplay,
XCAR (FRAME_X_DISPLAY_INFO (f)->name_list_element));
-#ifndef HAVE_CARBON
-/* A Mac Window is identified by a struct, not an integer. */
if (FRAME_X_OUTPUT (f)->parent_desc == FRAME_X_DISPLAY_INFO (f)->root_window)
tem = Qnil;
else
XSETFASTINT (tem, FRAME_X_OUTPUT (f)->parent_desc);
store_in_alist (alistptr, Qparent_id, tem);
-#endif
}
struct frame *f;
Lisp_Object new_value, old_value;
{
-#ifndef HAVE_CARBON
if (NILP (new_value))
f->want_fullscreen = FULLSCREEN_NONE;
else if (EQ (new_value, Qfullboth))
f->want_fullscreen = FULLSCREEN_WIDTH;
else if (EQ (new_value, Qfullheight))
f->want_fullscreen = FULLSCREEN_HEIGHT;
-#endif
}
if (XINT (arg) == f->border_width)
return;
-#ifndef HAVE_CARBON
+#ifndef MAC_OS
if (FRAME_X_WINDOW (f) != 0)
error ("Cannot change the border width of a window");
#endif /* MAC_TODO */
DEFVAR_LISP ("default-frame-alist", &Vdefault_frame_alist,
doc: /* Alist of default values for frame creation.
These may be set in your init file, like this:
- (setq default-frame-alist '((width . 80) (height . 55) (menu-bar-lines . 1))
+ (setq default-frame-alist '((width . 80) (height . 55) (menu-bar-lines . 1)))
These override values given in window system configuration data,
including X Windows' defaults database.
For values specific to the first Emacs frame, see `initial-frame-alist'.
DEFVAR_LISP ("default-frame-scroll-bars", &Vdefault_frame_scroll_bars,
doc: /* Default position of scroll bars on this window-system. */);
#ifdef HAVE_WINDOW_SYSTEM
-#if defined(HAVE_NTGUI) || defined(HAVE_CARBON)
+#if defined(HAVE_NTGUI) || defined(MAC_OS)
/* MS-Windows has scroll bars on the right by default. */
Vdefault_frame_scroll_bars = Qright;
#else