]> code.delx.au - gnu-emacs/blobdiff - doc/lispref/frames.texi
Document changes to windows code.
[gnu-emacs] / doc / lispref / frames.texi
index d27010d209680ef3c1379f798ad74a34f29629c9..d9399e98a69ca46a8b35866fe12af16eef626ac8 100644 (file)
@@ -1,7 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2001,
-@c   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+@c Copyright (C) 1990-1995, 1998-1999, 2001-2011
 @c   Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../../info/frames
@@ -87,8 +86,6 @@ is the same as for @code{framep} above.
 * Frame Titles::                Automatic updating of frame titles.
 * Deleting Frames::             Frames last until explicitly deleted.
 * Finding All Frames::          How to examine all existing frames.
-* Frames and Windows::          A frame contains windows;
-                                  display of text always works through windows.
 * Minibuffers and Frames::      How a frame finds the minibuffer to use.
 * Input Focus::                 Specifying the selected frame.
 * Visibility of Frames::        Frames may be visible or invisible, or icons.
@@ -338,9 +335,6 @@ parameters @code{foreground-color}, @code{background-color},
 If the terminal supports frame transparency, the parameter
 @code{alpha} is also meaningful.
 
-  You can use frame parameters to define frame-local bindings for
-variables.  @xref{Frame-Local Variables}.
-
 @menu
 * Parameter Access::       How to change a frame's parameters.
 * Initial Parameters::     Specifying frame parameters when you make a frame.
@@ -375,9 +369,6 @@ elements of @var{alist}.  Each element of @var{alist} has the form
 parameter.  If you don't mention a parameter in @var{alist}, its value
 doesn't change.  If @var{frame} is @code{nil}, it defaults to the selected
 frame.
-
-You can use this function to define frame-local bindings for
-variables, see @ref{Frame-Local Variables}.
 @end defun
 
 @defun set-frame-parameter frame parm value
@@ -521,6 +512,11 @@ you don't specify a name, Emacs sets the frame name automatically
 If you specify the frame name explicitly when you create the frame, the
 name is also used (instead of the name of the Emacs executable) when
 looking up X resources for the frame.
+
+@item explicit-name
+If the frame name was specified explicitly when the frame was created,
+this parameter will be that name.  If the frame wasn't explicitly
+named, this parameter will be @code{nil}.
 @end table
 
 @node Position Parameters
@@ -682,32 +678,34 @@ use the default width.
 @itemx right-fringe
 The default width of the left and right fringes of windows in this
 frame (@pxref{Fringes}).  If either of these is zero, that effectively
-removes the corresponding fringe.  A value of @code{nil} stands for
-the standard fringe width, which is the width needed to display the
-fringe bitmaps.
+removes the corresponding fringe.
+
+When you use @code{frame-parameter} to query the value of either of
+these two frame parameters, the return value is always an integer.
+When using @code{set-frame-parameter}, passing a @code{nil} value
+imposes an actual default value of 8 pixels.
 
 The combined fringe widths must add up to an integral number of
-columns, so the actual default fringe widths for the frame may be
-larger than the specified values.  The extra width needed to reach an
-acceptable total is distributed evenly between the left and right
-fringe.  However, you can force one fringe or the other to a precise
-width by specifying that width as a negative integer.  If both widths are
-negative, only the left fringe gets the specified width.
-
-@vindex menu-bar-lines, a frame parameter
+columns, so the actual default fringe widths for the frame, as
+reported by @code{frame-parameter}, may be larger than what you
+specify.  Any extra width is distributed evenly between the left and
+right fringe.  However, you can force one fringe or the other to a
+precise width by specifying that width as a negative integer.  If both
+widths are negative, only the left fringe gets the specified width.
+
+@vindex menu-bar-lines frame parameter
 @item menu-bar-lines
 The number of lines to allocate at the top of the frame for a menu
-bar.  The default is 1.  A value of @code{nil} means don't display a
-menu bar.  @xref{Menu Bar}.  (The X toolkit and GTK allow at most one
-menu bar line; they treat larger values as 1.)
+bar.  The default is 1 if Menu Bar mode is enabled, and 0 otherwise.
+@xref{Menu Bars,,,emacs, The GNU Emacs Manual}.
 
-@vindex tool-bar-lines, a frame parameter
+@vindex tool-bar-lines frame parameter
 @item tool-bar-lines
-The number of lines to use for the tool bar.  A value of @code{nil}
-means don't display a tool bar.  (GTK and Nextstep allow at most one
-tool bar line; they treat larger values as 1.)
+The number of lines to use for the tool bar.  The default is 1 if Tool
+Bar mode is enabled, and 0 otherwise.  @xref{Tool Bars,,,emacs, The
+GNU Emacs Manual}.
 
-@vindex tool-bar-position, a frame parameter
+@vindex tool-bar-position frame parameter
 @item tool-bar-position
 The position of the tool bar.  Currently only for the GTK tool bar.
 Value can be one of @code{top}, @code{bottom} @code{left}, @code{right}.
@@ -779,10 +777,10 @@ Whether deselecting the frame lowers it (non-@code{nil} means yes).
 
 @vindex icon-type, a frame parameter
 @item icon-type
-The type of icon to use for this frame when it is iconified.  If the
-value is a string, that specifies a file containing a bitmap to use.
-Any other non-@code{nil} value specifies the default bitmap icon (a
-picture of a gnu); @code{nil} specifies a text icon.
+The type of icon to use for this frame.  If the value is a string,
+that specifies a file containing a bitmap to use; @code{nil} specifies
+no icon (in which case the window manager decides what to show); any
+other non-@code{nil} value specifies the default Emacs icon.
 
 @vindex icon-name, a frame parameter
 @item icon-name
@@ -1309,53 +1307,6 @@ direction.
   See also @code{next-window} and @code{previous-window}, in @ref{Cyclic
 Window Ordering}.
 
-@node Frames and Windows
-@section Frames and Windows
-
-  Each window is part of one and only one frame; you can get that frame
-with @code{window-frame}.
-
-@defun window-frame window
-This function returns the frame that @var{window} is on.
-@end defun
-
-  All the non-minibuffer windows in a frame are arranged in a cyclic
-order.  The order runs from the frame's top window, which is at the
-upper left corner, down and to the right, until it reaches the window at
-the lower right corner (always the minibuffer window, if the frame has
-one), and then it moves back to the top.  @xref{Cyclic Window Ordering}.
-
-@defun frame-first-window &optional frame
-This returns the topmost, leftmost window of frame @var{frame}.
-If omitted or @code{nil}, @var{frame} defaults to the selected frame.
-@end defun
-
-At any time, exactly one window on any frame is @dfn{selected within the
-frame}.  The significance of this designation is that selecting the
-frame also selects this window.  Conversely, selecting a window for
-Emacs with @code{select-window} also makes that window selected within
-its frame.  @xref{Selecting Windows}.
-
-@defun frame-selected-window  &optional frame
-This function returns the window on @var{frame} that is selected
-within @var{frame}.  If omitted or @code{nil}, @var{frame} defaults to
-the selected frame.
-@end defun
-
-@defun set-frame-selected-window frame window &optional norecord
-This sets the selected window of frame @var{frame} to @var{window}.
-If @var{frame} is @code{nil}, it operates on the selected frame.  If
-@var{frame} is the selected frame, this makes @var{window} the
-selected window.  This function returns @var{window}.
-
-Optional argument @var{norecord} non-@code{nil} means to neither change
-the order of recently selected windows nor the buffer list (@pxref{The
-Buffer List}).
-@end defun
-
-  Another function that (usually) returns one of the windows in a given
-frame is @code{minibuffer-window}.  @xref{Definition of minibuffer-window}.
-
 @node Minibuffers and Frames
 @section Minibuffers and Frames
 
@@ -1366,7 +1317,7 @@ minibuffer-window}).
 
 However, you can also create a frame with no minibuffer.  Such a frame
 must use the minibuffer window of some other frame.  When you create the
-frame, you can specify explicitly the minibuffer window to use (in some
+frame, you can explicitly specify the minibuffer window to use (in some
 other frame).  If you don't, then the minibuffer is found in the frame
 which is the value of the variable @code{default-minibuffer-frame}.  Its
 value should be a frame that does have a minibuffer.
@@ -1748,6 +1699,15 @@ If @var{frame} is not visible, this function does nothing.  The return
 value is not significant.
 @end defun
 
+@defun frame-pointer-visible-p &optional frame
+This predicate function returns non-@code{nil} if the mouse pointer
+displayed on @var{frame} is visible; otherwise it returns @code{nil}.
+@var{frame} omitted or @code{nil} means the selected frame.  This is
+useful when @code{make-pointer-invisible} is set to @code{t}: it
+allows to know if the pointer has been hidden.
+@xref{Mouse Avoidance,,,emacs}.
+@end defun
+
 @need 3000
 
 @node Pop-Up Menus
@@ -1782,9 +1742,13 @@ without actually displaying or popping up the menu.
 The argument @var{menu} says what to display in the menu.  It can be a
 keymap or a list of keymaps (@pxref{Menu Keymaps}).  In this case, the
 return value is the list of events corresponding to the user's choice.
-(This list has more than one element if the choice occurred in a
-submenu.)  Note that @code{x-popup-menu} does not actually execute the
-command bound to that sequence of events.
+This list has more than one element if the choice occurred in a
+submenu.  (Note that @code{x-popup-menu} does not actually execute the
+command bound to that sequence of events.)  On toolkits that support
+menu titles, the title is taken from the prompt string of @var{menu}
+if @var{menu} is a keymap, or from the prompt string of the first
+keymap in @var{menu} if it is a list of keymaps (@pxref{Defining
+Menus}).
 
 Alternatively, @var{menu} can have the following form:
 
@@ -1939,30 +1903,34 @@ defined in the file @file{lisp/term/x-win.el}.  Use @kbd{M-x apropos
 @node Window System Selections
 @section Window System Selections
 @cindex selection (for window systems)
-
-The X server records a set of @dfn{selections} which permit transfer of
-data between application programs.  The various selections are
-distinguished by @dfn{selection types}, represented in Emacs by
-symbols.  X clients including Emacs can read or set the selection for
-any given type.
+@cindex clipboard
+@cindex primary selection
+@cindex secondary selection
+
+  In the X window system, data can be transferred between different
+applications by means of @dfn{selections}.  X defines an arbitrary
+number of @dfn{selection types}, each of which can store its own data;
+however, only three are commonly used: the @dfn{clipboard},
+@dfn{primary selection}, and @dfn{secondary selection}.  @xref{Cut and
+Paste,, Cut and Paste, emacs, The GNU Emacs Manual}, for Emacs
+commands that make use of these selections.  This section documents
+the low-level functions for reading and setting X selections.
 
 @deffn Command x-set-selection type data
-This function sets a ``selection'' in the X server.  It takes two
-arguments: a selection type @var{type}, and the value to assign to it,
-@var{data}.  If @var{data} is @code{nil}, it means to clear out the
-selection.  Otherwise, @var{data} may be a string, a symbol, an integer
-(or a cons of two integers or list of two integers), an overlay, or a
-cons of two markers pointing to the same buffer.  An overlay or a pair
-of markers stands for text in the overlay or between the markers.
-
-The argument @var{data} may also be a vector of valid non-vector
-selection values.
-
-Each possible @var{type} has its own selection value, which changes
-independently.  The usual values of @var{type} are @code{PRIMARY},
-@code{SECONDARY} and @code{CLIPBOARD}; these are symbols with upper-case
-names, in accord with X Window System conventions.  If @var{type} is
-@code{nil}, that stands for @code{PRIMARY}.
+This function sets an X selection.  It takes two arguments: a
+selection type @var{type}, and the value to assign to it, @var{data}.
+
+@var{type} should be a symbol; it is usually one of @code{PRIMARY},
+@code{SECONDARY} or @code{CLIPBOARD}.  These are symbols with
+upper-case names, in accord with X Window System conventions.  If
+@var{type} is @code{nil}, that stands for @code{PRIMARY}.
+
+If @var{data} is @code{nil}, it means to clear out the selection.
+Otherwise, @var{data} may be a string, a symbol, an integer (or a cons
+of two integers or list of two integers), an overlay, or a cons of two
+markers pointing to the same buffer.  An overlay or a pair of markers
+stands for text in the overlay or between the markers.  The argument
+@var{data} may also be a vector of valid non-vector selection values.
 
 This function returns @var{data}.
 @end deffn
@@ -1999,14 +1967,6 @@ and @code{x-set-selection} on MS-Windows support the text data type
 only; if the clipboard holds other types of data, Emacs treats the
 clipboard as empty.
 
-@defopt x-select-enable-clipboard
-If this is non-@code{nil}, the Emacs yank functions consult the
-clipboard before the primary selection, and the kill functions store in
-the clipboard as well as the primary selection.  Otherwise they do not
-access the clipboard at all.  The default is @code{nil} on most systems,
-but @code{t} on MS-Windows.
-@end defopt
-
 @node Drag and Drop
 @section Drag and Drop
 
@@ -2426,10 +2386,13 @@ For a tty display, it is log to base two of the number of colors supported.
 @end defun
 
 @defun display-visual-class &optional display
-This function returns the visual class for the screen.  The value is one
-of the symbols @code{static-gray}, @code{gray-scale},
-@code{static-color}, @code{pseudo-color}, @code{true-color}, and
-@code{direct-color}.
+This function returns the visual class for the screen.  The value is
+one of the symbols @code{static-gray} (a limited, unchangeable number
+of grays), @code{gray-scale} (a full range of grays),
+@code{static-color} (a limited, unchangeable number of colors),
+@code{pseudo-color} (a limited number of colors), @code{true-color} (a
+full range of colors), and @code{direct-color} (a full range of
+colors).
 @end defun
 
 @defun display-color-cells &optional display
@@ -2468,7 +2431,3 @@ The functions @code{x-pixel-width} and @code{x-pixel-height} return the
 width and height of an X Window frame, measured in pixels.
 @end ignore
 
-
-@ignore
-   arch-tag: 94977df6-3dca-4730-b57b-c6329e9282ba
-@end ignore